LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to stop 6514 device if pc hangs

Hi All,

 

I need to know how and where should I use wakeup reason of timed loop?

 

We are using software triggered timing source for the timed loop. In this the part of our lv2009 code constatnly monitors the temperature and switches on/off one relay using 6514 device DO. The monitor gone to sleep mode and the pc hangs. It damages the system. But we have used to shut down the power supply to board 6514 using wakeup reason, aborted mode. Still the damage happened.

 

Instead of Aborted mode of wakeup reason should we used the timing source error or timed loop error might helped to make the system fail safe?

 

Thanks

 

 

0 Kudos
Message 1 of 13
(3,268 Views)

You need to program a watchdog: http://www.ni.com/white-paper/4289/en/

0 Kudos
Message 2 of 13
(3,257 Views)

Hi Blokk,

 

Thanks for your reply.

 

But we are aware and tried using. but because of the following gave up using watchdog.

.

Hope below explanation makes you to understand and help me to come out of the situation.

 

In 6514 card, port4/line0 we used to make this bit high on launch of our application to enable the power supply to all other used ai, ao, di, do cards like 6221,6722, 6514, 6518.

 

If suppose i am using the watchdog , the attached snippet code is ok.

 

Should I include my part of application code, like reading / writing DI/DO inside the same timed loop, else this watch dog timer code has to be separate.

 

Thanks.

 

 

 

 

0 Kudos
Message 3 of 13
(3,206 Views)

it can be in the same loop. The idea is that, if your software loop which changes the digital lines/ports hangs, then the watchdog will act after timeout at the hardware side: bring all your pre-programmed digital outputs to a SAFE value (in your case when it does not heat).

0 Kudos
Message 4 of 13
(3,198 Views)

Thanks Blokk.

Ok. I could do all my coding & watch dog what I have shown in snippet in the same timed loop. Fine. But what is the use of clear expiration task or when should I use it?

Also I dont want to process the system on own once if the pc hanged.

 

Thanks.

0 Kudos
Message 5 of 13
(3,190 Views)

If the watchdog acted on your hardware, that clear expiration vi is what you need to bring the hardware back in a working state. You could have this function in your initialize state of your LV application when you restart/wake up the pc...

But all this is explained in the white paper i linked for you...

 

Sorry, i do not understand your last sentence.

0 Kudos
Message 6 of 13
(3,181 Views)

Yes I understand that link page content.

But if I dont want to bring the system back to normal running operation once got hanged. That case also should I need to use the expiration state control task?

That is what I try to mean by the last sentence of my previous query.

 

Thanks again.

 

 

0 Kudos
Message 7 of 13
(3,171 Views)

Why do not you test it yourself how it works? I never used the DAQmx Watchdog functions myself, but you should google for some more documents, to make it clear to yourself. Or just monitor the outputs and do not connect the heater, so you can test your pc failure scenario safe. 

 

By the way, you should also disable some Windows features like sleep mode and other energy saving options, to lower the frequency of such cases. But the hardware watchdog is anyway a must one...

0 Kudos
Message 8 of 13
(3,168 Views)

There's a couple things I want to chime in with.

 

First, Blokk's last piece of advice is what you should have been doing from the start.  Why would you expect a program running on your PC to continue running when your PC hangs?  Would you expect it to run with the PC off?  If the problem is the PC is going to sleep, disable those functions.  That's all done in Windows and has nothing to do with your application.

 

Second, why are you using a Timed Loop?  If you're not using RT, you're just creating overhead while not gaining the benefits of the Timed Loop.  You should be using a While Loop on a non-RT PC.

0 Kudos
Message 9 of 13
(3,156 Views)

Thanks for all your advice.

0 Kudos
Message 10 of 13
(3,145 Views)