Tchadu… blev inte klokare av att följa de länkar perplexity hänvisade till…. Ingen av länkarna pratar om lcnc öht…
Undrar hur den kom fram till detta…..
Så här svarade den på min flummiga fråga:
In lcnc when running position feedback from linear scales connected through a ethercat encoder interface, is the two cycle delay an issue?
No, the two-cycle delay is typically not a significant issue in LinuxCNC with EtherCAT linear scale feedback.
https://drives.novantamotion.com/kb/lat ... rvo-drives
Why It's Manageable
LinuxCNC's EtherCAT master (via IgH EtherCAT Master or SOEM) compensates for EtherCAT's inherent 2-frame latency (~2x cycle time) through Distributed Clocks (DC) sync and proper PDO timing configuration.
https://www.lenze.com/en-de/application ... e/295243/1
https://infosys.beckhoff.com/content/10 ... 18347.html
At 1ms cycle: Total feedback delay = ~2ms (acceptable for most motion control).
Scales report position via DC-synced sampling (not frame-triggered), minimizing jitter to <1µs.
https://infosys.beckhoff.com/content/10 ... 18347.html
https://www.ethercat.org/en/technology.html
LinuxCNC EtherCAT Config
In your linuxcnc/ethercat.conf or HAL:
text
# PDO mapping: position feedback in SM2 (process data)
# DC sync: align scale sampling to master clock
NETMASTER 0 {
...
DC_SO 1000 # Sync shift offset (µs)
}
LinuxCNC applies feedforward + lookahead (up to 10 cycles) to preempt feedback delays, keeping contour errors low even at 1kHz servo rates.
https://www.lenze.com/de-de/application ... l/280013/1
When It Becomes Problematic
Scenario Delay Impact
High-speed contouring (>10m/s, accel >5g) Noticeable following error
1ms cycle + many nodes (>20 slaves) Propagation adds ~100ns/node
No DC sync Jitter >10µs ruins velocity calc
Practical Thresholds
<1ms cycle: Negligible (feedsync scales like Celera M-6000 work great).
2ms cycle: Fine for general CNC; tune PID gains down 20%.
https://www.lenze.com/en-de/application ... e/295243/1
4ms+ cycle: Only for low-bandwidth axes (Z, A).
For your SOES/LAN9252 + NUCLEO-H753ZI setup: Use 500µs-1ms cycles with DC sync. LinuxCNC's ethercat_dc component handles the 2-cycle offset transparently—your linear scales will track smoothly for CiA402 CSP mode.
https://drives.novantamotion.com/kb/lat ... rvo-drives
Såå njaee… var kanske trots allt halucination….. om nu inte distribuerad klocka (DC-sync) hjälper till att lösa detta åt en…
Teoretiskt kan man ju få servots position och encoder position avlästa samtidigt med hjälp av dc sync, men hur sen lcnc hanterar detta i sin reglering med någon cykels (2) försening är ju fortfarande den springande punkten