MC_MoveLinRel

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. - Commands interpolated linear movement on an axes group to the specified relative positions.

Inputs

Input

Data Type

Range

Unit

Default

Description

Execute

BOOL

0, 1

N/A

No default

On the rising edgeClosed A rising edge is the transition of a digital signal from low to high. It is also called positive edge, request to perform a linear relative move.

AxesGroup

AXES_GROUP_REF

No range

N/A

No default

The axis group that performs the linear relative move.

Distance[]

LREAL

No range

User units

No default

Array of distances for each axis in the group.

Velocity

LREAL

0 < Velocity < (20 * Acceleration) and
0 < Velocity < (20 * Deceleration)

User unit/sec

No default

Maximum velocity of the defined path.

See Limitations on Acceleration and Jerk for more information.

Acceleration

LREAL

0 < Velocity < (20 * Acceleration)

User unit/sec2

No default

Maximum acceleration.

See Limitations on Acceleration and Jerk for more information.

Deceleration

LREAL

0 < Velocity < (20 * Deceleration)

User unit/sec2

No default

Maximum deceleration.

See Limitations on Acceleration and Jerk for more information.

Jerk

LREAL

Trapezoidal velocity profiles:
   0 (zero)

S-Curve velocity profiles:
   (Velocity / 20) < Acceleration < (2 * Jerk) and
   (Velocity / 20) < Deceleration < (2 * Jerk)

User unit/sec3

No default

Maximum jerkClosed In physics, jerk is the rate of change of acceleration; more precisely, the derivative of acceleration with respect to time.

See Limitations on Acceleration and Jerk for more information.

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 commanding the linear relative move.

  • Currently, only the ACS coordinate system is supported.
  • See Coordinate Systems for more information.

BufferMode

SINT

One of these enumeration values:

  • MC_BUFFER_MODE_ABORTING = 0 = Abort
  • MC_BUFFER_MODE_BUFFERED = 1 = Buffered
  • MC_BUFFER_MODE_BLENDING_PREVIOUS = 2 = Blending Previous
  • MC_BUFFER_MODE_BLENDING_NEXT = 3 = Blending Next
  • MC_BUFFER_MODE_BLENDING_LOW = 4 = Blending Low
  • MC_BUFFER_MODE_BLENDING_HIGH = 5 = Blending High

No range

N/A

No default

Defines the chronological sequence of the function block relative to the previous block.

  • The buffer mode is limited to MC_BUFFER_MODE_BUFFERED for groups with more than two axes.
  • See Buffer Modes for more information.
  • The blending modes (2, 3, 4, & 5) match the path velocity at the active move's endpoint.
  • Some individual axis velocities can make an abrupt change if the path of the next move travels in a different direction.
    • A transition move can be programmed in the TransitionMode input to avoid this.

TransitionMode

SINT

The value is limited to:

  • MC_TRANSITION_MODE_NONE = 0
  • MC_TRANSITION_MODE_CORNER_DISTANCE = 3

N/A

No default

Coupled with the TransitionParameter[ ], this input defines the shape and dynamics of the inserted contour to connect the current motion with the next motion in the queue.

  • The transition mode is limited to MC_TRANSITION_MODE_NONE for groups with more than three axes.
  • See Transition Between Moves for more information.

TransitionParameter[ ]

LREAL

1, N

N/A

No default

This array is dependent on the specified TransitionMode.

  • N values are supplier specified dependent on the selected TransitionMode.
  • Transition parameter values are applied to the axis group.

Outputs

Output

Data Type

Range

Unit

Description

Done

BOOL

 

 

If TRUE, the command completed successfully.

Busy

BOOL

 

 

If TRUE, the function block is executing.

Active

BOOL

 

 

If TRUE, the function block is controlling motion.

CommandAborted

BOOL

 

 

If TRUE, the command was aborted by another function block.

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.

Remarks

  • See Coordinated Motion, the top-level topic for Coordinated Motion.
  • The dimensionality of the move is determined by the number of axes mapped to the group.
  • When all motion has completed successfully, the axes group state is GroupStandby.
  • MC_MoveLinRel commands interpolated linear movement of an axes group to the specified relative positions.

    • An error is returned if the group is in the GroupDisabled state.
    • The maximum number of axes is set by the MaxNumberOfAxes input set in the MC_CreateAxesGrp function block.


    • Circular motion is only supported for axes groups with only two attached axes.
    • S-Curve motion is not currently supported.
    • The Jerk input is currently ignored.
    • S-Curve motion and the Jerk argument will be supported in a future release.

Figure 6-153: MC_MoveLinRel

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_MoveLinRel( ExecuteLinearMove, Group1_Ref, DistanceList, Velocity, Acceleration, Deceleration, Jerk, CoordSystem, BufferMode, TransitionMode, TransitionParams )
END_IL

ST Language Example

      (* Inst_MC_MoveLinRelST example *)
      
Inst_MC_MoveLinRel( ExecuteLinearMove, Group1_Ref, DistanceList, Velocity, Acceleration, Deceleration, Jerk, CoordSystem, BufferMode, TranstionMode, TransitionParams );

See Also