MC_CreateAxesGrp

PLCopen motion icon Pipe Network motion icon

 Function Block - Create an axis group for coordinated motion.

Inputs

Input

Data Type

Range

Unit

Default

Description

Execute

BOOL

0, 1

N/A

No default

On the rising edge, this function block creates a coordinated motion axes group.

Name

STRING

1 to 64 characters

N/A

No default

Axes Group Name

The string length is limited to 64 characters for optimal controller performance.

UpdateRate

UINT

3, 9

N/A

No default

Update rate of the axes group.

  • The group update rate is the same as the Base Period specified in MLMotionInit.
  • The update rate runs at the Base Period if it is a smaller time than the Base Period.
  • (0, 1, and 2 are reserved for future enhancements).
    • 3 = 125 μsec
    • 4 = 250 μsec
    • 5 = 500 μsec
    • 6 = 1 msec
    • 7 = 2 msec
    • 8 = 4 msec
    • 9 = 8 msec

MaxNumberOfAxes

UINT

2, 256

N/A

No default

The maximum number of axes that can be controlled by the group.

AxesGroupRef

AXES_GROUP_REF

No range

N/A

No default

The axes group reference variable to be initialized with a reference to the new axes group.

Outputs

Output

Data Type

Range

Unit

Description

Done

BOOL

 

 

If TRUE, the command completed successfully.

Error

BOOL

 

 

If TRUE, an error has occurred.

ErrorID

INT

 

 

Indicates the error if the Error output is set to TRUE.

See PLCopen Function Block ErrorIDs.

Remarks

  • See Coordinated Motion, the top-level topic for Coordinated Motion.
  • See Function Blocks - General Rules about how inputs and outputs work.
  • Calls to this function block are automatically generated when the application is compiled.
    • Users should not manually call this function block.
  • More than one axes group may be created and be active at the same time but each axis can only be a part of one group at a time.

Example: Valid Setup

AxesGroup1:   Axis0, Axis1, Axis2
AxesGroup2: Axis3, Axis4

Example: Invalid Setup

AxesGroup1:   Axis0, Axis1, Axis2
AxesGroup2: Axis2, Axis3, Axis4

The invalid setup is not allowed because Axis2 would be a part of two axes groups at the same time.

If an axis needs to be in more than one group, it can be removed from one and then added to another group. This is done using MC_RemAxisFromGrp and MC_AddAxisToGrp.

Figure 1: MC_CreateAxesGrp

FBD Language Example

FFLD Language Example

IL Language Example

BEGIN_ILCAL Inst_MC_CreateAxesGrp1(DoExecute, 'Group1', UpdateRate_3, MaxAxes, Group1_Ref)
END_IL

ST Language Example

Inst_MC_CreateAxesGrp( DoExecute, 'Group1', UpdateRate_3, MaxAxes, Group1_Ref);

See Also