To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 13663
13662  |  13664
Subject: 
Re: Message transmission speeds.
Newsgroups: 
lugnet.robotics
Date: 
Sun, 31 Dec 2000 15:27:03 GMT
Original-From: 
Brian <alano@kiva.net&ihatespam&>
Viewed: 
730 times
  
Steve Baker wrote:


It's all VERY cool - but the problem is that it's VERY slow.

(snip)
The best-case time seems to be more than ~100msec and the worst case
something less than ~500msec.

That seems VERY long.  I was under the impression that the IR link ran at
4800 baud - which ought to be 480 bytes/sec - which is about 2ms to send a
message and another 2ms to get the reply back - plus the time to read the
three sensors on the Scout and a little software overhead.

It doesn't seem reasonable that this should take more than about 10msec - not
100ms!

The data rate is 2400bps, and each packet of N bytes of data has 5 + N
bytes of overhead. So the more realistic time to send a 1 byte message
is 24ms.

Here is an excerpt from the Communication section of
http://www.crynwr.com/lego-robotics
(i.e. Did you check the web site first?:
http://www.crynwr.com/lego-robotics)

As for the sampling rate, the RCX runs at 2400 bps, which makes each bit
approx 417us.
(snip)
The IR protocol associated with sending a "message" to the RCX is pretty
simple. Bit encoding is 2400 bps, NRZ, 1 start, 8 data, odd parity, 1
stop bit. A '0' is coded as a 417us pulse of 38kHz
IR, a '1' bit is 417us of nothing.

At the packet level, all packets look like this:

0x55 0xff 0x00 D1 ~D1 D2 ~D2 ... Dn ~Dn C ~C

where D1...Dn are the message body, and C = D1 + D2 + ... Dn.

The data for sending an IR message is F7 followed by the 8 bit
"message". For example:

55 ff 00 f7 08 12 ed 09 f6



Message has 2 Replies:
  Re: Message transmission speeds.
 
(...) Oops. Two mistakes there. (5 + 1 + 1)*4 = 28 not 24, which is moot because "messages" apparently have a prefix of hex F7 as part of the data payload, so a message is actually 9 bytes or about 36ms. Makes it sound like you're doing nothing (...) (24 years ago, 31-Dec-00, to lugnet.robotics)
  Re: Message transmission speeds.
 
(...) That sounds believable. I send 6 one-byte messages in each comms cycle. That's gotta be a good 150ms - which is probably about what I'm seeing. How depressing. :-( (...) So, the first major speedup would be to send a 3-byte message containing (...) (24 years ago, 1-Jan-01, to lugnet.robotics)

Message is in Reply To:
  Message transmission speeds.
 
I'm thinking about building a robot with three Scouts acting as slaves to a single RCX - nine motors and a dozen sensors in all! I'm not quite sure what they are all going to do yet - but I want to plan the communications mechanisms first. What I'm (...) (24 years ago, 31-Dec-00, to lugnet.robotics)

5 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR