Programming the modulo range (MODULO)

The default setting of the modulo limits is configured in the axis-specific lists by the parameters P-AXIS-00126 and P-AXIS-00127. After controller start-up, the limits are active for rotary axes with MODULO axis mode and spindles. With linear axes, modulo calculation is switched off by default in the default setting. The effectiveness of the modulo calculation can be switched on and off for each axis by setting P-AXIS-00557 irrespective of axis type and axis mode.

These default settings can be changed by NC command.

Syntax:

<axis_name> [ MODULO ON | OFF | OFF_POS_INIT | DEFAULT | SHIFT [MIN=.. MAX=..] { \ } ]

<axis_name>

Name of the axis

MODULO

Identifier for the axis-specific programming of the modulo function. Must always be programmed as the first keyword.

ON

Select the modulo function with new limits. MIN, MAX are optional; if not programmed, the previous limits remain valid.

OFF

Deselect the modulo function.

OFF_POS_INIT

Deselect the modulo function with an implicit position initialisation of the NC channel ( see #CHANNEL INIT [CMDPOS] ).

DEFAULT

Reset the configured default values as per P-AXIS-00126, P-AXIS-00127 and P-AXIS-00557.

SHIFT

Convert the current nominal position in the module range. After conversion, the previous modulo settings are again valid.

MIN=..

Lower modulo limit in [°]

MAX=..

Upper modulo limit in [°]

\

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

If kinematic and/or Cartesian transformations are active in the channel, the programmed modulo limits refer to the programming coordinate system (PCS) or the machine coordinate system (MCS). If no transformations are active, the modulo range is defined in the axis coordinate system (ACS).

In the position controller, the modulo property of the axis is fixed after start-up and cannot be changed by programming.

If the modulo range is changed or activated, the current axis position is converted to the new modulo range.

Programing Example

prg_example

Programming the modulo function

%modulo_calc_1

:

N100 A[MODULO ON MIN=0 MAX=360] ;Select modulo monitoring

N110 A-+700                     Rotate in negative direction to position 340°

N120 A[MODULO DEFAULT]          ;Select configured default values

:

N200 A[MODULO OFF]

N210 X100 A2000                 ;Motion without modulo calculation

N220 A[MODULO ON MIN=0 MAX=360] ;Position 2000 to mod(360)=200

N230 A-+700                     Rotate in negative direction to position 340°

:

M30

;Programming example for modulo conversion (SHIFT):

%modulo_calc_2

:

N10 A[MODULO=OFF]                  ;Enable multiple rotation

N20 X100 A2000                     ;Rotate A axis multiple times without modulo

N30 A[MODULO=SHIFT MIN=0 MAX= 360] ;Position 2000 once to

                                   ;mod(360)=200

N40 X500 A2000                     ;Rotate A axis multiple times without modulo

:

M30