03-01-2017 11:41 AM
Hello NI friends
I am using a cRIO 9030 controller. When I run my code as real-time application, and make it to "run on startup", cRIO restarts, and functions OK. But as soon as I disconnect LAN cable from cRIO or my laptop, the system acts strange. from the screen I see the program is running, but it seems all the network variables are frozen. It was not like this before, I ran into this problem recently.
Any idea why that happens? Have I done something wrong or changed a settings that I should not have?
Thanks
Solved! Go to Solution.
03-01-2017 03:24 PM
if you look at the system settings in MAX is there a checkbox titled "Halt on IP failure"?
03-02-2017 02:25 PM
I have not noticed that before. will look at it.
Bu why should it fail If I disconnect Ethernet cable from the controller? it is supposed to work without a cable anyways. I am confused.
03-03-2017 02:03 PM
IoT.Windsor, if you are seeing the front panel on the computer, it makes sense that you see the variables stop. Are you using a monitor to the cRIO or on the computer?
Regards,
PedroR
03-03-2017 02:09 PM - edited 03-03-2017 02:11 PM
Pedro
I am using a loptop to modify the source code and upload it to the controller. to display results, I have a monitor (touch screen monitor) that is connected to the controller.
When I make a standalone real-time application, and make it to "run on startup", the controller restarts and the program will run from controller. at this point the program should have nothing to do with laptop, because it is running from the controller (correct me if I am wrong).
If I leave the Ethernet cable connected to the laptop, the controller is functioning OK, but when I disconnect the Ethernet cable, problem starts.
This has been baffling me for couple of weeks now.
03-06-2017 04:18 PM
IoT.Windsor,
When you unplug the Ethernet cable from the system, does it resume reading data if you plug it back in? Also, are you hosting the shared variables on the cRIO?
Josh
Applications Engineer
National Instruments
03-06-2017 10:35 PM
When you unplug the Ethernet cable from the system, does it resume reading data if you plug it back in?
I think yes, it resumes once Ethernet cable is plugged again.
Also, are you hosting the shared variables on the cRIO?
Yes I am using shared variables on cRIO. (however, it is not connected to any network).
03-07-2017 10:29 AM
IoT.Windsor, I am having problems understanding your architecture. You have a cRIO only connected through ethernet to your computer, you see on the screen of the cRIO that the network variables stop functioning when you disconnect the cable and they are back again when you connect the cable to the laptop. Am I right?
If you're hosting the variables in the cRIO, you need to connect it to a router or switch. The variables stop working because there is not an internet connection for them so the variable engine gets in a "listening" state and you see the program frozen.
Regards
PedroR
03-07-2017 10:45 AM
Pedro, you got the system architecture right.
So, is it a true statement that :
"network shared variables works only if they are used in a network (such as a router)"
If this is the case, I should stop using network shared variables if I am not connecting cRIO to a network?
03-07-2017 11:12 AM
IoT.Windsor, you can use them to communicate with the computer still but the cable is necessary.
Regards,
PedroR