Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

default output low when program crashes

I'm using a USB-6289 and was wondering if there is a way to have the device make all its outputs (DIO) low if the program crashes?  Right now it just keeps its last state before the program crashes or is aborted....

 

much thanks!

0 Kudos
Message 1 of 5
(5,479 Views)

Monse,

 

Generally devices will retain the last value until the software commands a new value.  It is a bit less clear what happens in the timed output modes, but I suspect that it would run to the end of the buffer, possibly contiuning to regenerate if set that way.

 

If your hardware setup can get into a hazardous condition when the program crashes, then you need a hardware watchdog or similar safety device to protect it.

 

Lynn

Message 2 of 5
(5,467 Views)

@Monse wrote:

I'm using a USB-6289 and was wondering if there is a way to have the device make all its outputs (DIO) low if the program crashes?  Right now it just keeps its last state before the program crashes or is aborted....

 

much thanks!


hopefully, you have programmed "error handling" and what to do with it (enable all to default/shutdown values)....otherwise, have a hardware "emergency stop."

 

 

from the manual...

 

Programmable Power-Up States

 

At system startup and reset, the hardware sets all PFI and DIO lines to high-impedance inputs by default. The DAQ device does not drive the

signal high or low. Each line has a weak pull-down resistor connected to it,as described in the specifications document for your device.NI-DAQmx s

upports programmable power-up states for PFI and DIO lines.Software can program any value at power up to the P0, P1, or P2 lines. The PFI and DIO lines can be set as:

 

• A high-impedance input with a weak pull-down resistor (default)

• An output driving a 0

• An output driving a 1

Message 3 of 5
(5,457 Views)

+1 for a hardware e-stop (even if it's just a power-off switch). 

 

Generally once a DAQ is initialized and talking to a computer, it's going to hold whatever state it's in till either the buffer runs out or its told to do something else from the host. 

 

Something like a cDAQ with some embedded brains in it and code to function as a fail-safe should the connection to the host be lost might be worth investigating. 

Message 4 of 5
(5,448 Views)

You might look into an X Series device.  These have a programmable watchdog (see pdf of X Series User Manual) that can set the DIO lines to some pre-defined state if software stops responding.  The X Series most similar to your USB-6289 would be the USB-6353 (it's not an exact replacement though, check the specs).

 

Like others have mentioned, if there is a safety risk then you'll almost certainly want a hardware emergency stop system.  Even though my current project uses an OEM X Series card, I am not using the watchdog states because instead we use a hardware emergency stop system.  Software interacts with the emergency stop system by issuing pulses to inform the system that it is still responding (if the pulses stop then the system enters an emergency shutdown state, similar to if the user hits the big red stop button on the machine).

 

 

Best Regards,

John Passiak
0 Kudos
Message 5 of 5
(5,431 Views)