I have the same issue as TAKUYA, the dc-phased pin never goes high. I managed to fix this using Claude AI and now the dc-phased pin goes high. I have attached a detailed notes of what was changed in the code as well as some screenshots from before and after.
NOTE: this was done entirely with the help of AI and I am not qualified enough to say whether it is correct or not! Grandixximo, could you please review the notes and share your thoughts? Opening the attached HTML file in a browser, you can view the notes which were generated. It is too long to copy-paste here.
EDIT: After testing the code more thoroughly, I'm getting jitter again. It's very likely that the AI's "fix" only addressed the dc-phased pin but broke something else... I've reverted back to the master branch (
github.com/grandixximo/linuxcnc-ethercat
), and everything is working again except for the dc-phased pin.
The issues the AI found are not issues,
- Same-cycle read — No,
Code:
reference_clock_time
reads from the previous cycle's response, already received in
- Missing
— Not needed; DC ref clock time comes from the normal sync datagrams
-
Code:
sync_reference_clock
guard — Intentionally skipped in M2R mode (correct behavior)
And not something related to my changes, the behaviors were already present from upstream, can you share your xml file? Your app time seems good, but the pll-err is suspiciously to 0
which tells me you probably do not have DC, is
assignActivate set to 300 on your DC capable devices?
Your first device lacks DC, I would advise to keep the first device on your network to be DC active, or you may need to set which slave does the DC timing reference in the XML, I always keep first device DC, have not tested differently, can't say for sure.
- EK1100 — coupler, no DC
- EL1008 — digital input, no DC
- EL2008 — digital output, no DC
- 3× StepperOnline A6 — these should have DC, but only if
is set in the XML config
In your XML you will need something like
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="-1">
<slave idx="xx" type="devicewith DC" >
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="250000"/>
</slave>Or you share your XML here, I will take a look, I think you do not have DC at all at the moment, you never even used any of my code changes at all.