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
(name of the logical device)

See also AXIS_REF.

Slave

AXIS_REF

Reference to a logical device
(name of the 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
(default value: 1)

RatioDenominator

DINT

Denominator ratio master-slave
(default value: 1)

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

MC_BUFFER_MODE

Chronological sequence of the function block

RampInMode

E_RampInMode

Behavior during synchronization:

  • eDirect: Synchronization takes place without a transition profile. This can lead to jumps in the setpoint curve.
  • eProfileBased: Synchronization is performed with a profile-based transition profile based on the dynamic values RampInVelocity, RampInAcceleration, RampInDeceleration and RampInJerk. A continuous setpoint curve can be achieved.
  • eMasterBased: Synchronization is performed with a master-based transition profile based on the parameters MasterSyncPosition, SlaveSyncPosition and MasterStartDistance. A continuous setpoint curve can be achieved.

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