[etherlab-users] Error reassigning removed PDO
Gavin Lambert
gavinl at compacsort.com
Wed Apr 23 09:44:29 CEST 2014
On Wednesday, 23 April 2014 18:43, quoth Florian Pose:
> ecrt_domain_state() is the one and only way to determine, if the data
> are valid. If you want to monitor different slave groups, you have to
> place them in several domains.
Something that I've observed with a particular slave (perhaps it's
technically the fault of the slave) is that if only inputs are mapped to it,
then it will start producing EC_WC_COMPLETE as soon as the slave hits
SAFEOP, and it will produce some input data -- however it stops updating the
input data during the subsequent transition from SAFEOP to OP. (And then
resumes as normal.)
Similarly if I map both inputs and outputs then it will start reading
EC_WC_COMPLETE *just slightly* before it acknowledges the transition to OP,
and there seems to be a small window in there where it's not updating the
input data.
I guess that's what the PDO Toggle is for, though.
> If you have a dynamic topology, you should make use of the alias
> addressing scheme.
Can aliases be assigned automatically? I didn't see any API for that.
But I was mostly thinking of the case where the network is powered down on
app startup, and then powered up later. Different slaves will complete boot
at different times. In a simple chain topology this will just result in one
or more devices appearing at the end of the ring, but with cable redundancy
or with tee/star branches this could result in odd changes to the ring
positions.
Ideally what I really want is to (a) identify devices by their serial,
without having to assign some other id to them, and (b) cope gracefully with
any particular slave being offline (either due to being powered off in star
topology, or manually bypassed in chain topology), mostly by ignoring the
data they're no longer producing (and passing the fact they're offline to
the higher level, so it can disable certain things). At the moment the only
ways I can see to do (b) are to either constantly be checking
ecrt_master_get_slave (which doesn't seem like it'd scale well, and only
supports ring positions) or to deactivate/rescan/reactivate whenever the
slave_count changes (to include only online slaves in the domain); which is
fine for the most part as most changes would occur when not "live", but it
does mean hotplugging wouldn't work.
I suppose I could make a domain per slave, but that doesn't sound very
efficient. (Perhaps I'm wrong about that though.)
More information about the Etherlab-users
mailing list