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).
Play mp3 When Alarm Triggered
Play mp3 When Alarm Triggered
- Attachments
-
- AlarmPlayAudioPC.zip
- (91.11 KiB) Downloaded 3204 times
Best Regards,
Kyle W. | Applications Engineer
Beijer Electronics, Inc.
Kyle W. | Applications Engineer
Beijer Electronics, Inc.
Re: Play mp3 When Alarm Triggered
Locked
Best regards,
Christopher
(801) 708-6690
Technical Support
Contact Us
Beijer Electronics AB
http://www.beijerelectronics.us
Christopher
(801) 708-6690
Technical Support
Contact Us
Beijer Electronics AB
http://www.beijerelectronics.us