This is a little confusing, but with your help I think I was able to configure
it…
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:
<OpMode>
<Name>DC</Name>
<Desc>DC-Synchron</Desc>
<AssignActivate>#x700</AssignActivate>
<CycleTimeSync0 Factor="1">0</CycleTimeSync0>
<ShiftTimeSync0 Input="0">0</ShiftTimeSync0>
<CycleTimeSync1 Factor="1">0</CycleTimeSync1>
<ShiftTimeSync1>140000</ShiftTimeSync1>
</OpMode>
results in:
ecrt_slave_config_dc(sc, 0x700, cycleTime, 0, 140000, 0);
So the value 140000 is written into ESC register 0x9A4: Sync1 cycle time (Time
between SYNC1 pulses and SYNC0 pulse in ns)...
Philippe Leuba
> On 13 Mar 2017, at 23:32, Gavin Lambert <[email protected]> wrote:
>
> 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.
>
> 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.
>
> 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.
_______________________________________________
etherlab-users mailing list
[email protected]
http://lists.etherlab.org/mailman/listinfo/etherlab-users