LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

No data received from some network shared variables

My project is a UI with approx. 20 indicators bound to corresponding network shared variables. These variables are written by a separate thread that is run dynamically by the UI thread upon a user event.

Of the twenty indicators, three booleans and three arrays are not receiving any data. I don't understand why only some indicators work and others don't, when all the variables are being written in the same dynamically called thread. It's always the same indicators that are the trouble (the arrays always show "empty", booleans always show "FALSE").

I have read all the knowledgebase articles. I AM deploying my library successfully using the Application method. Variable Manager shows all my variables as deployed. PSP indicators on all the indicators are "GREEN". "Watching" these variables in Variable Manager shows that each has a static timestamp year of 1903. Variables that ARE working show a current timestamp that is updated at the rate they are written.

Anyone have a clue?
0 Kudos
Message 1 of 4
(2,814 Views)
Just to be clear, ALL the shared variables work in development mode. The problem appears when I run the executable.
0 Kudos
Message 2 of 4
(2,813 Views)
Hi Bill,
 
I'm not sure why you are seeing this behavior in your shared variables. I would like to take a look at your code if possible. Also would you try reading from the variable and writting to the variable multiple times.
 
Is there any difference at all between the variables that work and the ones that don't? Could there be a race condition between writing and reading to those variables?
 
Hope to hear from you soon,
Sappster
0 Kudos
Message 3 of 4
(2,779 Views)
I believe I know now why I'm seeing this behavior.

Network shared variables need to be read at least once in order to start subscribing to SVE (at least to work in a built application (.exe)). The network shared variables I was having trouble with were being read and manipulated as in the screenshot below:



Even though I initialized these 2D arrays, when read the FIRST time in the above code, I get back an empty array. Of course, executing the REPLACE ARRAY SUBSET in this case will give you an EMPTY array which is then written back to the network shared variable. Hence I got into a vicious circle and the network shared variable remains "empty" as well as the indicator to which it's bound.

I now initialize and immediately READ the shared variables (as shown below) before ever getting to the code above. This first read returns empty arrays, but "kick starts" the variables so the second read returns the value to which they were initialized (999.0) in this case. The REPLACE ARRAY SUBSET now has a non-empty array to work with and all is well.




(By the way, I got the three boolean indicators to work by removing their data binding and then reconnecting them again.)


Message Edited by Bill@NGC on 06-07-2008 05:30 PM
Download All
0 Kudos
Message 4 of 4
(2,762 Views)