Showing results for 
Search instead for 
Did you mean: 

Network variable reads but doesn't write




I have a project with two targets, one target is a RT Cdaq chassis and the other is a PC. I also have two network variables, let's call them "network variable 1" and "network variable 2".


"Network variable" 1 is in a library under the RT chassis, written to in a VI on the RT chassis, and read in a VI on the PC, this network variable works perfectly. 


If I probe "network variable 2", writing values works w/o issue but it will only read its default value, which is false. I have noticed the following...


If "network variable 2" is in a library under the RT chassis I get no error, but if "network variable 2" is in a library under the PC i get error# -1950679027. Either way the probe on the read variable does not update but the write probe does update. What could be causing this???

0 Kudos
Message 1 of 5

There are a few things I'd check. First, have you taken a look at this? This is a good starting point for troubleshooting network shared variables. The fact that it works on a RT chassis and not on the PC makes it sound like it hasn't been deployed on the PC.


Also, a potentially good tool to use as well would be the NI Distributed Systems Manager under the Tools menu in LabVIEW. That would tell you more about the status of a variable than the probe would.

William R.
0 Kudos
Message 2 of 5



Thanks for the info! I ran thru all the steps and didn't find an issue, so I ran another test to determine if the network variable is working.


Originaly this is how the VI worked

step 1

On the RT cdaq, in one of the loops the "time has elapsed" node value (i'll call this "Data 1") of an "elapsed time express VI" is written to a network variable (network variable 1) which is then read by a VI running on the PC. This network variable has always worked fine.

step 2

Once the VI on the PC finishes performing a task, the same "time has elapsed" value mentioned above ("Data 1") is written to another network variable (network variable 2, this is the one I'm having an issue with). This network variable is read by another loop (this is not the same loop mentioned above)  on the RT cdaq and sets a case structure to a default value. This case structure never resets because (network variable 2) never updates.


Revised VI for Testing

I changed step 2 only, instead of writing the "time has elapsed" value ("Data 1") to network variable 2, I have now wired a boolean button control to network variable 2.


The case structure now resets but i have to do it manually instead of programatically.


Do you think that writing Data 1 to one network variable and then to another could cause an issue?



0 Kudos
Message 3 of 5

Hmmm... just out of curiousity, have you probed the value of "time has elapsed" where you are writing it to the other network variable? If you can update it from the front panel but not from your task, it sounds like the value might not ever get written to the variable, which might happen if the value gets stuck on the border of a loop.


Also, it might be helpful to see snippets of the relevant code. The whole "a picture's worth a thousand words" thing.

William R.
0 Kudos
Message 4 of 5
  1. To add a shared variable to a project, right-click a target, a project library, or a folder within a project library in the Project Explorerwindow and select New»Variable from the shortcut menu to display the Shared Variable Properties dialog box. Select among the shared variable configuration options and click theOK button. In your case you should be having each for Two targets Pc and Rt.
  2. You can set a Shared Variable node as absolute or target-relative depending on how you want the node to connect to the variable. An absolute Shared Variable node connects to the shared variable on the target on which you created the variable. A target-relative Shared Variable node connects to the shared variable on the target on which you run the VI that contains the node.

    If you move a VI that contains a target-relative Shared Variable node to a new target, you also must move the shared variable to the new target. Use target-relative Shared Variable nodes when you expect to move VIs and variables to other targets.

    Shared Variable nodes are absolute by default. Right-click a node and select Change to Target Relative or Change to Absolute to change how the Shared Variable node connects to the shared variable. Can you explain how the shared variable node is connected to shared variable? 

  3. You must deploy shared variables to theShared Variable Engine (SVE) before you can read and write those shared variables over a network. Deploying a shared variable creates a memory space for the shared variable in the SVE. Undeploying a shared variable frees the memory resources allocated to that shared variable.To deploy a shared variable, right-click the project library in theProject Explorer window that contains the shared variable and select Deploy. Are you sure with deploying the variable?
  4. Does your read loop executing and checking the variable?  Or you are probing inside loop which is not executing?
  5. Try to simplify the project and post if still issues.

Ref: and

0 Kudos
Message 5 of 5