Controlling the Power Drive System
State Machine
The drive state machine is controlled by the Controlword (0x6040) and the status is viewed by the Statusword (0x6041). The state machine can be operated as shown below
There are a few things to note when using the state machine
- When the mode of operation is set to any CiA402 mode the state machine automatically transitions to "Ready to switch on".
- When the transitioning out of "Fault" the state machine automatically transitions to "Ready to switch on".
- Section A
- no torque is present on the motor in Section A regardless of if motor power is present
- Section B
- motor power must be present to transition to "Switched on".
- If motor power is switched off or not present a fault will occur.
- no torque is present on the motor in Section B.
- Section C
- If motor power is switched off or not present a fault will occur.
- Torque is present on the motor in Section C.
- It is possible for the master to transition straight to "Operation enabled".
- See the Controlword description for additional information on state transitions 1-15.
Controlword (0x6040)
The Controlword is used to transition between and set the required states in the state machine.
The Controlword bits are defined as follows:
Bit | Name | Abbreviation |
---|---|---|
0 | Switch on | SO |
1 | Enable voltage | EV |
2 | Quick stop | QS |
3 | Enable operation | EO |
4-6 | Operation mode specific | OMS |
7 | Fault reset | F |
8 | Halt | H |
9 | Operation mode specific | OMS |
10 | Reserved | R |
11-15 | Manufacturer specific | MS |
- The drive does not support the Quick stop bit and shall be ignored if set to 0.
The following bits are required when transitioning between states:
Transition | Value (h) | BITS | |||||||
---|---|---|---|---|---|---|---|---|---|
0 (SO) | 1 (EV) | 2 (QS) | 3 (EO) | 4-6 (OMS) | 7 (F) | 8-15 | |||
15 | Fault → Ready to switch on | 0x86 | 0 | 1 | 1 | 0 | xxx | 1 | xxxxxxxx |
8/9/0 | Non fault → Ready to switch on | 0x06 | 0 | 1 | 1 | 0 | xxx | 0 | xxxxxxxx |
3/5 | → Switched on(1) | 0x07 | 1 | 1 | 1 | 0 | xxx | 0 | xxxxxxxx |
4/4a | → Operation enabled | 0x0F/0x1F | 1 | 1 | 1 | 1 | xxx | 0 | xxxxxxxx |
(1) The switched on state is often bypassed by the master.
Statusword (0x6041)
The statusword has the following defined bits
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ms | oms | ila | tr | rm | ms | w | sod | qs | ve | f | oe | so | rtso |
Definitions
- ms = manufacture specific
- oms = operation mode specific
- ila = internal limit active
- tr = target reached
- rm = remote
- w = warning
- sod = switch on disabled
- qs = quick stop
- ve = voltage enabled
- f = fault
- oe = operation enabled
- so = switched on
- rtso = ready to switch on
FSA States
The Statusword indicates the current state of the drive state machine. The following table outlines the Statusword bits and the represented state
State | Statusword Bits | Functional Meaning |
---|---|---|
Not ready to switch on | xxxx xxxx x0xx 0000 | No CiA mode of operation selected |
Switch on disabled(1) | xxxx xxxx x100 0000 | No motor torque - drive disabled |
Ready to switch on | xxxx xxxx x01x 0001 | No motor torque - drive disabled |
Switched on | xxxx xxxx x01x 0011 | No motor toque - drive disabled |
Operation Enabled | xxxx xxxx x01x 0111 | Motor has torque - drive enabled |
Fault reaction active(1) | xxxx xxxx x0xx 1111 | Motor is losing torque - drive disabling |
Fault | xxxx xxxx x0xx 1000 | No motor torque - drive disabled |
Quick stop active(2) | xxxx xxxx x00x 0111 | Not implemented |
(1) these states are automatically transitioned through
(2) quick stop active is not currently implemented
Voltage Enabled - Bit4
The CM1-E has separate control and motor power. The 24V motor power status can be read through bit 4 on the statusword.
- bit4=1 - 24V motor drive power is detected.
- bit4=0 - motor drive power is not detected.
The voltage DC value is also available on object 0x6079 (DC link voltage).
Modes of Operation
CiA402 defines modes of operation. This allows the user to use the drive in a mode that is most suited to the application.
Modes of operation object list
Index | Name | Function |
---|---|---|
0x6060 | Modes of operation | Write the required mode of operation |
0x6061 | Modes of operation display | Read the current mode of operation set on the drive |
The following modes of operation are available on the drive
Mode of operation | Abbreviation | 0x6060 value |
---|---|---|
Profile Velocity mode | PV mode | 3 |
Cyclic Synchronous Position mode | CSP mode | 8 |
Cyclic Synchronous Velocity mode | CSV mode | 9 |
Switching between modes
The drive is designed for dynamic switching between modes of operation. The "Modes of operation" and "Modes of operation display" are available in the RxPDO and TxPDO respectively. This allows the user to switch modes of operation without changing the ESM out of Operational. It is recommended the motor is put into a safe known state before switching modes. The master should send PDO data to the current mode of operation and the desired mode while switching modes. This should be continued until the "Modes of operation display" indicates the new mode has been set.
Cyclic Synchronous Position Mode
Cyclic synchronous position mode is set by setting the Modes of operation to 8. CSP mode is designed to allow the master controller full control of the position target. The 0x6064 position target shall be updated every 1ms. Failure to update the position target at 1ms intervals will result in noisy and poor motion.
The following objects are used in CSP mode
Object | Value | Unit | Description | PDO Mapped |
---|---|---|---|---|
0x6040 | - | - | See CiA 402 - Drives and Motion Control Device Profile (Copy) | Yes |
0x6041 | - | - | See CiA 402 - Drives and Motion Control Device Profile (Copy) | Yes |
0x607A | -232 to +231 | pulses | Target position | Yes |
0x6064 | -232 to +231 | pulses | Position actual value | Yes |
0x6060 | 8 | - | CSP mode set | Yes |
- Additional PDO objects are available. See PDO Mappings.
Use of Controlword and Statusword
No additional Controlword and Statusword bits are implemented.
Cyclic Synchronous Velocity Mode
Cyclic synchronous velocity mode is set by setting the Modes of operation to 9. CSV mode is designed to allow the master controller full control of the instantaneous velocity target. The 0x60FF velocity target shall be updated every 1ms. Failure to update the position target at 1ms intervals will result in noisy and poor motion.
The following objects are used in CSP mode
Object | Value | Unit | Description | PDO Mapped |
---|---|---|---|---|
0x6040 | - | - | See CiA 402 - Drives and Motion Control Device Profile (Copy) | Yes |
0x6041 | - | - | See CiA 402 - Drives and Motion Control Device Profile (Copy) | Yes |
0x60FF | See table below for motor maximum speeds | pulses/ms | Target velocity | Yes |
0x606C | See table below for motor maximum speeds | pulses/ms | Velocity actual value | Yes |
0x6060 | 9 | - | CSV mode set | Yes |
- Additional PDO objects are available. See PDO Mappings.
Motor maximum speeds
Part number | Max Speed RPM | Max 0x606C (Target velocity) |
---|---|---|
CM1-E-17S30D | 3000 rpm | -2,500,000 to +2,500,000 |
CM1-E-17L30D | 3000 rpm | -2,500,000 to +2,500,000 |
CM1-E-23S30D | 3000 rpm | -2,500,000 to +2,500,000 |
CM1-E-23L20D | 2000 rpm | -1,666,667 to +1,666,667 |
Use of Controlword and Statusword
No additional Controlword and Statusword bits are implemented.
Profile Velocity Mode
Profile Velocity mode provides an effective way to run the motor in velocity mode with very little overhead on the Ethercat master. The EtherCAT master sets the required acceleration, deceleration and then issues the target velocity. The drive will ramp up to the target velocity.
The following objects are used in Velocity Profile mode
Object | Value | Unit | Description | PDO Mapped |
---|---|---|---|---|
0x6040 | - | - | See CiA 402 - Drives and Motion Control Device Profile (Copy) for general usage. | Yes |
0x6041 | - | - | See CiA 402 - Drives and Motion Control Device Profile (Copy) for general usage. | Yes |
0x6060 | 3 | - | Sets the mode to Profile Velocity mode | Yes |
0x60FF | See table below for maximum speeds | pulses/s | Sets the target speed | Yes |
0x6083 | 0-32767 | pulses/s2 | Profile Acceleration | No |
0x6084 | 0-32767 | pulses/s2 | Profile Deceleration | No |
Use of Controlword and Statusword
The Controlword and Statusword use some additional mode specific bits in Profile velocity mode.
The Controlword Bit8 is used a s a Halt bit.
Bit | Value | Definition |
---|---|---|
8 | 0 | The motion shall be executed or continued |
1 | The axis shall be stopped using the deceleration value in 0x6084 |
The Statusword implements 2 additional bits to indicate if the target velocity is reached and/or is the current velocity is 0.
Bit | Value | Definition |
---|---|---|
10 | 0 | Halt (Bit 8 in controlword) = 0: Target not reached |
1 | Halt (Bit 8 in controlword) = 0: Target reached | |
12 | 0 | Speed is not equal to 0 |
1 | Speed is equal to 0 |
Use of acceleration and deceleration value
The deceleration value is only used when the target velocity is set to 0 or the halt bit is set. For all other changes in velocity the acceleration value is used.