Programming modulo axes

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

Syntax:

<axis_name> [ + | - ] <pos>

<axis_name>

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

+ | -

The 1st sign 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)

<pos>

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, there is also an option to change to a mode that always positions on the shortest path (section Positioning on the shortest way). In this mode, programming 2 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: 360° modulo)

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: 360° modulo)

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]

supplies the axis mode according to the axis table,
e.g. 4 if is axis ia of the modulo type.
-> is used to read modulo axes

V.A.MODULO_VALUE[i]

os used to read the modulo range
e.g. 360 with a modulo range of 0-360°.
(if the axis is a "non modulo axis”, this value is not relevant).

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.