MC_GearInPos

MC_GearInPos 1:

The function block MC_GearInPos synchronizes a slave axis precisely with a master axis (flying saw). The synchronization velocity is achieved exactly at the synchronous position 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.

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

Execute

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

RatioNumerator

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

RatioDenominator

Gear ratio denominator

MasterSyncPosition

The master's synchronous position

SlaveSyncPosition

The slave's synchronous position

SyncMode

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

MasterStartDistance

Currently not implemented

Velocity

Maximum slave velocity in the synchronization phase. If a velocity is not specified, the maximum velocity of the axis from the System Manager data is used.

The velocity given here is only checked if this checking is activated through the SyncMode variable.

Acceleration

Maximum slave acceleration in the synchronization phase. If an acceleration is not specified, the maximum acceleration of the axis from the System Manager data is used.

The acceleration given here is only checked if this checking is activated through the SyncMode variable.

Deceleration

Maximum slave deceleration in the synchronization phase. If a deceleration is not specified, the maximum deceleration of the axis from the System Manager data is used.

The deceleration given here is only checked if this checking is activated through the SyncMode variable.

Jerk

Maximum slave jerk in the synchronization phase. If a jerk is not specified, the maximum jerk of the axis from the System Manager data is used.

The jerk given here is only checked if this checking is activated through the SyncMode variable.

BufferMode

Currently not implemented

Options

Currently not implemented

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

Outputs

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

StartSync

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

InSync

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

Busy

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

Active

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

CommandAborted

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

Error

Becomes TRUE, as soon as an error occurs.

ErrorID

If the error output is set, this parameter supplies the error number, see Overview of NC errors (TC2).

Inputs/outputs

VAR_IN_OUT
    Master  : AXIS_REF;
    Slave   : AXIS_REF;
END_VAR

Master

Axis data structure of the master.

Slave

Axis data structure of the Slave.

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.