CANopen over EtherCAT for electrical drives

CANopen also defines several device profiles by establishing standard behavior and communication objects for similar devices. In the case of electrical drives, the profile is given by the CiA402 (“CANopen device profile for drives and motion control”) norm compliant with the IEC standard that defines programming languages for programmable control systems. The CiA402 norm specifies specific objects in OD in range 0x6000 to 0x67fe, what guarantees, that for a drive compatible with CiA402, typical process values such as position, velocity, or torque set-points and actual values will always be defined in the same objects with the same address regardless of the manufacturer and by such simplifies the commissioning of different drives. CIA402 also defines a state machine that corresponds to the drive’s actual operating state (Disabled, Fault, Switch ON, etc.). This state machine is controlled and monitored by two mandatory PDO entries: Control Word and Status Word. The drive cannot be started until the state machine has been put into the appropriate state.

The device states and possible control sequences of the drive are described by the CANopen state machine as follows:

ecm_lifecycle

The possible drive states are :

CiA402 Drive States

State

Description

NOT_READY_TO_SWITCH_ON

The drive is not ready to switch on. The drive is in boot phase. Drive motion functions are disabled. No communication established.

SWITCH_ON_DISABLED

The drive cannot be enabled via the EtherCAT interface. Drive motion functions are disabled.

READY_TO_SWITCH_ON

The drive can be enabled. Parameters can be transferred. Power may be applied. Drive motion functions are disabled.

SWITCHED_ON

The drive is enabled but idle No fault detected. Power is enabled Drive motion functions are disabled. Parameters can be transferred. No set-points are transferred from the EtherCAT interface.

OPERATION_ENABLED

Normal operation mode No fault detected. Drive motion functions and power are enabled. Power enabled. Set-points are transferred from the EtherCAT interface.

QUICK_STOP_ACTIVE

The quick stop process is executed. Drive motion functions are disabled. Power is enabled.

FAULT_REACTION_ACTIVE

A fault has occurred, fault reaction processes are executed.

FAULT

A fault is active, Drive is stopped and its functions are disabled.

State transitions are the result of events that can be either internal or triggers through the Control Word. When a command trigger for state change is received, the transition is performed before any other command is processed.

The possible transition states, their trigger events and performed actions are :

CiA402 Drive State Transitions

State Transition

Event

Action

0

Automatic transition after power-on or reset application

Drive device self-test and/or self initialization has to be performed

1

Automatic transition

Communication has to be activated

2

Shutdown command from control device or local signal

None

3

Switch on command received from control device or local signal

The high-level power has to be switched ON, if possible

4

Enable operation command received from control device or local signal

The drive function has to be enabled. All internal set-points cleared.

5

Disable operation command received from control device or local signal

The drive function has to be disabled.

6

Shutdown command received from control device or local signal

The high-level power has to be switched OFF, if possible.

7

Quick stop or disable voltage command from control device or local signal

None

8

Shutdown command from control device or local signal

The drive function has to be disabled. The high-level power has to be switched OFF, if possible.

9

Disable voltage command from control device or local signal

The drive function has to be disabled. The high-level power has to be switched OFF, if possible.

10

Disable voltage or quick stop command from control device or local signal

The high-level power has to be switched OFF, if possible.

11

Quick stop command from control device or local signal

The quick stop function has to be started.

12

Either: - Automatic transition when the quick stop function is completed and quick stop option code is 1, 2, 3 or 4. - Disable voltage command received from control device (depends on the quick stop option code)

The drive function has to be disabled. The high-level power has to be switched OFF, if possible.

13

Fault signal

The configured fault reaction function has to be executed.

14

Automatic transition

The drive function has to be disabled. The high-level power has to be switched OFF, if possible.

15

Fault reset command from control device or local signal.

A reset of the fault condition is performed if no fault exists currently on the drive device. After leaving the Fault state, the Fault reset bit in the control word has to be cleared by the control device.

16

If the quick stop option code is 5, 6, 7, or 8, enable operation command from control device

The drive function has to be enabled

CANopen uses 16-bits Status Word and Control Word to monitor and control the state machine. These PDO entries have the following bit assignment :

CiA402 Drive Words

Bit

Status Word Name

Control Word Name

0

Ready to switch on

Switch On

1

Switched on

Disable Voltage

2

Operation Enabled

Quick Stop

3

Fault

Enable Operation

4

Voltage Enabled

Operation-mode Specific

5

Quick Stop

Operation-mode Specific

6

Switch On Disabled

Operation-mode Specific

7

Warning

Reset Fault (only effective for faults)

8

Manufacturer-specific (reserved)

Pause/halt

9

Remote (always 1)

Reserved

10

Target Reached

Reserved

11

Internal Limit Active

Reserved

12

Operation-mode Specific (reserved)

Reserved

13

Operation-mode Specific (reserved)

Manufacturer-specific

14

Manufacturer-specific (reserved)

Manufacturer-specific

15

Manufacturer-specific (reserved)

Manufacturer-specific

words

The Status Word is only updated and written by the drive in Safe-Op and Operational states. The current drive state can be decoded from the logical combination of the bits in the Status Word:

CiA402 Drive State form Status Word

Status Word

State

xxxx xxxx x0xx 0000

Not ready to switch on

xxxx xxxx x1xx 0000

Switch on disabled

xxxx xxxx x01x 0001

Ready to switch on

xxxx xxxx x01x 0011

Switched on

xxxx xxxx x01x 0111

Operation enabled

xxxx xxxx x00x 0111

Quick stop active

xxxx xxxx x0xx 1111

Fault reaction active

xxxx xxxx x0xx 1000

Fault

The control commands allow the manipulation of the state of a drive by setting its control word. Commands are built up from the logical combination of the bits in the Control Word:

CiA402 Drive Commands to Control Word

Control Word

Command

State Transitions

xxxx 0xxx x110

Shutdown

2, 6, 8

xxxx 0xxx 0111

Switch On

3

xxxx 0xxx 1111

Switch On + Enable Operation

3 + 4

xxxx 0xxx xx0x

Disable

7, 9, 10, 12

xxxx 0xxx x01x

Quick Stop

7, 10, 11

xxxx 0xxx 0111

Disable Operation

5

xxxx 0xxx 1111

Enable Operation

4, 16

xxxx 1xxx xxxx

Fault Reset

15