Variable and Math Block

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 12

Math and Variable Block

Variable Block
Variable Block

❖ A block used to store a


value in the NXTs built-in
memory
Creating a Variable

Choose the Define Variable


command in the Edit menu of
the software.
Creating a Variable
In the dialog window, give
your new variable a short,
easy-to-understand name
and set the type of data that
the variable will hold.
Configuring The Variable Block
1. In the list, select the variable that you want to
pass or write a data.
Configuring The Variable Block
2. Choose to either read the variable’s current
value or write a new data to the variable.
Configuring The Variable Block
3. Used if you want to give your variable block a
starting value.
Math Block
Math Block
❖ This block performs simple
arithmetic operations like
addition, subtraction,
multiplication, and
division.
Configuring The Math Block
1. Input values can be typed in or supplied
dynamically by data wires.
Configuring The Math Block
2. The pull-down menu will let you choose from
six arithmetic operations you can perform.

You might also like