T7 with watchdog and watchdog disable | LabJack
 

T7 with watchdog and watchdog disable

3 posts / 0 new
Last post
mike
miket123's picture
T7 with watchdog and watchdog disable

I have a T7 controlled by Labview. What I want to achieve is this sequence of events:

Enable watchdog with a timeout of about 10 seconds. This is well documented and easy to implement.

Get Labview to send T7 a watchdog reset (say every 1 second) over Etherent. Easy to do.

In the event Ethernet cable is removed the Labview control software will complain due to loss of T7 acknowledge etc . The T7 will eventually reset of course but what I want is a single reset sequence. I want the T7 to set certain I/O lines to 0 Volts and then disable the resetting every 10 seconds.

So essentially I need the watchdog enabled but only one watchog reset event after loss of Ethernet communication. Also, once the Labview code restarts I want the watchdog system to be fully functional again.

Regards

Mike

 

 

LabJack Support
labjack support's picture
I don't think we have a

I don't think we have a feature that will do that directly. But, this may work...

*Set up the watch dog so that when it expires it will set an unused IO line low.

*Use a Lua script to monitor that IO line using a second IO line. If low (indicates a timeout occurred), set high so that another timeout can be detected. If the IO line has been high for more than X watchdog periods and then the line goes low, perform the reset steps.

That should only perform the reset steps after communication has been reestablished and lost.

mike
miket123's picture
Thank you for the reply.

Thank you for the reply.

I think there is a much simpler solution:

Power up the T7 which sets IO lines according to user requirements and then runs a LUA script to disable the watchdog if it was previously enabled (or just disable it anyway).

When Labview PC code runs it enbles the watchdog, refreshes the watchdog as normal to prevent the T7 resetting.

If ethernet cable is removed the T7 resets and sets the custom IO lines and then runs the LUA script to disable the watchdog. The LABVIEW code must of course inform the user and shut down without crashing.

So all I need to do is write a LUA script to disable the watchdog after reset because if a 10 second watchdog window is enabled always then it may be problematic trying to get the Labview to log on to the T7..