Search This Blog

Monday, December 15, 2014

G52 Offset Local Coordinate System


G52 - Offset Local Coordinate System:

In CNC Programming G52 G-Code used to shift the program to given distance locally.
·         The G52 works the same as G54. This code sets the origin of the local (child) coordinate system to the command location, relative to the current work system origin.
·         G52 shifts the local coordinate system origin by a specified distance.
·         Multiple G52 codes are not cumulative; subsequent shifts replace earlier ones. The G52 shift may therefore be cancelled by specifying a shift of zero.
·         If you are using multiple coordinate systems, the G52 shift amount will affect all coordinate systems.
·         G52 is a non-modal, no motion code. The G52 coordinate system will stay in effect for all work systems until it is cancelled.
·         The G52 is cancelled when RESET is pressed and at the end of a program. It is also cancelled during a program by M30, G52, X0 Y0 Z0.

Example for G52:

G0 X0 Y0; move to origin
M98 P9100; call subprogram
G52 Y4; shift coordinate system 4 inches in Y
G0 X0 Y0; move to new origin
M98 P9100; call subprogram again with new coordinates

G52 Y0; restore un-shifted coordinate system