Warning -1950679034 When Reading a Shared Variable

Updated Jun 22, 2018

Reported In

Software

  • LabVIEW Full
  • LabVIEW Real-Time Module
  • OPC Servers

Issue Details

When trying to read a shared variable, I receive Warning -1950679034: The shared variable has no value.

Solution

Warning -1950679034 is a warning that the shared variable you are trying to read has no known value. 

If your shared variable is hosted on a Real-Time system that is running headlessly, check that the IP address of the target within your LabVIEW project matches the IP address of the RT system. If the IP address is incorrect, LabVIEW may be looking for the variable in its previous location.

If you have just created or deployed the variable, it may not have been written to yet. If you have created an I/O Server, there could be a communication failure preventing the shared variable from receiving data.

You can prevent this warning by enabling the Initial Value option in the shared variable properties page. Once you set an initial value, you will have to redeploy the library.

Alternatively, you can initialize the shared variable by writing a value to the variable either in your code or using the Distributed System Manager.

If working with an OPC Server where LabVIEW is reading variables from the server and receiving this error, make sure you are running the variables in some sort of loop.  It is necessary to give the network communication time to respond otherwise LabVIEW will give this Warning and report 0 as the value.

 

Additional Information

Warning codes do not halt execution but they may be an indication of bad data.

WAS THIS ARTICLE HELPFUL?

Not Helpful