Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending cyclic udp signals over ethernet

Hello,

we use the cRIO 9033 for communication over ethernet.

Aside from some tcp communication we send every 10ms a udp packet over eth1 with 83 bytes for the whole ethernet frame (according to wireshark) to the receiver. The development of the receiver is not under our control but it lets us monitor received packages.

The receiver is directly connected over one ethernet cable with the CRIO. The receiver complains about timeouts. Analysis on the receiver side reveals some packets are not received. Also the time between two successive received packets varies between roughly 5ms and 40ms even if no packet were not received in between.

We did two more scenarios for testing purposes:
1) Put a hub (not switch) between CRIO and receiver and connect a notebook with wireshark to it.
2) Replace the receiver with our notebook and connect it directly to the receiver and measure again with wireshark.

For both scenarios we exported the wireshark measurements to csv parsed it and did some calculation. Result: The time delta between successive packets is again between 5ms and 40 ms and some packet are not received.

The send queue for the udp socket (according to /proc/net/udp) seems not to be full. also increasing the size via sysctl didn't have any influence. "netstat -i" and "ethtool -S eth1" shows tx_errors for eth1.


In tests for case 2) about 1 percent of time diffs were greater than 11ms, 0.1 percent > 20ms. Also the not received packets were about 0.1 percent.
Are those numbers usual ? We know that ethernet is not intended for real time use, but maybe someone knows how to tweak some network stack or network controller settings or to solve this problem in another way.

0 Kudos
Message 1 of 2
(2,196 Views)

That variation on the real time OS is not expected. It might be an issue with the application running on the cRIO.

From what I remember the TCP and UDP VIs should not be ran from inside a timed loop.

I'll follow up with you through email.

Andreas Stark
LabVIEW Lead @ Rocket Factory Augsburg
0 Kudos
Message 2 of 2
(2,148 Views)