[etherlab-dev] Experiences with ethercat-devel-r1824
fp at igh-essen.com
Mon Oct 19 13:00:45 CEST 2009
On Thu, Sep 24, 2009 at 11:47:58AM +0200, Erwin Burgstaller wrote:
> I've checked out the latest version of the Etherlab master and I didn't
> got EoE working. The best thing I got out of it, where lots of:
> EtherCAT WARNING: Failed to receive mbox check datagram for eoe0s7
Which kernel version are you using?
> Basically it has the same problem as before. The callback runs in the
> masters context an therefore outside of the real time-task. So because
> of the mutex the real-time task may be blocked by a non-real-time task,
> which could be delayed for unknown time and reason, if the CPU gets
> heavily used, especially by other real-time tasks, of which we have
The EoE code was designed to make use of the time between to rt task
executions. The callback is to "ask" the rt task, if it is ok to send an
EtherCAT frame. It your task considers this to be not the right time,
then it can easily not respond to this.
> So I decided to use the master callback function just to increase a
> counter. In the real-time loop I then will call ecrt_master_send_ext(),
> and ecrt_master_receive(), if the counter has been increased inside the
> call-back function.
The ecrt_master_send_ext() may only be called in the callback context,
because of the used locking mechanism.
> Obviously I did something wrong, but the main question are:
> * Where to place the calls?,
So you're really looking for an EoE implementations that exchanged IO
synchronous to the realtime task? Please consider, that the bandwidth
would be *really* small.
> * Why is there no ecrt_master_receive_ext() or something like that?
Receiving is always the same.
More information about the Etherlab-dev