Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Suddenly unable to read Shared Variables in cRIO 9074

Hi all, 

   I've been running a simple pair of programs on my host PC and cRIO (call them button_Host_1.vi and buttton_RIO_1.vi); the general idea is that I toggle a boolean in button_Host_1.vi, this writes a value to a shared variable and button_RIO_1.vi reads the value.  This worked very reliably for several months until I made a copy of button_Host_1.vi (I gave it the rather clever name button_Host_2.vi) and added it to my project: suddenly the vi on the cRIO (button_RIO_1.vi) couldn't read or write any shared variables, although I still have communication between vi's on the host PC.  All the variables are hosted on the host PC, show up in the Distributed System Manager, and I've got Variable Client Support for LabVIEW RT 1.7.0 on the cRIO.  The only error code I get is -1950679027: NI-PSP has not connected to the server yet, and this accompanies a time-out of the shared variable node on the RIO (but again, not on the PC; everything works fine there).  I've tried all the troubleshooting methods listed here to no avail.  I've also rebooted everything, also to no avail.  

 

Any suggestions?

0 Kudos
Message 1 of 5
(4,462 Views)

Aaron,

 

I wanted to get some clarifications of the issue from you:

 

  1. Is the button_Host_2.vi running at the same time as button_Host_1.vi and button_RIO_1.vi?  If it does not run at the same time, do you still experience the error?
  2. When/where does this error occur?
  3. Are you using RT FIFOs or Network Buffering on your variables?
  4. Does this problem occur in other projects (try creating a simple one), or is it restricted to this project?

Also, you can try the following:

 

  1. Try "relinking" the variables on the block diagram.  To do so, simply click on the SV node and navigate to the appropriate SV in your project.
  2. Host the variables on the cRIO.
  3. Turn off RT FIFOs or Network Buffering if they are on.

Kind regards,

 

Drew T.

Applications Engineer

 

Drew T.
Camber Ridge, LLC.
0 Kudos
Message 2 of 5
(4,457 Views)

Hi Drew, 

   Sorry for the delay; when I tried it the morning after my previous post it started working fine (although I didn't change anything) and it's only now started to repeat the issue.  In answer to your questions, 

 

1.  button_Host_2.vi is never running at the same time as button_Host_.vi, but button_RIO_1.vi is always running on the cRIO.

2.  The error occurs at the Shared Variable terminal of button_RIO_1.vi (i.e. it occurs on the RIO but not on the host PC).

3.  I am not using RT FIFOs or Network Buffering on my variables.

4.  Yes, it happens in other projects.  I made a simple project to test it: flip a switch on the PC to write "TRUE" to a shared variable (hosted on the PC) and have the RIO continuously monitor the shared variable.  It didn't work.

 

In response to your suggestions, 

 

1.  No luck.

2.  I don't have the appropriate software on the RIO to do that at the moment, but I'll work on getting it in place.

3.  They're not on now, but I'll continue to monitor them.

 

Again, sorry for the delay but I wanted to answer your questions and provide you with feedback regarding your suggestions, and since the system was working well for about two days I couldn't do that.

 

Thanks,

Aaron

0 Kudos
Message 3 of 5
(4,437 Views)

Hi again Drew, 

  When I tried to make the aforementioned simple project to test basic shared variable connectivity I noticed that I was unable to discover the cRIO chassis using the New Real-Time Project wizard.  I used (static) IP address of the cRIO to add it to the project but then none of the modules show up.  I typically access the RIO through a network but this failure to discover the RIO using the wizard occurs both on the network and when I use a crossover cable.  However, I can ping the RIO and MAX can access it through the network or via crossover cable.  MAX can reboot the RIO or transfer a file to it, although when I attempt to import a file I get no error but I also never get the file.

 

Just thought I'd add more info.

 

Thanks,

Aaron

0 Kudos
Message 4 of 5
(4,435 Views)

Aaron,

 

It sounds like the cRIO may not be functioning properly with the information in your last post coming to light.  What does the System State field in MAX show for this particular controller?

 

This could also occur if there is more than one device on the network using the same IP address, but it seems like you see the same problem with a crossover cable.  Are you setting both the controller and computer to a static IP address?  Do they both have the same subnet?  Try using 10.0.0.50/10.0.0.51 for the IP addresses and 255.255.0.0 for the subnet if you are unsure.

 

Finally, is the software on the cRIO the same as the versions on the host computer?  Did you upgrade recently?  If so, please update the software on the RIO to the latest version and try again.

 

In the interest of avoiding a long and drawn out troubleshooting process, you may simply try reformatting the controller now and reinstalling the software on it to try to start fresh.  This could be a corruption of the software, in which case a reformat could solve the problem.

 

Good Luck!

Drew T.
Camber Ridge, LLC.
0 Kudos
Message 5 of 5
(4,428 Views)