An-278 EtherCAT Error Codes
An-278 EtherCAT Error Codes
: AN-278
Version: 1.0
1. Scope
This document considers the different errors and warnings which may occur when the MC464 is used
with the P876 and EtherCAT servodrives or I/O. Only the low-level command line and BASIC program
access to error management is discussed. Therefore some prior knowledge of Trio BASIC, the MC464
command line and CanOpen-over-EtherCAT is assumed of the reader.
In the future, the information here may be used by Trio Motion Technology as the basis for a high
level user interface in Motion Perfect v 3.
2. Error types
Errors and warnings can come from a variety of sources. How they are handled will depend on the
source and the channel over which the error arrives.
• MC464 configuration errors.
• EtherCAT slave controller errors.
• EtherCAT State Machine.
• CoE Control Word and Status Word from Drive.
• Drive Error reported over SDO channel.
For example, to get the ESC state from the drive at node address 2 and print it to the terminal;
ETHERCAT($31, 0, 2, $130, 2, -1)
8
>>
1 Initial
2 Pre-Operational
4 Safe-Operational
8 Operational
Table 1 – meaning of ESC state value
To get the ESC error code from the remote drive or IO node and put the value in VR(620);
ETHERCAT($31, 0, 2, $134, 2, 620)
PRINT HEX(VR(620)) ' V2.0186 and later
' or:
PRINT HEX(VR(621)+VR(622)*256) ' V2.0185 and before
0x0011 Invalid requested state change I→S, I→O, P→O Current state + E
O→B, S→B, P→B
Other codes
<0x8000 Reserved
The EtherCAT state of the master (MC464) can be read with ETHERCAT command function 6.
ETHERCAT($06, 0, -1) ' print the EtherCAT state to the terminal
3
>>
ETHERCAT($06, 0, 600) ' Put EtherCAT state from slot 0 into VR(600)
0 Initial
1 Pre-Operational
2 Safe-Operational
3 Operational
Table 3 – Value returned by ETHERCAT Func. 6
For example:
BASE(2)
IF (DRIVE_STATUS AND $07) <> $07 THEN
PRINT “Drive Axis 2 not enabled”
ENDIF
r = reserved
oms = operation mode specific
h = halt
fr = fault reset
hos = homing operation start
eo = enable operation
qs = quick stop
ev = enable voltage
so = switch on
Note: Exact functions depend upon the slave drive. See also the CiA DS402 specification.
ms = manufacturer-specific
ha = homing attained
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
Note: Exact functions depend upon the slave drive. See also the CiA DS402 specification.
The actual error codes supported by a drive will depend on the drive manufacturer. The table below
shows some of the typical error codes which may be returned by a drive. See the drive’s handbook
for a full list.
Error Code Meaning
(Hex)
0000 No Error
1000 Generic Error
2000 Current
2200 Internal current
2330 Earth leakage
3110 Mains overvoltage
3210 DC Bus overvoltage
3220 DC Bus undervoltage
4210 High motor temperature
4310 High drive temperature
9000 External error
8. Example program
This example reads some of the errors and reports them to the Motion Perfect terminal at channel
#5.
' Check and report the errors over EtherCAT
ec_axis=0
ec_node=0
ec_slot=0
Note: Some details of the operation of this program requires the use of firmware V2.0186 or later.