LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

alarm generates two events

I have a shared variable with a lower and upper alarm level.

I am generating a user event when the alarm threshold is exceeded (see attached jpg). However, when returning back into the 'valid' region two events are generated. What could be the source of those two events and how can I avoid this behavior (I need only one event when passing the threshold again).

 

VPS

alarm_events.jpg

0 Kudos
Message 1 of 3
(2,900 Views)

Hi VPS,

 

The events triggering twice could possibily due to a redundant notification, on which you should do nothing in your code. 

 

If you notice, the events are triggered twice when only shared variable is changed its state to the alarm state, but it would trigger only once when it changes to the normal state. 

 

Check for the time stamp to make a comparison. When the alarm is triggered, the two events would have different timestamps,

 

Timestamp on 1st event trigger        -00:00:00 MM/DD/YYYY - is a redundant notification just ignore it.

Timestamp on second event trigger  - Current time and date   - is your Alarm do your action here.

 

It also makes no sense for the time stamp being 0 for a new alarm triggered.

 

You can have a look at the example vi DSC Alarm Demo.lvproj, DSC Alarm Event structure supprt.vi shipped with DSC module for a better understanding.

 

Hope this helps.

Message Edited by Vsh on 09-15-2009 04:08 AM
Message 2 of 3
(2,870 Views)

Hi Vsh,

 

Thank you for you input.

 

'If you notice, the events are triggered twice when only shared variable is changed its state to the alarm state, but it would trigger only once when it changes to the normal state. '

Actually in my case it is the other way around: one event when going into alarm state and two events when returning to the normal state.

 

'Check for the time stamp to make a comparison. When the alarm is triggered, the two events would have different timestamps,'

I have checked out the example vi you mentioned. Now I understand much better what is going on. In fact, the two events that are generated when returning to the normal state are due to acknowledgement and clearing of the alarm.

 

Thanks for your help!

 

VPS 

 

 

0 Kudos
Message 3 of 3
(2,835 Views)