Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: Greolt on December 13, 2007, 10:20:53 PM
-
Need some pointers from the experts with this simple VB script.
It works and does what I want it to.
However I should be able to combine some lines into one.
Particularly the two G0 moves. Can I put these on one line so both moves happen together?
Thanks, Greg
Xmove = GetUserDRO(1152) 'X distance DRO
Ymove = GetUserDRO(1153) 'Y distance DRO
Code "G91"
Code "G0 X" &Xmove
Code "G0 Y" &Ymove
While IsMoving ()
Wend
Code "M9"
Code "G90"
Exit Sub
-
Well I just tried it and it works no worries.
Should have done that before posting. ;D
This works just as well.
Xmove = GetUserDRO(1152) 'X distance DRO
Ymove = GetUserDRO(1153) 'Y distance DRO
Code "G91 G0 X" &Xmove & "Y" &Ymove
While IsMoving ()
Wend
Code "G90 M9"
Exit Sub
Greg
-
The biggest hording in programming is the fear to try to straightforward approve.