MC_MoveVelocity: Move axis at set velocity as of V6 (S7-1200) - Motion Control

S7-1200 Motion Control (S7-1200)

ft:publication_title
S7-1200 Motion Control (S7-1200)
Product
Motion Control
Version
V20
Publication date
11/2024
Language
en-US
MC_MoveVelocity: Move axis at set velocity as of V6

Description

Motion control instruction "MC_MoveVelocity" moves the axis constantly at the specified velocity.

Requirements

  • The positioning axis technology object has been configured correctly.

  • The axis is enabled.

Override response

MC_MoveVelocity can be aborted by the following Motion Control commands:

  • MC_Home command Mode = 3

  • MC_Halt command

  • MC_MoveAbsolute command

  • MC_MoveRelative command

  • MC_MoveVelocity command

  • MC_MoveJog command

  • MC_CommandTable command

The new MC_MoveVelocity command aborts the following active Motion Control commands:

  • MC_Home command Mode = 3

  • MC_Halt command

  • MC_MoveAbsolute command

  • MC_MoveRelative command

  • MC_MoveVelocity command

  • MC_MoveJog command

  • MC_CommandTable command

Parameters

Parameter

Declaration

Data type

Default value

Description

Axis

INPUT

TO_SpeedAxis

-

Axis technology object

Execute

INPUT

BOOL

FALSE

Start of the command with a positive edge

Velocity

INPUT

REAL

10.0

Velocity specification for axis motion

Limit values:

Start/stop velocity ≤ |Velocity ≤ maximum velocity

(Velocity = 0.0 is permitted)

Direction

INPUT

INT

0

Direction specification

0

Direction of rotation corresponds to the sign of the value in parameter "Velocity"

1

Positive direction of rotation

(The sign of the value in parameter "Velocity" is ignored)

2

Negative direction of rotation

(The sign of the value in parameter "Velocity" is ignored)

Current

INPUT

BOOL

FALSE

Maintain current velocity

FALSE

"Maintain current velocity" is deactivated. The values of parameters "Velocity" and "Direction" are used.

TRUE

"Maintain current velocity" is activated. The values in parameters "Velocity" and "Direction" are not taken into account.

When the axis resumes motion at the current velocity, the "InVelocity" parameter returns the value TRUE.

PositionControlled

INPUT

BOOL

TRUE

FALSE

Non position-controlled operation

TRUE

Position-controlled operation

The parameter applies as long as the "MC_MoveVelocity" command is being executed. After this, the setting of MC_Power applies again.

This parameter is ignored when a PTO axis is used.

InVelocity

OUTPUT

BOOL

FALSE

TRUE

  • "Current" = FALSE:

    The velocity specified in parameter "Velocity" was reached.

  • "Current" = TRUE:

    The axis travels at the current velocity at the start time.

Busy

OUTPUT

BOOL

FALSE

TRUE

The command is being executed

CommandAborted

OUTPUT

BOOL

FALSE

TRUE

During execution, the command was aborted by another command.

Error

OUTPUT

BOOL

FALSE

TRUE

An error occurred during execution of the command. The cause of the error can be found in parameters "ErrorID" and "ErrorInfo".

ErrorID

OUTPUT

WORD

16#0000

Error ID for parameter "Error"

ErrorInfo

OUTPUT

WORD

16#0000

Error info ID for parameter "ErrorID"

Note

PLCopen Version 2.0

The Motion Control instruction "MC_MoveVelocity" is compatible to PLCopen Version 2.0 as of V4.

The "InVelocity" and "Busy" parameters show their status regardless of the "Execute" parameter until the command is overridden or stopped by an error. For more information, refer to the section " Tracking active commands.

Behavior with zero setpoint velocity (Velocity = 0.0)

An MC_MoveVelocity command with "Velocity" = 0.0 (such as an MC_Halt command) aborts active motion commands and stops the axis with the configured deceleration.

When the axis comes to a standstill, output parameter "InVelocity" indicates TRUE for at least one program cycle.

"Busy" indicates the value TRUE during the deceleration process and changes to FALSE together with "InVelocity". If parameter "Execute" = TRUE is set, "InVelocity" and "Busy" are latched.

When the "MC_MoveVelocity" command is started, status bit "SpeedCommand" is set in the technology object. Status bit "ConstantVelocity" is set upon axis standstill. Both bits are adapted to the new situation when a new motion command is started.