MC_AddAxisToGrp

PLCopen motion icon Pipe Network motion icon

 Function Block - Adds an axis to an axes group.

Inputs

Input

Data Type

Range

Unit

Default

Description

Execute

BOOL

0, 1

N/A

No default

On the rising edge, the axis is added to the group.

AxesGroup

AXES_GROUP_REF

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.

  • The axis slot in the group cannot be occupied by another axis.
  • The index must be less than the maximum number of axes the group can contain.
  • MaxNumberOfAxes is a property of the axes group and is set when the group is created.
  • To remove an axis from a group see MC_RemAxisFromGrp.

Outputs

Output

Data Type

Range

Unit

Description

Done

BOOL

No range

N/A

If TRUE, the command completed successfully.

Error

BOOL

No range

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.

See PLCopen Function Block ErrorIDs.

Remarks


    • 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.
  • 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

BEGIN_IL
     CAL Inst_MC_AddAxisToGrp( AddAxisToGrp, Group1_ref, Axis_1, 0 )
END_IL

ST Language Example

(*MC_AddAxisToGrp ST example *)
Inst_MC_AddAxisToGrp (AddAxisToGrp, Group1_ref, Axis_1, 0);

See Also