To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 1141
1140  |  1142
Subject: 
Re: NQC vs Spirit communication speed
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Fri, 11 May 2001 20:33:35 GMT
Viewed: 
2108 times
  
hi John,

I'm curious to see your "Fakespirit" class.
At this moment I only need a limit set of commands, so I send by a couple of simple routines to my serial commport driver (indepent thread).
Here is the basic code I use, timing is very a stable (the measured times are given for the poll-command).

    tim:=now;
    sendstring(data);
    memo2.lines.add(inttostr(round((now-tim)*24*3600*1000)));
//this always gives 60 msec
    tim:=now;

    doing some calculations ....

    inputtimeout:=receive_len*10;     {normally 5 msec/byte, so 10 ms/byte should be enough}
    navail:=ReadData(p,receive_len);  {waits till receive_len bytes or inputtimeout}
    memo2.lines.add(inttostr(round((now-tim)*24*3600*1000)));
//at this moment another 50 msec is reported

//and of course here I've to check the whole string (except the first byte which isn't always $55 !!!)


John Hansen wrote:

This is more a general RCX communication question, actually.  As I mentioned
here previously, I've ported the NQC communication code to Delphi for the
purposes of modifying RcxCC to not use the Spirit OCX.

At present I have a version of RcxCC that does everything the original
version does without ever using Spirit.  It uses my "FakeSpirit" class that
uses my port of the NQC RCX_Link, RCX_Cmd, and Serial code.  I'm relatively
satisfied with the results.  But there is a slight problem.

The original RcxCC (which uses Spirit) appears to communicate with the brick
much faster than my modified RcxCC does.  Polling for information using my
Spirit replacement is much slower than doing so via Spirit.  I've profiled
the application and the vast majority of the time is spent in the serial
class' read method.  It appears to retry a lot - almost always (if not
always) failing on the first send.  But Spirit somehow seems to do the exact
same operations in virtually no time at all.

Can anyone shed some light on this matter?

Thanks in advance for your help,

John Hansen

Stef Mientki



Message is in Reply To:
  NQC vs Spirit communication speed
 
This is more a general RCX communication question, actually. As I mentioned here previously, I've ported the NQC communication code to Delphi for the purposes of modifying RcxCC to not use the Spirit OCX. At present I have a version of RcxCC that (...) (23 years ago, 11-May-01, to lugnet.robotics.rcx.nqc)

8 Messages in This Thread:



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

Custom Search

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