Function BlockMC_GrpReadActVelPLCopen motion iconPipe Network motion icon

Description

MC_GrpReadActVel 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 via the 'PathVelocity' output. This function block does not cause any motion.


    • The actual velocity is smoothed over the last 10 samples. This reduces the error in velocity estimation, but introduces a small amount of phase delay in the reported velocities.
    • Currently, only the ACS coordinate system is supported. See Coordinate Systems to learn more.

Figure 8-173: MC_GrpReadActVel

There is a one to one correspondence between the axes in the Axes Group and the velocity values in the Velocity Array. Each element in the Velocity array corresponds to the axis element in the Axes Group array. If a index in the Axes Group is unassigned then the velocity value for that array element in the Velocity array will be 0. If the element does contain an axis then the velocity value will be filled with the current actual velocity for that axis. Here is an example to illustrate how this works:

Related Functions

MC_GrpReadActPos, MC_GrpReadActAcc, MC_GrpReadCmdPos, MC_GrpReadCmdVel

Coordinated Motion, the top-level topic for Coordinated Motion.

Arguments

For more detail on how inputs and outputs work, refer to PLCopen Function Blocks - General Rules.

Input

Enable Description If True, then this function block will read the current actual velocity of the group and the axes in the group
  Data type BOOL
  Range 0, 1
  Unit N/A
  Default
AxesGroup Description The axes group from which the actual velocity will be read
  Data type AXES_GROUP_REF
  Range N/A
  Unit N/A
  Default
CoordSystem Description The coordinate system used when reading the actual velocity
  Data type SINT
  Range

One of the following enumeration values:

  • MC_COORDINATE_SYSTEM_ACS = 0
  • MC_COORDINATE_SYSTEM_MCS = 1
  • MC_COORDINATE_SYSTEM_PCS = 2
  Unit N/A
  Default
Velocity[] Description An array where the velocity data will be 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 MC_CreateAxesGrp that is used to create axes groups.
  Data type LREAL
  Range N/A
  Unit User units per second
  Default

Output

Valid Description If true, the velocities have been read without error.
  Data type BOOL
Error Description If true, an error has occurred.
  Data type BOOL
ErrorID Description Indicates the error if Error output is set to TRUE. See the table PLCopen Function Block ErrorID Output
  Data type INT
PathVelocity Description The current measured path velocity of the group, measured by taking the square root of the sum of the squared velocities of each axis.
  Data type LREAL
  Unit User units per second

Example

Structured Text

Inst_MC_GrpReadActVel(DoRead, Group, CoordSys, VelList);

IL

            BEGIN_ILClosed"Instruction list"
This is a low-level language and resembles assembly
     CAL Inst_MC_GrpReadActVel(DoRead, Group, CoordsSys, VelList)
END_IL

FBD

FFLD

Go back to the top of the page [Top]