3.5.13 G158 Coordinate Offsets


The "G158 Coordinate Offsets" dialog box is opened by "Parameter→G158 Coordinate Offsets", the dialog box up to 100 sets of G158 coordinate system from 0 to 99.


"G158 Coordinate Offsets" Dialog Box




Each group has the value of X_ Y_ Z_ A_ B_ C_ U_ V_ W_. If the values are by G158 command or manual dialog box, the controller calculates the equivalent value of X_ Y_ Z_ A_ B_ C_ U_ V_ W_.


If the machine is AC axis machine, it is equivalent to the following instructions:

G158 P00155 X_ Y_ Z_ A_ B_ C_ U_ V_ W_








If the machine is a machine with a BC axis, it is equivalent to the following command:

G158 P00159 X_ Y_ Z_ A_ B_ C_ U_ V_ W_


  • G158 coordinate offsets example

Example 1:

;Specify the fifth group of coordinate system

G158 L5                              

;First pull the tool along the spindle direction to the extreme position, and then specify the fifth group of coordinate system, and the rotary axis to make the tool in parallel with the Z axis position

G158 L5 P10000 Q1                    

;The first group of rotation modes specified by X_ Y_ Z_ A_ B_ C_ U_ V_ W_ are rotated around the X axis in order A_value

;Then around the Y-axis select B_ value, and then select the C-value around the Z-axis rotation in order to specify the coordinate system

G158 P00157 X_ Y_ Z_ A_ B_ C_ U_ V_ W_

;Group 1 rotation mode specified by X_ Y_ Z_ A_ B_ C_ U_ V_ W_ in incremental mode

;In order around the X-axis rotation A_ value, then around the Y-axis rotation B_ value, then around the Z-axis rotation C_ value

;Rotate in order to specify the coordinate system and turn the rotary axis so that the tool is parallel to the Z axis

G158 P11157 X_ Y_ Z_ A_ B_ C_ U_ V_ W_


Example 2: Processing program

%

G169

G54

G43 H2

G128 Q1

G0 B0. C0

;

M3S3000

;

; 1: eular, 59 = 111011, rotate Z then Y then Z

G158 Q1 L1 P10159 Q1 X0. Y0. Z85. A10. B20. C30. U0 V0 W0

;

M97 P2222

M97 P3333

M97 P4444

;

G169

G128 Q1

M5

M30


; drill a hole

O4444

G0 Z10.

G00X8.5Y7.4

G98

G81Z-3.R0.F200.

G0 Z10.

M99


; slot pocket

O3333

G00X2.Y18.Z10.

G01Z-2.F500.

....

G00Z10.

X2.Y18.

M99


; surfacing

O2222

G00X10.Y10.Z6.

X0.5Y19.5

G01Z0.F500.

....

G00Z6.

X10.Y10.

M99