<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><span></span></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>Hi Graeme,</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">Thanks for your analysis that I fully agree with. </div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">Regarding your proposition to set two last parameters to zero:</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);">ecrt_slave_config_dc(sc, 0x0700, 500000, 250000, 0, 0);</span></div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">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. </div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">So my only solution was to continue passing the value:</div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);">ecrt_slave_config_dc(sc, 0x0700, 500000, 250000, <b><i>1000</i></b>, 0);</span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);">and modify the code of the master to no longe take it into account in the start time calculation. </span></div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">A better solution would be to use:</div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);">ecrt_slave_config_dc(sc, 0x0700, 500000, 250000, 500000, 1000);</span></div><div id="AppleMailSignature">and modify the master to send <span style="background-color: rgba(255, 255, 255, 0);">sync1->shift_time to register 0x9A4. </span></div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">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.</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">In your case, did you have experimented problems ?</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">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. </div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">For me, this is really a bug and should be fixed in the master. Should I propose a patch for this ?</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">Best regards</div><div id="AppleMailSignature"><br>Philippe </div><div><br>On May 18, 2018, at 3:02 AM, Graeme Foot <<a href="mailto:Graeme.Foot@touchcut.com">Graeme.Foot@touchcut.com</a>> wrote:<br><br></div><blockquote type="cite"><div>ecrt_slave_config_dc(sc, 0x0700, 500000, 250000, 0, 0);</div></blockquote></div></body></html>