Creating a "one button touch off" button
So I am thinking all I need to do is grab the machine position for each axis from some #variable, and store each in the correct #variable. Does this sound right?
Please Log in or Create an account to join the conversation.
So I am thinking all I need to do is grab the machine position for each axis from some #variable, and store each in the correct #variable. Does this sound right?
It's even easier than that. If your "reference position" is (1,2,3) then G10 L20 P1 X1 Y2 Z3 will set the G54 coordinates of the current machine position to (1,2,3)
You could have that G-code line as an MDI_COMMAND in the INI file, linked to a hardware button in the HAL
www.linuxcnc.org/docs/html/config/ini_co..._sub_halui_section_a
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Thanks Andy, Can I also say x0y0z0, as I want to set a "current location is origin". I must have mis-read the doc's and am thinking setting them to zero will clear the current g5x data?
G10 L20 P1 X0 Y0 Z0 will set the current location to the origin.
G10 L2 P1 X0 Y0 Z0 will set the G54 Offsets to 0. The difference is in the L2 or L20.
www.linuxcnc.org/docs/html/gcode/gcode.h...em_a_id_sec_g10_l2_a
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
If the machine is moved to a G53 position of X2
Then
G10 L20 P1 X0
will store a value of 2 in #5221?
Now if G55 is set such that X0 in G55 is really X2 in G53, When I move to G55G0X2 will #5221 have a value of 2 or 4?
Please Log in or Create an account to join the conversation.
linuxcnc.org/docs/html/gcode/overview.ht...umbered_parameters_a
John
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
linuxcnc.org/docs/html/gcode/overview.ht...sec_debug_messages_a
John
Please Log in or Create an account to join the conversation.
So it would hold the value of 4 for the second example? The G5x's are ALWAYS absolute distance from machine 0 yes?
No and Yes.
G55 uses separate variables from G54, so #5241 would hold the G55 axis 0 offset.
John
Please Log in or Create an account to join the conversation.