MC_GearIn

The MC_GearIn FB commands gear coupling with a gear ratio. The gear ratio defines the speed ratio between the master and slave axes. Synchronisation to velocity is jerk-limited. The jerk value must be specified as an input at the FB.

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 command values or to actual master values. Selection is made in the "Mode" input parameter.

Block diagram

FB parameters

VAR_IN_OUT

Variable name

Data type

Description

Master

AXIS_REF

Axis reference of the master axis.

Slave

AXIS_REF

Axis reference of the slave axis

VAR_INPUT

Variable name

Data type

Description

Execute

BOOL

Starts the command on the rising edge.

RatioNumerator

DINT

Gear ratio numerator

RatioDenominator

DINT

Gear ratio denominator

Acceleration

LREAL

Acceleration value. This value must be always be specified positive.

Value range [0.0, 2147483647.0]
Default unit [1mm/s2 or 1°/s2]

Deceleration

LREAL

Deceleration value. This value must be always be specified positive.

Value range [0.0, 2147483647.0]
Default unit [1mm/s2 or 1°/s2]

Jerk

LREAL

Jerk value. This value must be always be specified positive.

Value range [0.0, 2147483647.0]
Default unit [1mm/s3 or 1°/s3]

Mode

UDINT

Possible values

0:

(16#0)

Type of coupling between master axis and slave:

Coupling on the command value side.

128:

(16#80)

Type of coupling between master axis and slave:

Coupling on the actual value side.

VAR_OUTPUT

Variable name

Data type

Description

InGear

BOOL

Commanded gearing completed.

Error

BOOL

Is TRUE if an error occurs in the FB.

ErrorID

WORD

Error identifier

CommandAborted

BOOL

TRUE indicates that the command was aborted by another command.

Behaviour of the FB:

If this is not the case, the “Error” output is set to FALSE and “ErrorID” indicates an error value that designates the state the axis is currently in.

Notice

notice

The MC_GearIn FB can be used for linear and rotary slave axes. With linear slave axes, software limit switch monitoring is active after “Homing” is completed. For deceleration on approaching the software limit, the current limit ramp is used and gear coupling is released.

Notice

notice

In all other situations, gear coupling is "holy", i.e. axis-specific feedhold, axis-specific override CANNOT act on the cam slave because this would be contradictory to the coupling specification.