Page 1 of 1

Play mp3 When Alarm Triggered

Posted: Wed Jun 10, 2015 2:20 pm
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).

Re: Play mp3 When Alarm Triggered

Posted: Tue Jan 21, 2020 5:43 pm
by Chris T.