To create and use variables in LEGO MINDSTORMS NXT Software, first define the variables available. Select the Edit menu, then select Define Variables.
zone.ni.com