This function is supported by alarm logging:
1. Open alarm logging
2. Select the alarm and choose properties
3. Tick on "triggers an action"
4. On the tags/actions tab choose "ProgramExecute" in the Action field
5. Enter media player or sound player program and the sound to be played in the "Parameter" field.
For example: "c:\winnt\mplayer.exe \play c:\media\sample.mid"
This applies to a single alarm. I dont know a way of generalizing this to all alarms, unless you make the above procedures to all alarms.
First - point - "triggers an action" has nothing to do with setting mentioned in point 4,
Second - point 4 - you can't enter there any function, only functions with format: BOOL AnyName(char* AnyParameter) will work there (at least it works like that in WinCC 5.1),
Third - this function will be called only after pressing "Loop In Alarm" button on the WinCC Alarm Control (or after calling AXC_OnBtnLoop).
However points 1-3 are correct, but then the standard function GMsgFunction is called and all you want to do after alarms come must be programmed there.
I couldn't understand you as I have moderate knowledge of scripting, can u please tell me step by step method to play sound on WinCC?
Thank you very much for your quick response. My e-mail address is [email protected]
Hi,
Follow these steps:
> 1. Open alarm logging
> 2. Select the alarm and choose properties
> 3. Tick on "triggers an action"
4. Open Script editor
5. Open standard function GMsgFunction
6. Add to GMsgFunction following code:
Dear Sir,
Thank you very much for your support. I tried this successfuly with one alarm. Now what about assigning different sounds to different alarms? Do I have to make separate fuctions for each and every alarm or there is some easy way?
Thanks for your continued support
Arshed Majeed
Electronics Engineer
Packages Ltd.
Pakistan