Play mp3 When Alarm Triggered

Sample Alarm Programs
Locked
User avatar
Kyle W.
Posts: 36
Joined: Wed Apr 09, 2014 3:16 pm

Play mp3 When Alarm Triggered

Post by Kyle W. »

This sample program will play a .mp3 file when an alarm is triggered. It will loop the sound and keep playing until the alarm is either acknowledged or the condition is cleared. The project takes advantage of aliasing so that there is only one screen with the media player on it, but three instances corresponding to the three alarms. Instead of giving the media player a file location, you use the general dynamic property of "Source" and point that to the alias. Each alias instance takes the source from the tag the instance references.

This project was created for a PC application and can play all three alarm sounds at the same time. If used on a panel (only TxB or TxC panels have an audio jack) it will only play the audio once and may need additional coding.

To use this project you will need to replace the initial value of the three String tags that have the location of the audio file.

This project was compiled using iX Developer 2.10 SP3 (2.16.154).
Attachments
AlarmPlayAudioPC.zip
(91.11 KiB) Downloaded 2249 times
Best Regards,

Kyle W. | Applications Engineer
Beijer Electronics, Inc.

User avatar
Chris T.
Posts: 109
Joined: Mon Nov 20, 2017 5:29 pm

Re: Play mp3 When Alarm Triggered

Post by Chris T. »

Locked
Best regards,
Christopher
(801) 708-6690
Technical Support
Contact Us

Beijer Electronics AB
http://www.beijerelectronics.us

Locked