Add a sound to a button

Johan10
2018-04-20
2018-04-22
  • Johan10 - 2018-04-20

    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

     
  • eschwellinger

    eschwellinger - 2018-04-21

    Hi,
    which plc are you using?

    BR
    Edwin

     
  • Johan10 - 2018-04-21

    Edwin Schwellinger hat geschrieben:
    Hi,
    which plc are you using?
    BR
    Edwin

    I’m using a Raspberry Pi 3.

     
  • eschwellinger

    eschwellinger - 2018-04-22

    Hi,
    check this example in the Forum application examples/snippets:
    l viewtopic.php?f=23&t=6247 l

    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

    IMG: executeCommandline.jpg

     
  • Johan10 - 2018-04-22

    Edwin Schwellinger hat geschrieben:
    Hi,
    check this example in the Forum application examples/snippets:
    l viewtopic.php?f=23&t=6247 l
    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

     

Log in to post a comment.