Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: lew on May 10, 2007, 08:49:27 PM
-
Hello:
I've been trying to write vb script in the scripter and calling gcode to perform a z axis to zero and after that move x and y to zero.
Can someone take a look at this vb and tell me if you see anything wrong?
When I execute this vb script, the z moves to zero but the x and y do not move.
code "G0 Z0.0"
While (ismoving)
Wend
code "GO X0.0 Y0.0"
End
Thanks
LEW
-
Yes here is your code:
code "G0 Z0.0"
While (ismoving) 'your while is moving is wrong also you need to put it at the end of your movement code.
Wend
code "GO X0.0 Y0.0" 'you put the letter "O" after your G instead of "0"
End 'You put and End statement that ties to nothing
It need to be:
code "G0 Z0.0"
code "G0 X0.0 Y0.0"
While Ismoving()
Wend
-
Thanks, Poppabear.
This was not a test. Just a guy who is starting to learn vb and has made some stupid mistakes.
Can't believe I typed an O and not a 0. The rest was ignorance. Working on the ignorance.
LEW