MC_GrpReadCmdPos

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. - Reads the command positionClosed Position means a point in space which is described by different coordinates. Depending on the used system and transformation it can consist of a maximum of six dimensions (coordinates).This means three Cartesian coordinates in space and coordinates for the orientation. In ACS there can be even more than six coordinates. If the same position is described in different coordinate systems the values of the coordinates are different. of the axes in the group.

Inputs

Input

Data Type

Range

Unit

Default

Description

EnableClosed Enable signal for the drive, Hardware-Enable with 24V signal to X8, Software-Enable command by setup Software, fieldbus or permanently set. Both are required for enabling the drive.

BOOL

FALSE, TRUE

N/A

No default

If TRUE, 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 reads the current commanded position of the axes in the group.

AxesGroup

AXES_GROUP_REF

No range

N/A

No default

The axes group the commanded position is read from.

CoordSystem

SINT

One of these enumeration values:

N/A

No default

The coordinate system used when reading the commanded position.

Position[]

LREAL

No range

User units

No default

An array where the position data is written.

  • 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 the MC_CreateAxesGrp function block used to create axes groups.

Outputs

Output

Data Type

Range

Unit

Description

Valid

BOOL

FALSE, TRUE

N/A

If TRUE, the positions have been read without error.

Error

BOOL

FALSE, TRUE

N/A

If TRUE, an error has occurred.

ErrorID

INT

No range

N/A

Indicates the error if Error output is 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.
  • The MC_GrpReadCmdPos function block fills the array (specified by the Position argument) with the commanded position of the coordinate system specified by the CoordSystem argument.
  • This function or function block does not generate any motion.
  • There is a one-to-one correspondence between the axes in the Axes Group and the position values in the Position Array.
  • Each element in the Position Array corresponds to the axis element in the Axis Group array.
  • If an indexClosed Zero pulse (zero signal) of a hardware pin such as digital input or feedback pin. in the Axes Group is unassigned, the position value for that array element in the Position Array is 0 (zero).
  • If the element does contain an axis, the position value is filled with the current actual position for that axis.
    • This is an example of how this works:

Figure 1: MC_GrpReadCmdPos

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_GrpReadCmdPos( DoRead, Group, CoordSys, PosList )
END_IL

ST Language Example

            (*MC_GrpReadCmdPos STClosed Structured text - A high-level language that is block structured and syntactically resembles Pascal. example *)
Inst_MC_GrpReadCmdPos(DoRead, Group, CoordSys, PosList );

See Also