1
General Mach Discussion / Need script help
« on: April 26, 2009, 09:06:44 PM »
HI I am having trouble with the logic of this little button code.
dooembutton(1001) 'do a pause
While getoemdro(813)>0 'wait for blended velocity to stop
Wend
dooembutton(1003) 'stop
dooembutton(1002) 'rewind
The while/Wend loop was an effort to get the pause function to complete before passing on to the stop function.
I would like one button to do a "pause" then a "stop". This snippet worked in the simulator, but on a machine what ever line is executing when the button is pressed continues till its done and THEN it "stops".
Tried IsMoving() same results.
Any ideas on how to properly get the "pause" to completely execute before moving on to the "stop"?
Thank you.
Jim
dooembutton(1001) 'do a pause
While getoemdro(813)>0 'wait for blended velocity to stop
Wend
dooembutton(1003) 'stop
dooembutton(1002) 'rewind
The while/Wend loop was an effort to get the pause function to complete before passing on to the stop function.
I would like one button to do a "pause" then a "stop". This snippet worked in the simulator, but on a machine what ever line is executing when the button is pressed continues till its done and THEN it "stops".
Tried IsMoving() same results.
Any ideas on how to properly get the "pause" to completely execute before moving on to the "stop"?
Thank you.
Jim