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 / 26244
26243  |  26245
Subject: 
Re: Memory - Where did it go?
Newsgroups: 
lugnet.robotics
Date: 
Sat, 8 Jul 2006 11:30:11 GMT
Viewed: 
4304 times
  
In lugnet.robotics, Tom Stiles <hamrad45@hotmail.com> wrote:

After reading the help file I was informed that out of the
256K of memory (which is small to begin with), only about 56K
is available for user files including sound files.

   Once you delete a lot of the "Try me" and on-brick programming stuff, this
jumps up to (IMS) 120k+ or so. Still not ideal (yeah, I'd like a Mb of memory as
well :-), but much better. As to what to delete, I've taken everything off but
the system sound files (and I left those on because I like them, not because
they're required; I've deleted those at times as well).

not knowing which files I can delete with no problems.

   I'm not sure there *are* any files that "can't be deleted". I'll have to
check, but I've deleted everything I think at one time or another.

2) Can someone show me one of their more complicated programs and
how much memory it took?

   Yes, but I'm not sure how informative this will be. Somebody asked this on
theNXTstep blog, and so I looked at some sizes. The largest program I've written
(nesting7.rbt) has 39 blocks, 6 loops, & 1 switch, and is about 2.2 Mb on the
comp[uter, and compiles down to 23.5 kb in the NXT. If the NXT has 120 k of free
memory, it would seem you could hold a program of about 240 blocks... but I'm
sure some of those are bigger than others*, so... I suspect (that would make
this an unwarrented, unsupported *guess*) a practical upper limit is around
150-180 blocks, if there's little else on the NXT itself. YMMV.

to see how effiecent the program is when complied...

   I think John Hanson has done a good bit of digging on this. The answer
appears to be "not as good as I'd like", with hand-optimised programs coming in
at (IMS) 2-3 times smaller (still rather large in some cases, but at least
there's some good room for improvement).

*execution time varies a good deal between different blocks, for instance, with
a Math (addition) block taking just 0.14 ms, (and variable read blocks being
even faster) to Draw image blocks taking 7 ms or up; sensor reads vary with the
sensor, but take around 4.4 ms in my testing.

--
Brian Davis



Message has 1 Reply:
  Re: Memory - Where did it go?
 
(...) By "Block" you mean a simple operation like and add or a multiply or turning on a motor or reading a sensor? These 'blocks' ought to be turned into little interpreted byte-code segments - it's hard to imagine how a block could possibly take up (...) (18 years ago, 8-Jul-06, to lugnet.robotics)

Message is in Reply To:
  Memory - Where did it go?
 
I got my Mindstorms NXT this past weekend and built the demo unit and then the Claw with only minor programming errors. Tonight I started using some of the various programming functions. My first program was to use the sonar and detect the presence (...) (18 years ago, 6-Jul-06, to lugnet.robotics)

9 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