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:
- To prevent the occurrence of a position lag error during torque control, the user must deactivate the position lag monitor (see MCV_PosLagMonitor FB).
- Use of an invalid drive mode sets the "Error“ output to TRUE. The “ErrorID“ output indicates the error P-ERR-44049 (ERR_PO_AX_INVALID_DRIVE_MODE).
- A change in drive mode is only permitted in the “Disabled” and “Standstill” states. If this is not the case, the “Error“ output becomes TRUE and “ErrorID“ indicates the error P-ERR-44050 (ERR_PO_AX_TNA_TORQUE_CTRL_ACTIVE).