Skip to main content

Introducing the Minblocks

A lot of folks have commented (to put it nicely) on the size of NXT-G programs relative to the memory on the NXT. Well, LEGO and NI it seems were listening. The new patch allows the user to add more blocks to the NXT-G pallets, including soon to be released blocks for 3rd party sensors, custom blocks individuals create with the LabVIEW Toolkit, and a selection of blocks straight from National Instruments called "miniblocks". The miniblocks are stripped down versions of some of the larger "stock" blocks, like the Display or Motor blocks. By going over those blocks with a fine-toothed comb, a (very!) hardworking team at NI has created specialized, targeted versions that upon being compiled only generate the needed bytecodes.

To put that another way, the miniblocks result in smaller programs on the NXT, as well as in some cases faster execution. For instance, 16 consecutive Display blocks generates a program on the NXT that is about 4k in size; but making the same program using 16 of the new miniDisplay blocks results in a program just 2.2 to 2.5 k in size, close to a 40% savings in memory. The miniMotor blocks are even more impressive, resulting in a savings of almost 70% over the "stock" Motor blocks! The miniblocks are also slightly faster in execution: Display a point, for instance, is about 30% faster than with the original Display block, as well as being smaller.

This doesn't answer all the issues folks have brought up with NXT-G and the memory on the NXT brick, but it shows two important things to me: first, LEGO & NI have been listening, and responding to things filtering out of the community (I strongly doubt this is the last time that occurs). Second, there are multiple solutions to any problem. Nope, they haven't added more memory to the NXT, they just reduced the amount of memory that programs need to run in... and done it less than a year after the product release. Well done!

For those who like numbers, here's the figures I got:
16 Move blocks: 11.8 kb
16 miniMove blocks: 7.7 kb
16 Motor blocks: 12.5 kb
16 miniMotor blocks: 3.9 k (!!)
16 Display blocks: 4 kb (with one Display block of a point taking 1.3 ms)
16 miniDisplay a RIC: 2.5 kb
16 miniDisplay a string: 2.4 kb
16 miniDisplay a point: 2.2 kb (with this miniDisplay block taking 0.93 ms)

Footnote: quite apart from these savings, I've also noticed that some FLL teams have gotten around any memory problems by using MyBlocks to save lots of memory, and even condensing down everything to one program where the kids select which mission to run on-screen (that way, any MyBlock used gets stored just once, instead of once per mission). Kudos to a number of FLL teams for working within the limits, and learning (& teaching!) something new.

The patch to NXT-G itself is rather nice: it adds another option under the "tools" menu, allowing you to import and export custom blocks into any of the subpallets within the Common pallets. I put the miniMove block in the subpallet with its big brother, and the miniDisplay blocks in with the original Display block... but you could put them anywhere you like. Keeping the the import tool in the menu keeps the interface from becoming cluttered as well, and it's fairly easy to use.

--
Brian Davis

Popular posts from this blog

Celebrating MINDSTORMS with a Remix - Part 3

The ROBOTMAK3RS continued their celebration of the 25th Anniversary of MINDSTORMS through these Fall and Winter remix projects. Each ROBOTMAK3R was tasked with selecting one LEGO set of their choice and combining it with a MINDSTORMS set. Below are the five amazing models they came up with. Braill3 by Jerry Nicholls Braill3 is an EV3-based LEGO Braille bricks reader. This robot uses its fingertip, made from three touch switches, to read messages written using the LEGO Braille bricks and will speak out what it detected. If it sees a simple maths problem it will attempt to solve it and give the answer as well. To learn more about the process of creating this machine, read Jerry's blog . Braill3 can be viewed here . Set Review: The Braille Bricks set is well thought out. The ratios of the letters is suitable for general use and the addition of some punctuation and arithmetic operators is excellent. There is a card showing what bricks there are and their quantities, but no form of sort...

Celebrating MINDSTORMS with a Remix - Part 2

The ROBOTMAK3RS continued their celebration of the 25th Anniversary of MINDSTORMS through these summer and fall remix projects. Each ROBOTMAK3R was tasked with selecting one LEGO set of their choice and combining it with a MINDSTORMS set. Below are the five amazing models they came up with. Remote controlled material handle r by Jozua van Ravenhorst (aka Mr Jo) This remix combines the LEGO Technic Material Handler (42144) with MINDSTORMS EV3 (31313) It uses the power of pneumatic cylinders to move objects around. By using a bluetooth remote control, very precise movements can be made with this model. Touch sensors in the base chassis prevent the turret twisting the cables that go through the turntable to much. The program has several protections to prevent over pressurizing the system for each of the 3 individual pumps and valves that control the 2 booms and claws. The real version of this machine is mostly used in waste material sites to bring the material to machines that sort and...

Celebrating 25 Years of MINDSTORMS

In celebration of the 25th Anniversary of MINDSTORMS, we take a trip through history. Please also visit ROBOTMAK3RS Community every week as we highlight different projects all through 2023 in celebration of the anniversary. Some of the early history is based on the content shared by  Coder Shah  in our  MINDSTORMS EV3 Community Group . Some of the text and links may have been edited from his original posts for consistency and clarity.  1984 - Kjeld Kirk Kristiansen watched a TV program called "Talking Turtle," where MIT professor Seymour Papert demonstrated how children could control robot "turtles" using LOGO, a programming language he developed. 1988 - The collaboration between MIT and LEGO resulted in LEGO TC Logo in 1988, which allowed students to control LEGO models using computer commands. The video shows Papert demonstrating TC Logo. 1990 - LEGO TC Logo was hampered since the robots you built had to be tethered to a personal computer. LEGO and MIT...