NXT Mindstorms 2.0 Program Size limit
-
- Posts: 2
- Joined: 04 Oct 2012, 00:52
NXT Mindstorms 2.0 Program Size limit
Is there a limit to the size of an NXT program? Even though I may have 90kbs+ of space can I use it all for single application?
-
- Posts: 290
- Joined: 03 Oct 2011, 00:06
- Location: Gallifrey
- Contact:
Re: NXT Mindstorms 2.0 Program Size limit
The only limit is your imagination. And how much memory is on the NXT. So yes, the programs can be as large as you want, as long as they don't hit the memory limit.
A.K.A. NeXT-Generation.
"A kingdom of heaven for RobotC now has recursion!"
"A kingdom of heaven for RobotC now has recursion!"
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: NXT Mindstorms 2.0 Program Size limit
If you use NXT-G I have a feeling your computer would crash before you build a 90kB program (NXT-G does not run well on a computer, especially when the program get large).
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
-
- Posts: 290
- Joined: 03 Oct 2011, 00:06
- Location: Gallifrey
- Contact:
Re: NXT Mindstorms 2.0 Program Size limit
This is true. I have nightmares about NXT-G and its slowness and glitchiness.mattallen37 wrote:If you use NXT-G I have a feeling your computer would crash before you build a 90kB program (NXT-G does not run well on a computer, especially when the program get large).
A.K.A. NeXT-Generation.
"A kingdom of heaven for RobotC now has recursion!"
"A kingdom of heaven for RobotC now has recursion!"
-
- Posts: 346
- Joined: 27 Sep 2010, 03:05
- Contact:
Re: NXT Mindstorms 2.0 Program Size limit
I think the actual limit is around 59kb. I'm sure John knows the exact size, but the limit is between 50 and 60kb. I have written a program in Labview that I had to reduce to get under the limit.
Steve
Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
-
- Posts: 2
- Joined: 04 Oct 2012, 00:52
Re: NXT Mindstorms 2.0 Program Size limit
Thank you Steve, I knew that it wasn't anywhere close to 90kbs. This isn't usually a problem except for FLL where the students that I coach begin to combine missions so that they have only one program (with a menu) to run.
I'll pass the information on.
John
I'll pass the information on.
John
Re: NXT Mindstorms 2.0 Program Size limit
Available memory of course is the RAM size for code plus variable memory plus fw (bytecode interpreter, VM).I think the actual limit is around 59kb
So my guess also was sth close to 60 kB for code plus variable memory, the rest up to 64 kB is for the VM.
The max variable memory I ever could allocate was round 30 KB (once for an astar and in another case, for a neural net), in that case the code was limited to about 30 kB, too.
-
- Posts: 346
- Joined: 27 Sep 2010, 03:05
- Contact:
Re: NXT Mindstorms 2.0 Program Size limit
There is a program size limit, that is different from the available memory. It has something to do with how programs are stored in the RAM.doc-helmut wrote:Available memory of course is the RAM size for code plus variable memory plus fw (bytecode interpreter, VM).
Oh, that's another important point. Programs must occupy consecutive RAM. So, sometimes a program won't fit, because there is no single block that's large enough because of deleted files and such. If you delete all the files, and download them again, you may find more programs will fit.
Labview has a tool for doing this. I'm not sure if it's available in NXT-G.
Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
Re: NXT Mindstorms 2.0 Program Size limit
I expressed myself probably wrong.
you wrote "the actual limit is around 59kb".
I agree, because the RAM is 64kByte, and I assume that the fw/VM takes the remaining (first) 4-5kB or what ever.
But I wanted to express that the 59 ? kByte for program code depends on how much the code is allocating variable memory,
so it might be max 59 kByte but maybe even much less (e.g., 30 kByte code limit if the code needs additionally 30 kByte for variables).
CMIIW, but IMO the "deleted files issue" is an issue of the 256 kByte flash memory ("linear" unfragmented vs. fragmented files), not of the 64 kByte RAM.
So source code stored on the flash which should be larger than these 59 kByte probably would never fit into the RAM and so never could be executed.
you wrote "the actual limit is around 59kb".
I agree, because the RAM is 64kByte, and I assume that the fw/VM takes the remaining (first) 4-5kB or what ever.
But I wanted to express that the 59 ? kByte for program code depends on how much the code is allocating variable memory,
so it might be max 59 kByte but maybe even much less (e.g., 30 kByte code limit if the code needs additionally 30 kByte for variables).
CMIIW, but IMO the "deleted files issue" is an issue of the 256 kByte flash memory ("linear" unfragmented vs. fragmented files), not of the 64 kByte RAM.
So source code stored on the flash which should be larger than these 59 kByte probably would never fit into the RAM and so never could be executed.
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: NXT Mindstorms 2.0 Program Size limit
Programs are stored in flash, not RAM. There is about 30k of RAM available to the user, and it seems quite independent of the program size.
The ARM 7 HW in the NXT has 256k of flash, and 64k of RAM. Obviously a large chunk of each is used by the FW, VM, and other resources.
The ARM 7 HW in the NXT has 256k of flash, and 64k of RAM. Obviously a large chunk of each is used by the FW, VM, and other resources.
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Who is online
Users browsing this forum: No registered users and 4 guests