CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Fri Dec 13, 2019 5:55 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Add a sound to a button
PostPosted: Fri Apr 20, 2018 10:19 am 
Offline

Joined: Sun Mar 04, 2018 11:12 pm
Posts: 15
Hello I had a project to drive a car with buttons in Codesys. I’ve finished and now I trying to add a sound to my button « Start»So that when I start, it makes the sound of a car which starts.
Thank’s a lot


Top
   
PostPosted: Sat Apr 21, 2018 6:07 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3570
Hi,
which plc are you using?

BR
Edwin


Top
   
PostPosted: Sat Apr 21, 2018 10:15 pm 
Offline

Joined: Sun Mar 04, 2018 11:12 pm
Posts: 15
Edwin Schwellinger wrote:
Hi,
which plc are you using?

BR
Edwin

I’m using a Raspberry Pi 3.


Top
   
PostPosted: Sun Apr 22, 2018 6:44 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3570
Hi,
check this example in the Forum application examples/snippets:
viewtopic.php?f=23&t=6247

You could add the sound file as external file in CODESYS (it will be downloaded then by CODESYS to the plc) and then execute it by the command line
like shown in this example.(This you Need to do in an own Task, because the Task is blocked as Long the sound file is played)

Keep in mind this solution does play the sound on the PI, not on the _/webvisu where you press the button.
BR
Edwin


You do not have the required permissions to view the files attached to this post.


Last edited by Edwin Schwellinger on Sun Apr 22, 2018 8:07 pm, edited 1 time in total.

Top
   
PostPosted: Sun Apr 22, 2018 2:57 pm 
Offline

Joined: Sun Mar 04, 2018 11:12 pm
Posts: 15
Edwin Schwellinger wrote:
Hi,
check this example in the Forum application examples/snippets:
viewtopic.php?f=23&t=6247

You could add the sound file as external file in CODESYS (it will be downloaded then by CODESYS to the plc) and then execute it by the command line
like shown in this example.(This you Need to do in an own Task, because the Task is blocked as Long the sound file is played)

Keeo in mind this solution does play the sound on the PI, not on the _/webvisu where you press the button.
BR
Edwin

Thanks a lot


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 2 guests


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:  
Powered by phpBB® Forum Software © phpBB Limited