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