E_DriveOperationMode

The data type E_DriveOperationMode is used in conjunction with the function blocks MC_ReadDriveOperationMode and MC_WriteDriveOperationMode to read or set the currently active operation mode.

This enum abstracts the switching between operating modes for CoE and SoE drives.

For CoE, switching between operating modes is triggered via the mapped object 0x6060 “Drive operation mode” and reported back to the nc via the mapped object 0x6061 “Drive operation mode display”. Mapping of these two objects is mandatory for the function.

For SoE, operating modes are switched via the mapped “Drive control word”.

TYPE E_DriveOperationMode :
(
    DriveOperationMode_Default                      := 0,   // default => reactivate the nc default op mode (if default mode is known!)

    // general operation modes
    DriveOperationMode_Torque                       := 1,   // CoE: CST = 10 cyclic synchronous torque mode / SoE: torque/force control (1)
    DriveOperationMode_Velo1                        := 2,   // CoE: CSV = 9 cyclic synchronous velocity mode / SoE: velo control (2) with feedback 1
    DriveOperationMode_Velo2                        := 3,   // CoE: CSV2 = 16 cyclic synchronous velocity mode with feedback 2
    DriveOperationMode_Pos1                         := 4,   // CoE: CSP = 8 cyclic synchronous position mode / SoE: pos control (11) with feedback 1, lag less
    DriveOperationMode_Pos2                         := 5,   // CoE: CSP2 = 15 cyclic synchronous position mode with feedback 2 / SoE: pos control (12) with feedback 2, lag less
    DriveOperationMode_TorqueAndCommutationAngle    := 6,   // CoE: CSTCA = 11 cyclic synchronous torque mode with commutation angle

    DriveOperationMode_VelocityMode                 := 34,  // CoE: VL = 2 velocity mode
    DriveOperationMode_DriveBasedHoming             := 38,  // CoE: HM = 6 homing mode

    // special indirect index based operation modes (only for SoE). In most cases the general operation modes shall be used
    DriveOperationMode_Index0                       := 100, // SoE primary operation mode, s. S-0-0032)
    DriveOperationMode_Index1                       := 101, // SoE secondary operation mode 1, s. S-0-0033)
    DriveOperationMode_Index2                       := 102, // SoE secondary operation mode 2, s. S-0-0034)
    DriveOperationMode_Index3                       := 103, // SoE secondary operation mode 3, s. S-0-0035)
) DINT;
END_TYPE

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v3.0.0

PC or CX (x86 or x64)

Tc2_MC2