[etherlab-users] EL6751 SDO-Configuration

Gavin Lambert gavinl at compacsort.com
Tue Jan 19 23:51:00 CET 2016

It’s hard to say without seeing what specific commands you’re trying to run.


ecrt_master_sdo_download* is intended for one-off synchronous transfers before starting the realtime loop, eg. for cases where you’re trying to interrogate the device or otherwise do out-of-band exchanges.  (You can also use it on a separate thread after starting the realtime loop, but this can add latency due to lock contention, so it may not be a good idea if your period is short.)


ecrt_slave_config_sdo* is intended for configuration required during the PREOP->SAFEOP transition.  You should always use these for such configuration (everything except the PDO Assign registers 0x1C1x, as those are automatically set from the PDO mappings you’ve made).  In particular if the device goes offline then these will automatically be re-sent when it reappears, while the above won’t.


“Complete” SDOs are the most efficient way of downloading an entire object to the device, but they come with some caveats:

*         Not all devices support them (although most do) – you may need to check the device manual or the output of “ethercat slaves –v”

*         Some objects might be too large to fit in the mailbox – while there are some segmenting protocols to deal with this, not all slaves support those.  (Fortunately it’s rare for config objects to be large.)

*         You have to know the internal byte-for-byte layout of the object, including padding bytes in some cases.  This is usually similar to the layout of the subindexes but occasionally there can be surprises.  Again, check the manual.  If you have access to something that can do SDO complete uploads, then try uploading the object first to see its current layout.  (Etherlab stable 1.5.2 doesn’t support this but I’ve previously posted some patches to add the feature.)

*         TwinCAT supports downloads both starting from subindex 0 (which requires including the number of subindexes as a two-byte field) or from subindex 1 (which omits this and only includes the “real” data of the object).  Etherlab only supports downloads starting from subindex 0.


If complete access isn’t suitable for some reason, then you can fall back on downloading the subindexes individually.


From: etherlab-users [mailto:etherlab-users-bounces at etherlab.org] On Behalf Of Matze Thias
Sent: Wednesday, 20 January 2016 04:06
To: etherlab-users at etherlab.org
Subject: [etherlab-users] EL6751 SDO-Configuration



I am trying to configure the EL6751 at the moment, so that I am able to send raw CAN messages over ethercat(http://infosys.beckhoff.com/content/1033/el6751/html/el6751_layer2_statemachine.htm?id=10857).
I took the configuration, which is done in terms of sdo-startup-downloads, from one of the twincat dialogs. Which method for sdo configuration is the right to choose?

If I use ecrt_master_sdo_download_complete for the different SDO-Objects to upload, nothing happens. When using ecrt_slave_config_complete_sdo the device error-led starts blinking(indicating, that some configuration is in progress) but at the same time I get this:

Jan 19 15:50:06 e-node8 kernel: [611927.053364] EtherCAT ERROR 0-1: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
Jan 19 15:50:06 e-node8 kernel: [611927.059801] EtherCAT ERROR 0-1: Unknown AL status code 0xF101.

Can anyone explain the error and has a solution for this? Maybe someone has experience in getting the el6751 configured and work-ready for this scenario and can share his insights :) ?


Matze Thias


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20160120/8103af38/attachment-0003.htm>

More information about the Etherlab-users mailing list