MC_GearInPos
This function block couples a slave axis to a specific position on a master axis. The speed ratio between the slave and master axes can be specified.
For an application example, refer to chapter Engaging the slave axis at a specific position of a master axis.

VAR_IN_OUT
Variable name | Data type | Description |
|---|---|---|
Master | AXIS_REF | Reference to a logical device See also AXIS_REF. |
Slave | AXIS_REF | Reference to a logical device See also AXIS_REF. |
VAR_INPUT
Variable name | Data type | Description |
|---|---|---|
Execute | BOOL | Start execution of the function block. |
RatioNumerator | DINT | Numerator ratio master-slave |
RatioDenominator | DINT | Denominator ratio master-slave |
MasterSyncPosition | LREAL | Position of the master axis from which the master axis and slave axis are synchronous. If the master axis is a modulo axis, the MasterSyncPosition is interpreted as the modulo position. |
SlaveSyncPosition | LREAL | Position of the slave axis from which the master axis and slave axis are synchronous. If the slave axis is a modulo axis, the SlaveSyncPosition is interpreted as the modulo position. |
MasterStartDistance | LREAL | Distance covered by the master axis while the slave axis is synchronizing. |
BufferMode | Chronological sequence of the function block | |
RampInMode | Behavior during synchronization:
| |
RampInVelocity | LREAL | Speed for profile-based synchronization with RampInMode = eProfileBased |
RampInAcceleration | LREAL | Acceleration for profile-based synchronization with RampInMode = eProfileBased |
RampInDeceleration | LREAL | Deceleration for profile-based synchronization with RampInMode = eProfileBased |
RampInJerk | LREAL | Jerk for profile-based synchronization with RampInMode = eProfileBased |
Direction | MC_DIRECTION | Direction of synchronization, especially with modulo axes |
VAR_OUTPUT
Variable name | Data type | Description |
|---|---|---|
StartSync | BOOL | Slave axis synchronizes |
InGear | BOOL | Slave axis is synchronous to the master axis |
Busy | BOOL | Function block is active |
Active | BOOL | Function block controls the axis |
CommandAborted | BOOL | The function block was canceled by another command |
Error | BOOL | An error has occurred in the function block |
ErrorID | WORD | Error number |
StartSync | BOOL | Slave axis synchronizes |





