Alarm horn depending on the alarm class

Find and share HowTos to various installations / configurations!
Search

Post Reply
7 posts • Page 1 of 1
ketxu
Posts: 7
Joined: Mon Oct 05, 2015 11:44 am

Alarm horn depending on the alarm class

Post by ketxu » Tue Sep 20, 2016 10:57 am

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?

User avatar
leoknipp
Posts: 2031
Joined: Tue Aug 24, 2010 5:28 pm

Re: Alarm horn depending on the alarm class

Post by leoknipp » Tue Sep 20, 2016 11:13 am

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

User avatar
mkoller
Posts: 741
Joined: Fri Sep 17, 2010 7:03 am

Re: Alarm horn depending on the alarm class

Post by mkoller » Thu Sep 22, 2016 7:27 am

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

User avatar
RudiKreiner
Posts: 198
Joined: Mon May 16, 2011 12:10 pm

Re: Alarm horn depending on the alarm class

Post by RudiKreiner » Fri Sep 23, 2016 1:47 pm

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: 50
Joined: Mon Dec 12, 2016 3:43 pm

Re: Alarm horn depending on the alarm class

Post by AMRPatricio » Tue Nov 26, 2019 5:04 pm

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: 50
Joined: Mon Dec 12, 2016 3:43 pm

Re: Alarm horn depending on the alarm class

Post by AMRPatricio » Mon Dec 02, 2019 11:06 am

Hi all,
any advice on this subject?

BR,
Antonio Patricio

User avatar
leoknipp
Posts: 2031
Joined: Tue Aug 24, 2010 5:28 pm

Re: Alarm horn depending on the alarm class

Post by leoknipp » Tue Dec 03, 2019 4:41 pm

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

Post Reply
7 posts • Page 1 of 1