MCV_SetDriveMode
Different operating modes can be set with the MCV_SetDriveMode FB. For the available drive modes see the table below.
Block diagram

Parameters of the function block
| VAR_IN_OUT | |||
| Axis | AXIS_REF | Axis reference. | |
VAR_INPUT | ||||
| Execute | BOOL | Change drive mode at rising edge. | |
| DriveMode | INT | Drive mode to be set (see above). | |
VAR_OUTPUT | ||||
| ActiveDriveMode | BOOL | The function block MCV_SetDriveMode is active. | |
| ActualDriveMode | INT | Currently supported drive modes: | |
(0) | position control | |||
(1) | speed control | |||
(2) | torque control | |||
(3) | position control with torque pilot control | |||
| Error | BOOL | Indicates if an error has occurred. | |
| ErrorID | WORD | Error identification. |
Behavior of the function block
- Following error monitoring must be deactivated to ensure that no following error will occur during torque control (see MCV_PosLagMonitor FB).
- Use of an inadmissible mode sets the "Error’ output to TRUE. ‘ErrorID’ is assigned the error code 44049 (ERR_PO_AX_INVALID_DRIVE_MODE).
- The mode change to "TorqueControl’ takes place only when the axis is in the ‘Standstill’ or ‘Continuous Motion’ or ‘Discrete Motion’ or ‘Synchronized Motion’ state. If this is not the case, the "Error’ output becomes FALSE and ‘ErrorID’ = 44050 (ERR_PO_AX_TNA_TORQUE_CTRL_ACTIVE).