Presentation is loading. Please wait.

Presentation is loading. Please wait.

Programming with LabVIEW Intro to programming and.

Similar presentations


Presentation on theme: "Programming with LabVIEW Intro to programming and."— Presentation transcript:

1 Programming with LabVIEW Intro to programming and

2

3 Variables X 5 1.5 true “left” int float Boolean String

4 Operations with variables Basic operation include multiplication, division, addition and subtraction Most other things you would want to use is in there

5

6 Basics of LabVIEW

7 Case statements LabVIEW’s 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

9 loops

10 Setting values to motors

11

12 Getting input from sensors

13 Where to get help (nice and quickly)

14

15 Easy exercises 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 it’s higher than the other one. 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.

16 Example solutions

17

18 More advanced exercises 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) X=-1 X=1 Y=1 Y=-1 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: motor’s 1 and 2 are at 1, and 3 and 4 are at -1. output would be “turning right” 1 2 3 4

19


Download ppt "Programming with LabVIEW Intro to programming and."

Similar presentations


Ads by Google