Zero Offset Shifts

A range of zero offset shifts are available in TwinCAT NC I. They describe the distance between the origins of the workpiece and of the machine.

Zero shift suppression

Command

G53 (standard setting)

Cancellation

G54 to G59

The zero shift is suppressed modally with G53. The suppression affects both the adjustable and the programmable zero shift.

Adjustable zero shift

Command

G54

G55

G56

G57

Cancellation

G53

or selection of another configurable zero shift

The commands G54 to G57 can be used within the NC program to switch back and forth between the zero shifts.

Parameterization

The configurable zero shift can be parameterized in different ways

  1. PLC function block ItpWriteZeroShiftEx (recommended standard)
  2. XAE Interpreter element
  3. from the DIN-program

The parameters are saved for each interpolation channel. This means that the adjustable zero shifts are channel dependent.

Notice The selection of a zero shift must be made in its own block. In order for the movement corresponding to the shift to be actually made it is necessary that at least the axes involved are named in a following geometrical block.

Sample 1:

N10 G01 X100 Y0 Z0 F6000
N20 G54 (activates adjustable zero offset shift (NPV))
N30 G01 X Y Z
N40 M30

In sample 1 all involved axes are named in line 30. The effect of this is that the zero shifts are applied to all the axes.

Sample 2:

N10 G01 X100 Y0 Z0 F6000
N20 G54 (activates adjustable zero offset shift (NPV))
N30 G01 X200 Y

In line 30 of sample 2 the X axis is taken to position 200 + shift in the X direction. The Y axis only moves to accommodate the shift, and the Z axis is not moved.

Parameterization from the DIN program

Command

#set paramZeroShift( G<n>; <value x>; <value y>; <value z> )#

Parameter G<n>

Zero shift to be parameterized (G54..G59)

Parameter <value>

Coordinates of the zero shift

'#set paramZeroShift(..)#' parameterizes the zero shift but does not activate it. This requires explicit programming of the G-Code.

Sample 3:

N10 G01 X100 Y0 Z0 F6000
N20 R12=200
N30 #set paramZeroShift( G54; 100.0; R12; -20)#
N40 G54 (activates adjustable zero offset shift (NPV))
N50 G01 X200 Y Z

Programmable zero shift

Command

G58 or G59

Cancellation

G53

Programmable zero shifts exist in addition to the adjustable ones. This type of zero shift is directly described from the NC program.

Zero Offset Shifts 1:

Addition of zero shifts

The programmable zero shift is only effective when the adjustable zero shift is active. This means that the total shift is the sum of

• set zero shift (G54, G55, G56 or G57)

• first programmable zero shift (G58)

• second programmable zero shift (G59)

Sample 4:

N10 G01 X100 Y0 Z0 F6000
N20 G54 (activates adjustable zero offset shift (NPV))
N30 G58 X0.5 Y0.5 Z0.5 (1st prg. zero offset shift)
N50 X Y Z (movements for the zero offset shift)
...
M30

Behavior with incremental dimension notation

Default behavior

Changing the origin also affects the incremental dimension.

Sample 5:

N10 G01 X100 Y0 Z0 F6000
N20 G54 (activates adjustable zero offset shift (NPV))
N25 G58 X10 Y10 Z0
N30 G91 (Incr. dimensions)
N40 G01 X200 Y0
N50 ...

In N40 Y moves to 10 in the basic coordinate system. A shift in origin also shifts the point of reference for incremental dimension programming, resulting in a travel path for Y.

In this way a contour, which is fully programmed based on the incremental dimension, can be positioned at any point through a zero shift.

The behavior of G91 is parameterizable.

Command

Description

ZeroShiftIncOn

The zero shifts are also applied under G91 once the axis is named. (standard setting)

ZeroShiftIncOff

The zero shift is not applied under G91.

Sample 6:

N10 G01 X100 Y0 Z0 F6000
N15 ZeroShiftIncOff
N20 G54 (activates adjustable zero offset shift (NPV))
N25 G58 X10 Y10 Z0
N30 G91 (Incr. dimensions)
N40 G01 X200 Y
N50 ...

Since 'ZeroShiftIncOff' is set in sample 6 , the X-axis in N40 is moved by 200 mm independently of the new zero shift. The Y-axis does not move as no target coordinate is programmed for it.

See also ToolOffsetIncOn/Off