MC_MoveAdditive

PLCopen motion icon

 Function Block - Performs a single-axis move for a specified distance from the endpoint of the previous move.

Inputs

Input

Data Type

Range

Unit

Default

Description

Execute

BOOL

FALSE, TRUE

N/A

No default

On the rising edge, request to queue the move.

Axis

AXIS_REF

1 to 256

N/A

No default

Name of a declared instance of the AXIS_REF library function.

Distance

LREAL

No range

User units

No default

Distance to add to the endpoint of the previous move.

Velocity

LREAL

No range

User unit/sec

No default

Velocity setpoint.

Acceleration

LREAL

No range

User unit/sec2

No default

Trapezoidal: Acceleration rate.

S-curve: Maximum acceleration.

See S-curve and Trapezoidal Acceleration / Deceleration.

Deceleration

LREAL

No range

User unit/sec2

No default

Trapezoidal: Deceleration rate.

S-curve: Maximum deceleration.

See S-curve and Trapezoidal Acceleration / Deceleration.

Jerk

LREAL

No range

User unit/sec3

No default

Trapezoidal: 0 (zero).

S-curve: Constant jerk.

See S-curve and Trapezoidal Acceleration / Deceleration.

BufferMode

SINT

0 to 5

N/A

No default

See Buffer Modes.

  • 0 = Abort.
  • 1 = Buffer.
  • 2 = Blend to active.
  • 3 = Blend to next.
  • 4 = Blend to low velocity.
  • 5 = Blend to high velocity.

Outputs

Output

Data Type

Range

Unit

Description

Done

BOOL

FALSE, TRUE

N/A

Indicates the move completed successfully.
The Command Position has reached the endpoint.

Busy

BOOL

FALSE, TRUE

N/A

High from the moment the Execute input goes high until the time the move is ended.

Active

BOOL

FALSE, TRUE

N/A

Indicates this move is the Active move.

CommandAborted

BOOL

FALSE, TRUE

N/A

Indicates the move was aborted.

Error

BOOL

FALSE, TRUE

N/A

Indicates either:

  • An invalid input was specified.
  • The move was terminated due to an error.

ErrorID

INT

No range

N/A

Indicates the error if Error output is TRUE.

See PLCopen Function Block ErrorIDs.

Remarks

Figure 1: MC_MoveAdditive

Time Diagram

These images show two examples of the combination of two Function Blocks (FBs) while the axis is in Discrete Motion state:

  • The left part of the diagram illustrates when the second FB is called after the first one.
    • If the first reaches the commanded distance 6000, and the velocity is 0 (zero), the output Done causes the second FB to move to the distance 10000.
  • The right part of the diagram illustrates when the second move FB starts the execution while the first FB is still executing.
    • The first motion is interrupted and aborted by the Test signal during the constant velocity of the first FB.
    • The second FB:
      • Adds on the previous commanded position of 6000 the distance 4000.
      • Moves the axis to the resulting position of 10000.

Figure 2: Time Diagrams: First and Second FBs

Figure 3: Time Diagram

FBD Language Example

Not available.

FFLD Language Example

IL Language Example

Not available.

ST Language Example

      (* MC_MoveAdditive ST example *) 
      
Inst_MC_MoveAdditive( MovAddReq, Axis1, 123.456, 100.0, 100.0, 100.0, 0, 0 ); //Inst_MC_MoveAdditive is an instance of MC_MoveAdditive function block
MovAddDone := Inst_MC_MoveAdditive.Done; //store Done output into user defined variable

See Also