<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">This is a little confusing, but with your help I think I was able to configure it…</div><div class=""><br class=""></div><div class="">The <ShiftTimeSync1> taken from the Beckhoff XML file must be put in the ‘sync1_cycle' parameter of ecrt_slave_config_dc method, and not in 'sync1_shift’ parameter that is ignored, so given:</div><div class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class=""><span style="background-color: rgba(255, 255, 255, 0);" class=""><OpMode></span></div><div style="margin: 0px; line-height: normal;" class=""><span style="background-color: rgba(255, 255, 255, 0);" class=""> <Name>DC</Name></span></div><div style="margin: 0px; line-height: normal;" class=""><span style="background-color: rgba(255, 255, 255, 0);" class=""> <Desc>DC-Synchron</Desc></span></div><div style="margin: 0px; line-height: normal;" class=""><span style="background-color: rgba(255, 255, 255, 0);" class=""> <AssignActivate>#x700</AssignActivate></span></div><div style="margin: 0px; line-height: normal;" class=""><span style="background-color: rgba(255, 255, 255, 0);" class=""> <CycleTimeSync0 Factor="1">0</CycleTimeSync0></span></div><div style="margin: 0px; line-height: normal;" class=""><span style="background-color: rgba(255, 255, 255, 0);" class=""> <ShiftTimeSync0 Input="0">0</ShiftTimeSync0></span></div><div style="margin: 0px; line-height: normal;" class=""><span style="background-color: rgba(255, 255, 255, 0);" class=""> <CycleTimeSync1 Factor="1">0</CycleTimeSync1></span></div><div style="margin: 0px; line-height: normal;" class=""><span style="background-color: rgba(255, 255, 255, 0);" class=""> <ShiftTimeSync1>140000</ShiftTimeSync1></span></div><div class=""><span style="background-color: rgba(255, 255, 255, 0);" class=""></OpMode></span></div><div class=""><br class=""></div><div class="">results in:</div><div class=""><br class=""></div><div class=""><span style="color: rgb(51, 51, 51); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre; background-color: rgb(255, 255, 255);" class="">ecrt_slave_config_dc(sc, 0x700, cycleTime, 0, 140000, 0);</span></div><div class=""><br class=""></div><div class="">So the value 140000 is written into ESC register 0x9A4: Sync1 cycle time (<span style="font-family: ArialMT; font-size: 9pt;" class="">Time between SYNC1 pulses and SYNC0 pulse in ns)...</span></div><div class=""><br class=""></div><div class=""><span style="color: rgb(51, 51, 51); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre; background-color: rgb(255, 255, 255);" class="">Philippe Leuba</span></div><div class=""><span style="color: rgb(51, 51, 51); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre; background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><br class=""><div><blockquote type="cite" class=""><div class="">On 13 Mar 2017, at 23:32, Gavin Lambert <<a href="mailto:gavinl@compacsort.com" class="">gavinl@compacsort.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif;" class="">Ah, ok. That setting actually modifies the SYNC1 cycle time (which is a parameter of ecrt_slave_config_dc) based on your actual cycle time – similarly you need to fill in the “real” cycle time values for those that have Factor=”1” in the XML.<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif;" class="">The appropriate calculations are given in ETG2000, section Types -> DeviceType -> Dc -> OpMode. Your application will need to calculate this itself based on your target cycle interval; the master library doesn’t do this for you.<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif;" class="">Also note that only the Cycle Times are written to the slaves, not the Shift Times. (The Sync0 shift time is however used to calculate the DC Start time.) For most slaves this is ok but for some you might need to explicitly configure 0x1C32/33 as well. You could try configuring it in TwinCAT and see what settings it uses for confirmation.</span></div></div></div></blockquote></div><br class=""></body></html>