MC_AddAxisToGrp
Function Block - Adds an axis to an axes group.
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
Execute |
BOOL |
0 to 1 |
N/A |
No default |
On the rising edge, the axis is added to the group. |
AxesGroup |
No range |
N/A |
No default |
Reference to an axes group. |
|
Axis |
AXIS_REF |
No range |
N/A |
No default |
Reference to the axis to be added. An axes group cannot contain more than one instance of an axis. |
IdentInGroup |
UINT |
0, MaxNumberOfAxes - 1 |
N/A |
No default |
The zero-based index of the axis in the group.
|
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
Done |
BOOL |
FALSE, TRUE |
N/A |
If TRUE, the command completed successfully. |
Error |
BOOL |
FALSE, TRUE |
N/A |
If TRUE, an error has occurred. |
ErrorID |
INT |
No range |
N/A |
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.
If using a dual-core controller, see Call Function Blocks Multiple Times in the Same Cycle.
-
-
- An axes group cannot contain more than one instance of an axis.
- Two active groups cannot contain the same axis. An "active" group is one in any state other than GroupDisabled.
- This function or function block does not generate any motion.
- See Coordinated Motion, the top-level topic for Coordinated Motion.
- See Function Blocks - General Rules about how inputs and outputs work.
- Both the axis and the axes group must be created prior to calling this function block.
- See MC_CreateAxesGrp and Create a PLCopen Axis.
- The IdentInGroup input specifies the index of the axis in the group.
- Axes do not need to be added in sequential order and gaps are acceptable.
- Gaps are ignored when the group is used.
- The group must be in either the GroupStandby or GroupDisabled state when the axis is added.
- The state of the group can be read with MC_GrpReadStatus.
- This implies that the group cannot be moving when the axis is added.
Figure 1: MC_AddAxisToGrp
FBD Language Example
FFLD Language Example
IL Language Example
Not available.
ST Language Example
(*MC_AddAxisToGrp ST example *)
Inst_MC_AddAxisToGrp (AddAxisToGrp, Group1_ref, Axis_1, 0);
See Also