36
Make
Note: This option is only available when the software is set to Level 2.
This function allows variables to be defined and altered.
•
Select the letters, mathematical symbols and numbers from the keypad or type them in.
To edit: Use the ‘C’ key to clear or highlight and delete using your keyboard
A variable is a letter or word that can be assigned a value e.g. Make x = 0.
The variable and its value will not ‘exist’ until it is created by the control program being run. The value
of the variable can be observed (once created by the program) in the Variable panel.
Note: If more than one word is used as the name of a variable there should be no spaces between the
words.
The variables are global, so the value of a variable in one flowchart will be ‘seen’ by all the other
flowcharts and procedures in the control program.
Most standard mathematical operators can be used within this function [+, -, *, /, ( ), etc.].
E.g. Make x =((x + 5) / y ) * 2
Note: Variables are integer values, they cannot be negative.
•
A variable can be used to store information.
E.g. In the Elevator we store the current floor in a variable called ‘floor’ (Make
floor=1). This allows us to check later in the program to see what floor we are
on, and which direction we have to move in to get the new floor (i.e. If we need
to go to level 2 and the floor variable tells us we are currently on 1, then we
need to go up!)
•
The value of a variable can be checked by a decision symbol
(Is Variable x > 5).
E.g. when the total number of cars is greater than 5 light the
Full sign.
• Random can be used to generate a random number over a
range of values between 0 and x.
Random (x)
x = the range of numbers
Random (x)+y y = the offset along the number line
back to Table of Contents