On Sat, 5 Jul 2003 04:19:23 +0200, "Rainer Harthaus"
>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.
I assume this is 4 kilobytes, thus 200 kilobytes/s or about 2 Mbits/s.
>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.
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).
Quote:>But how to
>implement the software without breaking the control process while waiting
>for new data.
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
Unless these precautions are used, the peak jitter can be 50-100 ms or