LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I need to modify an FPGA.vi that has already been deployed on a cRIO and runs at start-up.

Solved!
Go to solution

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. 

0 Kudos
Message 1 of 33
(4,316 Views)

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?

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
Message 2 of 33
(4,286 Views)

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)

0 Kudos
Message 3 of 33
(4,265 Views)

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

http://decibel.ni.com/content/docs/DOC-8765

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 4 of 33
(4,256 Views)
Thank you!  I will be reviewing your reply and will get back to you asap.  Regards, John
0 Kudos
Message 5 of 33
(4,246 Views)
Adnan,  is there a way to programmatically kill the connection over a crossover/ethernet cable without physically disconnecting it from a cRIO?  I'm thinking that would better suit our needs and allow me to check the behavior of both the cRIO and the host.vi while doing it.  I have looked into your examples and I'm thinking we need a solution somewhere in-between.
0 Kudos
Message 6 of 33
(4,200 Views)

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.

 

Joe Daily
National Instruments
Applications Engineer

may the G be with you ....
0 Kudos
Message 7 of 33
(4,178 Views)

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 

0 Kudos
Message 8 of 33
(4,171 Views)
Sorry Joe, the link I sent in the last message seems to be unavailable.  The article is entitled:

Reset cRIO using Watchdog Timer

0 Kudos
Message 9 of 33
(4,170 Views)

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.

 

 

Joe Daily
National Instruments
Applications Engineer

may the G be with you ....
0 Kudos
Message 10 of 33
(4,135 Views)