G-CODEEIA/ISO · modal · group 12
G59

Selection of workpiece coordinate system 6

Machine-specific. This G-code reference is specific to the Mazak INTEGREX e-670H / e-670H-S with the MAZATROL SmoothX control (EIA/ISO programming manual H747PB0030E). G-code availability depends on fitted options, and groups and behaviour differ between Mazak models and control generations — verify against the manual for your own machine before programming with any code.
What it does

G54; Workpiece coordinate system 1 G55; Workpiece coordinate system 2 G56; Workpiece coordinate system 3 G57; Workpiece coordinate system 4 G58; Workpiece coordinate system 5 G59; Workpiece coordinate system 6 Commanding the above permits selection/change of one of six coordinate systems specified beforehand that are agreed with the machine. By this command, subsequent axis commands are used as positioning at selected workpiece coordinate system until the key is pressed. zero point For the six workpiece coordinate systems, set the distance on each axis from the machine zero point to the zero point of each coordinate system on the WORK OFFSET display. 2. Remarks 1. When G54 to G59 and move command are given in the same block, the coordinate system is changed to the specified one to move to the specified position on a new coordinate 2. When G54 to G59 are changed independently, the counter display of current position changes to a value on the specified coordinate system. (Machine does not move.) 3. […]

G59 is modal (group 12) — it stays in effect until another code of the same group replaces it.

Programming format
A. Selection of a workpiece coordinate system
G54.1 Pn (n = 1 to 300)
Address words
  • Example : G54.1P300 Selection of P300 system
  • Note : Omission of P and setting of “P0” function the same as “P1”. Setting a value other than
  • integers from 0 to 300 at address P causes the alarm 809 ILLEGAL NUMBER INPUT.
  • B. Movement in a workpiece coodinate system
  • G54.1Pn (n = 1 to 300)
  • G90 Xx Yy Zz
  • Example : G54.1P1 Selection of P1 system
  • X0Y0Z0 Movement to P1-system origin (0, 0, 0)
  • C. Setting of workpiece origin data
  • G10 L20 Pn Xx Yy Zz (n = 1 to 300)
  • Example : G10L20P30X–255.Z–50.
  • Replacement of the X and Z origin data of the P30-system.
  • G10L20P30U–3.W–5.
  • Incremental processing on the X and Z origin data of the P30-system.
Notes & precautions
  • Omission of P and setting of “P0” function the same as “P1”. Setting a value other than
  • The timing at which the rewritten value becomes effective is after G54 to G59
Source

Mazak PROGRAMMING MANUAL for EIA/ISO PROGRAM, manual H747PB0030E, section 14-2 Selection of Workpiece Coordinate System: G54 to G59, p. 3-11, 14-4, 14-5, 14-6, 14-7, 14-8, 14-9, 14-10, 14-11. Reference and explanation only — not a reproduction of the manual.

Not sure how to use it? Ask the Mazatrol assistant →