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.

VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Alarm and procedure questions

Hello,

I'm using VeriStand 2014 and I have some questions about alarms and procedures. I currently have about 30 alarms created that monitor various sensors values. If any of the system limits are exceeded, an alarm will trip. I have the alarms trigger a procedure which changes a user variable. This user variable is used as a model input which tells the model to bring the system to a safe state. 

 

I have noticed that after an alarm trips, it continues to run the procedure to change the variable, which affects the performance of the system. I want the procedure just to run once when the alarm is tripped. How can I do this?

 

In addition, how can I reset the alarms? Is there a way to have the alarms reset automatically when the sensor value goes back into range? Alternatively, is there a way to trigger a reset of all alarms, possibly when another variable changes from 0 to 1?

 

Thanks.

0 Kudos
Message 1 of 8
(5,304 Views)

"I have noticed that after an alarm trips, it continues to run the procedure to change the variable, which affects the performance of the system. I want the procedure just to run once when the alarm is tripped."

 

I am not sure why this is happening. My first guess is that the procedure finishes quickly and resets the alarm, but the alarm condition is still active. So the alarm trips again and runs the procedure again. The best thing to do about this is to use the Condition step in a procedure to create a loop that waits until the system is back in a nominal state before resettting the alarm.

 

VeriStand 2015 has a new feature that allows you to automatically reset alarms when the signal goes back in range. However, in this mode the alarm does not run a procedure. You have to choose between running a procedure and doing an auto-reset.

Jarrod S.
National Instruments
0 Kudos
Message 2 of 8
(5,298 Views)

Jarrod,

The procedure doesn't reset the alarm (I think), it's only a Set Variable step, followed by an End step - I have no Alarm Command step. So I would assume the alarm is still set and therefore should not trip again and call the procedure again.

0 Kudos
Message 3 of 8
(5,294 Views)

You should add an End step to the procedure. This doesn't reset alarms, but it does properly stop the procedure execution. Without an End, I believe procedure execution just proceeds to the next procedure in the list.

Jarrod S.
National Instruments
0 Kudos
Message 4 of 8
(5,284 Views)

As I mentioned, I already have an End step in the procedure.

 

Also, why can I not select Tripped or Delayed Trip as Default State for any of my alarms? These options are always grayed out.

0 Kudos
Message 5 of 8
(5,278 Views)

Have you used the alarm commands reset Alarm & exit subroutine or Disable alarm & Exit subroutine?  Once you Disable the alarm you can reset it in another procedure.  I have run into issues with multiple alarms calling the same procedure, so be careful with that.

0 Kudos
Message 6 of 8
(5,273 Views)

Thanks for the tips. I did try adding the Disable and exit step. I also created a separate procedure that only triggers from one alarm to test. The procedure is as follows:

 

Set Variable: AlarmState_flag to 1

Alarm Command: Disable Alarm and Exit Subroutine – Tripped alarm.

 

With this setup, our LabVIEW GUI which uses the VeriStand API to get channel info is extremely slow and unresponsive (update rate about 1 Hz). 

 

If I delete the Set Variable step, the GUI is fine and the update rate is about 17 Hz.

 

I checked the alarm monitor and all alarms are listed as either enabled or disabled, so I assume that should mean that all procedures have ended?

0 Kudos
Message 7 of 8
(5,266 Views)

All of the alarms being enabled or disabled does not necessarily mean that all procedures have stopped. It depends on what is present in each of your procedures. 

Miles G.
National Instruments
Staff Applications Engineering Specialist
0 Kudos
Message 8 of 8
(5,244 Views)