MC_GrpSetPos
Description
MC_GrpSetPos sets the axis command position for all of the axes in an axes group to the positions specified in the Position
input. This function block does not cause any motion. The axes group must be enabled and in Standby mode for MC_GrpSetPos to execute. If it is not, this FB will return an error and the axis positions will remain unchanged. The command position is that returned by the Function Block A function block groups an algorithm and a set of private data. It has inputs and outputs. MC_GrpReadCmdPos.
-
- This function block starts a motion-related action and therefore stores data for calculations and error checking. Please see Calling Function Blocks Multiple Times in the Same Cycle if you are using a dual-core controller.
Related Functions
MC_ErrorDescription, MC_GrpReadCmdPos
Coordinated Motion, the top-level topic for Coordinated Motion.
Arguments
Input
Execute | Description | On the rising edge A rising edge is the transition of a digital signal from low to high. It is also called positive edge, request to set the position of the group |
Data Type | BOOL | |
Range | 0, 1 | |
Unit | N/A | |
Default | — | |
AxesGroup | Description | The axis group for which to set the positions |
Data Type | AXIS_GROUP_REF | |
Range | N/A | |
Unit | N/A | |
Default | — | |
Position[] | Description | An array containing the position for each axis in the group. If "Relative" is set, position represents a distance rather than an absolute position. The length of the array must equal the maximum number of axes allowed in the group. The maximum number of axes is an argument to MC_CreateAxesGrp, which is used to create axes groups. |
Data Type | LREAL | |
Range | [0, Number of axes in group-1] | |
Unit | N/A | |
Default | — | |
Relative | Description | Request to set relative (1) or absolute (0) position |
Data Type | BOOL | |
Range | 1, 0 | |
Unit | N/A | |
Default | — | |
CoordSystem | Description | The coordinate system used when setting the positions. |
Data Type | SINT | |
Range |
One of the following enumeration values:
Currently, only the ACS coordinate system is supported. See Coordinate Systems for more information. |
|
Unit | N/A | |
Default | — | |
BufferMode | Description | Currently unused |
Data Type | SINT | |
Range | [0, 0] | |
Unit | N/A | |
Default | — |
Output
Done | Description | If True, then the command completed successfully. |
Data Type | BOOL | |
Busy | Description | Currently unused, returns FALSE |
Data Type | BOOL | |
CommandAborted | Description | Currently unused, returns FALSE |
Data Type | BOOL | |
Error | Description | If True, an error has occurred. |
Data Type | BOOL | |
ErrorID | Description | Indicates the error identifier if Error output is set to TRUE. See the table in PLCopen Function Block ErrorID Output. |
Data Type | INT |
Example
ST
Inst_MC_GrpSetPos( DoSetPos, Group1, PositionArray, Relative, MC_COORDINATE_SYSTEM_ACS, 0 );
FBD
IL
BEGIN_IL "Instruction list" This is a low-level language and resembles assembly
CAL Inst_MC_GrpSetPos( DoSetPos, Group1, PositionArray, Relative, MC_COORDINATE_SYSTEM_ACS, BufferMode);
END_IL
FFLD