Showing results for 
Search instead for 
Did you mean: 

Shared Variables Time Out When Accessed Programmatically from NI cRIO 9033 (Error Code: -1950678943)

Finally found the trick, I mean "a" trick, not sure if it will work for others but it solved my problem:

To programatically open a connection to a shared variable hosted on a cRIO from that same cRIO, try "Open and Verify Variable Connection" from the PSP Variable Palette, with a timeout of -1 . The 1st SV will take between 10 to 30 sec and the next ones will be connected normally in a matter of ms.


If I use the normal "Open Variable Connection", it keeps on timing out after 5 sec and never connects, no matter how long I keep trying.


What made me take so long to figure it out:
After restarting the cRIO and running the vi, the connection to the SV never happens. If I stop the vi and run it again, it connects directly.

By the same token if I restarted my cRIO with a start-up application and then connect to the rtexe through operate->debug application, I could see that the connection did not occur. But if I stopped the rtexe and started it again, it would again connect directly.. and I was like wwhhhhyyyyyyy?? Smiley Mad

Message 11 of 14

Can't thank you enough. I have been pulling my hair out for four days. Most of my code was written with just the "open connection" vi and everything was working fine for months until just four days ago. It is almost inexplicable. (Do NI/LabVIEW updates break things? I keep using the update service now and then). 


Atleast for now, I can use your "trick" to get things working. Thank you.

0 Kudos
Message 12 of 14

I had the exact same issue recently. In my case the fix in this thread did not work and the issue was eventually resolved by using the hostname of the cRIO in the variable address. Using "localhost" or the IP of the cRIO both failed, but using the hostname (without the .local extension) worked. It may be obtained programmatically using:





0 Kudos
Message 13 of 14

Thank you Woss for the trick.

I was going crazy with my PXI system not working after a hardware change that made me upgrade to a LabVIEW 2023 Q1 NI Linux image from a 2020 i was using, and with this trick i can make it work. I can't explain the reason, but it works, the first connection takes ages.

0 Kudos
Message 14 of 14