Function BlockMC_GrpReadCmdVelPLCopen motion iconPipe Network motion icon

Description

MC_GrpReadCmdVel fills the array specified by the Velocity argument with the commanded velocity for the coordinate system, which is specified by the CoordSystem argument. The path velocity is also reported via the ‘PathVelocity’ output. This function block does not cause any motion.


  • Currently, only the ACS coordinate system is supported. See Coordinate Systems to learn more.

Figure 7-168: MC_GrpReadCmdVel

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 Axis Group array. If an 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 velocity for that axis. Here is an example to illustrate how this works:

Related Function Blocks

MC_GrpReadActPos, MC_GrpReadActVel, MC_GrpReadActAcc, MC_GrpReadCmdPos

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 commanded 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 commanded 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 commanded 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, which is used to create axes groups.
  Data type LREAL
  Range N/A
  Unit User units per second
  Default

Output

Valid Description If true, that 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 in PLCopen Function Block ErrorID Output
  Data type INT
PathVelocity Description The current commanded 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

            (*MC_GrpReadCmdVel STClosed"Structured text"
A high-level language that is block structured and syntactically resembles Pascal example *)
Inst_MC_GrpReadCmdVel(DoRead, Group, CoordSys, VelList );

IL

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

FBD

FFLD

Go back to the top of the page [Top]