labview program and data flow review labview robotics fundamentals
TRANSCRIPT
![Page 1: LabVIEW Program and Data Flow Review LabVIEW Robotics Fundamentals](https://reader035.vdocuments.us/reader035/viewer/2022081813/56649e4d5503460f94b439dd/html5/thumbnails/1.jpg)
LabVIEW Program and Data Flow Review
LabVIEW Robotics Fundamentals
![Page 2: LabVIEW Program and Data Flow Review LabVIEW Robotics Fundamentals](https://reader035.vdocuments.us/reader035/viewer/2022081813/56649e4d5503460f94b439dd/html5/thumbnails/2.jpg)
Data Flow
• Many code objects in LabVIEW generate data– Constants always put out
one “constant” value– Read Sensor commands
send out sensor values– Operations like “Divide”
send out result values• Data flows through wires
Value = 75
Value = Sound Sensor Reading
Value = Ultrasonic Sensor Reading divided by 2
![Page 3: LabVIEW Program and Data Flow Review LabVIEW Robotics Fundamentals](https://reader035.vdocuments.us/reader035/viewer/2022081813/56649e4d5503460f94b439dd/html5/thumbnails/3.jpg)
Data Flow
• Data is used by commands and Structures
Motor power set to 75
Motor power set to Sound Sensor value
Motor power set to Sound Sensor value divided by 2
![Page 4: LabVIEW Program and Data Flow Review LabVIEW Robotics Fundamentals](https://reader035.vdocuments.us/reader035/viewer/2022081813/56649e4d5503460f94b439dd/html5/thumbnails/4.jpg)
Data Flow
• Data is used by commands and Structures
Repeats 8 times
If Touch Sensor is Pressed, run this “True” pane code
Repeats until Port C Rotations exceed 1800 degrees
![Page 5: LabVIEW Program and Data Flow Review LabVIEW Robotics Fundamentals](https://reader035.vdocuments.us/reader035/viewer/2022081813/56649e4d5503460f94b439dd/html5/thumbnails/5.jpg)
Front Panel Data
• The Front Panel can provide and display data– Controls generate values that can be used in code
– Indicators display values in different ways
![Page 6: LabVIEW Program and Data Flow Review LabVIEW Robotics Fundamentals](https://reader035.vdocuments.us/reader035/viewer/2022081813/56649e4d5503460f94b439dd/html5/thumbnails/6.jpg)
Data Flow
• Every command in LabVIEW runs as soon as all its “incoming” data is ready
• The NXT Pink Wire is actually just a creative use of Data Flow to create sequences of commands that have to wait for one another
![Page 7: LabVIEW Program and Data Flow Review LabVIEW Robotics Fundamentals](https://reader035.vdocuments.us/reader035/viewer/2022081813/56649e4d5503460f94b439dd/html5/thumbnails/7.jpg)
Data Flow: Parallelism
• Every command in LabVIEW runs as soon as all its “incoming” data is ready– This even lets multiple code strands run at once!
![Page 8: LabVIEW Program and Data Flow Review LabVIEW Robotics Fundamentals](https://reader035.vdocuments.us/reader035/viewer/2022081813/56649e4d5503460f94b439dd/html5/thumbnails/8.jpg)
Controlling Program Flow
• Structures can control when commands run– Sequence Structures force groups of commands
to run in a certain order
![Page 9: LabVIEW Program and Data Flow Review LabVIEW Robotics Fundamentals](https://reader035.vdocuments.us/reader035/viewer/2022081813/56649e4d5503460f94b439dd/html5/thumbnails/9.jpg)
Controlling Program Flow
• Structures can control when commands run– Case Structures choose alternative sets of code to
run, based on an input value
![Page 10: LabVIEW Program and Data Flow Review LabVIEW Robotics Fundamentals](https://reader035.vdocuments.us/reader035/viewer/2022081813/56649e4d5503460f94b439dd/html5/thumbnails/10.jpg)
Controlling Program Flow
• Structures can control when commands run– For Loops repeat code a set number of times
![Page 11: LabVIEW Program and Data Flow Review LabVIEW Robotics Fundamentals](https://reader035.vdocuments.us/reader035/viewer/2022081813/56649e4d5503460f94b439dd/html5/thumbnails/11.jpg)
Controlling Program Flow
• Structures can control when commands run– While Loops repeat code until a wired Stop
condition is reached
![Page 12: LabVIEW Program and Data Flow Review LabVIEW Robotics Fundamentals](https://reader035.vdocuments.us/reader035/viewer/2022081813/56649e4d5503460f94b439dd/html5/thumbnails/12.jpg)
Control Loops
• Control Loops are a strategic arrangement of a Case and a Loop– Repeats a decision quickly so it looks “continuous”
![Page 13: LabVIEW Program and Data Flow Review LabVIEW Robotics Fundamentals](https://reader035.vdocuments.us/reader035/viewer/2022081813/56649e4d5503460f94b439dd/html5/thumbnails/13.jpg)
Shift Registers
• Shift Registers pass values across loop cycles– This allows values to “accumulate” or “count up”