MC_MoveVelocity

PLCopen motion icon

 Function Block - Performs a single-axis, non-ending move at a specified velocity.

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.

Speed

LREAL

Positive values.

User unit/sec

No default

The target axis speed.

Direction is specified by the Direction input parameter.

Acceleration

LREAL

Positive values.

User unit/sec2

No default

Trapezoidal: Acceleration rate.

S-curve: Maximum acceleration.

See S-curve and Trapezoidal Acceleration / Deceleration.

Deceleration

LREAL

Positive values.

User unit/sec2

No default

Trapezoidal: Deceleration rate.

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.

Direction

SINT

0 to 1

N/A

No default

  • A 0 or False value specifies that the axis should move in the positive direction.
  • A 1 or True value specifies that the axis should move in the negative direction.

BufferMode

SINT

N/A

No default

The specified buffer mode.

See Buffer Modes for detailed information.

  • MC_BUFFER_MODE_ABORTING
  • MC_BUFFER_MODE_BUFFERED
  • MC_BUFFER_MODE_BLENDING_PREVIOUS
  • MC_BUFFER_MODE_BLENDING_NEXT
  • MC_BUFFER_MODE_BLENDING_LOW
  • MC_BUFFER_MODE_BLENDING_HIGH

Outputs

Output

Data Type

Range

Unit

Description

InVelocity

BOOL

FALSE, TRUE

N/A

Indicates the command velocity has reached the programmed velocity.

Busy

BOOL

FALSE, TRUE

N/A

High from the moment the Execute input is one-shot to 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


  • Consider using the MC_MoveContVel function block.
    It is more flexible and allows for the continuous update of motion parameters.

  • This type of move can be terminated with the MC_Halt function block or by aborting it with another move.
  • See Function Blocks - General Rules about how inputs and outputs work.

Figure 1: MC_MoveVelocity

Time Diagram

These images show two examples of the combination behavior of an MC_Stop FB with a MC_MoveVelocity FB.

  • 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_MoveVelocity reports an error indicating the busy MC_Stop command.

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_MoveVelocity ST example *)
            
Inst_MC_MoveVelocity( MovVelReq , Axis1, 200.0, 100.0, 100.0, 0, True, MC_BUFFER_MODE_ABORTING );

See Also