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 / 2418
2417  |  2419
Subject: 
RE: Datalog in Delphi
Newsgroups: 
lugnet.robotics
Date: 
Wed, 6 Jan 1999 17:11:56 GMT
Original-From: 
Andy Walker <andy@ajwalker.freeserve.co.+SayNoToSpam+uk>
Viewed: 
1078 times
  
On Wednesday, January 06, 1999 6:21 AM, Simen Svale Skogsrud
[SMTP:simen@mop.no] wrote:
I have made a simple 25dpi monochrome scanner with my kit. Using NQC i have
written a small program for the RCX that advances the scanner one line and
reads aproximately 170 samples from the light-sensor while running it on a
carriage over the image. These samples are stored in a datalog which a
Delphi application on my PC then downloads before telling the RCX to go on
scanning the next line.

I have trouble getting the RCX to send the whole datalog in one transfer.

I do like this:

First I ask the RCX how many samples it got by reading the first entry of
the datalog:

    scanline := Spirit.UploadDatalog(0,1);
    datamount := scanline[2,0];

this is typically 170-180. If I then ask the RCX to upload it all by
writing

Spirit.UploadDatalog(1,170) // or any other value more than 50

i get an empty array as result. I have gotten around this by uploading it
in chunks smaller than 50 entries. This works well, but I can see no reason
why this should be, it is probably sub optimal as well. I find no
references to this problem in the Spirit documentation from Lego. Any
ideas?

thank you
Simen

If you check the parameter table #2 in the Spirit documentation it species that
the valid range for the size parameter is 1-50, although this is not mentioned
on the page describing the upload function. I guess there's just no way round
it.

Cheers,
Andy
--
Did you check the web site first?: http://www.crynwr.com/lego-robotics



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in Robotics

 
Verified and Trusted Team of Hackers
12 hours ago
Custom Search

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