02-01-2016 10:41 AM
Hii All
How to create an automated stop procedure to stop a stimulus profile using stimulus editor in case of an alarm in the system is triggered.
02-01-2016 10:49 AM
What I usually do is have 2 tasks (multi-threads) loops running, one running the profile, the other looking for an alarm condition (EStop). If the alarm is triggered, the alarm task loop stops the profile task loop (end task), does cleanup (establish a safe condition) and the procedure will end. Just make sure when your profile loop ends, it tells the alarm loop to also end. That way the profile will exit cleanly.
02-01-2016 10:58 AM
Hii Joshe
Thank you for your prompt reply. I will try the 2 loops.
02-01-2016 12:15 PM
Hi,
You will need some channel in your system definition that signals that an alarm has happened or the alarm channel itself. You can also set a User Channel to True in your sys def alarm if you want. Then in your Stimulus Profile, have the Alarm Loop thread watch that "alarm" channel. I have attached an example. Hope it works for you.
02-01-2016 12:30 PM
Wanted to also mention that we added a feature in VeriStand 2015 that allows procedures to stop all running sequences. You could have the alarm trip a procedure that calls this step:
The difference between "stop" and "abort" is whether or not the sequences run their Clean Up steps. Joshe's method is totally viable as well, and gives you a bit more control within the sequence. Just letting you know an alternative if you need it.
02-01-2016 01:08 PM
@ Thor
Thanks for the info. I am using VeriStand 2013. Therefore, using the 2 loops concept is a good choice.
@joshe: Thanks