NXT-G Blocks, 

 Add-Ins, and Tips 

While this may appear to be a LEGO page,  IT'S NOT.

NXT-G Blocks

This is a collection of blocks I've made for NXT-G , using NI's LabVIEW NXT Toolkit. The blocks will load directly into the Mindstorms software, once the Dynamic Block Update is installed. (only needed for NXT-G V1.0)

 

Advanced Display Image block

This block uses some very interesting and not well documented features of .ric files, by allowing users to pass parameters to the image.  This block is limited to five parameters.  The zip includes meter.ric, that works like a volt-meter.

To create an advanced ric file, use Andreas Dreier's RIC Editor

Also useful: Advanced Display Text Block by Guy Ziv (thanks for showing how some of the stuff is done)

 

Line Following block

This block should be placed in a loop, and will cause drive the motors at the speed specified, so the robot can follow the edge of a line, with a single light sensor.

My tests show this single block will execute about 2 to 3 times as fast as the same code in NXT-G.

 

Bit Logic block

This block will do bitwise operations on numbers (And, Or, Xor, and Not).

I'd love to take credit for this, but the block actually come from Michael Gasperi.  He created this block, and asked me to take a look at it.  I made some changes, and passed it along to Brady (at National Instruments) who made some improvements before sending it back, where I made even more improvements.  Now, it's a pretty nice little block, that's easy to use and looks good. (added 2/28/07)

 

Simple Array block v2.0

The array block is a repackaged sub-block.  It will allow you to Clear the array, Add values, Get and Replace values given the index.

 

Display Number block v2.0

I made this block as a debugging tool.  It combines several blocks that (due to program limitations) could not be compiled into a My Block.  The block takes a line number, a caption, and a number as input.  The Caption and Number are displayed on the given line on the screen.

 

Color Range Block v1.0

 This block will return Red Green and Blue values for the color sensor specified.

It requires the NXT retail software to be installed in order to work.

 
 

Temperature Block v1.0

This MyBlock was created by Brian Davis.  The zip file includes the my block & a sample program.

 

Installing Interger Blocks (NXT-G 2.0)

When you load v1.0 or v1.1 programs in NXT-G v2.0, you'll see some blocks (like the math block shown) have an (!) on them.  These are interger versions of blocks that have been updated in v2.0 to be floating point blocks.  These blocks are installed with v2.0, but do not appear on any pallet.

To add them to a pallet, simply create an empty file in the BlockRegistry directory, in the pallet sub-directory, with the name of the block and a .txt extension.

Ex: [LEGO MINDSTORMS directory]\engine\EditorVIs\BlockRegistry\Data\Numeric Operations.txt

The list of available blocks is located in: [LEGO MINDSTORMS directory]\engine\vi.lib\LEGO\Blocks\

If this doesn't make sense, you probably shouldn't do it.

 

I2C blocks

These are not my blocks, but I believe they have been removed from their former location:

IIC Read

IIC Write

IIC Read - multi

 
   

Display Time block

This block is a combination of many other things.  It's a modified version of the display number block that will display the value of a timer in minutes and seconds.  (added 2/28/07)

 

Acceleration Sensor block

This is the first block I made.  The Configuration panel is not complete.  It works with one of the prototype acceleration sensors from Hi-Technic.  It has outputs for X, Y & Z.  It can not be used as a loop block condition, because I didn't finish that part.

I've added some better pictures that Andy created and posted on NXTasy.org - Thanks Andy

HiTechnic has a better version of this block






Tools

This is a very small collection of tools.

 

Blank Image (1x1) 

This .ric file contains a blank image that can be used to erase one pixel on the NXT screen.

In NXT-G, this image will show as a couple small lines, however on the NXT, it will only show as one blank pixel.

The image should be Saved to your Pictures directory...

[LEGO MINDSTORMS directory]\engine\Pictures\

 

Blank Image (??x??) 

This .ric file contains a blank image that can be used to erase parts of the NXT screen.  The default image is a 1x1 pixel.

Using "Advanced Display Image Block" (above) you can pass parameters to set the width & height (as parameter 0 and parameter 1) up to 100 x 64.

In NXT-G, this image will show as a couple lines, however on the NXT, it will only show as one blank pixel.

** this image may not work with the normal display block in NXT-G **

The image should be Saved to your Pictures directory...

[LEGO MINDSTORMS directory]\engine\Pictures\






NXT-G Add-Ins

The following are small programs that can be added to NXT-G.  To install them, simply save them into the project folder in the NXT-G directory, and they will appear under the "tools" menu in NXT-G.

[LEGO MINDSTORMS directory]\engine\project\

As a rule, if you can't get them to work, don't use them.  But, one of the best places to ask questions is NXTasy.org

These are from various locations.  Several came from Jason King.  (Thanks Jason)

 

Config popup

Show configuration panel in a floating window.  Good for mini-PCs, with a resolution of ????x600.  You must select the type of block in the window, before selecting the block in the editor.

 

Download to file

Compile a program, and save it to a file.  Useful when writing a program, without having an NXT connected to the computer. 

 

Modify User Settings

Change some setting for a pre-selected user.

 

Remove bad wires

Removes bad wires.

 

Save Screen Image

Will save the selected image from the screen.  Good for saving Config panel images.