06-16-2009 03:45 PM
When a NSV library is deployed to a cRIO target where does this data get stored? I presume it must be somewhere in the flash since you can cycle power on the cRIO
and it will reinstate the NSV's that were deployed.
06-16-2009 04:29 PM
Well, the buffer that is created will be on the RAM (flash). And, the Shared Variable Engine has it's own buffer as well. So, if the cRIO target power cycles, the shared variable will subscribe back to the SVE buffer but will only read the values that it didn't read before from it..
On Windows, LabVIEW configures the SVE as a service and launches the SVE at system startup. On a real-time target, the SVE is an installable startup component that loads when the system boots. Have a look at the following article to get a thorough understanding:
Using the LabVIEW Shared Variable
If you have any questions, post back!
06-16-2009 05:03 PM
Thanks Adnan for your help.
I am also interested to know where the definition of the SV's are stored in the cRIO Flash. I had assumed that it would be some sort of XML data. Does the cRIO automatically read these 'definition' files upon powerup and reinstate the viability of the NSV's? So then, what is SV library deployment? Is it both a depositing of XML data and transactions with the SVE? I am interested to better understand how RT system replication works in regards to NSV libraries and also why it does not seem possible for a RT target to deploy its own libraries programmatically.
06-17-2009 01:14 PM
I wouldn't know where the definitions would be stored on the cRIO flash.
That depends on your application. If you setup the application as a startup application, then the application would run and the shared variable would know the shared variable engine that it needs to talk to setup the buffer for the shared variable. The shared library needs to be deployed on the shared variable engine to setup the buffer for each shared variable.
06-17-2009 05:59 PM
Information about the shared variables currently deployed to the Shared Variable Engine (SVE) is stored in binary files in the \ni-rt\system directory on the RT target. This information is used to instantiate shared variables when the RT target is rebooted. When shared variables are deployed to the SVE on the RT target from the Windows host these binary files are automatically updated.
SV hosting information (which SVs are hosted by the SVE) is not stored with the RT executable and you can not deploy SVs dynamically from the RT executable or any VI running in RT. The RT executable stores information about which SV nodes are used in the application and which SVE it should try to connect to, to read and write the SVs from the nodes in the application.