LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cannot read network published shared variables, lvlib on PC and VI on cRIO, error -1950679027

Solved!
Go to solution

I am unable to read a network published shared variable (NPSV) when the lvlib is deployed on my PC and the VI is on a cRIO. However, I am able to read the NPSV in the other 3 possible combinations of lvlib and VI locations work. 

 

LVLIB LOCATION || VI LOCATION || WORKS?

PC || PC || YES

PC || CRIO || NO

CRIO || CRIO || YES

CRIO || PC || YES

 

i've spent around 6 hours today reading forums and white papers but cannot figure this out. i've spent the remainder of this week researching watchdog techniques. The most relevant NPSV articles i could find are:

  • Using the LabVIEW Shared Variable
  • Configuring Software and Hardware Firewalls to Support National Instruments Products
  • Changing the Default Ports for TCP-Based NI-PSP (Windows)
  • Troubleshooting Network-Published Shared Variables
  • Shared Variable Quality Codes

UNSOLVED RELATED FORUMS

http://forums.ni.com/t5/LabVIEW/Network-variable-reads-but-doesn-t-write/m-p/3354148

http://forums.ni.com/t5/LabVIEW/Problems-with-network-published-variables-hosted-on-the-pc/m-p/24173...

http://forums.ni.com/t5/LabVIEW/OPC-shared-variable-cannot-be-read-on-RT-target/m-p/1069210

 

my end goal is a simplified watchdog technique i've seen work where a NPSV timeout results in a safe state of a VI running on the cRIO. The two labview watchdog examples (Find Labview examples) and others i've found/studied/recreated all focus on detecting a late VI loop execution as opposed to a lost internet connection.  These VIs just freeze when the connection is lost. Other lost internet connections VIs i've found don't work. 

 

 

0 Kudos
Message 1 of 27
(7,397 Views)

Hi Ryan,

 

Please ensure that the Network Variable Engine and Variable Client Support for LabVIEW RT software is installed on your cRIO. Please see this KnowledgeBase article for more details.

 

I was able to run the code you posted without any trouble when LVLIB was on the PC and the VI was running on the cRIO. There does not seem to be any issue with the code.

Aaron Douglass
Applications Engineer
National Instruments
0 Kudos
Message 2 of 27
(7,321 Views)

Hi Aaron. Thanks for the reply!

 

I confirmed the latest versions of the network variable engine and variable client support for LabVIEW RT are installed on my cRIO. i have attached screenshots of MAX that shows the software on my computer and the cRIO. i also looked at the add/remove software menu for the cRIO and confirmed all boxes are checked so all install items are installed.

 

Can you please compare with your setup to determine possible differences since your setup works? Maybe i should delete my previous versions of labview?

Download All
0 Kudos
Message 3 of 27
(7,319 Views)

please disregard the suggestion i had for me to delete previous versions of labview. I only have LabVIEW Run-Time for multiple years, not the developer suite for multiple years.

0 Kudos
Message 4 of 27
(7,317 Views)

I took a look at your software and it seems like you have all the necessary components installed. I'm wondering now if your firewall might be blocking certain communications with the cRIO. Do you have any firewalls enabled?

 

If so, please try disabling firewalls before running the project and see if that changes the behavior. 

Aaron Douglass
Applications Engineer
National Instruments
0 Kudos
Message 5 of 27
(7,303 Views)

Hmm. Looking back at your original post I see that you have already tried modifying your firewalls. I'm going to have to continue looking into this for other troubleshooting options.

Aaron Douglass
Applications Engineer
National Instruments
0 Kudos
Message 6 of 27
(7,302 Views)

Hi Aaron,

 

i tried firewalls off (router & windows, see attached image), a different router (issue exists with d-link DES-1005E or D-link DI-524), and an assigned gateway IP in MAX (the correct 192.168.0.1 instead of 0.0.0.0). These did not work.

 

error -1950679027 resulted when the firewall was turned off and the router was replaced. When i assigned a gateway IP, the bound NPSV would not connect as indicated by a non-green triangle next to the indicator. 

 

i did however notice the NPSV updates in the distributed system manager (see attached image DSM Behavior).

Download All
0 Kudos
Message 7 of 27
(7,295 Views)

i spent around 4 more hours troubleshooting this today with no success. my main error is now -1950679035 so i read all 10 posts regarding this error at the labview discussion forums and ones after searching "Unable to locate the shared variable in the Shared Variable Engine (SVE)". I also repaired the labview installation, reformatted the cRIO & installed cRIO software, added exceptions to my firewall, turned off my antivirus, but nothing has worked. Right now i'm downloading updates hoping the 2016 compactrio drivers will fix it. Please let me know if you have any ideas. 

0 Kudos
Message 8 of 27
(7,286 Views)

Another thing i tried that didn't work.

 

In the VI, I clicked the read NPSV node and replaced with programmatic access, location path was ni.var.psp://My Computer/Lib2/V2. I then went into the DSM and copied the variable path location, \\Ryan-HP\Lib2\V2. I edited the VI path to be ni.var.psp://Ryan-HP/Lib2/V2, and nothing changed. The DSM still updated with what my bound knob showed, while the read NPSV showed 0. 

0 Kudos
Message 9 of 27
(7,284 Views)

I have a couple of suggestions. The first is to go ahead and run the Troubleshoot Remote System Discovery Wizard for your cRIO. I know you can already see it, but the Wizard will confirm that all necessary ports are open. This will be a good sanity check with regards to firewalls and open ports. 

 

My other suggestion is to add a flat sequence structure with a 1 second wait at the beginning of your RT code (VI_cRIO.vi). This will allow time for all the RT code to initilize before the first call to the shared variable library is made. 

 

 

Aaron Douglass
Applications Engineer
National Instruments
Message 10 of 27
(7,270 Views)