MCV_SetDriveMode

Different operation modes can be set with the MCV_SetDriveMode FB. The table below lists the possible operation modes.

Block diagram

FB parameters

VAR_IN_OUT

Variable name

Data type

Description

Axis

AXIS_REF

Axis reference

VAR_INPUT

Variable name

Data type

Description

Execute

BOOL

A rising flank at the input signal causes a change to the specified drive mode

DriveMode

INT

Value

Operation mode

0

Position control

1

Velocity control

2

Torque control

3

Position control with torque pilot control

VAR_OUTPUT

Variable name

Data type

Description

Done

BOOL

Is TRUE when a drive mode switch-over was completed successfully.

ActiveDriveMode

BOOL

The FB MCV_SetDriveMode is active.

ActualDriveMode

INT

Current drive mode

Error

BOOL

Is TRUE if an error occurs in the FB.

ErrorID

WORD

Error code

Behaviour of the FB: