08-21-2011 07:59 PM
Hi Gang,
We're getting down to deployment time with our current project. It's my first using a cRIO. The PC talks to the RT processor via network shared variables (NSVs). During development, usually after a crash or a forced stop; upon re-starting, the RT software won't see changes in the NSVs. After restarting it a time or two it'll start working and all will be well.
I believe the shared variable "engine" resides on the cRIO, as the SVs and NSVs are shown under the chassis. Is that correct?
Now we're trying to set the RT app to run from NV memory at boot-up, and I can't get it to talk at all. My guess is that the NSVs get "out of sync" or something. Is there a Preferred method to intialize an RT app and its NSVs? We're using LV 2010 SP1.
I'll appreciate all responses.
Roger
08-22-2011 09:23 AM
Hello Roger,
regarding your first question, you are correct: if your variables are shown under the chassis that means they are deployed on the chassis and the CompactRIO is handling them.
Regarding your second question, it is generally a good idea that at the start of the program after you set the values of your shared variables, read them back out in a loop and wait until they have the correct value. The changes of variables can take some milliseconds to propagate.
Other troubleshooting tips for NSVs:
http://digital.ni.com/public.nsf/websearch/6E37AC5435E44F9F862570D2005FEF25?OpenDocument
Regards,
Daniel
08-22-2011 09:53 AM
Hi Daniel,
Thanks for your response!
This has been a dificult project, and I get to the point where I wonder if I'm right or wrong all the time. I appreciate your confirming what I should do about the network variables. I'm going to write routines for both the PC and cRIO apps that loop until communication is established.
Thanks, Again,
Roger