[etherlab-dev] Bus rescan while realtime operation

Florian Pose fp at igh-essen.com
Wed Mar 3 21:47:19 CET 2010


Hi,

On Wed, Jan 20, 2010 at 05:33:08PM +0100, Erwin Burgstaller wrote:
> "Slave scanning is now done any time the bus topology changes, even
> during realtime operation."
> 
> So why did this came in? I think the previous behavior has been pretty
> cool, the newer one might be dangerous instead.

The previous behavior did not give you any protection against that kind
of problems either. If you want to be sure, you have to use alias
addresses.

> If I have several EtherCAT slaves of the same type in line, for example
> digital outputs, and one of them is missing after the rescan, e.g. slave
> 3, the digital outputs on slave 4 will be accessed instead, which may
> cause big troubles on things we handle.
> 
> How may my realtime module recognize the start of the scan and when it's
> complete? 

The application does not have to worry about the state of the scan,
because it does not affect process data exchange. But if a slave has
been found for a certain slave configuration, can be checked with the
ecrt_slave_config_state() method.

> Any other ideas to handle such a situation other than with a shutdown
> of the whole operation?

A secure solution is to use the ecrt_domain_state() method. If the
working counter state is anything else then EC_WC_COMPLETE, your
application should not enable any outputs.

-- 
Best regards,
Florian Pose

http://etherlab.org



More information about the Etherlab-dev mailing list