MC_GrpReadActVel

PLCopen motion icon Pipe Network motion icon

 Function Block - Reads the actual velocity of the group and the axes in the group.

  • See Coordinated Motion, the top-level topic for Coordinated Motion.
  • This function or function block does not generate any motion.
  • See Function Blocks - General Rules about how inputs and outputs work.
  • The MC_GrpReadActVel function block fills the array specified by the Velocity argument with the actual velocity of the system in the coordinate system specified by the CoordSystem argument.
    • The measured path velocity is also calculated and reported by the PathVelocity output.


    • The actual velocity is averaged over the last 10 samples.
      • This reduces the error in velocity estimation but introduces a small amount of phase delay in the reported velocities.
    • Only the ACS coordinate system is supported.
      See Coordinate Systems.

  • There is a one-to-one correspondence between the axes in the Axes Group and the velocity values in the Velocity Array.
  • If a index in the Axes Group is unassigned, the velocity value for that array element in the Velocity array is 0 (zero).
  • If the element does contain an axis, the velocity value is filled with the current actual velocity for that axis.
    • This is an example of how this works:

Inputs

Input

Data Type

See Data Types.

Range

Unit

Default

Description

Enable

BOOL

FALSE, TRUE

N/A

No default

If TRUE, this function block reads the current actual velocity of the group and the axes in the group.

AxesGroup

AXES_GROUP_REF

N/A

N/A

No default

The axes group the actual velocity is read from.

CoordSystem

SINT

Enumerated

N/A

No default

  • The coordinate system used when reading the actual velocity.
  • One of these enumeration values:

Value

Description

CS_ACS

Axes Coordinate System

CS_MCS

Machine Coordinate System

CS_PCS

Product Coordinate System

Velocity

LREAL[ ]

Dimension: The number of axes mapped in the AxesGroup.

No range

User units / sec

No default

An array where the velocity 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

See Data Types.

Range

Unit

Description

Valid

BOOL

FALSE, TRUE

N/A

If TRUE, the velocities were read without error.

Error

BOOL

FALSE, TRUE

N/A

If TRUE, an error has occurred.

ErrorID

INT

Enumerated

N/A

PathVelocity

LREAL

No range

User units / sec

  • The current measured path velocity of the group.
  • This is measured by taking the square root of the sum of the squared velocities of each axis.

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

Inst_MC_GrpReadActVel(DoRead, Group, CoordSys, VelList);

See Also