MC_GearIn_BkPlcMc (from V3.0)
The function block starts and monitors a coupling between two axes. To release the coupling, an MC_GearOut_BkPlcMc function block should be used.
Inputs
VAR_INPUT
Execute: BOOL;
RatioNumerator: INT;
RatioDenominator: INT;
Acceleration: LREAL;
Deceleration: LREAL;
Jerk: LREAL; (ab/from V3.0.5)
BufferMode: MC_BufferMode_BkPlcMc:=Aborting_BkPlcMc; (ab/from V3.0.8)
END_VAR
Name | Type | Description |
---|---|---|
Execute | BOOL | A rising edge at this input starts the coupling. |
RatioNumerator | INT | [1, 1] These parameters describe the coupling factor in the form of a gear unit. |
RatioDenominator | INT | [1, 1] These parameters describe the coupling factor in the form of a gear unit. |
Acceleration | LREAL | [mm/s2] The acceleration permitted for the synchronization in actual value units of the axis per square second. |
Deceleration | LREAL | [mm/s2] The deceleration permitted for the synchronization in actual value units of the axis per square second. |
Jerk | LREAL | [mm/s3] The jerk to be applied. |
BufferMode | MC_BufferMode_BkPlcMc | 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) |
Inputs/outputs
VAR_INOUT
Master: Axis_Ref_BkPlcMc;
Slave: Axis_Ref_BkPlcMc;
END_VAR
Name | Type | Description |
---|---|---|
Master | Axis_Ref_BkPlcMc | Here, the address of a variable of type Axis_Ref_BkPlcMc should be transferred. |
Slave | Axis_Ref_BkPlcMc | Here, the address of a variable of type Axis_Ref_BkPlcMc should be transferred. |
Outputs
VAR_OUTPUT
Busy: BOOL;
InGear: BOOL;
CommandAborted: BOOL;
Error: BOOL;
ErrorID: UDINT;
Active: BOOL;
END_VAR
Name | Type | Description |
---|---|---|
Busy | BOOL | Indicates that a command is being processed. |
InGear | BOOL | This indicates the first successful synchronization of the axes. The signal the remains active, even if the synchronization subsequently fails temporarily or permanently. |
CommandAborted | BOOL | This indicates abortion of the coupling. |
Error | BOOL | The occurrence of an error is indicated here. |
ErrorID | UDINT | An encoded indication of the cause of the error is provided here. |
Active | BOOL | Indicates that a command is being processed. |
Behavior of the function block
On a rising edge at Execute the function block checks the transferred axis interface. A number of problems can be detected and reported during this process:
- Next, the system checks whether RatioDenominator is 0. In this case the system responds with Error and 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 an error state, or if it is in the process of carrying out a stop operation, it responds with Error and ErrorID:=dwTcHydErrCdNotReady.
- If the motion algorithm is already indicating an error code, the system responds with Error and ErrorID:= the motion algorithm's error code.
If these checks could be performed without problem, the coupling is initiated. The axis is now in state McState_Synchronizedmotion, 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.
A falling edge at Execute clears all the pending output signals. If Execute is set to FALSE while the coupling is still active, the existing coupling remains unaffected and active.
The output Active is currently identical to the output Busy. |