LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

execute a command when labview is stopped

my issue is that I have a CompactDAQ with a NI 9485 solid state relay module... I've developed my program and it works fine (well not fine or I wouldn't be writing this) except that the relays do not go back to a default open state when the program is shut off... the relays stay in whatever state they were in when the program was active.  This is bad for me because the relays are supplying power to some devices.... so I was wondering if there was anyway that when someone closes the labview program (not through the stop button the kills the main while loop but actually stops the program) that the relays can be set to some default state every time?

 

Thanks,

M

0 Kudos
Message 1 of 5
(3,105 Views)
There should be no way for a user to hit the abort button or exit the app except with your front panel Boolean. You can go to VI Properties>Window Appearance>Customize and hide the whole toolbar and disallow the user to close the window. You could also trap and discard the 'exit' with an application close? and panel close? evens if you are using an event structure. There's shipping examples called Event Conditional Stop and Event Tracking that you should look at.
Message 2 of 5
(3,100 Views)

 

So please follow the suggestions Dennis gave!!

 

Norbert 

Message Edited by Norbert B on 08-21-2008 02:27 AM
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 3 of 5
(3,084 Views)

Just for the record, I believe the Ed Dickens was the origin of that quote. Please see here.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 5
(3,041 Views)
Give an entirely new meaning to the ther "tree hugger" 😄
Message 5 of 5
(3,036 Views)