TwinCAT PLC Library Hydraulics - Version 1.4 — 4.2.6 MC_GearIn_BkPlcMc (from V3.0)

PLCopen Motion Control VAR_OUTPUT Busy: BOOL; InGear: BOOL; CommandAborted: BOOL; Error: BOOL; ErrorID: UDINT; Active: BOOL; END_VAR VAR_INOUT Master: Axis_Ref_BkPlcMc; Slave: Axis_Ref_BkPlcMc; END_VAR Execute : A positive edge at this input starts the coupling. RatioNumerator, RatioDenominator : [1, 1] These parameters describe the coupling factor in the form of a gear unit. Acceleration : [mm/s 2 ] The acceleration permitted for the synchronization in actual value units of the axis per square second. Deceleration : [mm/s 2 ] The deceleration permitted for the synchronization in actual value units of the axis per square second. Jerk : [mm/s 3 ] The jerk to be applied. BufferMode : Reserved.

This input is provided in preparation for a future build. It should currently either not be assigned or assigned the constant Aborting_BkPlcMc. (from V3.0.8) Busy : Indicates that a command is being processed. InGear : This indicates the first successful synchronization of the axes. The signal the remains active, even if the synchronization subsequently fails temporarily or permanently. CommandAborted : This indicates abortion of the coupling. Error : The occurrence of an error is indicated here. ErrorID : An encoded indication of the cause of the error is provided here. Active: Indicates that a command is being processed. Master, Slave :

Here, the address of a variable of type Axis_Ref_BkPlcMc [ } 67] should be transferred. Behavior of the function block The function block is activated by a positive edge at Execute , and investigates the axis interface that has been passed to it. A number of problems can be detected and reported during this process: Next, the system checks whether RatioDenominator is 0. In this case the function block will react by asserting Error with ErrorID :=dwTcHydErrCdIllegalGearFactor. Currently, the coupling can only be activated if both the master and the slave are at standstill. Otherwise the system responds with Error and ErrorID :=dwTcHydErrCdNotStartable.

If the axis is already in a fault state, or if it is in the process of carrying out a stop operation, it responds with Error and ErrorID :=dwTcHydErrCdNotReady. If the movement algorithm is already indicating an error code, the function block responds with Error and ErrorID := the movement algorithm's error code. If these checks could be performed without problem, the coupling is initiated. The axis is now in state McState_Synchronizedmotion [ } 78] , and the function block starts monitoring the coupling. When the velocity required by the coupling is reached for the first time while the slave axis coupling is active, this is indicated at output InGear.

Since the coupling can currently only be activated at standstill, this is the case immediately. If the slave axis is unable to follow the specifications for some reason while the coupling is active, InGear remains unchanged. If an error code occurs in the motion generator while the coupling is active, the system responds with Error and ErrorID :=motion algorithm error code. PLC Library Hydraulics 52 Version: 1.4