[etherlab-users] Question about DC synchronization in rtai_rtdm_dc example

Christoph Schroeder christoph.schroeder at helmholtz-berlin.de
Wed Nov 15 16:13:50 CET 2017


Hi Folks,

I stumbled upon a question regarding the dc example which is part of the
EtherCAT master release. The Example mentions:
"The initial application time is also used for phase calculation for the
SYNC0/1 interrupts. Please be sure to call it at the correct phase to
the realtime cycle"

What does this actually mean and is this even relevant if you don't use
cyclic SYNC0/1? What confuses me is that we use dc_start_time_ns in:
 > ecrt_master_application_time(master, dc_start_time_ns);

but for the wakeup time we simply set:
 > wakeup_time = system_time_ns() + 10 * cycle_ns;

right before starting the actual cycle. If we set a dc_start_time_ns,
which might seem to be important, shouldn't wakeup_time be something like:
 > wakeup_time = dc_start_time_ns + n * cycle_ns;

where n is the number of cycles already done in the past, so that it is
"in phase" to the original start time (and thus with the internal time
used by the master)?
Another thing is, that the start_time is changed at least once inside
"update_master_clock", but at this point it is never used again in this
application. Maybe that's because this example is only a part of a
bigger application, but I am still curious why.

Thanks and best regards,
Christoph


________________________________

Helmholtz-Zentrum Berlin für Materialien und Energie GmbH

Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.

Aufsichtsrat: Vorsitzender Dr. Karl Eugen Huthmacher, stv. Vorsitzende Dr. Jutta Koch-Unterseher
Geschäftsführung: Prof. Dr. Bernd Rech (kommissarisch), Thomas Frederking

Sitz Berlin, AG Charlottenburg, 89 HRB 5583

Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin

http://www.helmholtz-berlin.de



More information about the Etherlab-users mailing list