Troubleshoot etherCAT
4 minute read
Quick summary
For debugging EtherCAT issues you can try the following:
- look at the contents of the last motorcortex logfile
- the output of
dmesg
- the output of
ethercat slaves -v
- the output of
ethercat master -v
- the output of
journalctl
If you are looking for support on the support forum, please post the output of these file/commands.
Motorcortex Logfile
The system log is a record of system events, this is used to troubleshoot the system when errors occur, log files can be retrieved:
Via GUI (motorcortex running = yes):
- Download log via the GUI/Diagnostics Tab/System Logs.
- or view the current log in the GUI/Logs.
Via SHH (motorcortex running = no):
- Review the last system log, by means of
mcx-lastlog
command. - Review list of log files.
Via Browser:
- Download log files via the browser with:
https://[Controller_IP_Address]/log/browse/
.
The system log subdivided in:
1. Application Information
- Component Versions: Provides component version Information
- Hardware Key: Device specific registry.
- List off components: Active components needed for the application.
- List of features: Active features included to the application.
- License information
2. System Config
In here is listed the config.json
3. System events
A record of system events like:
- [INFO] - Successful system activities
- [INFO_SM] - State switching activities
- [WARNING] - Non critical failed system activities
- [ERROR] - Information about failed system activities
- [FATAL] - The system crashed, resulting with a massage what went wrong.
Dmesg
Dmesg show the kernel logs, you can use dmesg
command after you ssh
to your controller.
In case the Motorcortex System Reports an Error, you can use dmesg
command to troubleshoot the system:
EtherCAT WARNING 0-main-X: Slave does not support changing the PDO mapping!
Sometimes etherCAT hardware manufacturers do not allow personalized PDO mappings, resulting in the following warning:
[ 388.264575] EtherCAT WARNING 0-main-1: Slave does not support changing the PDO mapping!
[ 388.264577] EtherCAT WARNING 0-main-1: Currently mapped PDO entries: 0xF788:00/8. Entries to map: 0xF788:00/16
The etherCAT slave on position X, contains incorrect mapped PDO entries, The hardware expects: Currently mapped PDO entries: 0xF788:00/8
, what you configured: Entries to map: 0xF788:00/16
. Change entry 0xF788:00 bit size from 8 to 16.
Deploy the adjusted etherCAT configuration to the controller and check with dmesg
if the error is resolved.
EtherCAT ERROR 0-main-X: Failed to set OP state, slave refused state change (SAFEOP + ERROR)
The EtherCAT slave on position X, detected an ERROR
in SAFEOP State
. The ERROR
is the result of an incorrect sync manager channels for process data communication setting and/or distributed clocks settings.
This message always is in combination with: AL status message:
EtherCAT ERROR 0-main-X: AL status message 0x001B: “Sync manager watchdog”.
The EtherCAT slave on position X did not receive the process data within the specified watchdog time, usually caused when SyncManager2 is written.
Solution
Compare the configured Process Data, with the manufacturer ESI-file.The Control Byte
of SyncManager Index 2
is configured to #x24
. In the ESI-file the Control Byte of SyncManager Index 2
is #x64
.
Changing the EtherCAT configuration, that it matches the ESI-file will resolve this error.
EtherCAT ERROR 0-main-X: AL status message 0x0030: “Invalid DC SYNCH configuration”.
The Distributed Clock Configuration, for etherCAT slave on position X is invalid due to application requirements. Device expects set DC clock, check ESI file configuration for valid DC clock settings.
Configuration Example: EL5101-0011, this device is oversampled, depending on oversampling factor the device can read out the current counter value several times per bus cycle.
This example will use the default oversampling of 1
.
From ESI-file:
<OpMode>
<Name>DC1</Name>
<Desc>DC Oversampling 1</Desc>
<AssignActivate>#x730</AssignActivate>
<CycleTimeSync0 Factor="1">0</CycleTimeSync0> # factor "n" = n * etherCAT task time
<ShiftTimeSync0 Factor="1" Input="0">0</ShiftTimeSync0>
<CycleTimeSync1 Factor="-1">0</CycleTimeSync1> # factor "-n" = etherCAT task time / n
<ShiftTimeSync1>0</ShiftTimeSync1>
<Sm No="2">
<Pdo>#x1600</Pdo>
</Sm>
<Sm No="3">
<Pdo>#x1a00</Pdo>
<Pdo>#x1a01</Pdo>
<Pdo>#x1a10</Pdo>
</Sm>
</OpMode>
Note
Inside the ECAT-tool Distributed Clock settings, you need to fill in thedec
representation of the AssignActivate
: #x730 = 1840dec.
Note
Keep in mind that for this specific exampleEL5101-0011
, the PDO
configuration changes per oversampling factor.
Configure distributed clock settings, as described in the ESI-file.
Deploy the adjusted etherCAT configuration to the controller and check with dmesg
if the error is resolved.
Failed to determine PDO sync manager for FMMU!
This message is combined with the warning: EtherCAT WARNING 0-main-7: PDOs configuration for SM3, but slave does not provide the sync manager information
.
The etherCAT slave on position 7 contains incomplete SSI content. Override the slave SII data to solve this issue.
Error Handler
The Error Handler provides the user with system warnings
and errors
.
ES_Slave_Error
An ES_Slave_Error
is active when a slave
reported an error
. The typ of error can be read out via the GUI/Diagnostics/Drive Data Objects(SDO)
, after pressing READ SDOs
this action request the Drive Error Code
and Error Description
.
ES_Bus_Error
An ES_Bus_Error
is active when an etherCAT Domain
or etherCAT Bus
detected and an error. The cause could be:
- Incorrect
Station Alias
configuration. - Trying to enable drives that are not configured, or not detected on the etherCAT Bus.
Top Menu Bar,