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.