Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Electronic detection of loss of LabVIEW DAQ device control

I am looking for suggestions on methods to electronically detect the loss of LabVIEW's control of a USB X series multifunction DAQ device such as the USB-6343.  The DAQ device is controlling an external instrument and performing AI, AO and DO.  If the LabVIEW program should happen to lock up or for some other reason no longer be able to control the instrument by sending it AO and DO signals, then I need to detect that condition so that an external enable switch can be disengaged electronically by for example a relay.  So some means of sensing an electrical signal from the DAQ device is needed.  I do not want to rely on sensing the value of an analog out voltage or static digital output level since there is a chance those could remain in their valid state if software control is lost.

 

One thought is to continuously perform software timed digital logic state toggling and then sense that TTL frequency externally (by a tone decoder for example).  Ideally that toggling software code would be an inherent part of the control code so that if the control code locks up, so too would the toggling.

 

Steve

 

0 Kudos
Message 1 of 8
(3,424 Views)

What speed of response do you need?

 

One thought comes to mind- use a  loop to repeatedly toggle a digital output on and off. Wire that to a device (retriggerable monstable multivibrator chip or and off-the-shelf duration timer) whose output will turn on when it stops seeing retriggering pulses from the digital output.

 

Another term for such a fail-safe is "watchdog timer". You may want to Google that term, there may be an "all-in-one" package that suits your needs.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 2 of 8
(3,420 Views)

A few hundred millisecond response time should be ok.

 

I thought about the retriggerable monostable but felt it might be possible that the program could fault but still produce occasional digital line changes that are not at the correct frequency and those could still trigger the monostable and engage its output occasionally and thus allow the instrument to be ON - not continuously ON but still ON at some times.

0 Kudos
Message 3 of 8
(3,417 Views)

Hi SteveP,

 

X Series has a watchdog timer built in. From the X Series User Manual:

 

Watchdog Timer


The watchdog timer is a software-configurable feature used to set critical
outputs to safe states in the event of a software failure, a system crash, or
any other loss of communication between the application and the X Series
device.


When the watchdog timer is enabled, if the X Series device does not receive
a watchdog reset software command within the time specified for the
watchdog timer, the outputs go to a user-defined safe state and remain in
that state until the watchdog timer is disarmed by the application and new
values are written, the device is reset, or the computer is restarted. The
expiration signal that indicates an expired watchdog will continue to assert
until the watchdog is disarmed. After the watchdog timer expires, the
device ignores any digital writes until the watchdog timer is disarmed.


Note When the watchdog timer is enabled and the computer enters a fault condition, ports
that are set to tri-state remain tri-stated and do not go to user-defined safe states.


You can set the watchdog timer timeout period to specify the amount of
time that must elapse before the watchdog timer expires. The counter on the
watchdog timer is configurable up to (232 – 1) × 8 ns (approximately
34 seconds) before it expires. A watchdog timer can be set for all DIO and
PFI lines.

 

There's a shipping example that shows how to use it:

Write Digital Channel with Watchdog Timer

 

Brad

---
Brad Keryan
NI R&D
Message 4 of 8
(3,410 Views)

Thanks Brad.  X Series keeps looking better and better.

 

I wish though that it be used to also define states for analog outputs.  They are outputs after all, used to control things.  Heading over to DAQ Idea Exchange...

 

Steve

 

0 Kudos
Message 5 of 8
(3,399 Views)

Regarding analog outputs-

 

Would it be possible to reserve one of your digital outputs to turn on when the watchdog times out?

 

Use this to turn on a relay or analog mux that swiches the analog signal from DAQ over to an alternate set of desired voltage levels. Or just route to ground if 0V is the desired safe shutdown state.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 6 of 8
(3,390 Views)

We use a 555 timer ith a set time dely. The timer is reset by either a 5V analogue signal or a digital O/P as changing signal. The output from the timer holds a relay energised (SSR type) unless the timer times out (when labview is frozen and no longer resets the timer) the relay drops out isolating the power to the external devices

0 Kudos
Message 7 of 8
(3,284 Views)

This retriggerable (before the end of the output pulse) one-shot monostable multivibrator approach would allow the relay to be re-energized should the control signal be re-applied following its disappearance.  The user may want the system to be locked out upon such a fault and require some distinct action to re-energize it.  The X Series watchdog timer provides that capability, although some electronics could probably be added to the one-shot method to lock that out.

 

0 Kudos
Message 8 of 8
(3,281 Views)