How could I play a sound from outside machine simulator library

Started by jairo90, September 07, 2023, 09:12:49 AM

Previous topic - Next topic

jairo90

Hi
Does Anybody knows how i could play a sound that is not in the machine simulator library sound?
Thanks in advance. 

EasyPLC_Master

Very easy, use the function PlayExternalSound().

For instance add a Static Element and name it Stat, then use the same script code as listed here:

public void Init()
{
 
}

public void Main()
{
    if(IOManager.TrigOutUp(0))
        Stat.PlayExternalSound("D:\\Temp\\chord.wav");
}

public void Physics()
{

}

public void Finish()
{
 
}