MC_CreateAxesGrp

PLCopen motion icon Pipe Network motion icon

 Function BlockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. - 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 edgeClosed The transition of a digital signal from low to high. AKA: positive edge., this functionClosed A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. 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.

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_ILClosed Instruction list - This is a low-level language and resembles assembly.CAL 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