1305
« on: November 14, 2009, 08:13:35 PM »
Now I have read your whole topic I think I get what you want.
What you need to do is create a macro like this :-
Enter the following lines into notepad and save them as M1800.m1s in the macro folder inside the profile folder you are using e.g. C:\Mach3\Macros\Mach3Mill making sure the last line has a return on the end.
SetVar(100,GetoemDRO(83))
SetVar(101,GetoemDRO(84))
SetVar(102,GetoemDRO(85))
Now in your g-code program when ever you want the current position of the machine relative to the home position command M1800
Then #100 will be equal to the x position #101= to y and #102 = to z
So your program would look like this
G00 X0 Y0 Z10.
M1800
(Do calculations here)
#100=[#100/2]
#101=[#101/2]
#102=[#102/2]
G00 X#100 Y#101 Z#102
M1800
Etc.
Graham