Skip to main content

Positioning

G code: G0, G92

Function: These commands position the tool.

G0 commands a rapid positioning on a straight line to the defined position (normally without tool operation).

G92 immediately sets the position. The result is that a jump is also executed on the axes. If MC_ControlAxisByPos.bAvoidGaps:=TRUE is set, then a jump is not executed. Instead, all axes are traveled individually to the target position in the shortest distance. G92 can be inserted at the beginning of the path in order to set the start position.

In a series of G92 commands, the last one is executed first. The previous ones are skipped. If a G1 block with identical coordinates is inserted, then the jump is executed for one cycle. This is an advantage if the path between the positions of the jump commands is not important, but the set position should be traveled as fast as possible. The SMC_ControlAxisByPos* POUs detect a jump to the specified values, pause the interpolator, and interpolate each axis individually as fast as possible.

Important

Two consecutive identical positions always result in a movement stop at this position. The stop also occurs when the subsequent path connects smoothly and could be traveled without stopping.

Syntax

G0 X Y Z A B C P Q U V W F FF E EF H L/O S
G92 X Y Z A B C P Q U V W H L/O

G Code Word

Description

X Y Z

Target positions of the Cartesian axes

A B C P Q U V W

Target positions of the additional axes

E

Path acceleration/deceleration

EF

Path acceleration/deceleration only for G0 motion. If is set EF <> 0, then the value that is defined in E is not taken into consideration for G0 movements.

F

Path velocity

FF

Velocity that is used only for G0 movements. If is set FF <> 0, then the value that is defined in F is not taken into consideration for G0 movements.

H L/O

H function

S

S profile

Graphical representation

In the graphical editor, G0 commands are represented by a green line. G92 commands are not represented directly. They simply move the starting point of the subsequent element. Positioning commands can be inserted only in the CNC text editor or in the tabular editor. They can be moved in the graphical editor.

Example 36. Examples

Positioning with linear interpolation with defined feed

N0 G92 X10 Y10   Sets the start position at 10/10
N10 G1 X20 F10   Linear interpolation to 20/10 with feed 10
N20 G0 Y20 F100  Linear positioning to 20/20 with feed 100

Different positioning modes

N0 G92 X100 Y100 F100   Sets the position at 100/100
N10 G1 X100 Y100        Saves the output of this position for one cycle
N20 G92 X50 Y100        Sets the position suddenly to 50/100

Positioning with defined path velocity

N1 G0 X1000 Y0 FF1000 EF10000 EF-10000  Positioning with velocity 1000
N2 G1 Y100 F100 E100 E-100              Interpolating positioning with velocity 100
N3 G0 X0 Y0                             Positioning with velocity 1000
N4 G0 X1000 FF0 EF0                     Positioning with velocity 100 because FF and FE are reset; thus the values in F and E are used.