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 numerator/denominator format.

The slave axis can be coupled to the master axis when stationary. This block cannot be used for synchronization while the master axis is in motion. In this case the Flying Saw block MC_GearInVelo or MC_GearInPos can be used.

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.

Alternatively, the block MC_GearInDyn with dynamically variable gear ratio is available.

Inputs


VAR_INPUT
Execute : BOOL;
RatioNumerator : LREAL;
RatioDenominator : UINT;
Acceleration : LREAL;
Deceleration : LREAL;
Jerk : LREAL;
BufferMode : MC_BufferMode;
Options : ST_GearInOptions;
END_VAR

MC_BufferMode

Execute

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

RatioNumerator

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

RatioDenominator

Gear ratio denominator

Acceleration

Acceleration (≥0). (currently not implemented)

Deceleration

Deceleration (≥0). (currently not implemented)

Jerk

Jerk (≥0). (currently not implemented)

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
InGear : BOOL;
Busy : BOOL;
Active : BOOL;
CommandAborted : BOOL;
Error : BOOL;
ErrorID : UDINT;
END_VAR

InGear

Becomes TRUE, if the coupling was successful.

Busy

The Busy output becomes TRUE when the command is started with Execute and remains TRUE as long as the command is processed. If Busy becomes FALSE again, the function block is ready for a new job. At the same time one of the outputs InGear, 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 if an error occurs.

ErrorID

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

Inputs/outputs


VAR_IN_OUT
Master : AXIS_REF;
Slave : AXIS_REF;
END_VAR

AXIS_REF AXIS_REF

Master

Master axis data structure.

Slave

Axis data structure of the Slave.

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