Ethercat random jitter fix
- grandixximo
-
Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 238
- Thank you received: 321
14 Apr 2026 09:14 #345526
by grandixximo
Replied by grandixximo on topic Ethercat random jitter fix
Yes, you are using DC. Both of your working configurations are DC.
syncToRefClock does not mean "DC on or off". It only controls who is the time reference that everyone else follows. Both modes use Distributed Clocks.
refClockSyncCycles=1 means the master pushes its time to the slaves every cycle. The slaves follow the master. This is DC.
refClockSyncCycles=-1 (without syncToRefClock) means the master adjusts its own cycle to follow the first DC slave. The master follows the slave. This is also DC.
refClockSyncCycles=-1 with syncToRefClock="false" flips the sign, making it effectively +1. So it is the same as refClockSyncCycles=1. Master pushes time to slaves.
Both your working configs resolve to the same thing: master as reference, sync every cycle.
What does not work for you is the mode where master follows the slave (syncToRefClock="true" or negative refClockSyncCycles alone). That is what I want to investigate, whether it is a problem with what your first slave reports or something else in my code.
To confirm DC is active on your slaves, run these commands:
ethercat slaves -v
This will show "Distributed clocks: yes" or "no" for each slave. If it says yes, the hardware supports DC.
Then to check what sync mode is actually active:
ethercat upload -p 0 -t uint16 0x1C32 0x01
This reads the sync mode from the first slave. Value 0 means free run, 1 means SM-synchronous, 2 means DC Sync0, 3 means DC Sync1. You want to see 2 or 3. Replace -p 0 with -p 1, -p 2 etc for each drive.
Please post the output here, or if possible email me at luca at aitalmac.com about remote access. A USB to Ethernet adapter would give the machine internet while keeping the EtherCAT port dedicated.
syncToRefClock does not mean "DC on or off". It only controls who is the time reference that everyone else follows. Both modes use Distributed Clocks.
refClockSyncCycles=1 means the master pushes its time to the slaves every cycle. The slaves follow the master. This is DC.
refClockSyncCycles=-1 (without syncToRefClock) means the master adjusts its own cycle to follow the first DC slave. The master follows the slave. This is also DC.
refClockSyncCycles=-1 with syncToRefClock="false" flips the sign, making it effectively +1. So it is the same as refClockSyncCycles=1. Master pushes time to slaves.
Both your working configs resolve to the same thing: master as reference, sync every cycle.
What does not work for you is the mode where master follows the slave (syncToRefClock="true" or negative refClockSyncCycles alone). That is what I want to investigate, whether it is a problem with what your first slave reports or something else in my code.
To confirm DC is active on your slaves, run these commands:
ethercat slaves -v
This will show "Distributed clocks: yes" or "no" for each slave. If it says yes, the hardware supports DC.
Then to check what sync mode is actually active:
ethercat upload -p 0 -t uint16 0x1C32 0x01
This reads the sync mode from the first slave. Value 0 means free run, 1 means SM-synchronous, 2 means DC Sync0, 3 means DC Sync1. You want to see 2 or 3. Replace -p 0 with -p 1, -p 2 etc for each drive.
Please post the output here, or if possible email me at luca at aitalmac.com about remote access. A USB to Ethernet adapter would give the machine internet while keeping the EtherCAT port dedicated.
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 11839
- Thank you received: 4012
14 Apr 2026 10:17 #345530
by rodw
Replied by rodw on topic Ethercat random jitter fix
A USB wifi adapter is also fine for a second network connection. I have often used one with an external antenna. If the PC is in your enclosure, run a SMA cable up to a bulkhead connecter and place the antenna on the outside of the enclosure. You just need to drill a hole for the connector. Something like this but check if you need male or female. www.amazon.com.au/Boobrie-Bulkhead-Exten...BRMR/ref=sr_1_4_sspa
The problem with wifi, often you need to search for drivers and often you need to build them from source. Like my current wifi dongle. But it is bulletproof now its built. The wired NIC I use for Ethercat.
The problem with wifi, often you need to search for drivers and often you need to build them from source. Like my current wifi dongle. But it is bulletproof now its built. The wired NIC I use for Ethercat.
Please Log in or Create an account to join the conversation.
- papagno-source
- Offline
- Premium Member
-
Less
More
- Posts: 139
- Thank you received: 10
14 Apr 2026 10:53 #345531
by papagno-source
Replied by papagno-source on topic Ethercat random jitter fix
I'm actually at the client's site performing the installation. This machine was already running Debian 10, but I wanted to test Debian Trixie and we're encountering these problems, which we seem to have solved.
The output of the ethercat slaves -v command is:
=== Master 0, Slave 0 ===
Device: Main
State: OP
Flag: +
Identity:
Vendor Id: 0x0000022b
Product code: 0x0531ec01
Revision number: 0x00000003
Serial number: 0x0001894b
DL information:
FMMU bit operation: yes
Distributed clocks: yes, 64 bit
DC system time transmission delay: 0 ns
Port Type Link Loop Signal NextSlave RxTime [ns] Diff [ns] NextDc [ns]
0 MII up open yes - 3151034175 0 0
1 MII up open yes 1 3151039505 5330 935
2 N/A down closed no - - - -
3 N/A down closed no - - - -
Mailboxes:
Bootstrap RX: 0x1000/1024, TX: 0x1400/1024
Standard RX: 0x1000/128, TX: 0x1080/128
Supported protocols: EoE, CoE, FoE
General:
Group:
Image name:
Order number:
Device name:
CoE details:
Enable SDO: yes
Enable SDO Info: no
Enable PDO Assign: yes
Enable PDO Configuration: yes
Enable Upload at startup: no
Enable SDO complete access: yes
Flags:
Enable SafeOp: no
Enable notLRW: no
Current consumption: 0 mA
=== Master 0, Slave 1 ===
Device: Main
State: OP
Flag: +
Identity:
Vendor Id: 0x00850104
Product code: 0x01030507
Revision number: 0x02040608
Serial number: 0x00000000
DL information:
FMMU bit operation: no
Distributed clocks: yes, 64 bit
DC system time transmission delay: 935 ns
Port Type Link Loop Signal NextSlave RxTime [ns] Diff [ns] NextDc [ns]
0 MII up open yes 0 3730859530 0 935
1 MII up open yes 2 3730862990 3460 855
2 MII down closed no - - - -
3 MII down closed no - - - -
Mailboxes:
Bootstrap RX: 0x0000/0, TX: 0x0000/0
Standard RX: 0x1000/128, TX: 0x1080/128
Supported protocols: CoE
General:
Group: ServoDrive
Image name: DRIVE
Order number: SD700_ECAT Drive
Device name: SD700_ECAT_V1.2_G
CoE details:
Enable SDO: yes
Enable SDO Info: yes
Enable PDO Assign: yes
Enable PDO Configuration: yes
Enable Upload at startup: no
Enable SDO complete access: no
Flags:
Enable SafeOp: no
Enable notLRW: no
Current consumption: 0 mA
=== Master 0, Slave 2 ===
Device: Main
State: OP
Flag: +
Identity:
Vendor Id: 0x00850104
Product code: 0x01030507
Revision number: 0x02040608
Serial number: 0x00000000
DL information:
FMMU bit operation: no
Distributed clocks: yes, 64 bit
DC system time transmission delay: 1790 ns
Port Type Link Loop Signal NextSlave RxTime [ns] Diff [ns] NextDc [ns]
0 MII up open yes 1 3711076970 0 855
1 MII up open yes 3 3711078720 1750 875
2 MII down closed no - - - -
3 MII down closed no - - - -
Mailboxes:
Bootstrap RX: 0x0000/0, TX: 0x0000/0
Standard RX: 0x1000/128, TX: 0x1080/128
Supported protocols: CoE
General:
Group: ServoDrive
Image name: DRIVE
Order number: SD700_ECAT Drive
Device name: SD700_ECAT_V1.2_G
CoE details:
Enable SDO: yes
Enable SDO Info: yes
Enable PDO Assign: yes
Enable PDO Configuration: yes
Enable Upload at startup: no
Enable SDO complete access: no
Flags:
Enable SafeOp: no
Enable notLRW: no
Current consumption: 0 mA
=== Master 0, Slave 3 ===
Device: Main
State: OP
Flag: +
Identity:
Vendor Id: 0x00850104
Product code: 0x01030507
Revision number: 0x02040608
Serial number: 0x00000000
DL information:
FMMU bit operation: no
Distributed clocks: yes, 64 bit
DC system time transmission delay: 2665 ns
Port Type Link Loop Signal NextSlave RxTime [ns] Diff [ns] NextDc [ns]
0 MII up open yes 2 3704486570 0 875
1 MII down closed no - - - -
2 MII down closed no - - - -
3 MII down closed no - - - -
Mailboxes:
Bootstrap RX: 0x0000/0, TX: 0x0000/0
Standard RX: 0x1000/128, TX: 0x1080/128
Supported protocols: CoE
General:
Group: ServoDrive
Image name: DRIVE
Order number: SD700_ECAT Drive
Device name: SD700_ECAT_V1.2_G
CoE details:
Enable SDO: yes
Enable SDO Info: yes
Enable PDO Assign: yes
Enable PDO Configuration: yes
Enable Upload at startup: no
Enable SDO complete access: no
Flags:
Enable SafeOp: no
Enable notLRW: no
Current consumption: 0 mA
while the command:
ethercat upload -p 0 -t uint16 0x1C32 0x01 = 0x0002 2
ethercat upload -p 1 -t uint16 0x1C32 0x01 = 0x0002 2
ethercat upload -p 2 -t uint16 0x1C32 0x01 = 0x0002 2
ethercat upload -p 3 -t uint16 0x1C32 0x01 = 0x0002 2
The output of the ethercat slaves -v command is:
=== Master 0, Slave 0 ===
Device: Main
State: OP
Flag: +
Identity:
Vendor Id: 0x0000022b
Product code: 0x0531ec01
Revision number: 0x00000003
Serial number: 0x0001894b
DL information:
FMMU bit operation: yes
Distributed clocks: yes, 64 bit
DC system time transmission delay: 0 ns
Port Type Link Loop Signal NextSlave RxTime [ns] Diff [ns] NextDc [ns]
0 MII up open yes - 3151034175 0 0
1 MII up open yes 1 3151039505 5330 935
2 N/A down closed no - - - -
3 N/A down closed no - - - -
Mailboxes:
Bootstrap RX: 0x1000/1024, TX: 0x1400/1024
Standard RX: 0x1000/128, TX: 0x1080/128
Supported protocols: EoE, CoE, FoE
General:
Group:
Image name:
Order number:
Device name:
CoE details:
Enable SDO: yes
Enable SDO Info: no
Enable PDO Assign: yes
Enable PDO Configuration: yes
Enable Upload at startup: no
Enable SDO complete access: yes
Flags:
Enable SafeOp: no
Enable notLRW: no
Current consumption: 0 mA
=== Master 0, Slave 1 ===
Device: Main
State: OP
Flag: +
Identity:
Vendor Id: 0x00850104
Product code: 0x01030507
Revision number: 0x02040608
Serial number: 0x00000000
DL information:
FMMU bit operation: no
Distributed clocks: yes, 64 bit
DC system time transmission delay: 935 ns
Port Type Link Loop Signal NextSlave RxTime [ns] Diff [ns] NextDc [ns]
0 MII up open yes 0 3730859530 0 935
1 MII up open yes 2 3730862990 3460 855
2 MII down closed no - - - -
3 MII down closed no - - - -
Mailboxes:
Bootstrap RX: 0x0000/0, TX: 0x0000/0
Standard RX: 0x1000/128, TX: 0x1080/128
Supported protocols: CoE
General:
Group: ServoDrive
Image name: DRIVE
Order number: SD700_ECAT Drive
Device name: SD700_ECAT_V1.2_G
CoE details:
Enable SDO: yes
Enable SDO Info: yes
Enable PDO Assign: yes
Enable PDO Configuration: yes
Enable Upload at startup: no
Enable SDO complete access: no
Flags:
Enable SafeOp: no
Enable notLRW: no
Current consumption: 0 mA
=== Master 0, Slave 2 ===
Device: Main
State: OP
Flag: +
Identity:
Vendor Id: 0x00850104
Product code: 0x01030507
Revision number: 0x02040608
Serial number: 0x00000000
DL information:
FMMU bit operation: no
Distributed clocks: yes, 64 bit
DC system time transmission delay: 1790 ns
Port Type Link Loop Signal NextSlave RxTime [ns] Diff [ns] NextDc [ns]
0 MII up open yes 1 3711076970 0 855
1 MII up open yes 3 3711078720 1750 875
2 MII down closed no - - - -
3 MII down closed no - - - -
Mailboxes:
Bootstrap RX: 0x0000/0, TX: 0x0000/0
Standard RX: 0x1000/128, TX: 0x1080/128
Supported protocols: CoE
General:
Group: ServoDrive
Image name: DRIVE
Order number: SD700_ECAT Drive
Device name: SD700_ECAT_V1.2_G
CoE details:
Enable SDO: yes
Enable SDO Info: yes
Enable PDO Assign: yes
Enable PDO Configuration: yes
Enable Upload at startup: no
Enable SDO complete access: no
Flags:
Enable SafeOp: no
Enable notLRW: no
Current consumption: 0 mA
=== Master 0, Slave 3 ===
Device: Main
State: OP
Flag: +
Identity:
Vendor Id: 0x00850104
Product code: 0x01030507
Revision number: 0x02040608
Serial number: 0x00000000
DL information:
FMMU bit operation: no
Distributed clocks: yes, 64 bit
DC system time transmission delay: 2665 ns
Port Type Link Loop Signal NextSlave RxTime [ns] Diff [ns] NextDc [ns]
0 MII up open yes 2 3704486570 0 875
1 MII down closed no - - - -
2 MII down closed no - - - -
3 MII down closed no - - - -
Mailboxes:
Bootstrap RX: 0x0000/0, TX: 0x0000/0
Standard RX: 0x1000/128, TX: 0x1080/128
Supported protocols: CoE
General:
Group: ServoDrive
Image name: DRIVE
Order number: SD700_ECAT Drive
Device name: SD700_ECAT_V1.2_G
CoE details:
Enable SDO: yes
Enable SDO Info: yes
Enable PDO Assign: yes
Enable PDO Configuration: yes
Enable Upload at startup: no
Enable SDO complete access: no
Flags:
Enable SafeOp: no
Enable notLRW: no
Current consumption: 0 mA
while the command:
ethercat upload -p 0 -t uint16 0x1C32 0x01 = 0x0002 2
ethercat upload -p 1 -t uint16 0x1C32 0x01 = 0x0002 2
ethercat upload -p 2 -t uint16 0x1C32 0x01 = 0x0002 2
ethercat upload -p 3 -t uint16 0x1C32 0x01 = 0x0002 2
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
- grandixximo
-
Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 238
- Thank you received: 321
14 Apr 2026 11:02 - 14 Apr 2026 11:03 #345532
by grandixximo
Replied by grandixximo on topic Ethercat random jitter fix
You are using DC. Confirmed.
All four slaves show "Distributed clocks: yes, 64 bit" and all four report 0x1C32:01 = 0x0002 which means DC Sync0. Your drives are running in DC synchronized mode right now. This is the best mode for a CNC machine.
The only thing that does not work for you is the alternative sync strategy where the master follows the reference slave clock instead of the other way around. But that is just a different way of keeping everyone in sync, not a better or worse one. What you have now, master as reference with refClockSyncCycles=1, is perfectly fine and is DC.
One thing I notice is that your reference clock, slave 0, is not one of the SD700 drives. It is a separate device, the first on the bus. That could be related to why syncToRefClock=true causes problems, if that device reports timing that my PLL does not handle well. If there is an opportunity to test this any time in the future within a better setting, I'd love to debug it remotely.
All four slaves show "Distributed clocks: yes, 64 bit" and all four report 0x1C32:01 = 0x0002 which means DC Sync0. Your drives are running in DC synchronized mode right now. This is the best mode for a CNC machine.
The only thing that does not work for you is the alternative sync strategy where the master follows the reference slave clock instead of the other way around. But that is just a different way of keeping everyone in sync, not a better or worse one. What you have now, master as reference with refClockSyncCycles=1, is perfectly fine and is DC.
One thing I notice is that your reference clock, slave 0, is not one of the SD700 drives. It is a separate device, the first on the bus. That could be related to why syncToRefClock=true causes problems, if that device reports timing that my PLL does not handle well. If there is an opportunity to test this any time in the future within a better setting, I'd love to debug it remotely.
Last edit: 14 Apr 2026 11:03 by grandixximo.
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
Time to create page: 0.230 seconds