Title: Programming with LabVIEW
1Programming with LabVIEW
Intro to programming and
2(No Transcript)
3Variables
float
Boolean
1.5
true
left
X
5
int
String
4Operations with variables
- Basic operation include multiplication, division,
addition and subtraction - Most other things you would want to use is in
there
5(No Transcript)
6Basics of LabVIEW
7Case statements
- LabVIEWs equivlent to the IF statement
- One side of it will fire if the Boolean statement
you feed it is true, the other side if it is
false.
8(No Transcript)
9loops
10Setting values to motors
11(No Transcript)
12Getting input from sensors
13Where to get help (nice and quickly)
14(No Transcript)
15Easy exercises
Exercise 1
Exercise 2
Have two buttons and a slider, each button should
add a certain amount to the slider If you finish
early put a dial with each slider that represents
the amount it adds to the slider Extra bonus
put a third button that changes whether the
buttons add or multiply.
Create two dials and have an output that displays
the two added together, and another that displays
the second one subtracted from the first one. If
you finish this early, make a light next to each
one that lights up if its higher than the other
one.
16Example solutions
17(No Transcript)
18More advanced exercises
Exercise 1
Exercise 2
Create four dials to represent each motor, each
ranging from -1 to 1. Take the data from them and
output which direction the robot is going. EX
motors 1 and 2 are at 1, and 3 and 4 are at -1.
output would be turning right
Put two dials to represent the x and y input from
a joystick, and output a value from -1 to 1 to
send to each of the four motors. (just use
sliders instead of actually connecting motors)
Y1
1
3
X-1
X1
2
4
Y-1
19(No Transcript)