MC_GearInDyn

MC_GearInDyn 1:

The function block MC_GearIn activates a linear master-slave coupling (gear coupling). The gear ratio can be adjusted dynamically during each PLC cycle. Hence a controlled master/slave coupling can be build up. The Acceleration parameter has a limiting effect in situations with large gear ratio variations.

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_GearIn with dynamically variable gear ratio is available.

Inputs


VAR_INPUT
Enable : BOOL;
GearRatio : LREAL;
Acceleration : LREAL;
Deceleration : LREAL;
Jerk : LREAL;
BufferMode : MC_BufferMode;
Options : ST_GearInDynOptions;
END_VAR

MC_BufferMode

Enable

Coupling is activated with a rising edge at input Enable. The gear ratio can be changed cyclically as long as Enable is TRUE.
The command is terminated if Enable becomes FALSE after coupling. The gear ratio is frozen at its last value, but the slave is not decoupled.

GearRatio

Gear ratio as floating point value. The gear ratio can be changed cyclically as long as Enable is TRUE. If ENABLE is FALSE, the gear ratio remains unchanged.

Acceleration

Acceleration (≥0). If the value is 0, the standard acceleration from the axis configuration in the System Manager is used. The parameter limits the acceleration of the slave in situations with large gear ratio variations.
The maximum acceleration is only reached at the maximum master velocity. Otherwise the slave acceleration is below this value when the gear ratio changes significantly.

Deceleration

Deceleration (≥0). (Not implemented)

Jerk

Jerk (≥0). (Not implemented)

BufferMode

Currently not implemented

Options

Currently not implemented

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 Enable 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.