CIP Sync: State Machine
The device control of the AKD2G can be used to carry out all the motion functions in the corresponding modes, which are Homing Mode and Cyclic Position Mode. The control of the AKD2G is implemented through a mode-dependent state machine. The mode of operation is set through the Manufacturer Specific Bits 11 and 12 (see Mode-dependent bits in the Controlword). 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 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
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 Bit 7 'Reset Fault' of the controlword must be cleared by the host. |
16 | Bit 2 is set | Motion function is re-enabled as long as the quick stop action has completed and standstill has been reached. |
Controlword
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 |
Reserved |
6 |
Reserved |
7 |
Reset fault (only effective for faults) |
8 |
Pause/Halt |
9 |
Reserved |
10 |
Reserved |
11 | Select Home Mode |
12 | Select Cyclic Position Mode |
13 | Reserved |
14 | Reserved |
15 | Reserved |
Controlword bits 11-15 mode
Controlword bits 11-12 are defined to be manufacturer specific; bits 13-15 are reserved. For AKD2G, specific modes can be set for each bit that defines the behavior.
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 Manufacturer Specific Bit 11 (Homing Mode) or Bit 12 (CIP Sync Cyclic Sync Position Mode).
Operation Mode | Bit 4 | Bit 5 | Bit 6 | Bit 9 |
---|---|---|---|---|
Homing Mode (hm) | Start Homing Operation | Reserved | Reserved | Reserved |
CIP Sync Cyclic Sync Position Mode (csp) | Start Cyclic Position following | 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
The momentary state of the state machine can be read with the aid of the 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 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:
|
12 | Operation mode specific (reserved) | Home Attained |
13 | Operation mode specific (reserved) | Home/Position Following Error |
14 | Ramp Down Requested | Motion Mode Selected (0 = Homing, 1 = Cyclic Position) |
15 | Manufacturer-specific (reserved) | Following Position |
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.
Modes of Operation | Bit 12 | Bit 13 |
---|---|---|
Homing mode (hm) | Homing attained | Homing error |
CIP Sync Cyclic Position Mode (csp) | Reserved | Following error |