MC_GrpReadActAcc

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 actual acceleration of the group and the axes in the group.

Inputs

Input

Data Type

Range

Unit

Default

Description

Enable

BOOL

0, 1

N/A

No default

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

AxesGroup

AXES_GROUP_REF

No range

N/A

No default

The axes group the actual acceleration is read from.

CoordSystem

SINT

One of these enumeration values:

  • MC_COORDINATE_SYSTEM_ACS = 0
  • MC_COORDINATE_SYSTEM_MCS = 1
  • MC_COORDINATE_SYSTEM_PCS = 2

N/A

No default

The coordinate system used when reading the actual acceleration.

Acceleration[ ]

LREAL

No range

User unit/sec2

No default

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

 

 

If TRUE, the accelerations have been read without error.

Error

BOOL

 

 

If TRUE, an error has occurred.

ErrorID

INT

 

 

Indicates the error if Error output is TRUE.

See the table in PLCopen Function Block ErrorIDs.

PathAcceleration

LREAL

 

User unit/sec2

The current measured path acceleration of the group.

This is measured by taking the square root of the sum of the squared accelerations of each axis.

Remarks

  • See Coordinated Motion, the top-level topic for Coordinated Motion.
  • See Function Blocks - General Rules for more information about how inputs and outputs work.
  • 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 calculated and reported via the PathAcceleration output.
  • This function or function block does not generate 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 for more information.

  • 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, the acceleration value for that array element in the Acceleration array is 0 (zero).
  • If the element does contain an axis, the acceleration value is filled with the current actual acceleration for that axis.
    • This is an example of how this works:

Figure 6-139: MC_GrpReadActAcc

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_GrpReadActAcc( DoRead, Group, CoordSys, AccList )
END_IL

ST Language Example

Inst_MC_GrpReadActAcc( DoRead, Group, CoordSys, AccList );

See Also

Concept Link IconSee Also