Real time data exchange

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I have two computers (Win XP) and must get one of this computer to send a
small amount of measurement data (4k) each 20ms to the other computer. In
the receiving computer there is running a real-time process in a loop (20ms,
real computing time: 5ms), which needs the actual measurement data in time.
There is no possibility to make both jobs on one computer.
Anybody have an idea for a proper way to implement the communication? For
the hardware, I think to take Firewire or a parallel cable. But how to
implement the software without breaking the control process while waiting
for new data. Open e network drive and write each 20ms a new file? Take a
Thanks for your suggestions.


Re: Real time data exchange
On Sat, 5 Jul 2003 04:19:23 +0200, "Rainer Harthaus"

Quoted text here. Click to load it

I assume this is 4 kilobytes, thus 200 kilobytes/s or about 2 Mbits/s.

Quoted text here. Click to load it

What is wrong with Ethernet, even the 10 Mbit/s should barely be able
to constantly keep up with that rate.

Use UDP if timing is important and you can tolerate some lost frames,
the 4 KB data must be split into 3 frames.

Use TCP/IP if it is important that all data is transferred, but the
timing of the delivery is not (e.g. the data has been time stamped at
the sending computer).

Quoted text here. Click to load it

Either synchronise the control loop with the sending cycle of the
other computer or use a separate thread to receive frames while other
threads do all kinds of other control activities.

By the way, disconnect both the keyboard and mouse from both computers
in order to prevent any user interaction with the computers while the
real time applications are running.

The Win NT series of operating systems can work with a surprisingly
low jitter (within a millisecond of two with 99.9 % certainty)
_provided_ that the CPU load is low (always below 50 %), the hardware
is well behaving (some drivers are not well behaving and must be
discarded) and there is a full control what exactly is running on the
system (thus any random user interaction, such as running Word, must
be prevented).

Unless these precautions are used, the peak jitter can be 50-100 ms or
even more.


Re: Real time data exchange
You can probably meet these requirements using TCP/IP sockets over ethernet.
This depends somewhat on whether you can tolerate an occasional missed
message, which would be very infrequent.  Good fast ethernet adapters are
readily available an inexpensive.

If your requirements are more stringent, you might look into one of the
reflective memory devices.  They are a lot more $$$ but can meet some
serious real-time constraints.

(The Duck)

Quoted text here. Click to load it
Quoted text here. Click to load it

Site Timeline