Alarm horn depending on the alarm class
Search
Alarm horn depending on the alarm class
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?
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?
Re: Alarm horn depending on the alarm class
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
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
Re: Alarm horn depending on the alarm class
And to play the .wav file, you can use startSound() in your CTRL script
- RudiKreiner
- Posts: 198
- Joined: Mon May 16, 2011 12:10 pm
Re: Alarm horn depending on the alarm class
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.
"_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.
-
- Posts: 50
- Joined: Mon Dec 12, 2016 3:43 pm
Re: Alarm horn depending on the alarm class
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
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
-
- Posts: 50
- Joined: Mon Dec 12, 2016 3:43 pm
Re: Alarm horn depending on the alarm class
Hi all,
any advice on this subject?
BR,
Antonio Patricio
any advice on this subject?
BR,
Antonio Patricio
Re: Alarm horn depending on the alarm class
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
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