From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Safety: shut down set-up after crash labview

I am planning to run my set-up overnight and during the weekends.

Labview is controlling the liquid level in my set-up. However, if Labview crashes at the moment the the filling system is on than the filling will continue forever (and the vessel will flood which is dangerous).

 

Can anybody tell me how can I solve this? I want my set-up to automatically shut down after a labview crash (so all valves needs to be closed)

 

Thanks for helping

 

Best regards

 

Elly Hoekstra

0 Kudos
Message 1 of 11
(2,955 Views)

The only way you can take care of this is to understand what sort of crash will happen and make sure you have implemented a good error handling mechanism. So, when you get an error, the program should go into an error state (or something similar) and make sure you set the hardware and software to shut down smoothly.

 

Do you know why LabVIEW might crash?

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 11
(2,948 Views)

The program did not crash till so far.

 

But we do not take want to take the risk.

 

Unfortunately I did not program a error handling system in my vi

 

I was thinking about the following solution, but I do not know if this is possible and suitable hardware exist for this

*) Write an additional loop in the program which is sending subsequently 0 and 1 to a device

*) If this device did not receive both a 0 and 1 in let's say the past 5 minutes, the set-up will be shut down automatically (as long as the program is running, the device will receive 0 and 1, if the program crashes it will receive either only 1 or either only 0)

 

Do you think something like this is possible?

 

Best regards

 

Elly 

0 Kudos
Message 3 of 11
(2,945 Views)

If it is a dangerous situation I would use an FPGA with a Watchdog Timer to shut down on emergencies.  You could use an external Watchdog circuit to shutdown if communications to the PC is lost. A 555 timer setup to run as a watchdog timer that controls a relay to shut off the fill would work.

Visualize the Solution

CLA

LabVIEW, LabVIEW FPGA
0 Kudos
Message 4 of 11
(2,941 Views)

@HoekstraE wrote:

I was thinking about the following solution, but I do not know if this is possible and suitable hardware exist for this

*) Write an additional loop in the program which is sending subsequently 0 and 1 to a device

*) If this device did not receive both a 0 and 1 in let's say the past 5 minutes, the set-up will be shut down automatically (as long as the program is running, the device will receive 0 and 1, if the program crashes it will receive either only 1 or either only 0)

 

Do you think something like this is possible?

 

Best regards

 

Elly 


Sure that's possible and could be a quick fix. But, be sure to implement error handling if you get some time; we all underestimate how important it is when building an application. Or, a watchdog as suggested above.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 5 of 11
(2,936 Views)

Thank you for your quick reply.

 

I am not familiar with FPGA, watchdog timers and 555 timer set-up. Can you tell me where to find more information about this.

 

Best regards

 

Elly

0 Kudos
Message 6 of 11
(2,923 Views)

Search Google for Watchdog Timers.  They have USB, serial, and other options. Some will plug into your PC, others are external.  You would just ping the device.  If the device doesn't see the ping, then it opens or closes a relay.  You have a few options such as feeding your power supply for your control through it.  When the relay opens, your supply is lost and your valves close (assuming they are normally open).

0 Kudos
Message 7 of 11
(2,917 Views)

As some others have advised, it is never a good idea to rely on software running on a non-real-time OS for safety.

 

Just put a float switch on your vessel, with the output wired to a relay or other means of stopping the fill.  You can monitor the status of the safety switch from LV if you wish: This is the opposite of relying on software for the safety.

 

Lynn

Message 8 of 11
(2,898 Views)

A watchdog timer seems to be a suitable solution for my problem

 

I am using the following NI-cards

NI 9203 (to read pressures --> linked to reactor levels)

NI 9265 (to control the pump)

NI 9481 (to control valves of the reactors )

NI 9421 (to read the level of my liquid storage vessel)

 

In case Labview crashes at least the pump needs to be switched off.

 

Do I understand it correctly if

i) I need to buy a "watchdogtimer" (= piece of hardware)

ii) I need to reset the counter of the watchdog timer every x seconds (this I need to program in Labview)

iii) If my program crashes than the watch dog timer will become 0. A signal needs to be send to the pump to switch it off.

 

Does anybody has an idea where to buy a watchdog timer?

 

 

 

0 Kudos
Message 9 of 11
(2,865 Views)

Many programmable logic controllers (PLC) can perform watchdog functions and are designed to be robust in industrial environments.  Many automation companies and soem electronics or industrial distributors sell them.

 

Your questions about understanding are all correct.

 

If you are unfamiliar with these types of equipment, you might be better off bringing in a expert to advise you so that you do not overlook some important aspect of making your system safe.

 

Lynn

0 Kudos
Message 10 of 11
(2,849 Views)