MC_GearIn (FB)

FUNCTION_BLOCK MC_GearIn

This function block commands a ratio between the velocity of the slave and master axis.

../../../../../../_images/plcopen.png
  • The slave ramps up to the ratio of the master velocity and locks in when this is reached. Any lost distance during synchronization is not caught up.

  • The gearing ratio can be changed while MC_GearIn is running by a rising edge at “Execute” or by using a consecutive MC_GearIn command without the necessity to MC_GearOut first

  • InGear is set the first time the ratio is reached.

  • After being InGear, a position locking is performed.

Example of GearIn timing diagram

../../../../../../_images/MC_GearIn_Ex.png
InOut:

Scope

Name

Type

Comment

Input

Execute

BOOL

Starts the function block at rising edge

RatioNumerator

DINT

Gear ratio numerator, new value is updated only with rising edge of Execute input

RatioDenominator

DINT

Gear ratio denominator, new value is updated only with rising edge of Execute input

MasterValueSource

MC_Source

Decide to use the actual position or reference position of master axis

Acceleration

LREAL

[u/s°°2] Value of the acceleration (increasing energy of the motor), just applied until “insync” is reached. Range: >0. If value = 0, Acceleration will be equal to parameter paraMaxAccelerationAppl.If value > 0 and <= 1,Acceleration will be limited to 1.

Deceleration

LREAL

[u/s°°2] Value of the deceleration (decreasing energy of the motor), just applied until “insync” is reached. Range: >0. If value = 0, Deceleration will be equal to parameter paraMaxDecelerationAppl.If value > 0 and <= 1,Deceleration will be limited to 1.

BufferMode

MC_BufferMode

Not supported, default mcABORTING used

Output

InGear

BOOL

Commanded gearing completed

Busy

BOOL

The function block is not finished

Active

BOOL

Indicates that the function block has control on the axis

CommandAborted

BOOL

Command is aborted by another command from other PLCopen function block

Error

BOOL

Signals that error has occurred within function block

ErrorID

ERROR_ID

Error identification. For error details refer to Enumeration ERROR_ID

Inout

Master

Axis_Ref

Reference to master axis

Slave

Axis_Ref

Reference to slave axis