Loginskip to content

December 5th, 2006

NXT LabVIEW Toolkit Overview

Although the “official” release is scheduled for next week, National Instruments (who developed NXT-G and the firmware running on the NXT brick) “leaked” to the NXT community that the toolkit is available online as of today, December 5th, 2006. The LabVIEW Tookit for LEGO Mindstorms NXT is available for download on NI website.

Being granted the privilege to be a member of the beta testing group, I was able to play around with some of its functionalities over the past months. A scratch overview of the toolkit is described in this post.

Basically, the toolkit is comprised of three components -

Direct VIs
This is a set of LabVIEW blocks (termed VIs - Virtual Instruments in LabVIEW jargon) that encapsulate direct Fantom driver calls. These VIs allow one to program LabVIEW user interfaces and diagrams that control and monitor the NXT running on the Mac/PC. A separate post on these Direct VIs will be published later today.

LabVIEW to NXT Compiler
This is actually the core of NXT-G. It allows one to compile LabVIEW diagrams into .RXE format (the executable file format of NXT virtual machine, i.e. firmware), download/upload from NXT (with the aid of a simple “NXT Terminal”) and “Debug” a program running on the NXT by stepwise execution of diagram blocks and monitoring wire values and panel indicators (a LabVIEW program is composed of a code - “diagram”, and a user interface “panel” which has “controls” for input and “indicators” for output). This tool exposes (almost) the full strength of the LEGO firmware. It allows graphical and easy to use low-level system calls, communication with digital sensors, IO maps access and much more. One can also use some of LabVIEW program control structures (loops, case, flat sequence) which are only partially available in NXT-G, use Arrays and Clusters (a Cluster is a “record” containing several “fields”, like a row in the phones book) etc. Another added value is the use of LabView environment, which is much more “mature” programming environment then NXT-G. I’ll devote a few posts in the coming weeks to describe this part of the toolkit. Fairly extensive documentation is supplied with the toolkit, alltough we (beta testers) had no knowledge of “tutorial” programs available from NI.

NXT-G Block builder
The blocks in NXT-G are in fact a set of VIs. The toolkit allows one to make new blocks, which with the aid of the allready released Dynamic Palette patch can be added to any of the NXT-G palettes. The toolkit supplies a simple wizard that creates new blocks from several “templates” (simple block, output block, sensor block etc.). An NXT-G Block is comprised of three VIs - the Implementation VI (contains the diagram that actually get compiled), a Config VI (whose panel is shown in the lower-left panel of NXT-G when the block is selected) and a Draw VI (which create the block image in the NXT-G diagram). I’ve used the toolkit for making several new blocks, all of which will be released in “beta” form in the next few days, including an “Array Variable” and “Array Element” block (for manipulating numeric arrays in RAM instead of on Flash as some MyBlocks available online do), and the PSP-Nx Block interfacing a PS2 controller announced earlier this week. Again, NI supplies some documentation explaining how to make new blocks, alltough in this case much of the “advanced” capabilities (like disabling a control when terminal is wired, live sensor update, etc.) is left undocumented. I’ll devote a few reviews on these “Advanced NXT-G Block Development” aspects in the next weeks.

To summarize, the release of this toolkit marks a new era in NXT, and especially in the future prospects of NXT-G. Expect to see a large number of applications and new blocks in the coming future! We at NXTasy will try to cover these advances, as well as support the community in our forums.