Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Watchdog Clear hangs program execution.

Hello All,

I am writing code to run on a remote 9004 RT and am using the WatchDog function to restart it should there be a program execution problem. This seems to work fine except when I try to use the WatchDog Clear function. If I do not include a Stop function at the end of the vi error line it will hang the program at that point and require me to use the environment Stop button to terminate. The example " WatchDog Occurrence - RT Engine.vi" includes the Stop function and will also hang if I disable it. The help for the Stop function says, "In general, avoid using this function when you have a built-in termination protocol in a VI." So the WatchDog functions are doing something that is not normal in that sense.

Does anyone know why I must use the Stop function here and if this is the preferred way to build a robust remote RT system? I use the occurrence expiration option in WatchDog configure to display a date and time of the WatchDog problem so I will be able to troubleshoot.

Thanks,
HLB
0 Kudos
Message 1 of 3
(3,686 Views)

Hi HLB,

 

You are right that the WatchDog functions are doing something that is not normal in a certain sense. This has to do with the interaction of the watchdog functions and the Real Time Operating System (RTOS). I first tried to reproduce the issue you are seeing using a cRIO-9012, thinking that they should be the same. I was unable to reproduce the behavior, the VI would stop when I pressed the button even without the Stop function. However, I was then reminded by a colleague that the 900x and the 901x use different OSes (see here). When I tried to reproduce this issue on a cRIO-9004 I did see the behavior you mentioned.

 

So to answer your question, in general the stop is not recommended but because of the watchdog timer's interaction with the RT OS it is required to achieve proper functionality.

With warm regards,

David D.
0 Kudos
Message 2 of 3
(3,667 Views)

Hello David,

 

Glad you could verify that behavior.  I have not delt with cRIO's beyond the 9004 so it is good to have verification that this behavior is proper in this instance.

 

Thanks,
HLB

0 Kudos
Message 3 of 3
(3,659 Views)