Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: jimbogrif on June 15, 2010, 11:54:05 AM
-
I've written a program to zero out a tool after a tool change and when I step therough the program, it works fine. When I run the program by pressing "Auto Tool Zero", it doesn't set the "Z" DRO to 2.0" as instructed by the last step in the program. The absolute Z value is correct but not the Z DRO. It appears to be stepping over the last command but again, when I step through the program, it works great. Here's the program.
Call SetDRO(2,2.0)
Code "G0 G53 X33.619 Y.181"
Code "G28.1 Z1.9"
Code "G53 G0 Z2.0"
Call SetDRO(2,2.0)
Please Help
-
Try entering this before the last line,
While IsMoving ()
Wend
Greg
-
It worked - I don't know why but it worked - Thanks. I've been working on this for a long time without any luck.
Thanks again
-
Now that the Auto Tool Zero button work, is it possible to run this "auto tool zero" as part of a program, either a subroutine or possibly an "M" code? In other words, can the program shown above be executed as part of a program?
Thanks in advance