Presentation is loading. Please wait.

Presentation is loading. Please wait.

How to use LabVIEW Ihor Korolov February 2011.

Similar presentations


Presentation on theme: "How to use LabVIEW Ihor Korolov February 2011."— Presentation transcript:

1 How to use LabVIEW Ihor Korolov February 2011

2 Contents What is LabVIEW? How does LabVIEW work? Block diagram
Front panel Palettes 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

3 What is LabVIEW? LabVIEW – Laboratory Virtual Instrument Engineering Workbench is 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". C language Dataflow programming language uses icons instead of lines of text to create programs 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. Cross-platform I. Korolov: How to use LabVIEW

4 LabVIEW Professional Development System
Price Desktop PC LabVIEW Professional Development System Laptop PDA I. Korolov: How to use LabVIEW

5 LabVIEW www.ni.com I. Korolov: How to use LabVIEW
PXI Modular Instrumentation Desktop PC Laptop PC PDA High-Speed Digitizers High-Resolution Digitizers and DMMs Multifunction Data Acquisition Dynamic Signal Acquisition Instrument Control Digital I/O Counter/ Timers Machine Vision Motion Control Distributed I/O and Embedded Control Signal Conditioning and Switching Unit Under Test I. Korolov: How to use LabVIEW

6 How does LabVIEW work? I. Korolov: How to use LabVIEW

7 How does LabVIEW work? I. Korolov: How to use LabVIEW

8 How does LabVIEW work? Front panel Block Diagram Ctrl+E
Block diagram toolbar Continuous run Clean Up diagram Pause Run Stop Reorder objects Debugging features I. Korolov: How to use LabVIEW

9 LabVIEW Front panel How does LabVIEW work?
Used to display Controls or Indicators I. Korolov: How to use LabVIEW

10 - Actual program - Invisible to user
How does LabVIEW work? LabVIEW Block Diagram - Actual program Invisible to user - Read left to right I. Korolov: How to use LabVIEW Example LP

11 How does LabVIEW work? Palettes
Front panel Block Diagram Controls palette Tools palette I. Korolov: How to use LabVIEW

12 Automatic Selection Tool
How does LabVIEW work? Tools palette Floating Palette Used to operate and modify front panel and block diagram objects. Automatic Selection Tool Scrolling Tool Breakpoint Tool Probe Tool Color Copy Tool Coloring Tool Operating Tool Positioning/Resizing Tool Labeling Tool Wiring Tool Shortcut Menu Tool I. Korolov: How to use LabVIEW Example

13 Data flow programming I. Korolov: How to use LabVIEW

14 Data flow programming If you put a control (or indicator) on the front panel LabVIEW automatically creates a corresponding control (or indicator) terminal on theBlock Diagram I. Korolov: How to use LabVIEW Example FP TB

15 Data flow programming. Functions.
View as icon “Add” function Click and Ctrl+H wire I. Korolov: How to use LabVIEW Example2,3

16 Data flow programming. Functions.
I. Korolov: How to use LabVIEW Example

17 Some of basic wires used in block diagrams
Data flow programming. Wires 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 I. Korolov: How to use LabVIEW

18 Data flow programming. Functions
I. Korolov: How to use LabVIEW Example

19 Data flow programming. Functions
Polymorphism Array Arithmetic Operations I. Korolov: How to use LabVIEW

20 Programming structures
I. Korolov: How to use LabVIEW

21 For loop LabVIEW Programming Structures From 0 to N-1 Right click
I. Korolov: How to use LabVIEW Example For Loop

22 While loop LabVIEW Programming Structures Auto-indexed tunnel
Loop tunnel Shift register Timed While loop Repeats the sub diagram inside the loop until the conditional terminal receives a particular Boolean value I. Korolov: How to use LabVIEW Example WhileL

23 Case structure LabVIEW Programming Structures
I. Korolov: How to use LabVIEW Example

24 Flat sequence structure
LabVIEW Programming Structures Flat sequence structure 1 2 3 Stacked sequence structure 4 Sequence structures are used to ensure a subdiagram executes after or before another subdiagram 3 2 1 I. Korolov: How to use LabVIEW

25 LabVIEW Programming Structures
Local variables Global variables 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. I. Korolov: How to use LabVIEW Example

26 LabVIEW: Wait statements
Wait (ms) function Wait Until Next ms Multiple function Pre-loop code Loop code I. Korolov: How to use LabVIEW

27 Waveform Graph – Plot an array of numbers against their indices
LabVIEW: Graphs Waveform Graph – Plot an array of numbers against their indices XY Graph – Plot one array against another Digital Waveform Graph – Plot bits from binary data Graph properties I. Korolov: How to use LabVIEW Example Graph

28 Write/Read LabVIEW Measurements file
LabVIEW: File I/O Write to a File Read from a File Write/Read LabVIEW Measurements file Writing to LVM file Reading from LVM file I. Korolov: How to use LabVIEW Example File I/O

29 SubVI I. Korolov: How to use LabVIEW

30 What is a subVI? Using a VI as a subVI.
A SubVi is a stand VI that can be called by other VI and it is similar to an individual function. Advantages Modular Easier to debug Don’t have to recreate code Require less memory I. Korolov: How to use LabVIEW

31 What is a subVI? Using a VI as a subVI.
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 I. Korolov: How to use LabVIEW

32 What is a subVI? Using a VI as a subVI.
2 Create the Connector Right 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 I. Korolov: How to use LabVIEW Example

33 Data acquisition I. Korolov: How to use LabVIEW

34 Sensors How to use LabVIEW with DAQ software Data acquisition (DAQ)
Fundamental task of a DAQ system is to measure or generate real-world physical signals Data acquisition (DAQ) Connecting Signals Simple DAQ application DAQ device Sensors Terminal Block I. Korolov: How to use LabVIEW

35 Measurements and automation explorer (MAX)
MAX is the primary configuration and testing utility that is available for the DAQ device 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 I. Korolov: How to use LabVIEW MAX

36 Specific VIs for performing: Analog Input Analog Output Digital I/O
How to use LabVIEW with DAQ software Traditional NI-DAQ Specific VIs for performing: Analog Input Analog Output Digital I/O Counter operations NI-DAQmx Next 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 I. Korolov: How to use LabVIEW

37 How to use LabVIEW with DAQ software
Ni USB 6501 DAQ assistant Quickly and easily program the DAQ device Creates a local task Most applications can use the DAQ Assistant I. Korolov: How to use LabVIEW Example DAQ

38 How to use LabVIEW ? Tips and tricks
( ) 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 I. Korolov: How to use LabVIEW

39 Köszönöm for your attention!
I. Korolov: How to use LabVIEW


Download ppt "How to use LabVIEW Ihor Korolov February 2011."

Similar presentations


Ads by Google