MC_GearIn command

MC_GearIn commands a gear coupling at a gear ratio. The gear ratio defines the velocity ratio between master and slave axes. Synchronisation to the velocity is jerk-limited. "Jerk" is set in the command.

If the optional parameters “Acceleration", "Deceleration” and “Jerk” are not specified or set to ≤ 0, the dynamic values are taken from the corresponding axis list.

The slave axis can be linked either to master setpoint values or to actual master values. The selection is made in the "Mode" parameter.

Optionally, the program can wait for the job to end (“WaitSyn” keyword) or can assign a Job ID (“Id” keyword) for later synchronisation.

The “PhaseShift” parameter specifies the required phase of master and slave axes which are set during automatic phase compensation (Mode = 256). The value is programmed in metric units [0.1 µm or 10^-4°]. This parameter has the default value 0.

NC command:

<axis_name>[ MC_GearIn Master=<expr> RatioNumerator=<expr> RatioDenominator=<expr>
                       [Acceleration=<expr>] [Deceleration=<expr>] [Jerk=<expr>] Mode=<expr> [Id=<expr>]
                      [WaitSyn] [PhaseShift=<expr>] { \ } ]

Block diagram of the function block in PLCopen:

Input pin


Master *

Logical axis number of the master axis

RatioNumerator *

Gear ratio numerator

RatioDenominator *

Gear ratio denominator


[1 mm/s2 or 1°/s2]


[1 mm/s2 or 1°/s2]


[1 mm/s3 or 1°/s3]



Type of coupling between master axis and slave:

Coupling based on command values.


Type of coupling between master axis and slave:

Coupling based on actual values.


Automatic phase compensation: ON.

*As a supplement to PLCopen the following options are available for these input pins:


As an alternative to the logical axis number the axis name of the master spindle can also be programmed.


Alternative abbreviation RN


Alternative abbreviation RD

Programing Example


MC_GearIn command

S[MC_GearIn Master=11 RatioNumerator=2 RatioDenominator=3 \

Acceleration=500 Deceleration=600 Jerk=20000 Mode=0]

Commanding with master axis names, default dynamic values and abbreviation of gear ratio:

S[MC_GearIn Master=S2 RN=1 RD=3 PhaseShift=25 Mode=256 WaitSyn]