Preparing the workspace

Before you develop a new robot control application you should make sure that all NXT handles, global variables and settings are resetted and the old figures are closed. To make sure you are working with a clean workspace use:

COM_CloseNXT('all')
close all
clear all

at the beginning of your main robot application. The important thing here is that clear all comes after COM_CloseNXT, otherwise it won't work.

If you also want a clean command window (which helps cleaning previous error messages when tracking bugs), you can optionally use

clc % clear old messages from command line

This leavey your command history fully untouched by the way. Now you should have a clean environment for your program.


Proceed to next chapter.