MC_GrpSetPos

PLCopen motion icon Pipe Network motion icon

 Function Block - Sets the axis command position for all of the axes in an axes group to the positions specified in the Position input.


    • This function block starts a motion-related action and stores data for calculations and error checking.
    • If using a dual-core controller, see Program a Multi-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 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.

Inputs

Input

Data Type

See Data Types.

Range

Unit

Default

Description

Execute

BOOL

FALSE, TRUE

N/A

No default

On the rising edge, request to set the position of the group.

AxesGroup

AXES_GROUP_REF

No range

N/A

No default

The axis group to set the positions.

Position[]

LREAL

Dimension: The number of axes mapped in the AxesGroup.

No range

N/A

No default

An array containing the position for each axis in the group.

  • If Relative is set, position represents a distance rather than an absolute position.
  • The length of the array must equal the maximum number of axes allowed in the group.
  • The maximum number of axes is an argument to MC_CreateAxesGrp, which is used to create axes groups.

Relative

BOOL

FALSE, TRUE

N/A

No default

Request to set position:

  • (1) relative.
  • (0) absolute.

CoordSystem

SINT

Enumerated

N/A

No default

The coordinate system used when setting the positions.

One of these enumeration values:

Value

Description

CS_ACS

Axes Coordinate System

CS_MCS

Machine Coordinate System

CS_PCS

Product Coordinate System

BufferMode

SINT

0 to 0

N/A

No default

Unused.

Outputs

Output

Data Type

See Data Types.

Range

Unit

Description

Done

BOOL

FALSE, TRUE

N/A

If TRUE, the command completed successfully.

Busy

BOOL

FALSE, TRUE

N/A

Returns FALSE.

CommandAborted

BOOL

FALSE, TRUE

N/A

Returns FALSE.

Error

BOOL

FALSE, TRUE

N/A

If TRUE, an error has occurred.

ErrorID

INT

Enumerated

N/A

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

Inst_MC_GrpSetPos( DoSetPos, Group1, PositionArray, Relative, CS_ACS, 0 ); 

See Also