05-19-2009 07:18 PM
In an initialization VI, a shared variable is populated with information from a config file. There is no problem here. The variable is written to. However, when I read from the shared variable in a second vi, the variable only appears to have content the second time the vi is open and ran. First time the vi is open an ran, it errors, saying the shared variable is empty. I tried saving the shared variable library, click deploy and even auto deploy on the library and then saving the project, but nothing happens. Any experiences, tips, ideas or handfulls of money that may help?
05-19-2009 07:53 PM
You have not specified whether you are creating a single-process shared variable or a network published. In both cases, LabVIEW creates the 'client-side' buffer the first time a Shared Variable node attempts to read from the shared variable. This behavior results in a value not being read the first time or a slighlty longer time on the initial execution. Try to read the variable at least once outside the loop to 'warm up' and then read inside the loop. Have a look at the following article:
Using the LabVIEW Shared Variable
Let me know if that helps or if you have additional questions.