MC_MoveAdditive

PLCopen motion icon

 Function BlockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. - Performs a single-axis move for a specified distance from the endpoint of the previous move.

It is typically used with Abort specified at the BufferMode input. If BufferMode is not Abort, this move is identical to an MC_MoveRelative.

MC_MoveAdditive

Figure 7-137: MC_MoveAdditive

Time Diagram

This diagram shows two examples of the combination of two FunctionClosed A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. Blocks while the axis is in Discrete Motion state:

  • The left part of the diagram illustrates when the Second Function Block is called after the First one.
    • If the First reaches the commanded distance 6000 (and the velocity is 0), the output Done causes the Second FB to move to the distance 10000.
  • The right part of the diagram illustrates when the Second move Function Blocks 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 and moves the axis to the resulting position of 10000.

MC_MoveAdditive: Timing Diagram

Arguments

See Function Blocks - General Rules for more information about how inputs and outputs work.

Input

Execute

Description

Requests to queue the move

 

Data type

BOOL

 

Range

0, 1

 

Unit

N/A

 

Default

Axis

Description

Name of a declared instance of the AXIS_REF library function.

See Modify PLCopen Axis for more information.

 

Data type

AXIS_REF Structure

 

Range

[1, 256]

 

Unit

N/A

 

Default

Distance

Description

Distance to add to the endpoint of the previous move

 

Data type

REAL

 

Range

 

Unit

User unit

 

Default

Velocity

Description

Velocity setpointClosed Setpoint is the target value that an automatic control system, for example PID controller, will aim to reach

 

Data type

LREAL

 

Range

 

Unit

User unit/sec

 

Default

Acceleration

Description

Trapezoidal: Acceleration rate

S-curve: Maximum acceleration

 

Data type

LREAL

 

Range

 

Unit

User unit/sec2

 

Default

Deceleration

Description

Trapezoidal: Deceleration rate

S-curve: Unused

 

Data type

LREAL

 

Range

 

Unit

User unit/sec2

 

Default

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

Description

Trapezoidal: 0

S-curve: Constant jerkClosed In physics, jerk is the rate of change of acceleration; more precisely, the derivative of acceleration with respect to time

 

Data type

LREAL

 

Range

 

Unit

User unit/sec3

 

Default

BufferMode

Description

0 = abort

1 = buffer

2 = blend to active

3 = blend to next

4 = blend to low velocity

5 = blend to high velocity

See table in Buffer Modes.

 

Data type

SINT

 

Range

[0,5]

 

Unit

N/A

 

Default

Output

Done

Description

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

 

Data type

BOOL

Busy

Description

High from the moment the Execute input is one-shot to the time the move is ended

 

Data type

BOOL

Active

Description

Indicates this move is the active move

 

Data type

BOOL

CommandAborted

Description

Indicates the move was aborted

 

Data type

BOOL

Error

Description

Indicates an invalid input was specified or the move was terminated due to an error

 

Data type

BOOL

ErrorID

Description

Indicates the error if Error output is set to TRUE.

See PLCopen Function Block ErrorID Output for more information.

 

Data type

INT

FFLD Language

MC_MoveAdditive: LD example

ST Language

      (* 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