Is there a way to create variables in LabView?::safety::
Read through the 2011 Training Material to find the answer.
You can local variables that only exist within a single vi and you can have global variables that all vi’s within a project can have access to. Search LV help on local and global variables to see how to define.
to expand on Motorhead’s explanation,
every control and indicator is actually a ‘local variable’. In the functions pallete, go to Programming> structures and you will see the local and global variable ‘vi’ (though they are technically not VIs). You can right click these and change them between read and write.
For variables that go between VIs, you can create a global variable in your project. For the robot, I suggest passing data through the premade Global Robot Data file. To add data to this variable, just open it from the project explorer and add the controls that you want.
You don’t mention why you need a variable.
One of the things that programmers are often tripped up by in LV is overuse of variables. They do have their purpose, but in reality are very rarely used in LV. Unless you are pretty careful to avoid parallel code, it is best to learn how to use wires instead.
Greg McKaskle