MC_GearIn

MC_GearIn 1:

The function block MC_GearIn activates a linear master-slave coupling (gear coupling). The block accepts a fixed gear ratio in a numerator denominator format. Alternatively the blocks MC_GearInFloat with a LREAL gear ratio and MC_GearInDyn with a dynamically changeable gear ratio are available.

Note:

The coupling can be activated only in standstill. The inputs Acceleration, Deceleration and Jerk are not used.

Moving axes can be coupled using the optional Flying Saw functionality (MC_GearInPos, MC_GearInVelo).

VAR_INPUT

VAR_INPUT
    Execute          : BOOL;
    RatioNumerator   : INT;
    RatioDenominator : UINT;
    Acceleration     : LREAL;
    Deceleration     : LREAL;
    Jerk             : LREAL;
END_VAR

Execute : The command is executed with rising edge.

RatioNumerator : Gearing factor numerator

RatioDenominator : Gearing factor denominator.

Acceleration : Acceleration (not used)

Deceleration : Deceleration (not used)

Jerk : Jerk (not used)

For a ratio of 1:3, the numerator has to be 1 and the denominator 3. The numerator may also be negative.

VAR_OUTPUT

VAR_OUTPUT
    InGear         : BOOL;
    CommandAborted : BOOL;
    Error          : BOOL;
    ErrorID        : UDINT;
END_VAR

InGear : Becomes TRUE, if the coupling was successful.

CommandAborted : Becomes TRUE, if the coupling could not be carried out.

Error: Becomes TRUE, as soon as an error occurs.

ErrorID : Supplies the error number when the Error output is set

VAR_IN_OUT

VAR_IN_OUT
    Master : NCTOPLC_AXLESTRUCT;
    Slave  : NCTOPLC_AXLESTRUCT;
END_VAR

Master : Axis structure of the master.

Slave : Axis structure of the slave.

Requirements

Development environment

Target system type

PLC libraries to be linked

TwinCAT v2.8

PC (i386)

TcMC.Lib