06-02-2010 03:58 PM
What is the best way to modify the program without changing its function. I just need to tell if the cRIO is online or not - from a host.vi with an FPGA reference (I've tried using the FPGA LED as an power on/off indicator) without success). Do I need to halt or suspend the execution of the existing FPGA.vi in order to do so or is there an easier way? Can I use the same FPGA from another project window? I am currently running LV 2009 with Windows XP Pro with a NI-9112 Chassis and a NI-9012 Controller.
Solved! Go to Solution.
06-03-2010 03:05 AM
Your title and what you have written have confused me. What exactly are you trying to do? Do you need to tell whether the cRIO is visible on the network, or whether it is switched on? Or, do you just want to know whether the FPGA is active?
06-03-2010 12:43 PM
Actually, both the cRIO and host computer are connected to a network. The cRIO cannot run the middleware software (Opensplice) we are currently using however - only the host computer can. That means only our host computer can 'check' the status of the cRIO periodically to see if it is online or not, then report its status to the network. The FPGA, as I have already mentioned has been programmed and is working as expected - and boots at start-up. We just need to know in the event the power to the cRIO has been disconnected we will be able to reset it once power is restored and if it is online to send periodic signals to the host saying 'I'm alive and well'. From the project explorer we have a host.vi currently under 'My Computer' that can interface with the network and has an FPGA reference. I was hoping I could wire a control to the FPGA LED to see if I could turn IT on or off first and verify that I did from the host.vi - currently, nothing happens! I'm thinking the program we have already deployed to the cRIO has to be halted or we need to suspend its execution in order to test this: 'can I control the FPGA LED theory of mine' before moving on to some other idea. I was hoping you could give me some suggestions! Thank you, John
Project Engineer, Johnson Space Center (JSC)
06-03-2010 01:48 PM
So, I am thinking that you need setup a heartbeat shared variable which can then take care of network errors on either side. Have a look at the following articles and do let me know if they help or not:
http://forums.ni.com/ni/board/message?board.id=170&message.id=270792&requireLogin=False
06-03-2010 02:59 PM
06-09-2010 05:21 PM
06-10-2010 01:39 PM
John,
I can not recommend that you disable your ethernet interface. However based on refresh rate, I would just reboot the controller from witin measurement and automation explorer. If this does not do what you want you can programmically undeploy your shared variable by using a property node.
Please let us know how this works for you.
06-10-2010 03:33 PM
Joe, thank you for your comments. Disconnecting the ethernet connection is a means to simulate one piece of h/w coming on line - in this case the host computer before the cRIO. If you look back on this thread you will see that the two, meaning the host computer and cRIO are connected to a network and not to each other. I have been studying/running the following example: http://decibel.ni.com/content/docs/DOC-7082 . My customer is requesting that I use the watchdog whack continuously - say 1/sec. on the controller until or w/o comm with the host. If the host pings the cRIO to see if it IS on-line and for some reason connection is lost/unavailable we need to simulate this eventuality w/o resetting the cRIO itself. If you have any suggestions please let me know. Thank you! John
06-10-2010 03:37 PM
06-11-2010 06:05 PM
if you are pinging the host there is very little that we programmiclly do to simulate this. You will need to look at other options for this as the ICMP Ping reply is handled by the network stack and it not something we can change.
As a workaround is the switch that cRIO connected to managed? You might be able to login to the switch and disable the port that cRIO is connected to.
Please let me know how it turn out.