Programming modulo axes

The default mode for modulo programming supports the specific definition of the direction of rotation, position by two signs and limiting to maximum one revolution in absolute dimensions

<axis_name> [ + | - ] <expr>

<axis_name>

Designation of modulo axis. Long axis designations are not supported (e.g. "C_MODULO").

+ | -

The first After the axis name always determines the direction of rotation:

  - means rotation clockwise (cc)

 + means rotation counter-clockwise (ccw)

no sign means rotation in the direction of the shortest way (optimised alignment)

<expr>

Axis position in [°]. The position value can be combined with an additional sign to specify an absolute dimension. The assignment of sign and position value can be forced to execute the shortest way by brackets [..].

Attention

attention

The programming of 2 signs (direction and position) is only permitted if the axis has the "Modulo" axis mode P-AXIS-00015). Positioning is always executed on the shortest way if no sign is programmed directly after the axis name.

In addition, you can switch to a mode that always positions the tool on the shortest way (Section Positioning on the shortest way). In this mode, the use of two signs is also permitted. However, evaluation is based on the following rule:

          -- => + (minus minus is plus)

          +- => - (plus minus is minus)

          -+ => - (minus plus is minus)

          ++ => + (plus plus is plus)

Programming in absolute dimensions (G90):

Example (assuming: modulo range 0 - 360°)

G90 G1 C+560 * G90 G1 C+200 (Move to position 200 in + direction)

G90 G1 C-P1 (Go to position P1 (with implicit modulo) in – direction)

Programming in incremental dimensions (G91)

Example (assuming: modulo range 0 - 360°)

G91 G1 C+560 (Movement to "current position plus 560" in + direction)

The following V.A. variables permit read access to the current axis-specific modulo settings

V.A.MODE[i]

delivers the axis mode according to the axis table.
e.g. 4 if the axis is the modulo type.
-> used to read modulo axes

V.A.MODULO_VALUE[i]

used to read the modulo range
e.g. 360 for a modulo range of 0-360°.
(this value is irrelevant with “non modulo axes”).

Programing Example

prg_example

Programming examples of modulo programming in absolute dimensions

G90 G1 C+350 <=> Go to position 350 in + direction

P1 =+10

G90 G1 C+P1 <=> G1 C+10 <=> Go to position 10 in +direction

P1= -350

G90 G1 C-P1 <=> G1 C-[-350] <=> G1 C-10 <=> Go to position 10 in - direction

G90 G1 C+450 <=> G1 C+[450 mod 360] <=> Go to position 90 in + direction

Programing Example

prg_example

Examples of correct programming:

C+200 Rotate in positive direction to position 200

C-200 Rotate in negative direction to position 200

C+-200  Rotate in positive direction to position -200 (= +160)

C+[-200]  Rotate in positive direction to position -200 (= +160)

C—200 Rotate in negative direction to position -200 (= +160)

C-[-200]  Rotate in negative direction to position -200 (= +160)

C200 Rotate on shortest way to position 200

C[+200] Rotate on shortest way to position 200

C[-200] Rotate on shortest way to position -200

Programing Example

prg_example

Examples of incorrect programming:

None because the first sign after the axis name determines the direction of rotation and every additional sign belongs to the position expression.

Programing Example

prg_example

Programming examples of modulo programming in relative dimensions

G91 G1 C+30

G91 G1 C-30

Programing Example

prg_example

Examples of correct programming:

C+200 Rotate in positive direction to "current position plus 200”

C-200 Rotate in negative direction to "current position minus 200”

C200 Rotate in positive direction to "current position plus 200”

Programing Example

prg_example

Examples of incorrect programming:

C+-200   Error: Negative motion path during rel. programming not allowed.

C—200    Error: Negative motion path during rel. programming not allowed.

P1=-1

C-[P1]   Error: Negative motion path during rel. programming not allowed.