OpenEtherCATsociety / SOEM

Simple Open Source EtherCAT Master
Other
1.36k stars 688 forks source link

Jitter while sending 1024 bytes with three slaves connected to SOEM. #80

Closed shuganthan closed 7 years ago

shuganthan commented 7 years ago

1.) Configured three Ethercat slaves each sending 1024bytes & receiving 128 bytes process data every cycle. ( Slave = Microchip LAN9252) 2.) Our master is SOEM running on TI AM3359 / LINUX RT . ( version = 1.3.1, version = Linux 4.4 PREMPT RT ) 3.) We setup cycle time on SOEM roughly at 2 milliseconds. ( using the simple_test example)

We are noticing a jitter roughly around 650 microseconds on the Wireshark capture & attached it too. We kindly request you to let us know are there ways we could reduce the jitter to absolute minimum or zero or could you suggest us a different hardware / dev kit for SOEM.

Note: soem_am3359_linuxRT_2000usec_1024bytes.png to soem_am3359_linuxRT_2000usec_1024bytes.pcapng

soem_am3359_linuxrt_2000usec_1024bytes

nakarlsson commented 7 years ago

We usually run SOEM in a deterministic environment running any RTOS with capability to send layer 2 Ethernet frames, we’ve projects with cycle times down to 100us. So for devkit you can pick any HW and SW that have the mentioned capability.

If you continue with Linux rt and TI, I suggest you make some tracing to find out where the jitter originate from and make sure you send processdata at a fixed 2ms timer.

Psudo: Timer_callback(every2ms) sendprocessdata recivepcoessdata

Not : While(1) sendprocessdata recivepcoessdata sleep(2ms)

shuganthan commented 7 years ago

Hi,

Thank you for your reply.

Modified the simple_test.c and sent process data using Linux timers. It worked perfectly . No jitter ( 1024 bytes txPDO, 128 bytes rxPDO @ 1 millisecond ).

I have also attached the wireshark capture.

Note:

please rename soem_timer_am3359_1000usec_1024bytes.png to soem_timer_am3359_1000usec_1024bytes.pcapng.

soem_timer_am3359_1000usec_1024bytes

Regards, Suganthan Sundaram