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.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:
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
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:
General tips for handling shared variable errors:
- 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.
- 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.