Function BlockMC_GrpReadActAccPLCopen motion iconPipe Network motion icon

Description

The MC_GrpReadActAcc function block fills the array specified by the ‘Acceleration’ argument with the actual acceleration of the system in the coordinate system specified by the CoordSystem argument. The measured path acceleration is also calculated and reported via the ‘PathAcceleration’ output. This function block does not cause any motion.


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

Figure 7-164: MC_GrpReadActAcc

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

Related Functions

MC_GrpReadActPos, MC_GrpReadActVel, MC_GrpReadCmdPos, MC_GrpReadCmdVel

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

Concept Link IconSee Also

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 acceleration 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 acceleration 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 acceleration
  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
Acceleration[] Description An array where the acceleration 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 second2
  Default

Output

Valid Description If true, the accelerations 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 was set to TRUE. See the table PLCopen Function Block ErrorID Output
  Data type INT
PathAcceleration Description The current measured path acceleration of the group, measured by taking the square root of the sum of the squared accelerations of each axis.
  Data type LREAL
  Unit User units per second2

Example

Structured Text

Inst_MC_GrpReadActAcc( DoRead, Group, CoordSys, AccList );

IL

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

FBD

Ladder Diagram

Go back to the top of the page [Top]