[etherlab-users] Sdo download octet_string

Boris Skegin boris.skegin.de at googlemail.com
Thu Nov 3 08:55:19 CET 2016


Thanks for your answer.

So I tried
 echo  c80001e0010101000000000000000000000000000000000000000000 | xxd -r
 -p | ethercat download -p0 -toctet_string 0X210C 0 -

but with no success as you see from the debug output as you see below.

What makes me wonder is that "data_size = 1"  and "SDO download 0x210C:00
(1 bytes) ..." .

Even if some formatting error occurs,
 echo  c80001e0010101000000000000000000000000000000000000000000 | xxd -r  -p
is never 1 byte long.

My etherlab version is not the newest, it is 4b0b906 .
Can this be the reason?

Regards,
boris


[Thu Nov  3 00:39:26 2016] EtherCAT ERROR 0-0: Failed to process SDO
request.
[Thu Nov  3 00:40:04 2016] EtherCAT DEBUG 0:
ecrt_master_sdo_download(master = 0xffff880137222000, slave_position = 0,
index = 0x210C, subindex = 0x00, data = 0xffff880138ce2ac8, data_size = 1,
abort_code = 0xffff880036d2fd98)
[Thu Nov  3 00:40:04 2016] EtherCAT DEBUG 0-0: Scheduling SDO download
request.
[Thu Nov  3 00:40:04 2016] EtherCAT DEBUG 0-0: Processing SDO request...
[Thu Nov  3 00:40:04 2016] EtherCAT DEBUG 0-0: Downloading SDO 0x210C:00.
[Thu Nov  3 00:40:04 2016] EtherCAT DEBUG: 2D
[Thu Nov  3 00:40:04 2016] EtherCAT DEBUG 0-0: Expedited download request:
[Thu Nov  3 00:40:04 2016] EtherCAT DEBUG: 00 20 2F 0C 21 00 2D 00 00 00
[Thu Nov  3 00:40:04 2016] EtherCAT DEBUG 0-0: Download response:
[Thu Nov  3 00:40:04 2016] EtherCAT DEBUG: 00 20 80 0C 21 00 10 00 07 06
[Thu Nov  3 00:40:04 2016] EtherCAT ERROR 0-0: SDO download 0x210C:00 (1
bytes) aborted.
[Thu Nov  3 00:40:04 2016] EtherCAT ERROR 0-0: SDO abort message
0x06070010: "Data type does not match, length of service parameter does not
match".

2016-11-02 23:44 GMT+01:00 Gavin Lambert <gavinl at compacsort.com>:

> On 3 November 2016 10:13, quoth Boris Skegin:
> > I have to sdo download an octet string of 28 bytes.
> >
> > Upload apparently works:
> >
> > $ ethercat upload -p0 -toctet_string 0X210C 0 | xxd
> > 0000000: c800 01e0 0101 0100 0000 0000 0000 0000  ................
> > 0000010: 0000 0000 0000 0000 0000 0000            ............
> >
> > But trying to write back this octet string with something like
> >
> > $ ethercat download -p0 -toctet_string 0X210C 0
>  c80001e0010101000000000000000000000000000000000000000000
> > SDO transfer aborted with code 0x06070010: Data type does not match,
> length of service parameter does not match
> >
> > does not work.
> >
> > Do octet strings have some special format for SDO download?
>
> You need to supply actual bytes, not hex literals.  ie. the format the
> uploaded data was in before you piped it to xxd.
>
> I haven't tested this, but in principle you could do something like this:
>
> $ echo c80001e0... | xxd -r -p | ethercat download -p0 0x210c 0 -
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20161103/3d0e8d14/attachment-0004.htm>


More information about the Etherlab-users mailing list