MC_GrpSetPos
Function Block A function block groups an algorithm and a set of private data.
It has inputs and outputs. - Sets the axis command position Position means a point in space which is described by different coordinates.
Depending on the used system and transformation it can consist of a maximum of six dimensions (coordinates).This means three Cartesian coordinates in space and coordinates for the orientation.
In ACS there can be even more than six coordinates.
If the same position is described in different coordinate systems the values of the coordinates are different. for all of the axes in an axes group to the positions specified in the Position
input.
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
Execute |
BOOL |
0, 1 |
N/A |
No default |
On the rising edge The transition of a digital signal from low to high. AKA: positive edge., request to set the position of the group. |
AxesGroup |
No range |
N/A |
No default |
The axis group to set the positions. |
|
Position[] |
LREAL |
0, Number of axes in group-1 |
N/A |
No default |
An array containing the position for each axis in the group.
|
Relative |
BOOL |
0, 1 |
N/A |
No default |
Request to set position:
|
CoordSystem |
SINT |
One of these enumeration values:
|
N/A |
No default |
The coordinate system used when setting the positions.
|
BufferMode |
SINT |
0, 0 |
N/A |
No default |
Currently unused. |
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
Done |
BOOL |
|
|
If TRUE, the command completed successfully. |
Busy |
BOOL |
|
|
Currently unused. Returns FALSE. |
CommandAborted |
BOOL |
|
|
Currently unused. Returns FALSE. |
Error |
BOOL |
|
|
If TRUE, an error has occurred. |
ErrorID |
INT |
|
|
Indicates the error if the Error output is set to TRUE. |
Remarks
-
- This function block starts a motion-related action and stores data for calculations and error checking.
See Call Function Blocks Multiple Times in the Same Cycle if using a dual-core controller.
- This function or function block does not generate any motion.
- See Coordinated Motion, the top-level topic for Coordinated Motion.
- The axes group must be enabled Enable signal for the drive, Hardware-Enable with 24V signal to X8, Software-Enable command by setup Software, fieldbus or permanently set.
Both are required for enabling the drive. and in Standby mode for MC_GrpSetPos to execute.
- If it is not, this FB returns an error and the axis positions remains unchanged.
- The command position is that returned by the FB MC_GrpReadCmdPos.
Figure 1: MC_GrpSetPos
FBD Language Example
FFLD Language Example
IL Language Example
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
ST Language Example
Inst_MC_GrpSetPos( DoSetPos, Group1, PositionArray, Relative, MC_COORDINATE_SYSTEM_ACS, 0 );
See Also