LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hardware behaviour when program closed

Hi all

My DAQmx hardware controls some safety relevant circuitry. I want to be sure that my HW enters a predefined state when my labview program or the PC crashes. I there anything like a stand alone default state when the communication stops working?

0 Kudos
Message 1 of 9
(702 Views)

Look up "Watchdog Timer".  The notion is that whatever you need to be "protected" (your "HW") needs to require something from its "Controller" (your PC running its LabVIEW Program) to "reset its timer" periodically to prevent the Timer from running out of time and "entering a predefined state".  So your code does something like use a DIO line to output a 1 Hz square wave to the WatchDog -- if the WatchDog doesn't see a transition in a second, it "does its thing".

 

Bob Schor

 

 

Message 2 of 9
(686 Views)

@Robi_F wrote:

My DAQmx hardware controls some safety relevant circuitry.


Anything safety critical, I would avoid Windows and DAQmx devices and go with a cRIO.  The FPGA is extremely reliable, and I have yet to have any issues with the RealTime Linux on the controller.  You will still want to implement some type of watchdog at each target transition (Windows->RT, RT->FPGA) and properly shutdown the circuitry as necessary.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 9
(678 Views)

Hi.

Thanks for the reply. Unfortunately I have what I have. So with standard USB hardware there is no way to program a built in default?

For example, the device name is stored in to hardware itself.

0 Kudos
Message 4 of 9
(668 Views)

>Unfortunately I have what I have.

 

I would love to know what would happen if you said this to an onsite safety officer 🤣

 

I've encountered a similar issue before but it was mitigated using external hardware that would gate the USB DIO outputs based on the state of one particular DIO output.

 

>the device name is stored in to hardware itself

 

Is this true?  I thought NI MAX just stored the serial and the name you give it for lookup when plugged in later...

Message 5 of 9
(661 Views)

@Robi_F wrote:

Unfortunately I have what I have. So with standard USB hardware there is no way to program a built in default?

For example, the device name is stored in to hardware itself.


There is no (easy) way to program a built-in static "default".  This is why WatchDog Circuits look for a dynamic signal from the Controller, effectively saying "I am alive and Working Properly" -- if this ever stops (because of a bug, the PC crashed, Windows started forcing an update, or something else), the WatchDog, running on the piece of equipment being protected, shuts the system down "gracefully" (however that can be accomplished).

 

Bob Schor

0 Kudos
Message 6 of 9
(647 Views)

And such a watchdog doesn't exist on standard usb NI hardware I suppose.

Actually this would be a nice feature..

0 Kudos
Message 7 of 9
(632 Views)

@Robi_F wrote:

And such a watchdog doesn't exist on standard usb NI hardware I suppose.

Actually this would be a nice feature..


Funny you should mention it.  DAQmx has a watchdog timer API, so (depending on your particular instrument) you have this exact feature.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 9
(625 Views)

to all: Thanks a lot for the help

0 Kudos
Message 9 of 9
(350 Views)