Chapter 1Introduction© National Instruments Corporation1-3LabVIEW LEGO MINDSTORMS NXT ModuleNXT Bytecode Instructions and LabVIEW FunctionsThe NXT firmware executes a program file by interpreting its contents as bytecode instructions. You can think of many of the bytecode instructions as loosely analogous to LabVIEW functions. For example, the NXT firmware has an ADD bytecode that shares its semantics with the Add function in LabVIEW. In other words, the ADD bytecode behaves similarly to the Add function for a given set of input data types and values.The LabVIEW Help documentation describes how all of the supported functions operate in general. Refer to the 13,Functions 13, section of this document for a list of NXT-specific exceptions and behavior changes.NXT Program Data SpaceNXT programs maintain a data space for run-time data similarly to how LabVIEW maintains VI data spaces. You do not need to manage the data space because the module compiler automatically organizes the data space of NXT programs and the NXT firmware manages the data space at run time.NoteThis automatic management of the data space includes resizing arrays and strings as needed, much like LabVIEW. However, using arrays and strings requires a relatively large amount of memory and execution time on the NXT brick, so avoid overusing arrays and strings in the programs you write. If you extensively use dynamic array and string resizing while the program runs, such as placing Build Array functions in a loop, the program might intermittently run more slowly than normal. Additionally, extensive use of dynamic array and string resizing can cause the NXT firmware to run out of memory during program execution. If the total size of the data space, including the array and string data, exceeds the size of the allotted RAM pool in the NXT firmware, the program immediately aborts and prints an error message on the display of the NXT brick. Indexing an empty array also causes the program to abort.Parallel Execution on the NXT BrickNXT firmware supports parallel execution of VI code in a similar sense to the way that LabVIEW executes parallel code on a single-processor PC. Parallel streams of functions or subVI calls share the CPU using an automatically managed cooperative multitasking system.You do not need to perform any special steps to enable parallel execution. Write parallel code the same way you write parallel code for VIs that run on a PC.