Common Errors When Using Shared Variables in LabVIEW

Updated May 20, 2024

Reported In

Software

  • LabVIEW

Issue Details

When using shared variables in LabVIEW I have observed multiple errors and warnings:
  • What can I do to fix these errors and warnings?

Solution

LabVIEW shared variables are classified into two types:

  • Single-process shared variables: these are similar to LabVIEW global variables and generally do not return errors.
  • Network-published shared variables: these are more complex due to the networking involved and what source they may be bound to and thus return more errors.

This document focuses on the errors returned by network-published shared variables.

Most Common Shared Variable Errors:
Error/WarningDescription and Recommendations
-1950679034 (0x8BBB0006)
(Warning)
General Description:
LabVIEW: The shared variable has no value.

Other Representations:
Quality: IAQ_NO_KNOWN_VALUE (Quality bit 7)

Typical Sources: 
LabVIEW: ni_tagger_lv_Read
Shared Variable Monitor: variable quality

Recommendations: 
This warning will occur if the shared variable is bound to a source, but the variable has not received a value from the source. This is only a problem if the variable never receives an update from the source, even if you are sure the source is generating updated values. In most cases, you can ignore this warning.

Related Links:
What Happens When my Shared Variable Engine Goes Down Unexpectedly?
-1950679035 (0x8BBB0005)General Description: 
LabVIEW: Unable to locate variable in the Shared Variable Engine. Deployment of this variable may have failed.

Other Representations:
Quality: IAQ_NONEXISTANT (Quality bit 6)

Typical Sources:
LabVIEW: ni_tagger_lv_Read
Shared Variable Monitor: variable quality

Recommendations: 
This error indicates that the read or write could not be completed because the variable could not be found in the Shared Variable Engine. This error most often occurs if the library containing the variable was just deployed and the read or write operation took place before the variable became available in the system. Thus, when your VI first starts up you can ignore this error.

If this error is returned during normal VI operation it could mean one of the following:
  1. The shared variable was undeployed
  2. The shared variable engine is no longer running
  3. A firewall is blocking all communication with the Shared Variable engine
Related Links:
Error -1950679035 when Using Shared Variables

Error -1950679035 when Changing Shared Variable Properties Programmatically 

Configuring LabVIEW, LabVIEW DSC, and Lookout to Work with the Windows Firewall
-1950679036 (0x8BBB0004)General Description: 
LabVIEW: General communications failure.

Other Representations:
Quality: IAQ_NETWORK_FAILURE (Quality bit 5)

Typical Sources: 
LabVIEW: ni_tagger_lv_Read
Shared Variable Monitor: variable quality

Recommendations: 
This error is equivalent to Error -1950679038
-1950679037 (0x8BBB0003)General Description: 
LabVIEW: Server failure.

Other Representations:
Quality: IAQ_SERVER_FAILURE (Quality bit 4)

Typical Sources: 
LabVIEW: ni_tagger_lv_Read
Shared Variable Monitor: variable quality

Recommendations: 
This error indicates that the IO server the variable is bound to encountered an error during initialization. For instance, if the variable is bound to an OPC IO server and you receive this error, the OPC IO server most likely could not connect to the OPC server. If you are using the Modbus IO server, then there is most likely a configuration problem with the Modbus IO server.

To further diagnose the problem follow these steps:
  1. Undeploy the library containing the IO server and variable you are attempting to read from.
  2. Open the Published Variable Monitor (Tools»DSC Module»Monitor Variables), the Variable Manager utility, or Distributed System Manager.
  3. Redeploy the library. You should see an error indicated in the Alarms and Events summary of these tools.This alarm/event entry will contain more specific information about the problem.
Related Links:
LabVIEW DSC Module Can’t Connect to OPC Server/No Values Returned
-1950679038 (0x8BBB0002)General Description: 
LabVIEW: General device error response.

Other Representations:
Quality: IAQ_DEVICE_FAILURE (Quality bit 3)

Typical Sources: 
LabVIEW: ni_tagger_lv_Read
Shared Variable Monitor: variable quality

Recommendations: 
This error indicates that the IO server (Modbus, OPC, etc.) to which the shared variable is bound encountered an error. Use the Published Variable Monitor (Tools»DSC Module»Monitor Variables) or Distributed System Manager to diagnose the issue. Check your hardware configuration and make sure all cables are connected.
-1967362038 (0x8ABC700A)General Description: 
LabVIEW: Not Found
IAK_SHARED: Not Found

Other Representations:
Variable Engine Class Not Found

Typical Sources: 
LabVIEW Deploy Dialog: Deployment of shared variables failed

Recommendations: 
This error could occur if you launched LabVIEW and tried to deploy Shared Variables before rebooting after installing LabVIEW. In this case, rebooting the system should resolve the issue.
In other cases, this error means that the Shared Variable Engine configuration can't be found or can't be loaded, and is likely related to a problem with MAX.

Additional Information

How to interpret shared variable errors:
When you use shared variable reference nodes on a block diagram, the shared variable may return an error. In almost all cases the error cluster will contain the error source:

ni_tagger_lv_Read

or

ni_tagger_lv_Write

This does not necessarily mean the error occurred in these nodes. Any error noted below that has an associated quality (see notes under Other Representations) was actually returned by the Shared Variable Engine and passed through the error returned by ni_tagger_lv_Read or ni_tagger_lv_Write.

If you use front panel binding to connect to shared variables you will see a transparent, green, or red triangle next to the front panel control. A transparent triangle indicates that the front panel control is not connected to the variable or the VI is idle. A green triangle indicates good connection status to the source. A red triangle indicates an error. Hover the mouse over the triangle and you should see a more detailed description of the error.

How to interpret shared variable deployment errors:
You may encounter an error while trying to deploy a library. You can categorize most deployment errors into two classes:
  • First, you may receive an error indicating a configuration problem with a shared variable in the library. In this case, scroll up in the Deployment Status text field in the Deploy window until you can find the first error.Concentrate your efforts on resolving the first type of error.
  • The second class of deployment errors are higher-level errors (such as Error -1967362038). In this case, use the Distributed Systems Manager or Variable Manager utility to verify that the Shared Variable Engine is running. Then, try restarting the Shared Variable Engine and redeploy the library.
General tips for handling shared variable errors:
  • Before running a VI that uses shared variables, open the Variable Manager utility and verify that your shared variables are working properly
  • Expect that network-published shared variables will return errors at some point during execution of your code. Your code should handle all shared variable errors.
  • If automatic error handling is enabled and any shared variable returns an error, your VI will stop and you will be prompted to handle the error. If you don't need to handle shared variable errors, you can disable automatic error handling for the VI by unchecking this option in the Execution category of the VI Properties dialog box.