Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Play mp3 When Alarm Triggered
PostPosted: Wed Jun 10, 2015 2:20 pm 
User avatar

Joined: Wed Apr 09, 2014 3:16 pm
Posts: 36

Offline
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 1735 times

_________________
Best Regards,

Kyle W. | Applications Engineer
Beijer Electronics, Inc.
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 7 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: