Implementation of the heart rate in the FPGA vi to detect an abnormal termination of the host using the compactRIO vi?

Hello

I'm developing an app for the compactRIO systems. I want to implement a heartbeat in the FPGA code that detects if the host vi gave up. I also want the FPGA vi at the stop with a stop of the host vi command.

I implemented the heartbeat signal within the host vi and the heartbeat counter is located in a loop of the single cycle timed (SCTL) in the FPGA vi. However, I have other loops while in the FPGA vi (b/c I/o analog are not compatible with the SCTL) and so I need to stop several multiple loops with a stop order from the inside of the loop cycle timed (by opposition from a user input, what you can do with a local variable).

As I have now, when I download and run the code to my compact goal of RIO, and I abandoned the host vi (and not by pressing the stop button), the code in the SCTL stops, but on the other the loop is not. Can anyone help?

Greetings Andrew P.

I took a quick look at your code, and while I'm not completely sure of the cause of the behavior that you are experiencing, I noticed a few things in your FPGA code.  First of all, it seems that you use an appropriate method to report the other loop the SCTL is stopped due to the delay of heartbeat.  Secondly, it seems that the logic around the heart rate monitor can be a bit off.  Currently, you are taking the current value of the entry of Heartbeat/command and comparing it to the value returned by the shift register using a not equal to vi comparison.  This allows to detect a change in the status of this entry if the shift register is providing the value of previous to this entry.  However, it seems that you take the value of the comparison is not equal to to fuel the shift register, rather than the current value of the control of heart rate.  What happens if you change?

Kind regards

Michael G.

Tags: NI Software

Similar Questions

Maybe you are looking for