Shared variable no longer updates

All,
I have an RT Systems 2011 and have been using shared variables between the RT and Host. Working for months. Then I renamed a shared variable and it no longer updates. When I try to look at the variable in the NI Distributed System Manager, it reports that it does not exist.
I changed the name back to what it was, it is seen by the System Manager but the current value is not displayed.
I did a remote debug into the RT code and the variable is being updated.
Any ideas\comments\etc would be appreciated?
Thanks

What hardware are you using as your real-time target? When you mentioned that you are using "RT Systems 2011", are you using LabVIEW 2011 and the Real-Time Module?
After you updated the shared variable, did you re-deploy it? I highly recommend reading through the “Deployment and Hosting” section of the DeveloperZone Tutorial linked below:
http://www.ni.com/white-paper/4679/en/#toc3
Regards,
Cameron F
Applications Engineer
National Instruments

Similar Messages

  • Shared Variable does not update when typedef is changed

    I have a shared variable of type custom control (typedef made up of a cluster). When I chang the typedef, e.g. the name or type of one of the fields in the cluster, and then save it, the shared variable does not update to reflect this change. That is, if I place the shared variable on my block diagram and do a "UNBUNDLE BY NAME" on the output, I see the old fields. I have to go back to the properties of the shared variable, change its data type, apply it, then go back and change it back to my custom control.
    Anyone else seen this behaviour? Anyone know how to get the shared variable to update without going through this procedure?
    Bill
    “A child of five could understand this. Send someone to fetch a child of five.”
    ― Groucho Marx

    I guess I should have included this information:
    LabVIEW 8.2.1 using Project Explorer.
    “A child of five could understand this. Send someone to fetch a child of five.”
    ― Groucho Marx

  • Shared Variables Won't Update

    Hello All -
    I'm having a problem interacting with my OPC server, and I'm hoping some suggestions will help me out here.
    I have an OPC server running on a XP SP2 machine, and it is interacting properly with my equipment (a bioreactor). When I use the NI OPC Quick Client, I can browse to the tags I want to see, and those tags update as expected. I can put my hands on the temperature sensor and watch the output change on the QuickClient screen. The only odd thing that I have to do with the Quick Client is that I have to manually set the data type (Float, Single, Double, etc.) and request an asynchronous read before it will begin updating. 
    When I try to connect via Shared Variables, it's a different story. I create the shared variable using the instructions at the bottom of this page:
    http://digital.ni.com/public.nsf/allkb/EA15F53DB6FECCA5862567240064DF09
    Next, I drag the variable to my front panel and start the VI. A summary of the behavior is this:
    * As long as the variable type is read/write, the LED is green on the VI.
    * I can write values to the OPC server
    * The VI never shows data arriving from the OPC server, I can only write.
    * No error messages are received.
    This behavior doesn't change for any permutation of "read/write" status in the variable definition, switching the node from read to write, changing the control from read to write, etc.
    I'm using Labview Developer Suite 8.6 with the DCS option. Fresh install of Windows and LV. No other software on the machine.
    Any ideas how to troubleshoot this? I'm running out of ideas...
    One other update, which may or may not be related: Whenever I try to connect using a DataSocket method via one of the example VIs such as "Monitor Multiple OPC items.vi", LabView crashes immediately. 
    Message Edited by wdmarner on 10-06-2008 10:56 AM
    Message Edited by wdmarner on 10-06-2008 10:57 AM

    Hi Wdmarner,
    When you configure OPC CLient I/O Server, what server are you using? The NIOPCServers or the Varable Engine or something else? With respect to datasockets, does the system hang or does it crash and totally exit labview?
    Regards,
    National Instruments
    RIO Embedded Hardware PSE
    CompactRIO Developers Guide

  • Shared variables update in QuickClient but not in Variable Manager

    Greetings,
    I am using LV 8.6 Developer with the DSC module installed. Also, I'm using WinXP Service Pack 3.
    I am trying to create a VI that will interact with an OPC server connected to some equipment.
    I've created shared variables to read the value of tags in my OPC server exactly according to the instructions on this page:
    http://zone.ni.com/devzone/cda/tut/p/id/6346
    For some reason though, the value of the shared value never updates to reflect the value on the server.
    When I follow the tag on the OPC QuickClient, it updates just fine, but somehow the value of the shared variable isn't updating. 
    I also tried retreiving this data using the DataSocket method in the "Multiple OPC Items Monitor.vi" example, but running that VI crashes LabView every time. 
    Also, I can create a shared variable and write to tags using a VI, but I can't read them.  
    It seems like I'm *this* close to getting the shared variables to work. Any suggestions?

    Hi Rob,
    To answer your questions...
    DataSocket: NI doesn't give me the option to investigate the error when I restart the program. I did a search for .cpp files, but none turned up. I did collect the error report that Windows generates, and I attached it. I'm not sure if that would be something useful or not.
    SharedVariables: I went to use the Distributed System Manager to take a look at the variables. For both my shared variable as well as the tags on the I/O data source, the data type is listed as "advanced" and the quality is "unknown bad."  I collected the logs from the I/O server and attached them. Oddly, when I look through there, I see some Quality=BAD  and some VT_ILLEGAL flags. The deadband is set to zero, and the update rate is 1,000ms.
    Also, I've configured the DCOM and Local Security Policy settings as described in numerous support articles, and my Windows Firewall is turned off. The OPC server and LabView reside on the same computer. 
    I suppose the confusing thing is why the QuickClient works fine, but the SVE doesn't.  
    I've tried this on three different computers with the same results in all cases. Currently, LV and the OPC server is the only software installed on any machine. The only other OPC server I have access to is the LV server, and it seems to work okay. 
    Thanks,
    Wes
    Attachments:
    a793_appcompat.txt ‏133 KB
    screen.JPG ‏105 KB
    OPC I-O Server Diagnostic Information.txt ‏69 KB

  • Shared variable does not work in executable

    In editor mode, the shared variables update fine.  When I build the executable, the shared variables no longer work.
    See attachment.
    Attachments:
    TestCitadel.vi ‏30 KB

    I found this note in the LV2010 help, I wonder if this could be related to your problem...
    Note  You can use scaling only for network-published
    shared variables, I/O variables, or I/O aliases. When the shared
    variable you want to scale is a network-published shared variable, it
    must have a data source. Configure a network-published shared variable
    to have a data source by placing a checkmark in the Enable Aliasing checkbox on the Variable page of the Shared Variable Properties dialog box.

  • How to read shared variables inside event structure ?

    Hi,
    I have a problem that my shared variables do not update inside event structure. The program(s) I am trying to get working is seen in the attached screenshot. It works as follows:
    0. I start the vi that is unsquared.
    1. I write a string to a shared variable using vi in red square. I make sure that its updated using write-wait-read.
    2. I run the other vi (blue square), this changes the boolean shared variable.
    The unsquared vi has been running the whole time, it has event structure bind to boolean shared variable change (the one in blue vi). After I have runned the blue vi, the unsquared vi should change the indicator values to match the ones in red vi. However I have to start the blue vi multiple times to get it to change, sometimes even 6 times.
    Also, when I change the value in red vi to a third value and start blue vi multiple times, the unsquared vi shows all the variables. I.e. I put "cat" to red then start red, put "mouse" to red then start red,... and then start clicking blue... Unsqured shows cat, mouse,..., dog (dog is the default).
    How can I force the shared variable to update inside event sructure. I want the current value of the variable, not some historical values.
    Attachments:
    Screenshot-5.png ‏108 KB

    Found the buffering... disabling it solved the problem... thanks.
    FYI, there is another solution that I just found out... attached. Adding timeout to the event structure and the variable read outside the event structure... This makes the shared variable strings (one that is read outside and the otherone that is read inside) different.
    Could someone explain why the variables are in different state even if they are used in the same place and looped with 10ms intervals?
    Juha
    Attachments:
    Screenshot-6.png ‏110 KB

  • CFP-1808 shared variables timestamp

    Hi,
    I need to control and acquire data from a cFP Ethernet module (cFP-1808) to a PXI RT system. I have tested two ways of doing it:
    1. Bind shared variables to the Fieldpoint channels. Works great except for the fact that I have to record the timestamp of every single channel in all Fieldpoint modules. I have to avoid this. The reason I have to record all timestamps is that sometimes two consecutive reads are the same in value and in timestamp; so even if I make sure I get a value every 100ms in my real time application I cannot trust  that  the shared variable engine will give a real new value every 100ms, because sometimes one read is the same as the previous one. My
    understanding of the technology is that the cFP network interface checks for an
    updated value of the channels of each module at the Advise Rate. If there’s a
    new value the cFP transmits it to the Shared Variable Engine running in the PXI
    controller, but if the value has not changed it doesn’t transmit anything, so
    more efficiency is achieved in the network communication. This would explain the
    timestamp behavior of the shared variables bound directly to Fieldpoint
    channels; since there is no new value the shared variable is not updated so the
    timestamp of two consecutive reads is the same.
    2.  Create a Modbus server and then create shared variables bound to the Modbus server channels. With this method any time my RT application asks for a new value the shared variable engine provides a real new value with an updated timestamp, and all timestamps in the same module are equivalent (in 1usec range).  Therefore, it looks like using the Modbus solution I  only have to record one timestamp per module.
    So option 2 probably fixes my problem, but I'd like to understand why. Both methods use the shared variable engine, shouldn't they behave the same way? There's one downside in option 2, which is having to deal with Modbus addresses and not having the ease of use of option 1 that just browses to find the Fieldpoint channel.
    Any comments?
    A final note, it'd be great to be able to use the Fieldpoint VIs in LV Real-Time! Can this be achieved?
    Raimon

    Hi Raimon,
    How are you binding to your shared variables?  This KB reviews three methods:
    http://digital.ni.com/public.nsf/allkb/FA610367EC62574186257118005089F2?OpenDocument
    I don't believe using FieldPoint VIs on a PXI RT target is possible because FieldPoint is not a driver that you are able to install on the PXI RT target.  We do have the cFP-2xxx line of RT controllers for FieldPoint, which can communicate directly to the FieldPoint modules, ensuring determinism.
    Trey B
    Applications Engineering
    National Instruments

  • Support for Shared Variables in Third Party XP embedded based TPC's?

    I have deployed an application in an XP embedded based Touch Panel (Third party). The application is working fine, but the shared variables hosted on an RT (sbRIO Board) are not getting updated in the application on TPC
    1. The TPC is part of the project as Windows XP Embedded Touch Panel
    2. NI TPC Service has been installed on the TPC and the application can be deployed remotely from the development PC through ethernet. (Hence network connections and communications are OK)
    3. By using Distributed Systems Manager in the development computer, I can see that the shared variables are getting updated on the network
    I believe that the problem can be solved if the following programs are installed on the TPC
    A. Support for shared variables for XPembedded
    B. Shared Variable engine
    I have tried installing support for shared variables from Program Files > National Instruments > Labview 8.6 > PDA > Utilities > Variables > x86 - but am getting an installation error "Unable to find application manager for Pocket PC applications".
    Shared variable engine has been installed from ve220 folder. The program is getting installed. But the Variable Engine is not started Control Panel > Administrative tools > Services in Xpe, the service is stopped and cannot be started. When I try to start the service, I am getting the following error on TPC
    "Could not start the National Instruments Variable Engine Service on the local computer.
    Error 1053. The service did not respond to the start or control request in a timely fashion."
    Please suggest solutions for the above or alternate locations for the following:
    1. Support for shared variables for XP embedded TPC's
    2. Shared Variable engine installer program.
    Thanks
    Krish
    Solved!
    Go to Solution.

    Problem solved!
    Update for interested folks working on XP Embedded TPC's
    Just to make sure that Shared Variables were indeed accessible to the TPC, I wanted to install Distributed Systems Manager 8.6 on the TPC. However since the TPC was having only 1 GB of DOM (Disk on Memory) and with all the software I had tried, there were only a few Megabytes left on the system. I had to add another DOM of 2 GB.
    All the products of the Installation went fine, with the exception of NI Logos (Version 5.0). NI Logos installation failed repeatedly.  I tried installing NI Logos separately, with the same results. Then I had this gut feeling that NI Logos had something to do with the issue.
    I then downloaded the new version of NI DSM 2009 SP1. Although this was supposed to get installed on any fresh system without Labview, the installation would not proceed beyond the setup stage. I tried installing NI Logos from the products folder on the new download separately and it worked like magic!
    Once the new Logos (Ver 5.5) got installed, the Shared Variable Engine started automatically and the Shared Variables were finally unleashed - free to rise and shine! Thank God Almighty!!
    On the lighter side, come to think of it - for running an application of around 400KB, we need XP embedded, NI Run Time, Logos, DSM ..........  (all around 900MB). Can we make it any simpler?!!  Inviting your comments .......
    Thanks
    Krish

  • Shared variables not updating in exe

    Hi,
    I've created a project with 2 vi's, they share data via Networked Shared Variables, one vi writes while the other reads.
    The data is passed between the 2 vi's whilst running in the Labview 2009 SP1 development environment, but when I create an exe, the screen values in the reader vi do not update at all.
    In the build specification I've tried both including the vi's which reference the shared variables and the
    option to list the shared variable libaries for deployment at run time, as methods to overcome the problem.
    Please, any clues why the exe should fail to allow shared variables to pass data ?
     thanks,
    Gary. 

    Hey Gary,
    I've just created a project to replicate the issue you are having and indeed when I built the application, the Shared Variables were no longer working. This is because I hadn't deployed the Shared Variables in code; which I think may be the problem that you're having at the moment. When create a Network Published Shared Variable library in LabVIEW, it auto-deploys itself for the development environment; but this is definitely not the case for when you build an executable. Instead, you must deploy the library yourself in code.
    In the attached zip folder, please follow the following instructions and hopefully you'll be able to fix your VI:
    Unzip the folder and extract the files.
    Open up the project.
    Look at the project layout. Notice the SharedVariableLibrary.lvlib and inspect the Shared_Double variable.
    Look at how the Reader.vi and the Writer.vi interact with the variable.
    Go into the Main.vi. See that I make an Open Application Reference VI and Invoke Node to manually deploy the library in code. You'll have to change the path to this library to match the directory structure of your own computer, so just make sure it navigates to the library in the extracted folder.
    Check out the Build Specifications. I've done nothing here except ensure I only include the Main VI. Finally build the VI and run the executable. 
    You should see that this will give you a working Shared Variable setup. The Machine Name input for the Open Application Reference is blank because you only want to communicate with the localhost i.e. Your computer. Therefore by explicitly deploying all libraries you require, your VIs should be able to communicate effectively.
    Does this solve your problem?
    Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)
    Attachments:
    GlobalVariableProject Folder LabVIEW 9_0SP1.zip ‏26 KB

  • Why string type shared variable takes more time to update in the client

    I am using shared variables to share the data across a master and the client PCs connected in a network. (Network published & no buffering)
     I have created an integer type shared variable(I32) and a string type shared variable (data size is 60 bytes) in the Master and subscribing to the same in the client PCs. In the master PC, I am modifying the data in this order - update the data in the string type variable and then update the data in the integer vaiable.
    But in the client PCs, due to the size difference in the variables, I am receiving the data of the integer first and after that about 3-4 sec later only I am receiving the string data. Can any optimization be done to reduce this latency period? Instead of the string data type any better data type will reduce this delay?
    Please suggst. Advnced thanks.

    Latency has a lot to do with your network.  3-4 seconds is a long time though.  This could also be due to the larget data size of your string.  The integer data size is definitaly not 60 bytes.  If you're looking for better performance, I would highly recommend looking into Datasocket communication or TCP/IP communication.  (There are shipping example for both.)
    When it comes to performance of throughput and efficiency, network-published variables are lower on the totem pole.
    I hope this helps,
    Kevin S.
    Applications Engineer
    National Instruments

  • How to update shared variables

    Hi, I have a VI that opens an text file and reads some information from that page. That information should be copied to shared variables. The problem is that I have 160 shared variables and I don't want to drag them all from project explorer to Block diagram and wire them all. Is there any other way to update that data to shared variables? I can easily open and read data with couple of while loops. I'd really be thankful if someone could help me.
    Mika

    I do need all 160 variables. I have to make a sequencer.With cFP modules and laptop is ment to specify sequences needed for testing some equipment. I have 16 digital inputs and 16 digital outputs and 8 analog inputs. Those shared variables specify which channel is ON and for how long, and the delay of the channel. There is also variable that tells if channel is in use or not. One variable is channel factor, which tells how many cycles there will be in that cycle time. So if one channel needs only 5 variables, those 40 channels need 160-200 variables.  Shared variables are specified in the user interface and then cFP module can easily read them. In user interface there is also the possibility to open a file that have variables specified earlier. In that point I need to open a text file and update the data to shared variables.
    Mika

  • Slow update of Shared Variables on FP-2015

    My application consists of a VI running on an FP-2015 which collects and transmits data from/to various I/O modules (DI-301, aI-111,Do-401 etc.) and passes this data to a Host PC using Shared Variables.  It runs embedded on the FP-2015 so that it can react to certain conditions I/O conditions and implement the appropriate safety measures independently of the host pc.  When I try to change some of the values of the shared variables from the host PC, it seems to take a long time for them to update on the Fieldpoint controller.  For instance, if I try to change the value of a Digital Output on the DO-401 from the Host machine, it can take anywhere from 1-3 seconds before the I/O point actually toggles.  I am using an Array of Booleans as the shared variable type.  I am pretty sure the code is running at the correct speed at that this delay is caused by the shared variables because if I remove the shared variable and toggle the digital outs from high to low and low to high, they switch at the appropriate rates.  Has anyone had any problems with using shared variable on a FP-2015?  (The shared variables are hosted on the PC, not the 2015)
    Also, I have seen some postings which say the FP-20xx do not have enough memory to run the shared variable server.  Should I be OK if the server is running the Host pc?  The link below says the shared variable engine will not work properly on the FP-2015 because it does not have enough memory but the second link below says 32mb are required (although 64 are recommended), which the FP-2015 has.  Any confirmations whether the shared variables will work properly on the FP-2015.  In all, I presently have 6 shared variable, each on being an array with a length of 20 elements.
     http://digital.ni.com/public.nsf/allkb/6e37ac5435e44f9f862570d2005fef25
    http://zone.ni.com/devzone/cda/tut/p/id/4679
    Thanks
    Damien

    Thanks Tommy, I appreciate the advice.  However, I think I will be abandoning the network-published shared variables for now.  Before I left the office yesterday, I found the "communication wizard" for the Real-Time module.  It allowed me to select my top-level VI and it automatically set up a communication routine to transmit all the controls and indicators from the RT target to the VI running on my host PC.  It allowed me to select from multiple communication protocols (I selected TCP) and everything is working well now.  I would have liked to use shared variables because they seem to be so simple to use but I do not want to waste time trying to hunt down a problem I may never fix.  For now, out with the shared variables, in with TCP.
    PS.  I didn't change any of my code, (I was using timed loops in case you were wondering), and by changing over to TCP communication all my delay problems were solved.  This reinforces my suspicion that the delays were caused by the shared variables.
    Damien 

  • Modbus I/O Server Shared Variable Not Updating Immediately After Flush

    Hi everyone,
    Weird issue here... If I create a Modbus I/O server in a LabVIEW project, bind a shared variable to a holding register, write to the shared variable, flush, and read back, the value returned in an immediate readback is NOT the value I previously wrote. I've attached an example snippet.
    In this example, PLC Command Complete is TRUE coming in. I write a FALSE to it. I flush the shared variable buffer. I read back PLC Command Complete. When I do this, PLC Command Complete will return TRUE (???), and after 100ms or so, return FALSE. How is this possible??
    Some notes:
    The shared variable is NOT network buffered.
    The slave is NOT altering the value of this variable; only this snippet of code is.
    Altering the refresh rate of the Modbus server does not affect the outcome.
    If anyone has any idea as to what's going on, I would greatly appreciate it!

    Couple of points.
    First, your screenshot shows network shared variables, not single process!
    Next, network shared variables take time to update (much longer than NI tell you!) If you knock up a little timing noddy to set a variable and then loop reading that variable until the transition comes through you get results like this (runnng from the programming environment, I've not tried with a compiled exe):
    Network shared variable, no flush - approx 20ms (NI say is should be 10)
    Network shared variable, flush buffer - very fast (faster than the ms clock resolution) but still took between 14 and 20 iterations of my loop before the change percolated through (certainly not what you would expect)
    Single Process variable - instant (even without the flush)
    This has caused me so many problems in the past (my own race conditions are bad enough without NI throwing in extra ones with this unexpected behaviour) that I try to avoid network shared variables now.
    Change yours to single process and you should be fine (or do they need to be NS?)

  • How fast can shared variable update?

    Hi,
         According to online documents shared variable engine update at 10ms or forced by flushing command. But  I tested the following two program and can not get the shared variable updated:
          Thanks fo rhelp!
          Tom
    Attachments:
    test_program1.png ‏20 KB
    test_program2.png ‏20 KB

    Hi,
         I don' use NSV to transfer large amount of data between RT and host. The actual application is as follows:
          I also would like to test how fast the NSV update rate and how the flush vi works. I test two programs and did not match the number in the documents.
        Tom

  • Bound control doesn't always update shared variable (LV 8.2 + DSC)

    It seems that it is possible for a bound shared variable to NOT always get updated with the latest UI control value that it is bound to. 
    If you run the vi in the attached project, and (fairly quickly) toggle the 'Keyswitch Control' between the 'Off' and 'Start' positions, you should be able to reproduce the effect shown in the attached pdf.  Sometimes the bound shared variable (Keyswitch_Control) gets stuck in the 'On' position when the control reads 'Off' or 'Start.'  It does not catch up after a little while either; it seems truly "stuck."
    Unless I am missing something here, this looks like a bug. 
    I haven't played around with any other control types yet to test further.  I also don't know if this is limited to 'control -> SV' binding or if it also affects 'SV -> indicator' bindings (I hope not!).
    Any ideas!?!?!?
    Attachments:
    DataBindTest.zip ‏21 KB
    DataBindTest.pdf ‏40 KB

    Hello WHAVEman,
    I was able to replicate what you were observing. It seems that there is a bug in the front panel binding code. I would be filing a Corrective Action Report to let R&D know about this. Thanks for pointing it out.
    Just on the side note, if you are looking to build an application based on the application architecture as in your posted code, then I would recommend that you refer to the attached VI for a much more efficient way of doing this.
    Regards,
    Chetan K
    Application Engineering
    National Instruments
    Attachments:
    Connect Shared Varibles.vi ‏29 KB
    DataBind UI_modified.vi ‏12 KB

Maybe you are looking for

  • Problem with HRFORM for country grouping 40.

    Hello Everybody, I have created HR Form ZSAP_PAYSLIP_IN for India (Country Grouping = 40 ) copied from standard HR form SAP_PAYSLIP (for Country Grouping 99). The DDIC structure /1PYXXFO/ZSAP_PAYSLIP_IN and the smartform ZPYXXFO_ZSAP_PAYSLIP_IN are g

  • Inconsistant currency Information

    FI/CO Interface: Inconsistant currency Information

  • Centrer des élements sous Flash CS5 / Windows 7

    Bonjour à tous, Je suis nouvelle dans le flash ! Je me suis lancé dans le Flash pour faire un site Internet, seulement j'ai quelques problèmes pour centrer certains éléments, je m'explique : Je pars dans une configuration plutôt classique de site, c'

  • How to join two queries

    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod _1st query_ select (CASE WHEN SUBSTR(R1.RA_NO,1,3)= 'NRA' THEN 'Damansara Uptown One Sdn. Bhd.' WHEN SUBSTR(R1.RA_NO,1,3)= 'ORA' THEN 'Damansara Uptown Two Sdn. Bhd.' WHEN SUBSTR(R1.RA_

  • How to find out Password Verify script for a profile

    Hi, DB_VERSION : 10.2.0.4 OS_VERSION:Windows 2003 There is a profile MY_PROFILE created for which Password Verify Fucntion is created as " VERIFY_FUCTION" How can i find out contents of the script while executing VERIFY_FUCTION ?