[etherlab-users] Slave DC start time calculation

Philippe Leuba pleuba at swissonline.ch
Fri May 18 06:24:59 CEST 2018


Hi Graeme,

Thanks for your analysis that I fully agree with. 

Regarding your proposition to set two last parameters to zero:

ecrt_slave_config_dc(sc, 0x0700, 500000, 250000, 0, 0);

This would fix the start time calculation but I can not put sync1->cycle_time to zero because this value (1000 in my case) must be sent to register 0x9A4 (Time between SYNC0 and SYNC1 pulses) for the slave to work correctly. 

So my only solution was to continue passing the value:
ecrt_slave_config_dc(sc, 0x0700, 500000, 250000, 1000, 0);
and modify the code of the master to no longe take it into account in the start time calculation. 

A better solution would be to use:
ecrt_slave_config_dc(sc, 0x0700, 500000, 250000, 500000, 1000);
and modify the master to send sync1->shift_time to register 0x9A4. 

The consequences of the current wrong start time can be hidden in most cases, just having the SYNC0/SYNC1 events not shifted as expected from the PDO. In my case, this caused problems sometimes on only one of my nine slaves, randomly depending of the CPU load/jitter.

In your case, did you have experimented problems ?

It was very helpful to monitor the time calculation values in the debug log (debug level 1), especially the ´remainder' that should be almost the same for all slaves but was not. 

For me, this is really a bug and should be fixed in the master. Should I propose a patch for this ?

Best regards

Philippe 

> On May 18, 2018, at 3:02 AM, Graeme Foot <Graeme.Foot at touchcut.com> wrote:
> 
> ecrt_slave_config_dc(sc, 0x0700, 500000, 250000, 0, 0);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20180518/f5eac83a/attachment-0004.htm>


More information about the Etherlab-users mailing list