DS402 State Machine

The device control of the AKD2G can be used to carry out all the motion functions in the corresponding modes. The control of the AKD2G is implemented through a mode-dependent state machine. The mode of operation is set through object 6060h, 6860h Modes of operation - AxisX. There are separate state machines for each axis.


  • The fieldbus state machine controls the axis as long as AXIS#.CMDSOURCE is equal to “Fieldbus”. To enable the axis using WorkBench and bypass the DS402 state machine, a command source other than “fieldbus” should be selected for AXIS#.CMDSOURCE. During commissioning and performing initial procedures like tuning, it is recommended the fieldbus master is OFF (not running) or not connected and the command source is “Service”.

State Machine (DS402)

State Machine Description

State Description
Not Ready for Switch On Axis is not ready to switch on, initialization has not completed.
Switch On Disable Axis is ready to switch on, parameters can be transferred, the bus voltage can be switched on, motion functions cannot be carried out yet.
Ready to Switch On Bus voltage may be switched on, parameters can be transferred, motion functions cannot be carried out yet.
Switched On Bus voltage must be switched on, parameters can be transferred, motion functions cannot be carried out yet.
Operation Enable No fault present, output stage and motion functions are enabled.
Quick Stop Active Drive has been stopped with the emergency ramp, output stage is enabled, motion functions are not enabled.
Fault Reaction Active A fault has occurred, the drive is in process of stopping with the quick stop ramp.
Fault A fault is active, the drive has been stopped and disabled.

Transitions of the state machine

The state transitions are affected by internal events (ex: switching off the bus voltage, WorkBench enable/disable) and by the flags in the controlword (bits 0,1,2,3,7).

Transition Event Action
0 Reset Initialization
1 Initialization completed successfully. The axis is ready to operate. None
2 Bit 1 Disable Voltage and Bit 2 Quick Stop are set in the controlword (Shutdown command). Bus voltage may be present. None
3 Bit 0 is also set (Switch On) and bus voltage is present None
4 Bit 3 is also set (Enable Operation) Torque is applied to axis and motion function is enabled, depending on the mode that is set.
5 Bit 3 is canceled (Disable Operation) Output stage is disabled. No torque applied to motor.
6 Bit 0 is canceled (Shutdown) None
7 Bits 1 and 2 are canceled (Quick Stop/Disable Voltage) None
8 Bit 0 is canceled (Shutdown) Output stage is disabled. No torque applied to motor.
9 Bit 1 is canceled (Disable Voltage) Output stage is disabled. No torque applied to motor.
10 Bits 1 and 2 are canceled (Quick Stop/Disable Voltage) Output stage is disabled. No torque applied to motor.
11 Bit 2 is canceled (Quick Stop) Drive is stopped with the emergency braking ramp. The output stage remains enabled. Setpoints are canceled (motion block number, digital setpoint, speed for jogging or homing). Bit 2 must be set again to perform any further motion.
12 Bit 1 is canceled (Disable Voltage) Output stage is disabled. No torque applied to motor.
13 Fault reaction active Execute appropriate fault reaction
14 Fault reaction is completed Drive function is disabled. The power section may be switched off.
15 "Fault Reset" command received from host A reset of the fault condition is carried out if no fault exists currently on the drive. After leaving the state Fault the Bit7 'Reset Fault' of the controlword must be cleared by the host.
16 Bit 2 is set Motion function is reenabled as long as the quick stop action has completed and standstill has been reached.

Controlword Object 6040h

The control commands are built from the logical combination of the bits in the controlword and external signals (example: enable output stage).

Bit assignment in controlword

Bit Name

0

Switch on

1

Disable voltage

2

Quick stop

3

Enable operation

4

Operation mode specific

5

Operation mode specific

6

Operation mode specific

7

Reset fault (only effective for faults)

8

Pause/halt

9

Operation mode specific

10

Reserved

11 AXIS#.CANOPEN.CONTROLBIT11.MODE
12 AXIS#.CANOPEN.CONTROLBIT12.MODE
13 AXIS#.CANOPEN.CONTROLBIT13.MODE
14 AXIS#.CANOPEN.CONTROLBIT14.MODE
15 AXIS#.CANOPEN.CONTROLBIT15.MODE

Controlword bits 11-15 mode

Controlword bits 11-15 are defined to be manufacturer specific by the DS402 standard. For AKD2G, specific modes can be set for each bit that defines the behavior. See AXIS#.CANOPEN​.CONTROLBIT##.MODE for available mode descriptions.

Commands in the controlword

Command Bit 7 Fault Reset Bit 3 Enable Operation Bit 2 Quick stop Bit 1 Disable Voltage Bit 0 Switch On Transitions

Shutdown

X

X

1

1

0

2, 6, 8

Switch on

X

X

1

1

1

3

Disable voltage

X

X

X

0

X

7, 9, 10, 12

Quick stop

X

X

0

1

X

7, 10, 11

Disable operation

X

0

1

1

1

5

Enable operation

X

1

1

1

1

4

Fault reset

1

X

X

X

X

15

Bits marked by an X are irrelevant.

Mode-dependent bits in the controlword

The following table shows the mode-dependent bits in the controlword. Only manufacturer-specific modes are supported at present. The individual modes are set by object 6060h, 6860h Modes of operation - AxisX.

Operation Mode No. Bit 4 Bit 5 Bit 6 Bit 9
Analog velocity FEh reserved reserved reserved reserved
Analog torque FFh reserved reserved reserved reserved
Cyclic sync position Mode (csp) 08h reserved reserved reserved reserved
Cyclic sync velocity mode (csv) 09h reserved reserved reserved reserved
Electronic Gearing FDh reserved reserved reserved reserved
Homing mode (hm) 06h Start homing operation reserved reserved reserved
Profile position mode (pp) 01h New set-point Use new set-point immediately

0 - Absolute move

1 - Relative move

Blend / only the fly move once target position is reached
Profile torque mode (tq) 04h reserved reserved reserved reserved
Profile velocity mode (pv) 03h reserved reserved reserved reserved

Description of the remaining bits in the controlword

The remaining bits in the controlword that are not used for drive state machine commands or operation mode specific commands are used for special operations:

Bit 8 – Pause/Halt: If bit 8 is set, then the drive halts (pauses) in all modes. The set-points (speed for homing or jogging, motion task number, setpoints for digital mode) for the individual modes are retained.

Statusword 6041h

The momentary state of the state machine can be read with the aid of the statusword.

Index Sub-Index Data Type Access PDO Mappable Description
0x6041 0 Unsigned16 RW TxPDO Drive state machine statusword

Bit assignment in the statusword

Bit Name Description
0

Ready to switch on

Controlled by state machine
1

Switched on

Controlled by state machine
2

Operation enabled

Controlled by state machine
3

Fault

Axis fault is active
4

Voltage enabled

Bus voltage is present
5

Quick stop

Controlled by state machine
6

Switch on disabled

Controlled by state machine
7

Warning

Axis warning active
8 STO – Safe Torque Off STO is preventing drive from enabling (AXIS#.SAFE.STO.ACTIVE)
9 Remote

1 – Fieldbus in control (AXIS#.CMDSOURCE = Fieldbus)

0 – WorkBench in control (AXIS#.CMDSOURCE = Service)

10 Target reached

Axis has reached target value.

In Profile Position Mode and Homing Mode the position window is set using AXIS#.SETTLE.P. The behavior can be configured by AXIS#.CANOPEN​.TARPOSMODE.

In Profile velocity and Analog velocity modes, this bit is set when AXIS#.VL.FB is within the window set using the object 606Dh, 686Dh Velocity window - AxisX sub 0 and a window time is set using object 606Eh, 686Eh Velocity window time - AxisX sub 0.

The bit is also set on coming to standstill on Halt bit (bit 8 of Controlword = 1) or after Quickstop (bit 2 of Controlword = 0) with quick stop option code 5 or 6.

11 Internal limit active

This bit is controlled by the conditions below:

  • Set if motion is being commanded into a limit switch and clears when moving out of a limit switch.
  • Set if a controlled stop is in progress (SS1, action table, etc) and clears once the controlled stop is complete.

    • The drive is usually disabled at the end of most controlled stop actions and this bit will clear.
  • Set while Wake and Shake is active.
12 Operation mode specific (reserved) See Mode-dependent bits in the statusword
13 Operation mode specific (reserved) See Mode-dependent bits in the statusword
14 Ramp Down Requested SIL3 drives only. Indicates that a SS1 input was triggered and the master should stop the axis. STO will be triggered in configured SS1_t amount of time for instance of SS1 that was triggered.
15 Manufacturer-specific (reserved)  

States of the state machine

Bits marked by X are irrelevant

State Bit 6 switch on disabled Bit 5 quick stop Bit 3 fault Bit 2 operation enabled Bit 1 switched on Bit 0 ready to switch on

Not ready to switch on

0

X

0

0

0

0

Switch on disabled

1

X

0

0

0

0

Ready to switch on

0

1

0

0

0

1

Switched on

0

1

0

0

1

1

Operation enabled

0

1

0

1

1

1

Fault

0

X

1

0

0

0

Fault reaction active

0

X

1

1

1

1

Quick stop active

0

0

0

1

1

1

Mode-dependent bits in the statusword

The following table shows the mode-dependent bits in the statusword. The individual modes are set by object 6060h, 6860h Modes of operation - AxisX.

Modes of Operation No. Bit 12 Bit 13
Analog velocity FEh This bit is 1 while the motor is at standstill (see AXIS#.ZEROREACHED). Not used
Analog torque FFh This bit is 1 while the motor is at standstill (see AXIS#.ZEROREACHED). Not used
Cyclic sync position mode (csp) 08h This bit stays on 1 as long as the drive is following the position set-points. Following error
Cyclic sync velocity mode (csv) 09h This bit stays 1 as long as the drive is following velocity set-points Not used
Electronic Gearing FDh This bit is 1 if the slave is synchronized (bit 5 of AXIS#.MOTIONSTAT is 1). Following error
Homing mode (hm) 06h Homing attained Homing error
Profile position mode (pp) 01h Set-point acknowledge Following error
Profile velocity mode (pv) 03h This bit is 1 while the motor is at standstill (see AXIS#.ZEROREACHED). Not used