LabView instrumentoinnissa, 55492, 3opLabview in instrumentation
• Lecturer: Heikki Ojala, [email protected], room C204a Physicum
• Teaching assistant: Hannu Koskenvaara, [email protected], room B436 Chemicum
• Course webpage: http://electronics.physics.helsinki.fi/?page_id=679• Time: Monday&Wednesday 12-14• Place:
– Lectures in D104 on 7.11., 9.11., 16.11., 23.11., 28.11., 30.11.– Excercises in D210 on 2.11., 14.11., 21.11., 5.12., 7.12., 12.12., 14.12.
• Material: Lecture notes Supporting material: Learning with LabVIEW 8 (Robert H. Bishop)
• Exam: Monday 19.12.
Course contents
1. Labview basics– virtual instruments, data flow, palettes
2. Structures– for, while, case, ...– editing techniques
3. Controls&Indicators– arrays, clusters, charts, graphs
4. Modular programming + recording– SubVIs– File I/O
5. Analysis– Linear algebra, Signal processing, Mathscript
6. Communication between loops– Producer/Consumer, State Machine, Local variables
7. Instrument control– DAQ, GPIB, Serial, Data collection
LabVIEW (Laboratory Virtual Instrument Engineering Workbench)
• Graphical programming language– icons instead of text– dataflow programming
• Virtual Instruments (VI)– measure, control, analyze, and store data– look like physical instruments– three main components:
• front panel, block diagram, icon and connector
Each VI has 2 Windows
Front Panel• User Interface (UI)
– Controls = Inputs– Indicators = Outputs
Block Diagram• Graphical Code
– Data travels on wires from controls through functions to indicators
– Blocks execute by Dataflow– Execution elements (functions,
structures, subVIs,...) are called nodes
LabVIEW Programs Are Called Virtual Instruments (VIs)
Front panel and the associated block diagram
Icon and connector
• specify the pathways for data to flow into and out of Vis– connect VIs to other VIs
connectoricon
Run Button
Continuous Run Button
Abort Execution
Execution Highlighting Button
Additional Buttons on the Block Diagram Toolbar
Front panel Toolbar
Retain Wire Values Button
Step Function Buttons
Controls Palette(Controls & Indicators)
(Place items on the Front Panel Window)
Indicator:Numeric Slide
Control:Numeric
Customize Palette View
Functions (and Structures) Palette
(Place items on the Block Diagram Window)
Structure:While Loop
Context Help Window• Help»Show Context Help, press the <Ctrl+H>
keys• Hover cursor over object to update windowAdditional Help
–Right-Click on the VI icon and choose Help, or
–Choose “Detailed Help.” on the context help window
Labview Help
Help>>Find Examples
File>>New (from template)
More help & resources
• NI.com– active forums with professional help
• Block diagram execution– Dependent on the flow of data– Block diagram does NOT execute
left to right• Node executes when data is
available to ALL input terminals
• Nodes supply data to all output terminals when done
Dataflow Programming
Example: DataflowA.vi, DataflowB.vi
Keynotes
Keynotes