31
Mach4 General Discussion / Re: Laser pointer, offset X-Y and set zero but whitout moving the tool incremental
« on: June 05, 2023, 04:53:13 PM »
Hi,
I would suggest that you instantiate two registers X_AXIS_OFFSET, and Y_AXIS_OFFSET and make them persistent.
That will allow you to populate both registers with the exact offset for each axis. It might be for instance that you intended the X axis offset to be
3 inches , but when its all bolted in place its 3.024 inch, well that's OK just put the the correct and exact number in the register.
Now you write a macro that zeros the X and Y axes combining the two registers using the API above.
Mach4 has built in macros so clearly you don't want to overwrite any of those. I make it a rule that any of my own macros are m100() or above,
and then I can be reasonably sure that none of my macros will clash with any internal macros.
Can you tell me what axis no. you have assigned the X and Y axes to?
Craig
I would suggest that you instantiate two registers X_AXIS_OFFSET, and Y_AXIS_OFFSET and make them persistent.
That will allow you to populate both registers with the exact offset for each axis. It might be for instance that you intended the X axis offset to be
3 inches , but when its all bolted in place its 3.024 inch, well that's OK just put the the correct and exact number in the register.
Now you write a macro that zeros the X and Y axes combining the two registers using the API above.
Mach4 has built in macros so clearly you don't want to overwrite any of those. I make it a rule that any of my own macros are m100() or above,
and then I can be reasonably sure that none of my macros will clash with any internal macros.
Can you tell me what axis no. you have assigned the X and Y axes to?
Craig