how to use labview ihor korolov february 2011. contents what is labview? how does labview work?...
TRANSCRIPT
![Page 1: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/1.jpg)
How to use LabVIEW
Ihor Korolov
February 2011
![Page 2: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/2.jpg)
Contents
What is LabVIEW?
How does LabVIEW work?
Block diagramFront panelPalettes
Data flow programming. Functions.
LabVIEW Programming Structures (Formula, Case structure …)
What is a subVI? Using a VI as a subVI.
How to use LabVIEW with data acquisition (DAQ) software
Measurements and automation explorer (MAX)
I. Korolov: How to use LabVIEW
![Page 3: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/3.jpg)
What is LabVIEW?
I. Korolov: How to use LabVIEW
LabVIEW – Laboratory Virtual Instrument Engineering Workbenchis a graphical (visual) programming from National istruments (NI).
The purpose is automating the usage of processing and measuring equipment in any laboratory setup.
Originally released for the Apple Macintosh in 1986, the graphical language at the heart of LabVIEW is called "G".
uses icons instead of lines of text to create programs
Dataflow programming languageC language
Cross-platform
The graphical approach of LabVIEW allows non-programmers to build programs by dragging and dropping virtual representations of lab
equipment with which they are already familiar.
![Page 4: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/4.jpg)
Price
LabVIEW Professional Development System
I. Korolov: How to use LabVIEW
Desktop PC
Laptop
PDAhttp://www.ni.com/labview/buy/
![Page 5: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/5.jpg)
High-SpeedDigitizers
High-ResolutionDigitizers and DMMs
Multifunction Data Acquisition
DynamicSignal Acquisition
Digital I/OInstrumentControl
Counter/Timers
MachineVision
Motion Control
Distributed I/O andEmbedded Control
Laptop PC PDADesktop PCPXI Modular Instrumentation
Signal Conditioningand Switching
Unit Under Test
LabVIEW
I. Korolov: How to use LabVIEW
www.ni.com
![Page 6: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/6.jpg)
How does LabVIEW work?
I. Korolov: How to use LabVIEW
![Page 7: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/7.jpg)
How does LabVIEW work?
I. Korolov: How to use LabVIEW
![Page 8: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/8.jpg)
How does LabVIEW work?
I. Korolov: How to use LabVIEW
Front panel Block Diagram
Ctrl+E
Block diagram toolbar
Reorder objectsRun
Continuous run
Pause
Stop
Debugging features
Clean Up diagram
![Page 9: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/9.jpg)
How does LabVIEW work?
I. Korolov: How to use LabVIEW
LabVIEW Front panel
Used to display Controls or Indicators
![Page 10: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/10.jpg)
How does LabVIEW work?
I. Korolov: How to use LabVIEW
LabVIEW Block Diagram
- Actual program - Invisible to user- Read left to right
Example LP
![Page 11: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/11.jpg)
How does LabVIEW work? Palettes
I. Korolov: How to use LabVIEW
Front panel
Controls palette
Tools palette
Block Diagram
![Page 12: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/12.jpg)
How does LabVIEW work? Tools palette
I. Korolov: How to use LabVIEW Example
Operating Tool
Positioning/Resizing Tool
Labeling Tool
Wiring Tool
Shortcut Menu Tool
• Floating Palette• Used to operate and modify front
panel and block diagram objects.
Scrolling Tool
Breakpoint Tool
Probe Tool
Color Copy Tool
Coloring Tool
Automatic Selection Tool
![Page 13: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/13.jpg)
Data flow programming
I. Korolov: How to use LabVIEW
![Page 14: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/14.jpg)
Data flow programming
I. Korolov: How to use LabVIEW
If you put a control (or indicator) on the front panel
LabVIEW automatically creates a correspondingcontrol (or indicator) terminal on theBlock Diagram
Example FP TB
![Page 15: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/15.jpg)
Data flow programming. Functions.
I. Korolov: How to use LabVIEW
View as icon
Click and Ctrl+H“Add” function
wire
Example2,3
![Page 16: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/16.jpg)
Data flow programming. Functions.
I. Korolov: How to use LabVIEW Example
![Page 17: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/17.jpg)
Data flow programming. Wires
I. Korolov: How to use LabVIEW
Some of basic wires used in block diagrams
Data type Color
Floating-point orange
Integer blue
Boolean green
String Pink/purple
Dynamic Dark blue
Broken wires
The wire connects more than one data source
You have connected two terminals of different types
![Page 18: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/18.jpg)
Data flow programming. Functions
I. Korolov: How to use LabVIEW Example
![Page 19: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/19.jpg)
Data flow programming. Functions
I. Korolov: How to use LabVIEW
Polymorphism
Array Arithmetic Operations
![Page 20: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/20.jpg)
Programming structures
I. Korolov: How to use LabVIEW
![Page 21: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/21.jpg)
LabVIEW Programming Structures
I. Korolov: How to use LabVIEW
For loop
Right click
From 0 to N-1
Example For Loop
![Page 22: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/22.jpg)
LabVIEW Programming Structures
I. Korolov: How to use LabVIEW
While loop
Repeats the sub diagram inside the loop until the conditional terminal receives a particular Boolean value
Auto-indexed tunnel
Loop tunnel
Shift register
Timed While loop
Example WhileL
![Page 23: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/23.jpg)
LabVIEW Programming Structures
I. Korolov: How to use LabVIEW
Case structure
Example
![Page 24: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/24.jpg)
LabVIEW Programming Structures
I. Korolov: How to use LabVIEW
Flat sequence structure
Stacked sequence structure
1 2 3
12
34
Sequence structures are used to ensure a subdiagram executes after or before another subdiagram
![Page 25: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/25.jpg)
LabVIEW Programming Structures
I. Korolov: How to use LabVIEW
Use global variables to access and pass data among several
VIs
Use local variables to read or write to one of the controls or indicators on the front
panel of a VI.
Local variables Global variables
Example
![Page 26: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/26.jpg)
LabVIEW: Wait statements
I. Korolov: How to use LabVIEW
Wait Until Next ms Multiple functionWait (ms) function
Pre-loopcode
Loop code
![Page 27: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/27.jpg)
LabVIEW: Graphs
I. Korolov: How to use LabVIEW
Waveform GraphWaveform Graph – Plot an array of numbers against their indices – Plot an array of numbers against their indicesXY GraphXY Graph – Plot one array against another – Plot one array against anotherDigital Waveform GraphDigital Waveform Graph – Plot bits from binary data – Plot bits from binary data
Graph properties
Example Graph
![Page 28: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/28.jpg)
LabVIEW: File I/O
I. Korolov: How to use LabVIEW
Write to a File Read from a File
Writing to LVM fileWriting to LVM file Reading from LVM fileReading from LVM file
Write/Read LabVIEW Measurements file
Example File I/O
![Page 29: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/29.jpg)
SubVI
I. Korolov: How to use LabVIEW
![Page 30: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/30.jpg)
What is a subVI? Using a VI as a subVI.
I. Korolov: How to use LabVIEW
What is a subVI?
A SubVi is a stand VI that can be called by other VI and it is similar to an individual function.
AdvantagesModular
Easier to debugDon’t have to recreate codeRequire less memory
![Page 31: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/31.jpg)
What is a subVI? Using a VI as a subVI.
I. Korolov: How to use LabVIEW
How to create a subVI?
A SubVi is a stand VI that can be called by other VI and it is similar to an individual function.
Create/Edit the Icon Create the Connector Assign Terminals to controls and indicators Add description (optional) Save the VI Insert the VI into a Top Level VI
1 Create/Edit the Icon
Right-click on the icon in the block diagram or front panel
![Page 32: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/32.jpg)
What is a subVI? Using a VI as a subVI.
I. Korolov: How to use LabVIEW
2 Create the ConnectorRight click on the icon pane (front panel only)
3 Assign Terminals to controls and indicators
r
4 Documentation (VI properties)
5. Save the VI
6. Insert the VI into a Top Level VI
Example
![Page 33: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/33.jpg)
Data acquisition
I. Korolov: How to use LabVIEW
![Page 34: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/34.jpg)
How to use LabVIEW with DAQ software
I. Korolov: How to use LabVIEW
• Data acquisition (DAQ)
• Connecting Signals
• Simple DAQ application
Sensors
Terminal Block
DAQ device
Fundamental task of a DAQ system is to measure or generate real-world physical signals
![Page 35: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/35.jpg)
Measurements and automation explorer (MAX)
I. Korolov: How to use LabVIEW
Measurement & Automation Explorer (MAX) provides access to all your NI DAQ, GPIB, IMAQ, IVI, Motion, VISA, and VXI devices. Here can configure your NI hardware and software, add new channels, interfaces, and virtual instruments, execute system diagnostics, and view the devices and instruments connected to your system.
Configuration tree Configuration View Task list
MAX is the primary configuration and testing utility that is available for the DAQ device
MAX
![Page 36: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/36.jpg)
How to use LabVIEW with DAQ software
I. Korolov: How to use LabVIEW
Traditional NI-DAQSpecific VIs for performing:• Analog Input• Analog Output• Digital I/O• Counter operations
NI-DAQmxNext generation driver: • VIs for performing a
task• One set of VIs for all
measurement types
DAQ assistant Measurement type can be:• Analog Input• Analog Output• Counter Input• Counter Output• Digital I/O
![Page 37: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/37.jpg)
How to use LabVIEW with DAQ software
I. Korolov: How to use LabVIEW
Ni USB 6501
Quickly and easily program the DAQ deviceCreates a local taskMost applications can use the DAQ Assistant
DAQ assistant
Example DAQ
![Page 38: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/38.jpg)
How to use LabVIEW ? Tips and tricks
I. Korolov: How to use LabVIEW
GPIB Communication and Configuration
Virtual Instrument Software Architecture (VISA)Serial Port Communication
Instrument Drivers (How to create and use *.dll in LabVIEW)
Application control (property node and invoke node)
How to execute a system command
Remote panel connection manager and Web publishing tool
…
Tips and tricks (3.03.2011)
![Page 39: How to use LabVIEW Ihor Korolov February 2011. Contents What is LabVIEW? How does LabVIEW work? Block diagram Front panel Palettes Data flow programming](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56649ddd5503460f94ad5dc8/html5/thumbnails/39.jpg)
Köszönöm for your attention!
I. Korolov: How to use LabVIEW