[etherlab-dev] [PATCH] My patchset roundup July 2015

Gavin Lambert gavinl at compacsort.com
Mon Jul 13 01:00:02 CEST 2015


On 13 July 2015 10:20, quoth Graeme Foot:
> Re: gavinl-2004-sdo_write_size.
> 
> What I have been doing to allow one SDO Request object for all data sizes
is
> to call ecrt_sdo_request_read() every time before calling
> ecrt_sdo_request_write().  This sets the size specific to the object you
are
> about to write at the expense of extra time and processing.  It does
however
> ensure the size is matched correctly to the object you are about to write
to.

Sure, that would work too, given the way that reading changes the next write
size.  And it's true that most of the time I do a read first in any case to
check the current value (which may affect whether I do the write at all).

But writing without a prior read still seems like something you should be
able to do, and the read changing the write size is technically an
implementation bug that I wouldn't want to rely on.

> Also as you say, the SDO Request must be created with the largest expected
> data size.  The largest I have come across so far is a STRING[16] (16
bytes).
> Has anyone seen larger?

Strings can be longer than that of course, but the other time that you may
get larger values is when using Complete Access (via the other patches).
The motivating example was reading an entire array at once, which was about
40 bytes.





More information about the Etherlab-dev mailing list