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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Value change indicator event structure does not working properly

Solved!
Go to solution

Hello

I need your help again. I want to have alarm (continuous beeping sound) till the user acknowledges (click) on the alarm.

for example, if the Numeric 3 value more than 5, this will trigger alarm c and start beeping sound till the user click on alarm c boolean indicator. when value goes less than 5 should not have any sound.

0 Kudos
Message 11 of 21
(1,467 Views)

Is this a hardware alarm connected to e.g. a DIO line or you want the program to beep?

 

(You don't need a wait in the lower loop because you have a timeout event that defines the loop rate. Consider using arrays for the controls and LEDs)

0 Kudos
Message 12 of 21
(1,454 Views)

Hi hossaimm,

 

again some pseudocode:

 

// the Numeric 3 value more than 5, this will trigger alarm c  //
AlarmC := numeric3 > 5 

// start beeping sound //
EnableBeep := EnableBeep OR AlarmC
 
// till the user click on alarm c boolean indicator //
// using indicators as input controls is a bad UX!  //
EnableBeep := EnableBeep AND NOT(UserConfirm) // make UserConfirm a button with latching behaviour //

in a parallel loop:
IF EnableBeep THEN beep(100ms)

 

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 13 of 21
(1,451 Views)

Hello Altenbach, 

Thanks for reply. No this is not hardware alarm.

There are back end calculations to have numeric values for alarm a, b, and/or c. I need to start beeping alarm when that alarm light goes ON  and keep beeping, till the user acknowledge this by clicking on the alarm indicator.

0 Kudos
Message 14 of 21
(1,447 Views)

Do you want to be able to silence the alarm even if one of the values is over the limit or do you only want to acknowledge an alarm once the values are normal again?

 

Here is a quick rewrite that can hopefully give you some ideas. Note that arrays simplify the diagram N times here!

 

 

Message 15 of 21
(1,436 Views)

Thanks for the help. Your code looks clean and great.

Yes I want the alarm to be silent even if one of the values is over the limit.

Sound Stopping condition:

1-User click on the alarm(a, b, or c), whichever is ON. (If more than one(a and b) is ON then clicking on any one of the alarm should be ok.)

OR

2-all values comes down to normal  (State light in your code OFF)

 

I am sorry, I am new and having hard time using array to simplify codes. Thanks for help. 

0 Kudos
Message 16 of 21
(1,433 Views)

Hello 

I am trying hard for some days to implement sound alarm. Unfortunately did not find much of the solution for Sound alarm.
There are background calculations for Numeric 1,2,3 field(In attached program I can input values manually). I need to have sound alarm along with the light.

Start Beeping condition:: 
-Any of the alarm goes ON(light on in the attached program)

Stop Beeping condition::
1-all values comes down to normal (i.e. State light in the code OFF)

OR
2-User click on the alarm/light(a, b, or c), whichever is ON. (If more than one is (i.e. a and b) is ON then clicking on any one of the alarm should stop beeping. Sound(beeping) will be off but Alarm light should still be ON in this case) (Acknowledge string will record/show the time of the mouse click.)

0 Kudos
Message 17 of 21
(1,432 Views)

LIke this?

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 18 of 21
(1,423 Views)

I am getting error message opening the file:  "File version is later than current version"

any idea how to open this?

0 Kudos
Message 19 of 21
(1,412 Views)

Hello Hossaimm,

 

I have converted the Sound alarM2 file posted by RTLSVU to LabVIEW 15. This should fix the error that you where experiencing. 

 

Application Engineer

Michael

0 Kudos
Message 20 of 21
(1,394 Views)