Error -1950678943 Occurs in Rare Irregular Intervals

Updated Sep 12, 2024

Reported In

Hardware

  • cRIO-9039

Issue Details

  • I receive an error -1950678943 sporadically while trying to access Network Shared Variables.
  • Network shared variables (NSVs) are deployed on the PC. NSVs are written and read programmatically from the same PC they are deployed. Time to time error -19560678943 occurs.  
  • I have shared variables hosted on the cRIO. If I access to the shared variables using a shared variable node it works properly. However, if I try a programmatic access to the shared variables I get the following error:
Error -1950678943: Timed out while attempting to open a connection to the variable

Solution

Error -1950678943: Timed out while attempting to open a connection to the variable may occur if you’re trying programmatic access to the shared variables. To programmatically open a connection to a shared variable hosted on a target from the same target, use Open and Verify Variable Connection from the PSP Variable Palette, with a timeout of -1.
If the error occurs sporadically, the reason may be network packet loss. Although TCP communication is very reliable, it is not perfect as some packet loss is expected on Local Area Networks.
The amount of packet loss that is acceptable in the application largely depends on the type of function you are implementing over the network. A 2% packet loss or less is typically acceptable in a distributed application, however, anything more than 2% might be a sign of a problem.  If the project requires 0% packet loss, you will need to reduce the number of nodes (switches, routers, PCs) a packet needs to jump between the sender and the receiver. One hardware solution that has more reliable packet transmission is a fiber channel network (a possible solution if the application requires 0% packet loss). The best options to find what causing the packet losses are:
  • Isolate LabVIEW shared variables only.
  • Find if other applications have the same amount of packet loss.
  • Use packet analyzers to monitor incoming/outcoming TCP packets.
  • Isolate the application from any other network traffic and see if there is still packet losses.
The above steps will give a better idea if LabVIEW application, Shared Variables, Network connections, or network devices are causing the error. After that, you can find a way to re-transmission the packets.

Additional Information

Using Network-Published shared variables to communicate information on the same PC is not the use-case for them, otherwise, you start seeing weird behavior on the Shared Variable Engine such as the intermittent Error -1950678943.
When there is a need to communicate within the same application (VIs) or share data between parallel processes, the Single-Process shared variable is more suitable since you can enable it as an RT-FIFO so that you don't lose data. By using the Single Process shared variable, you remove the "network" aspect and have more reliable communication between VIs.