Real time data exchange

Real time data exchange

Post by Rainer Harthau » Sun, 06 Jul 2003 11:19:23



Hi,
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
pipe?
Thanks for your suggestions.

Rainer

 
 
 

Real time data exchange

Post by Paul Keinane » Sun, 06 Jul 2003 22:27:13


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.

Quote:>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.

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
be prevented).

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

Paul

 
 
 

Real time data exchange

Post by Stev » Tue, 08 Jul 2003 01:36:20


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.

Steve
(The Duck)


Quote:> Hi,
> 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
> pipe?
> Thanks for your suggestions.

> Rainer

 
 
 

1. Real-time vs real-time vs real time

When used in titles or at the start of a sentence, I suspect
it should be `Real-time' and not `Real-Time' on the grounds
that capitalization nevers occurs within a hyphenated word
except for a proper noun.

Thus one would have RtSS and not RTSS.

(Likewise, `Fault-tolerance' and not `Fault-Tolerance' ...
which would reduce FTCS to FtCS).

                        Mathai Joseph

2. Sparse Matrix Solver DSP?

3. what's the exact difference between Hard Real-Time and Soft Real-Time

4. PPP Client Software for MSDOS

5. Is Real Time Publish and Subscribe realy "real time"

6. Colour Printers

7. How to make Real - time Linux, X etc more real - time?

8. runtime error on bootup

9. Update on real-time CORBA and real-time DCOM

10. Best Real-time Exec / Real-time OS

11. Is it 'real-time' or 'real time' ?

12. What makes a system "real-time?" (Was: Real-Time references wanted)