MC_MoveContVel

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 non-ending move at a specified velocity with the option of continually updating the ongoing motion with the current input parameters.

Inputs

Input

Data Type

Range

Unit

Default

Description

Execute

BOOL

FALSE, TRUE

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 queue the move.

Axis

AXIS_REF

1, 256

N/A

No default

Name of a declared instance of the AXIS_REF library function.

Velocity

LREAL

All finite values.

User unit/sec

No default

The target axis velocity.

  • Negative values of velocity move the axis in the negative direction.
  • Positive values move the axis in the positive direction.
  • A value of 0 (zero) is valid.
    • 0 (zero) indicates a deceleration to zero velocity.

Acceleration

LREAL

Positive values.

User unit/sec2

No default

Trapezoidal: Acceleration rate.

S-curve: Maximum acceleration.

See S-curve and Trapezoidal Acceleration / Deceleration for more information.

Deceleration

LREAL

Positive values.

User unit/sec2

No default

Trapezoidal: Deceleration rate.

S-curve: Unused.

See S-curve and Trapezoidal Acceleration / Deceleration for more information.

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

LREAL

No range

User unit/sec3

No default

Trapezoidal: 0 (zero).

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

See S-curve and Trapezoidal Acceleration / Deceleration for more information.

ContinuousUpdate

BOOL

FALSE, TRUE

N/A

No default

Determines if the inputs of the function block are re-evaluated every cycle or if they are only evaluated on the rising edge of Execute.

  • If TRUE, when the function block is triggered (on the rising edge of Execute), the function block uses the current updated values of the input variables and apply it to the ongoing movement of the axis.
    • This continues as long as ContinuousUpdate stays TRUE.
  • The impact of ContinuousUpdate ends as soon as the function block is no longer busy (Busy output is FALSE) or ContinuousUpdate is set to FALSE.

BufferMode

SINT

See Description

N/A

No default

The specified buffer mode.

  • 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
  • See Buffer Modes for more information.

Outputs

Output

Data Type

Range

Unit

Description

InVelocity

BOOL

No range

N/A

Indicates the command velocity has reached the programmed velocity.

Busy

BOOL

No range

N/A

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

Active

BOOL

No range

N/A

Indicates this move is the Active move.

CommandAborted

BOOL

No range

N/A

Indicates the move was aborted.

Error

BOOL

No range

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 for more information.

Remarks

  • After MC_MoveContVel execution begins (Execute input - low to high), follow up changes to input parameters immediately affect the ongoing motion, without requiring an additional low to high transition on the Execute input.
  • This type of move can be terminated with the MC_Halt function block or by aborting it with another move.

Figure 6-231: MC_MoveContVel

Time Diagram

This example shows the behavior of the combination of a MC_Stop function block with a MC_MoveContVel function block.

  • A rotating axis is ramped down with FB2 MC_Stop.
  • The axis rejects motion commands as long as MC_Stop parameter Execute = TRUE.
  • FB1 MC_MoveContVel reports an error indicating the busy MC_Stop command.

Figure 6-232: Time Diagrams: First and Second FBs

MC_MoveVelocity: Timing Diagram

Figure 6-233: Time Diagram

FBD Language Example

Not available.

FFLD Language Example

IL Language Example

Not available.

ST Language Example

(* MC_MoveContVel STClosed "Structured text"
A high-level language that is block structured and syntactically resembles Pascal example *)
Inst_MC_MoveContVel( MovVelReq , Axis1, Vel, 100.0, 100.0, 0, True, MC_BUFFER_MODE_ABORTING );

See Also