[etherlab-users] failing dc-sync-check (and rtdm patch)
Graeme Foot
GraemeF at touchcut.com
Wed Jan 25 07:36:14 CET 2012
Hi,
I've been having the same problem (ie: Slave did not sync after 5000
ms).
In my case it was happening on most startups and sometimes after running
for a while.
When it happened after the app had been running a while the domain
working counter changed from 2 to 1 and one of the slaves got an error
0x0A11 - EtherCAT State Error (The EtherCAT AL state became not
"Operational" while the DS402 drive state is in "Operation enabled.").
I have no idea what this error means.
I fixed my startup case by waiting until the working counter state on
the domains used by the dc slaves were all EC_WC_COMPLETE (ie all
registered process data were being exchanged).
This of course meant that I needed to add another rtdm method
"ecrt_rtdm_slave_config_dc". To do so I have rejigged the rtdm
framework so that the rtdm functions are now in the user space ec
library. I needed to do this because I had to access more of the
library types and it was getting unwieldy keeping it separate.
Some little changes as a result:
- proper functions rather than defines
- ecrt_rtdm_master_application_time takes a direct value rather than
pointer
- ecrt_rtdm_domain_states now takes a ec_domain_state_t array pointer
- new function ecrt_rtdm_slave_config_dc
I have attached a full rtdm patch in case anyone wants it (for 2124).
Graeme.
-----Original Message-----
From: etherlab-users-bounces at etherlab.org
[mailto:etherlab-users-bounces at etherlab.org] On Behalf Of George Broz
Sent: Monday, 23 January 2012 23:08
To: etherlab-users at etherlab.org
Subject: [etherlab-users] failing dc-sync-check
Hello,
What would cause the dc-sync-check to fail (resulting in the "Slave did
not
sync after..." message in the error log), even when the timeout
(EC_DC_SYNC_WAIT_MS) is set long (30 seconds)?
After 30 seconds, the "Sync after..." is still in the 4 milli-second
range - far from the 5 micro-seconds needed to pass.
In my application, after calling master_activate()
a Xenomai task every 5 milli-seconds calls:
* ecrt_rtdm_master_application_time()
* ecrt_rtdm_master_sync_reference_clock(), and
* ecrt_rtdm_master_sync_slave_clocks()
The first slave is the reference clock. It generally takes 10 to 20
seconds
for the first slave to get past this step (if at all). The other slaves
take less,
but still a couple of seconds. Slave to slave sync is good (<1000ns),
but gets
much better (<100ns)when I stop calling sync_reference_clock().
I read in a previous post that --enable-cycles helped. Is this
necessary?
Is there something I can do (e.g. "adjust" the application_time) to make
this
converge faster? Should it help to rescan the bus before starting my
application?
I am running the "default-tip" (2271) version of the master.
Master-to-ref.slave synchronization (using EtherCAT) is not important to
us, but
slave-to-slave sync is critically important to us.
Thanks in advance,
--George Broz
Moog, Inc. Industrial Group
_______________________________________________
etherlab-users mailing list
etherlab-users at etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: etherlabmaster-1.5-2124-c_rtdm_full.patch
Type: application/octet-stream
Size: 164178 bytes
Desc: etherlabmaster-1.5-2124-c_rtdm_full.patch
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20120125/64246491/attachment-0004.obj>
More information about the Etherlab-users
mailing list