Drive logic

Choose the drive mode of operation per axis, and see how the drive logic switches CiA402 drives on and off.

The drive logic runs one CiA402 state machine per axis. It switches each drive on and off through the drive’s control wordThe control word (object 0x6040) is how the controller commands a CiA402 drive: switch on, enable operation, switch off, acknowledge a fault. , tells it which mode to run in, and follows its state through the status wordThe status word (object 0x6041) is how a CiA402 drive reports its state: ready, switched on, operation enabled, fault. .

driveModeone value per axis driveModeAllsets every axis Drive logic CiA402 state machine one per axis Connect and link the CiA402 drive CiA402drive driveControlWord Controlword 0x6040 driveOpMode Modes of operation 0x6060 driveStatusWord Statusword 0x6041 driveOpMode so the loops know the mode Axes control Axis control loops

All parameters on this page are under root/DriveLogic/ and hold one value per axis.

Mode of operation

The mode of operation decides what the drive closes its own loop on, and so what the application sends it.

CSP · 8
Cyclic synchronous position

The drive follows a target position and closes the position loop itself. The application sends a new position every cycle.

CSV · 9
Cyclic synchronous velocity

The drive follows a target velocity. The application closes the position loop and sends a velocity every cycle.

CST · 10
Cyclic synchronous torque

The drive follows a target torque. The application closes the position and velocity loops and sends a torque every cycle.

By default every axis runs in CSP. In AGV applications the wheel axes run in CSV.

Choose a setpoint mode

The setpoint is what the application commands: a position, a velocity or a torque. Each combination of setpoint and drive mode has its own set-up; click one to open its guide.

All modes the drive logic knows
Value Mode
1 Profiled position
2 Velocity
3 Profiled velocity
4 Profiled torque
6 Homing
7 Interpolated position
8 Cyclic synchronous position (CSP)
9 Cyclic synchronous velocity (CSV)
10 Cyclic synchronous torque (CST)

Any other value is passed to the drive unchanged, for a mode the drive manufacturer defines.

Change the mode in Desk

  1. Open Motorcortex Desk and connect to the controller.

  2. In the Parameters panel, type DriveLogic/driveMode in Filter parameters….

  3. Click the value field of driveMode, type one mode per axis separated by spaces, and press Enter. For example, 8 8 8 9 9 9 runs the first three axes in CSP and the last three in CSV. To change one axis, expand driveMode and write that channel.

    To give every axis the same mode, write the mode to driveModeAll instead.

  4. Press the save button at the top of the Parameters panel (tooltip Save parameter tree to server, or Ctrl+S). The controller loads the saved values after the configuration’s defaults, so the saved mode is the one it starts with.

The drive logic only reaches the drive through links in the EtherCAT configuration. Each axis needs three: two that carry the commands and the mode to the drive, and one that brings the drive’s state back.

The standard configurations already contain these links. Add them yourself only for a new drive: in the ECAT tool, link each entry to its parameter, using the channel of the axis. The first axis is channel 0, the second channel 1, and so on.

ECAT tool: the drive's 6060:00 Mode of Operation entry with root/DriveLogic/driveOpMode linked to it

The Modes of operation entry of a drive, with its link to the drive logic.

Other drive logic parameters

Parameter What it does
disableDrive Keeps the axis switched off and ignores its errors, for example for an axis that is not fitted.
seqEnableOpId Holds the axis off until the axis with this number is enabled, so axes switch on one after another. 0 turns it off.
timeoutSwitchOnSec, timeoutEnableOpSec, timeoutFaultAckSec, timeoutSwitchOffSec How long the state machine gives the drive to complete each step: switching on, enabling operation, acknowledging a fault and switching off.
delayEnableOpSec A pause between switching the drive on and enabling operation.
driveState, driveEnabled, driveHasError Read-only: where the state machine is, and whether the drive is enabled or in error.