Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400...
Transcript of Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400...
![Page 1: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/1.jpg)
Intro to LabVIEW
frclabviewtutorials.com/workshop
![Page 2: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/2.jpg)
Front Panel
Controls
Indicators
![Page 3: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/3.jpg)
Block Diagram
Controls
Indicators
Terminals
![Page 4: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/4.jpg)
Demo
Adding controls and indicators
![Page 5: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/5.jpg)
Demo
Adding controls and indicators
![Page 6: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/6.jpg)
Data Flow
LabVIEW follows a dataflow model for running Vis
• A node executes only when data are available at all of
its required input terminals.
• A node supplies data to the output terminals only
when the node finishes execution.
![Page 7: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/7.jpg)
Demo - Setting a motor
• Read Joystick
• Set Drive motors
![Page 8: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/8.jpg)
Demo - Setting a motor
• Read Joystick
• Set Drive motors
![Page 9: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/9.jpg)
Exercise
Drive a motor.pdf
![Page 10: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/10.jpg)
Case Structures
• Have two or more sub diagrams or cases.
• Use an input value to determine which case to
execute.
• Execute and display only one case at a time.
• Are similar to case statements or if...then...else
statements in text-based programming languages.
![Page 11: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/11.jpg)
Case Structures
• Input and Output Tunnels
– You can create multiple input and output tunnels.
– Input tunnels are available to all cases if needed.
– You must define each output tunnel for each case.
![Page 12: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/12.jpg)
Repetition
• While Loop
![Page 13: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/13.jpg)
Repetition
• While Loop
– Iteration terminal
• Returns number of times loop has executed.
• Is zero-indexed.
Iteration Terminal
![Page 14: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/14.jpg)
Repetition
• While Loop
– Conditional terminal
• Defines when the loop stops.
• Has two options.
– Stop if True
– Continue if True Conditional Terminal
Iteration Terminal
![Page 15: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/15.jpg)
Repetition
• While Loop
– Tunnels transfer data
into and out of
structures.
![Page 16: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/16.jpg)
Repetition
• While Loop
– Tunnels transfer data
into and out of
structures.
– Data pass out of a
loop after the loop
terminates.
![Page 17: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/17.jpg)
Repetition
• While Loop
– Tunnels transfer data into
and out of structures.
– Data pass out of a loop
after the loop terminates.
– When a tunnel passes
data into a loop, the loop
executes only after
data arrives at the tunnel.
![Page 18: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/18.jpg)
Exercise – While Loops
While Loops.pdf
![Page 19: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/19.jpg)
Exercise – While Loops
• How many times is the Number of Iterations
indicator updated? Why?
![Page 20: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/20.jpg)
Repetition
• While Loop
• For Loop
![Page 21: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/21.jpg)
Repetition
• While Loop
• For Loop
– Count Terminal
![Page 22: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/22.jpg)
Repetition• Comparison
– Description• For the following scenarios, decide whether to use a While Loop or a For Loop.
![Page 23: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/23.jpg)
Repetition• Comparison
– Description• For the following scenarios, decide whether to use a While Loop or a For Loop.
– Scenario 1
• Acquire pressure data in a loop that executes once per second for one minute.
• 1. If you use a While Loop, what is the condition that you need to stop the loop?
• 2. If you use a For Loop, how many iterations does the loop need to run?
• 3. Is it easier to implement a For Loop or a While Loop?
![Page 24: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/24.jpg)
Repetition• Comparison
– Description• For the following scenarios, decide whether to use a While Loop or a For Loop.
– Scenario 1
• Acquire pressure data in a loop that executes once per second for one minute.
• 1. If you use a While Loop, what is the condition that you need to stop the loop?
• 2. If you use a For Loop, how many iterations does the loop need to run?
• 3. Is it easier to implement a For Loop or a While Loop?
– Scenario 2
• Acquire pressure data until the pressure is greater than or equal to 1400 psi.
• 1. If you use a While Loop, what is the condition that you need to stop the loop?
• 2. If you use a For Loop, how many iterations does the loop need to run?
• 3. Is it easier to implement a For Loop or a While Loop?
![Page 25: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/25.jpg)
Repetition• Comparison
– Scenario 3• Acquire pressure and temperature data until both values are stable for two minutes.
• 1. If you use a While Loop, what is the condition that you need to stop the loop?
• 2. If you use a For Loop, how many iterations does the loop need to run?
• 3. Is it easier to implement a For Loop or a While Loop?
![Page 26: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/26.jpg)
Repetition• Comparison
– Scenario 3• Acquire pressure and temperature data until both values are stable for two minutes.
• 1. If you use a While Loop, what is the condition that you need to stop the loop?
• 2. If you use a For Loop, how many iterations does the loop need to run?
• 3. Is it easier to implement a For Loop or a While Loop?
– Scenario 4• Output a voltage ramp starting at zero, increasing incrementally by 0.5 V every
second, until the output voltage is equal to 5 V.
• 1. If you use a While Loop, what is the condition that you need to stop the loop?
• 2. If you use a For Loop, how many iterations does the loop need to run?
• 3. Is it easier to implement a For Loop or a While Loop?
![Page 27: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/27.jpg)
FRC Arhitecture
• Begin
![Page 28: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/28.jpg)
FRC Arhitecture
• Begin
![Page 29: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/29.jpg)
FRC Arhitecture
• Begin–Create references for all joysticks, motors, and
sensors
–Runs at power up
![Page 30: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/30.jpg)
FRC Arhitecture
• Begin
• Teleop
![Page 31: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/31.jpg)
FRC Arhitecture
• Begin
• Teleop
![Page 32: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/32.jpg)
FRC Arhitecture
• Begin
• Teleop–Primarily used to read joysticks and set drive
motors and actuators
–Only runs while Teleop enabled
![Page 33: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/33.jpg)
FRC Arhitecture
• Begin
• Teleop
• Autonomous
![Page 34: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/34.jpg)
FRC Arhitecture
• Begin
• Teleop
• Autonomous
![Page 35: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/35.jpg)
FRC Arhitecture
• Begin
• Teleop
• Autonomous–Runs when Autonomous is enabled
![Page 36: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/36.jpg)
FRC Arhitecture
• Begin
• Teleop
• Autonomous
• Timed Tasks
![Page 37: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/37.jpg)
FRC Arhitecture
• Begin
• Teleop
• Autonomous
• Timed Tasks
![Page 38: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/38.jpg)
FRC Arhitecture
• Begin
• Teleop
• Autonomous
• Timed Tasks–Runs once enabled (during both auto and teleop)
![Page 39: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/39.jpg)
Debugging Techniques
• Correcting Broken VI’s
![Page 40: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/40.jpg)
Debugging Techniques
• Correcting Broken VI’s
– Broken Wires Exist
• You wired a Boolean control to a String indicator.
• You wired a numeric control to a numeric control.
![Page 41: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/41.jpg)
Debugging Techniques
• Correcting Broken VI’s
– Broken Wires Exist
• You wired a Boolean control to a String indicator.
• You wired a numeric control to a numeric control.
– A required block diagram terminal is unwired.
![Page 42: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/42.jpg)
Debugging Techniques
• Correcting Broken VI’s
– Broken Wires Exist
• You wired a Boolean control to a String indicator.
• You wired a numeric control to a numeric control.
– A required block diagram terminal is unwired.
– A subVI is broken
![Page 43: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/43.jpg)
Debugging Techniques
• Correcting Broken VI’s
• Correcting Dataflow
– Execution Highlighting
– Single-Stepping & Breakpoints
– Probes
![Page 44: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/44.jpg)
Debugging Techniques
• Correcting Broken VI’s
• Correcting Dataflow
– Are there any unwired or hidden subVIs?
– Is the default data correct?
– Does the VI pass undefined data?
– Are numeric representations correct?
– Are nodes executed in the correct order?
![Page 45: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/45.jpg)
Terminals and LabVIEW datatypes
![Page 46: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/46.jpg)
Data Feedback in Loops
• Shift Registers
– When programming with loops, you often need to
know the values of data from previous iterations of
the loop.
– Shift registers transfer values from one loop
iteration to the next.
![Page 47: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/47.jpg)
Documentation
• Free Labels
![Page 48: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/48.jpg)
Documentation
• Free Labels
– Describe algorithms.
– Have pale yellow backgrounds.
– Double-click in any open space to create.
![Page 49: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/49.jpg)
Documentation
• Free Labels
– Describe algorithms.
– Have pale yellow backgrounds.
– Double-click in any open space to create.
![Page 50: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/50.jpg)
Documentation
• Free Labels
• Owned Labels
– Explain data contents of wires and objects.
– Move with object.
– Have transparent backgrounds.
– Select Visible Items»Label from the shortcut menu
to create.
![Page 51: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/51.jpg)
Documentation
• Free Labels
• Owned Labels
– Explain data contents of wires and objects.
– Move with object.
– Have transparent backgrounds.
– Select Visible Items»Label from the shortcut menu
to create.
![Page 52: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/52.jpg)
Documentation
• Free Labels
• Owned Labels
• Sub diagram Labels
– Case Structures
![Page 53: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/53.jpg)
Documentation
• Free Labels
• Owned Labels
• Sub diagram Labels
– Case Structures
– Loops
![Page 54: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/54.jpg)
Documentation
• Free Labels
• Owned Labels
• Sub diagram Labels
• White Papers
![Page 55: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/55.jpg)
Documentation
• Free Labels
• Owned Labels
• Sub diagram Labels
• White Papers
![Page 56: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/56.jpg)
Keyboard Shortcuts
• CTRL + u = diagram cleanup
• Right Click = palette
• CTRL + Space = quick drop
• CTRL + e = switch window
• CTRL + Shift + e = activate project window
• CTRL + r = Run
• CTRL + t = split window
![Page 57: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/57.jpg)
Advanced LabVIEW
frclabviewtutorials.com/workshop
![Page 58: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/58.jpg)
Let LabVIEW do the work!
TypeDefs
![Page 59: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/59.jpg)
Demo
TypeDefs - Teleop Optimization
![Page 60: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/60.jpg)
Demo
TypeDefs - Teleop Optimization
![Page 61: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/61.jpg)
Let LabVIEW do the work!
TypeDefs
Functional Global Variable (FGV)
![Page 62: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/62.jpg)
Variables
How would you handle the following dataflow
challenges?• Initialize front panel controls with values from a configuration file?
• Copy a “Ship To” address to a “Bill To” address?
• Initialize indicators that will be written to later in your code?
• Write to an indicator in two cases of a Case structure without
writing to it in all cases?
![Page 63: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/63.jpg)
Variables
Variables can be of the following types:
• Local—Stores data in front panel controls and
indicators.
![Page 64: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/64.jpg)
Local Variables
• Use local variables to pass data within a single
VI.
![Page 65: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/65.jpg)
Local Variables
• Use local variables to pass data within a single
VI.
• Use local variables to modify front panel
control values.
![Page 66: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/66.jpg)
Local Variables - Demo
• Race Conditions
![Page 67: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/67.jpg)
Local Variables Exercise
• Local Variable Exercise.pdf
![Page 68: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/68.jpg)
Variables
Variables can be of the following types:
• Local—Stores data in front panel controls and
indicators.
• Global —Stores data in special repositories that
can be accessed from multiple VIs.
![Page 69: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/69.jpg)
Global Variable
• Store data
• Can be accessed across the entire project
![Page 70: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/70.jpg)
Variables
Variables can be of the following types:
• Local—Stores data in front panel controls and
indicators.
• Global —Stores data in special repositories that
can be accessed from multiple VIs.
• Functional Global—Stores data in While Loop
shift registers.
![Page 71: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/71.jpg)
Functional Global Variable
• Store Data
• Can be accessed across the entire project
• Can perform operations on the data
• Used to avoid read/write race conditions
• Used to implement custom boundaries on data
![Page 72: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/72.jpg)
FGV
Implemented with a shift register
![Page 73: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/73.jpg)
Shift Registers
• Right-click the border and select Add Shift
Register from the shortcut menu.
• Right shift register stores data on completion
of an iteration.
• Left shift register provides stored data at
beginning of the next iteration.
![Page 74: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/74.jpg)
Shift RegistersBlock Diagram 1st run 2nd run
InitializedShiftRegister
Output = 5 Output = 5
Not InitializedShiftRegister
Output = 4 Output = 8
![Page 75: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/75.jpg)
Shift Registers
• Default ValuesData Type Default Value
Numeric 0
Boolean FALSE
String Empty
![Page 76: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/76.jpg)
Shift Registers• Stacked shift registers remember values from
multiple previous iterations and carry those
values to the next iterations.
![Page 77: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/77.jpg)
Shift Registers• Stacked shift registers remember values from
multiple previous iterations and carry those
values to the next iterations.
• Right-click the left shift register and select
Add Element from the shortcut menu to stack a
shift register.
![Page 78: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/78.jpg)
Shift Registers• Stacked shift registers remember values from
multiple previous iterations and carry those
values to the next iterations.
• Right-click the left shift register and select
Add Element from the shortcut menu to stack a
shift register.
![Page 79: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/79.jpg)
FGV
Functional Global Variable Code
![Page 80: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/80.jpg)
Implementing An FGV
![Page 81: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/81.jpg)
FGV - Demo
Demo - Shooter Speed
![Page 82: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/82.jpg)
Demo
• Parallel Loop Paradigm
![Page 83: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/83.jpg)
VariablesVariables can be of the following types:
• Local—Stores data in front panel controls and indicators.
• Global —Stores data in special repositories that can be accessed from multiple VIs.
• Functional Global—Stores data in While Loop shift registers.
• Shared—Transfers data between various distributed targets connected together over a network.
![Page 84: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/84.jpg)
Readable Code
Enums
![Page 85: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/85.jpg)
Enums
• Control – menu
• Constant – readable code
• Example
![Page 86: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/86.jpg)
Enums
• Control – menu
• Constant – readable code
• Example
![Page 87: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/87.jpg)
Timer - Demo
• FGV
• Enums
![Page 88: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/88.jpg)
Timer - Demo
• FGV
• Enums
![Page 89: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/89.jpg)
Questions
![Page 90: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/90.jpg)
Auto Wire and Auto Index
• Auto Wire
– Useful to quickly connect unchanged values in
loop or case structure
![Page 91: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/91.jpg)
Auto Wire and Auto Index
• Auto Wire
– Useful to quickly connect unchanged values in
loop or case structure
• Auto Index
– Primarily for reading or creating arrays
![Page 92: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/92.jpg)
Auto Wire and Auto Index
• Auto Wire
– Useful to quickly connect unchanged values in
loop or case structure
• Auto Index
– Primarily for reading or creating arrays
![Page 93: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/93.jpg)
VI Properties
• SR Flip Flop Demo
![Page 94: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/94.jpg)
VI Properties
• SR Flip Flop Demo
– Edge Detector
![Page 95: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/95.jpg)
Architectures
• State Machine
![Page 96: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/96.jpg)
Architectures
• State Machine
![Page 97: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/97.jpg)
Architectures
• State Machine
![Page 98: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/98.jpg)
Architectures
• State Machine
• Producer-Consumer
– Parallel loops
• First creating data or instructions
• Other handling
![Page 99: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/99.jpg)
Architectures
• State Machine
• Producer-Consumer
– Parallel loops
– Use either queue or fgv
![Page 100: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/100.jpg)
Producer Consumer Demo
![Page 101: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/101.jpg)
Type Def.
• Useful for passing data – both controls and
indicators
• Demo
![Page 102: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/102.jpg)
Type Def.
• Useful for passing data – both controls and
indicators
• Demo
![Page 103: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/103.jpg)
Advanced Debugging Tools
• VI Profiler
– Tools>>Profile>>Performance and Memory
![Page 104: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/104.jpg)
OOP and LVOOP
• Object Oriented Programming
– Used in C++, C#, Java, Python, etc.
– A method of grouping where
• An object represents the data
• Has attributes and/or properties
• Has methods that act on the object and its properties
• LVOOP is OOP in LabVIEW
![Page 105: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/105.jpg)
LVOOP
• Demos – custom motor control
![Page 106: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/106.jpg)
LVOOP
• Demos – custom motor control
– Create a class
![Page 107: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/107.jpg)
LVOOP
• Demos – custom motor control
– Create a class
– Create methods
![Page 108: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/108.jpg)
LVOOP
• Demos – custom motor control
– Create a class
– Create methods
– Create an object
![Page 109: Intro to LabVIEW · •Acquire pressure data until the pressure is greater than or equal to 1400 psi. •1. If you use a While Loop, what is the condition that you need to stop the](https://reader033.fdocuments.in/reader033/viewer/2022042001/5e6db7a5b6a2084c9e612388/html5/thumbnails/109.jpg)
Demo
Auto Wire & Auto Index