MC_GearInPos_BkPlcMc (from V3.0.33)
The function block starts and monitors an on-the-fly 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;
MasterSyncPosition: LREAL;
SlaveSyncPosition: LREAL;
SyncMode: INT;
MasterStartDistance: LREAL;
Acceleration: LREAL;
Deceleration: LREAL;
Jerk: LREAL; (ab/from V3.0.5)
BufferMode: MC_BufferMode_BkPlcMc:=Aborting_BkPlcMc;
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. |
MasterSyncPosition | LREAL | [mm] The coupling is fully active from this master position. |
SlaveSyncPosition | LREAL | [mm] The coupling is fully active from this slave position. |
SyncMode | INT | Currently not supported. |
MasterStartDistance | LREAL | [mm] This is the master distance over which the coupling is established. |
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
StartSync: BOOL;
InSync: BOOL;
Busy: BOOL;
Active: BOOL;
CommandAborted: BOOL;
Error: BOOL;
ErrorID: UDINT;
END_VAR
Name | Type | Description |
---|---|---|
StartSync | BOOL | Indicates the transition phase between idle state and fully active coupling. |
InSync | BOOL | This indicates the first successful synchronization of the axes. The signal the remains active, even if the synchronization subsequently fails temporarily or permanently. |
Busy | BOOL | Indicates that a command is being processed. |
Active | BOOL | Indicates that a command is being processed. |
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. |
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.
- If RatioDenominator is less than 0, the system responds with Error and ErrorID:=dwTcHydErrCdNotSupport.
- The coupling can only be activated if the slave is at standstill. Otherwise the system responds with Error and ErrorID:=dwTcHydErrCdNotStartable.
- If the absolute value of the MasterStartDistance is too small, the system responds with Error and ErrorID:=dwTcHydErrCdCannotSynchronize.
- If the actual position of the master is not between MasterSyncPosition and the end of the synchronization distance specified by MasterStartDistance, the system responds with Error and ErrorID:=dwTcHydErrCdCannotSynchronize.
If these checks could be performed without problem, the coupling is initiated. The slave axis initially continues to be in state McState_Standstill. Only when the master axis reaches the start of the synchronization distance for the first time does the slave axis report McState_Synchronizedmotion and indicate StartSync, and the function block starts monitoring the coupling. As soon as the axis reaches the end the synchronization distance for the first time, the slave axis indicates InSync. Should the master axis later pass the start of the synchronization distance backwards, the coupling is not released.
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.
An example is available under #103.
The function block does not support the functionality of TwinCAT NC. |
The output Active is currently identical to the output Busy. |