> Our cyclic loop works as follows: > ecrt_master_receive > ecrt_domain_process > ecrt_domain_queue > ecrt_master_send > calculate > sleep Very good. > > Pros: calculation occurs while frame is being sent > Cons: calculated data will be sent a step later That is the price to pay if you have both long calculation and long EtherCAT frames. There is no free lunch ;)
This system works best if you have a measurement (as opposed to a control) dominated system with lots of PDO's, say about 30000. The data is time stamped, so you know when the data was fetched. Even better if you use distributed clocks at the same time > > The sleep time is measured and recalculated and adjusted to a given > cycle time relative to a given start time. Are you running in kernel or user space? In kernel space (together with etherlab), have you looked at the rt_appcore.ko option pll?: insmod rt_appcore.ko pll=1 This will synchronize the cyclic task exactly with your system clock. If you use NTP on your system, your cyclic task is locked in on international time! Thus, in 1000 years, you will have had 1000*365*24*60*60*frequency calls, exactly, no more, no less. To get that right is not as easy as it sounds if you bear in mind that any number on a digital computer has either limited accuracy or a limited range, the one or the other. It is like the 50Hz frequency locking of the the national grid - over time you allways get 50*24*60*60 cycles. (To those clever guys out there, I have just defined 1 year to be 365 days, not 265.249...... days) - Richard -- ------------------------------------------------------------------------ Richard Hacker M.Sc. richard.hac...@igh-essen.com Tel.: +49 201 / 36014-16 Ingenieurgemeinschaft IgH Gesellschaft für Ingenieurleistungen mbH Heinz-Bäcker-Str. 34 D-45356 Essen Amtsgericht Essen HRB 11500 USt-Id.-Nr.: DE 174 626 722 Geschäftsführung: - Dr.-Ing. S. Rotthäuser, - Dr.-Ing. T. Finke, - Dr.-Ing. W. Hagemeister Tel.: +49 201 / 360-14-0 http://www.igh-essen.com ------------------------------------------------------------------------ _______________________________________________ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users