Thanks Daz,
That's a lot more elegant than what I came up with. I haven't messed around with the PLC Script yet so it is good to see a simple example.
I use a pendant with no screen for jogging and have a button to change the increment. I'm never looking at the screen when I do this so I
wanted to play a wav file to tell me what the new selection is. I ended up creating wav files for each entry and added functions to the screen script as you did in your youtube sound example. I then swapped out the Jog increment text box for a DRO since a DRO has a onChange event and put this code in:
if scr.GetProperty('JogIncrDro','Value') == "1.000000" then
OneInch:Play()
elseif scr.GetProperty('JogIncrDro','Value')=="0.100000" then
OneTenth:Play()
elseif scr.GetProperty('JogIncrDro','Value')=="0.010000" then
OneHundredth:Play()
elseif scr.GetProperty('JogIncrDro','Value')=="0.001000" then
OneThousandth:Play()
elseif scr.GetProperty('JogIncrDro','Value')=="0.000100" then
OneTenThousandth:Play()
end
Putting it in the PLC would be quicker and cleaner.
BTW, You need to come up with a website where we can donate some beer money for all your help
