Setting an axis position in the channel (SET_POSITION)

Release Note

release_note

This function is available as of CNC Build V2.11.2808.

This command sets the current position of an axis in the NC channel to a defined value. This value acts on the ACS level (in the position controller). It does not initiate a motion. Instead, it marks the axis as referenced after the axis position is repositioned. The NC channel is then initialised with the new axis positions, taking into consideration any active offsets.

The new axis position is specified with as an absolute value (POS) or a relative value to the current position (OFFSET).

Syntax:

<axis_name> [SET_POSITION  POS=.. | OFFSET=..  { \ } ]

<axis_name>

Name of the axis

SET_POSITION

Identifier for the function of setting an axis position. Must always be programmed as the first keyword.

POS=..

New defined absolute axis position in [mm, inch]

OFFSET=..

Relative offset to the current axis position in [mm, inch]

\

Separator ("backslash") for clear programming of the command over multiple lines.

Programing Example

prg_example

Set an axis position

%set_pos.nc

N010 G01 F2000 X0 Y0 Z0 A0 B0 C0

N020 $FOR P1=0,100,1

N030 G91 X100 ;Axis X moves to 10000mm

N040 $ENDFOR

N050 X[SET_POSITION POS=100] ;Set X axis position to 100

;..

;..

N999 M30