MC_GearInPos

MC_GearInPos 1:

The function block MC_GearInPos synchronizes a slave axis precisely with a master axis (flying saw). The synchronous velocity is achieved exactly at the synchronous point of the master and slave.

The master axis must already be moving, otherwise synchronization is not possible.

The slave axis can be uncoupled with the function block MC_GearOut. If the slave is decoupled while it is moving, then it retains its velocity and can be halted using MC_Stop or MC_Halt.

MC_GearInPos 2: Inputs

VAR_INPUT
    Execute             : BOOL;
    RatioNumerator      : LREAL;
    RatioDenominator    : UINT;
    MasterSyncPosition  : LREAL;
    SlaveSyncPosition   : LREAL;
    SyncMode            : ST_SyncMode;
    MasterStartDistance : LREAL;
    Velocity            : LREAL;
    Acceleration        : LREAL;
    Deceleration        : LREAL;
    Jerk                : LREAL;
    BufferMode          : MC_BufferMode;
    Options             : ST_GearInPosOptions;
END_VAR

Name

Type

Description

Execute

BOOL

The command is executed with a rising edge at Execute input.

RatioNumerator

LREAL

Gear ratio numerator. Alternatively, the gear ratio can be specified in the enumerator as a floating point value, if the denominator is 1.

RatioDenominator

UINT

Gear ratio denominator

MasterSyncPosition

LREAL

The master's synchronous position

SlaveSyncPosition

LREAL

The slave's synchronous position

SyncMode

ST_SyncMode

In the data structure SyncMode boundary conditions for the synchronization process are specified via individual flags.

MasterStartDistance

LREAL

Currently not implemented.

Velocity

LREAL

Maximum slave velocity in the synchronization phase. If no velocity is specified, the default velocity of the axis from the System Manager data is used. Info: the velocity specified here is only checked if this check is activated through the SyncMode variable.

Acceleration

LREAL

Maximum slave acceleration in the synchronization phase. If no acceleration is specified, the default acceleration of the axis from the System Manager data is used. Info: the acceleration specified here is only checked if this check is activated through the SyncMode variable.

Deceleration

LREAL

Maximum slave deceleration in the synchronization phase. If no deceleration is specified, the default deceleration of the axis from the System Manager data is used. Info: the deceleration specified here is only checked if this check is activated through the SyncMode variable.

Jerk

LREAL

Maximum slave jerk in the synchronization phase. If no jerk is specified, the default jerk of the axis from the System Manager data is used. Info: the jerk specified here is only checked if this check is activated through the SyncMode variable.

BufferMode

MC_BufferMode

Currently not implemented

Options

ST_GearInPosOptions

The ST_GearInPosOptions contains two position values as limits. The check for these position limits can be activated. To do this, two flags (GearInSync_CheckMask_OptionalMinPos, GearInSync_CheckMask_OptionalMaxPos) have to be set in the SyncMode structure.

MC_GearInPos 3:

The RatioNumerator must be 1 and the RatioDenominator must be 4 for a 1:4 ratio. Alternatively, the RatioDenominator may be 1, and the gear ratio can be specified as floating point number 0.25 at RatioNumerator. The RatioNumerator may be negative.

MC_GearInPos 4: Inputs/outputs

The axis data structure of type AXIS_REF addresses an axis unambiguously within the system. Among other parameters, it contains the current axis status, including position, velocity or error state.

VAR_IN_OUT
    Master : AXIS_REF;
    Slave  : AXIS_REF;
END_VAR

Name

Type

Description

Master

AXIS_REF

Axis data structure of the master

Slave

AXIS_REF

Axis data structure of the slave

MC_GearInPos 5: Outputs

VAR_OUTPUT
    StartSync      : BOOL;
    InSync         : BOOL;
    Busy           : BOOL; 
    Active         : BOOL; 
    CommandAborted : BOOL;
    Error          : BOOL;
    ErrorID        : UDINT;
END_VAR

Name

Type

Description

StartSync

BOOL

Becomes TRUE when the synchronization with the master axis was started.

InSync

BOOL

Becomes TRUE, if the coupling was successfully completed and the slave axis is synchronized with the master axis.

Busy

BOOL

The Busy output becomes TRUE when the command is started with Execute and remains TRUE for as long as the command is processed. If Busy becomes FALSE again, the function block is ready for a new order. At the same time one of the outputs, InSync, CommandAborted or Error, is set.

Active

BOOL

Active indicates that the command is executed. (currently Active=Busy, see BufferMode)

CommandAborted

BOOL

Becomes TRUE, if the command could not be fully executed. The axis may have become decoupled during the coupling process (simultaneous command execution).

Error

BOOL

Becomes TRUE as soon as an error occurs.

ErrorID

UDINT

If the error output is set, this parameter supplies the error number.