MC_BlockerPreparation
TF5410 | TF5420 | |
---|---|---|
| MC Group with Pick-and-Place | MC Group Coordinated Motion |
The function block MC_BlockerPreparation appends a blocking job to the list of segments in the PathData structure. The PathData table can be executed via MC_MovePath. The function block MC_BlockerPreparation can be called several times per cycle. A maximum of 30 entries are allowed per PathData table.
A blocking job is an entry that suspends execution of the path until it is resolved with MC_ReleaseBlocker. As long as the blocker is not resolved, the execution of the path is stopped at this segment. Each blocker has an Id so that the individual blockers can be distinguished in the PLC.
When a blocking job is active, the group status is still "moving".
If the override is changed while the blocking job is active, it will take effect for the next moving job.
If a new job with BufferMode mcAborting is executed while the blocking job is active, the blocking job is aborted.
If MC_GroupHalt or MC_GroupStop are executed while the blocking job is active, the path is terminated and the blocking job is automatically released.
Inputs
VAR_INPUT
BlockerId : UDINT;
BufferMode : MC_BUFFER_MODE := mcBuffered;
InvokeId : UDINT;
END_VAR
Name | Type | Description |
---|---|---|
BlockerId | UDINT | Id of the blocker. Can be any UDINT >0. |
BufferMode | MC_BUFFER_MODE | Defines how successive motion commands are to be processed (see MC_BUFFER_MODE). Only mcBuffered and mcAborting are allowed here. |
InvokeId | UDINT | Segment ID for analysis purposes. |
Inputs/outputs
VAR_IN_OUT
PathData : MC_PATH_DATA_REF;
END_VAR
Name | Type | Description |
---|---|---|
PathData | MC_PATH_DATA_REF | Table containing the segments of a path. The table is written by the Preparation function blocks, like this one, and executed by MC_MovePath (see MC_PATH_DATA_REF). |
Outputs
VAR_OUTPUT
Error : BOOL;
ErrorId : UDINT;
END_VAR
Name | Type | Description |
---|---|---|
Error | BOOL | This output becomes TRUE if an error has occurred during command execution. |
ErrorId | UDINT | Contains the command-specific error code of the last executed command. Details of the error code can be found in the ADS error documentation or in the NC error documentation (error codes 0x4nnn and 0x8nnn). |
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT V3.1.4024.7 TF5400 Advanced Motion Pack V3.1.10.1 | PC or CX (x64) | Tc3_McCollisionAvoidance, Tc3_McCoordinatedMotion, Tc2_MC2 |