Alarm horn depending on the alarm class

Find and share HowTos to various installations / configurations!
7 posts • Page 1 of 1
ketxu
Posts:7
Joined: Mon Oct 05, 2015 1:44 pm

Alarm horn depending on the alarm class

Post by ketxu »

Hello.

I want to know if there is a possibility to configure in the WinCCOA multiple horns for a different classes for the alert_hdl in the project (for a warning alert_hdl play 111.wav, for the danger alert_hdl play 222.wav, ...).
I didn't see nothing related to the horn in the configuration for the alert_hdl defined in the project.

Any ideas for this?

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Alarm horn depending on the alarm class

Post by leoknipp »

Hello,

there is no predefined functionality available for the alert horn in WinCC OA.
If you want to start a sound output in your project when an alert is raised you have to implement your own script, e.g using dpQueryConnectSingle() with SELECT ALERT to get a hotlink when an alert is raised.
If you connect for the alert priority _alert_hdl.._prior you can decide which file shall be played depending on the alert priority (the priority is defined at the alert class).

Best Regards
Leopold Knipp
Senior Support Specialist

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Alarm horn depending on the alarm class

Post by mkoller »

And to play the .wav file, you can use startSound() in your CTRL script

RudiKreiner
Posts:198
Joined: Mon May 16, 2011 2:10 pm

Re: Alarm horn depending on the alarm class

Post by RudiKreiner »

What we do is to define a short script that switches the horn on or off in the various configs of the alert class, like this:
"_alert_class.._ctrl_c_nack : 'main(){dpSet("Prj.Hrn:_original.._value",5);}
_alert_class.._ctrl_c_ack : 'main(){dpSet("Prj.Hrn:_original.._value",0);}'
_alert_class.._ctrl_none : 'main(){dpSet("Prj.Hrn:_original.._value",0);}'

Maybe that will be of help to you.

PS: Prj.Hrn is the name of our datapoint that runs the horn, yours may be different of course.

AMRPatricio
Posts:61
Joined: Mon Dec 12, 2016 4:43 pm

Re: Alarm horn depending on the alarm class

Post by AMRPatricio »

Hi all,
I am currently trying to implement a horn functionality. I already went though all the posts about this subject. Also, I did give a look on the alertHorn.ctl script present in the DemoApplication_3.15, which uses a dpQueryConnectSingle() with SELECT ALERT.

When a small number of alarms is raised (or acknowledged) everything seems to be working as required: horn playing the sound refer to the highest priority alarm currently in unacknowledged state. The problem is how to lead with situations when a big amount of alarms (lets say 300) are raised or acknowledged at same time.

On the log file the following warning is raised:
Values were discarded, examples/Horn.ctl, work, function has 200 pending runs -> DISCARDING!

Obviously after that, the script is not working as expected. Any advice?

BR,
Antonio Patricio

AMRPatricio
Posts:61
Joined: Mon Dec 12, 2016 4:43 pm

Re: Alarm horn depending on the alarm class

Post by AMRPatricio »

Hi all,
any advice on this subject?

BR,
Antonio Patricio

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Alarm horn depending on the alarm class

Post by leoknipp »

If you get the log message that work functions are discarded information in the CTRL script is lost (discarded) and possibly therefore you script does not work as expected.
You can possibly increase the number of pending runs for the CTRL script by using the config entry maxPendingRuns or you can use a blocking time at dpQueryConnectSingle() to reduce the number of work function calls.

Best Regards
Leopold Knipp
Senior Support Specialist

7 posts • Page 1 of 1