en:software:mdurosettacncsoftwaregcode:supported_g_m-codes:go_to_predefined_positions

G28 uses the values stored in parameters 5161-5166 as the X Y Z A B C final point to move to.
The parameter values are absolute machine coordinates

  • G28 - makes a rapid move from the current position to the absolute position of the values in parameters 5161-5166. Since the position stored in the parameters 5161-5166 is considered absolute the tool offset enabled with G43 influences the position. Example: #5163 = 0, tool_offset_z = 50 → target_position = #5163 - tool_offset_z = -50.
  • G28 axes - makes a rapid move to the position specified by axes including any offsets, then will make a rapid move to the absolute position of the values in parameters 5161-5166 for axes specified.
    Any axis not specified will not move.
  • G28.1 - stores the current absolute position into parameters 5161-5166. Note: G28.1 does not take any argument, the current absolute machine position is stored.

Examples

G28 (rapid move to the values specified into the stored parameters, moving all axes)
G28 Z10.0 (rapid move to Z10.0 then to location specified in the G28 stored parameters, moving only Z)
G28 G91 Z0 (rapid relative move to relative Z0.0 then to location specified in the G28 stored parameters, moving only Z)

The last example skip the intermediate position, since the movement is relative and with a displacement of 0.
It is usually used to ensure that only axis Z will move to the homing position specified in G28 parameters.

G30 uses the values stored in parameters 5181-5186 as the X Y Z A B C final point to move to.
The parameter values are absolute machine coordinates

  • G30 - makes a rapid move from the current position to the absolute position of the values in parameters 5181-5186.
  • G30 axes - makes a rapid move to the position specified by axes including any offsets, then will make a rapid move to the absolute position of the values in parameters 5181-5186 for axes specified.
    Any axis not specified will not move.
  • G30.1 - stores the current absolute position into parameters 5181-5186. Note: G30.1 does not take any argument, the current absolute machine position is stored.

1.6.2.1 Examples

( © 2018 by RosettaCNC Motion                                 )
( file name: g28_example.ngc                                  )
 
G17 G21 G40 G49 G50 G54 G69 G90
 
#5161=20    ( G28 X )
#5162=40    ( G28 Y )
#5163=20    ( G28 Z )
 
G52 X20 Y20
G28 G91 Z0
M98 P1000
; Since Z axis is specified only axis Z will be moved to the
; position stored in parameter 5163.
; Since the intermediate point Z0 is specified with G91 the
; intermediate point position will be skipped.
G28 G91 Z0
G90
 
G52 X50 Y50
M98 P1000
; If no axis is specified with the G28 the position stored in
; the parameters 5161-5166 is used.
G28
 
M2
 
( Square )
O1000
    G90
    G0 X0 Y0 Z0
    G1 X10
    Y10
    X0
    Y0
M99
  • Last modified: 2023/03/22 09:07
  • by 127.0.0.1