Documente Academic
Documente Profesional
Documente Cultură
The biomedical industry relies heavily on the ability to acq ire, analyze acquire anal e, and present large quantities q antities of data; data for example: Monitoring and storing physiological signals in order to research disease mechanisms or the effects of various drug interactions. There exists Th i t a strong t d demand d for f a flexible, fl ibl easy-to-use, t and d cost-effective tool.
Nearly all test, measurement, and control applications can be divided into 3 main components: the ability to acquire, analyze, and present data.
What is LabVIEW?
Laboratory Virtual Instrument Engineering Workbench G programming language that utilizes graphical and iconic scripting techniques. techniques
Compile code for multiple OS and devices. Useful U f l iin a b broad d range of f applications. li ti
LabVIEW is Everywhere y
Sensor Embedded (FPGA) Handheld Wireless Networked I/O PC Boards Industrial Computer (PXI) Tektronix Open Windows Oscilloscopes PC, Mac, Linux, Sun Workstation
LabVIEW is tightly i t integrated t d with ith all ll NI hardware, in addition to connecting to thousands of I/O devices from hundreds of different vendors.
Presentation with LabVIEW can be done on your PC or over a network, t k or you can t take k advantage of additional applications such as DIAdem.
Design
Prototype
Deploy
Simulation and Prototyping And more Control Automatic Controls and Dynamic Systems Mechatronics M h t i and dR Robotics b ti And more Measurements Circuits and Electronics Measurements and Instrumentation And more more
Desktop PC
Laptop PC
PDA
High-Speed High-Resolution Multifunction Dynamic Instrument Digitizers and DMMs Data Acquisition Signal Acquisition Control Digitizers
Digital I/O
Counter/ Timers
Machine Vision
Motion Control
B. LabVIEW Environment
Front Panel / Block Diagram Toolbar /Tools Palette
D Additional Help D.
Finding Functions Tips p for Working g in LabVIEW
Instruments Instruments**
20kS/s2 GS/s 1224 12 24 bit some 2 0 AC/DC x x
* Sound Cards Work in Some Data-Acquisition Applications, - http://www.tmworld.com/article/319702-Sound_Cards_Work_in_Some_Data_Acquisition_Applications.php ** The above table may not be representative of all device variations that exist in each category
What is MAX?
MAX stands for Measurement & Automation eXplorer. MAX configures f and organizes all your National Instruments DAQ, Q PCI/PXI instruments, GPIB, IMAQ, IVI, Motion, VISA, and VXI devices. Used U d for f configuring fi i and dt testing ti d devices. i
Icon found on Windows desktop
New Blank VI or
Start from an Example:
LabVIEW programs are denoted as virtual instruments (VIs), due to their visual imitation of actual hardware instruments.
All programs are developed with a ready-made graphical user interface (GUI). The source code is developed graphically in a block diagram format.
Control: Numeric
Tools Palette
Recommended: Automatic Selection Tool Tools to operate and modify both front panel and block diagram objects
Automatic Selection Tool Automatically chooses among the following tools: O Operating ti Tool T l Positioning/Resizing Tool Labeling Tool Wiring Tool
Status Toolbar
Demonstration 1: Creating a VI
Front Panel Window Graph Indicator Block Diagram Window
Dataflow Programming g g
Block diagram execution
Dependent on the flow f of f data Block diagram does NOT execute left to right
Node executes when data are available to ALL input terminals Nodes supply data to all output terminals when done
Debugging Techniques
Finding Errors
Click on broken Run button. Window showing g error appears. pp
Execution Highlighting
Click on Execution Highlighting button; data flow is animated using bubbles. Values are displayed on wires.
Probes
Right-click on wire to display probe and it shows data as it flows through wire segment. You can also select Probe tool from Tools palette and click on wire.
Loops
While While Loops
i terminal counts iteration Always runs at least once Runs until stop condition is met
For Loops
i terminal counts iterations Run according to input N of count terminal
For Loop
Drawing g a Loop p
2. Enclose code to be repeated 1. Select the structure
Standard VIs: modularized VIs customized by wiring (customizable) Functions: fundamental operating elements of LabVIEW; no front panel or block diagram (yellow)
Analysis
Storage g
File I/O
( ) (a)
(b)
2. Select
(c)
File I/O
File I/O Allows recording or reading data in a file file. LabVIEW creates or uses the following file formats: Binary: underlying file format of all other file formats ASCII: regular text files LVM: LabVIEW measurement data file TDM: created for National Instruments products
Spreadsheet Formatting
Spreadsheet files are ASCII files with a certain formatting
Usually tabs between columns and end of line constants between rows LabVIEW includes VIs that perform this formatting or a string can be concatenated
B Signal Processing B.
MathScript Arrays Clusters Waveforms
Boolean Data
Buttons and LEDs
Decorations
Tab Control Arrows
Other
Strings and text boxes Picture/Image Display ActiveX Controls
1D Array 012345
Auto-Indexing Disabled
Wire remains the same size
2. Timed Loops p
Configure special timed While loop for desired dt.
Time Delay
Timed Loop
Properties Include:
Size Color Plot Style Plot color
Features F t iinclude: l d
Cursors Scaling
(FunctionsProgramming StructuresMathScript)
Variable Workspace
View/Modify Variable Contents
User Commands
m-file Script
(LabVIEWToolsMathScript Window)
Introduction to Clusters
Data structure that g groups p data together. g Data may be of different types. Analogous A l t to struct t t in i C C. Elements must be either all controls or all indicators. Thought of as wires bundled into a cable. Order is important important.
Creating a Cluster
1. Select a Cluster shell. ControlsModernArray Matrix & Cluster ControlsModernArray, 2. Place objects inside the shell.
Cluster Functions
In the Cluster & Variant subpalette of the Programming palette Can also be accessed by right-clicking the cluster terminal
Bundle By Name
The Waveform Datatype contains 3 pieces of data: t0 = Start Time dt = Time between Samples Y = Array of Y magnitudes Two ways to create a Waveform Cluster:
Initial Value
Value 3
First Iteration
Second Iteration
Last Iteration
Create SubVI
Enclose area to be converted into a subVI. Select S l t EditCreate Edit C t S SubVI bVI from f the th Edit M Menu.
State Machines
( ) While Loop (1) p (2) Shift Register (3) ( ) Case Structure
1 2
Local Variables
Local Variables allow data to be passed between parallel loops. A single control or indicator can be read or written to from more than one location in the program Local Variables break the dataflow paradigm and should be used sparingly
Shows the current region g of view compared to entire Front Panel or Block Diagram Great for large g p programs g
LabVIEW Project
Group and organize VIs Hardware and I/O management Manage VIs for multiple targets Build libraries and executables Manage large LabVIEW applications Enable version tracking and management
(LabVIEWProjectNew)
Shared Variables
Shared Variables are used to send data between VIs. Variable Types: Single Process: share the data among VIs on the local computer. Network-published: communicate between VIs, remote computers, p , and hardware through g the Shared Variable Engine. g Shared Variable must exist within a p project j library. y Shared Variable must be deployed to be available to other projects and remote computers.
Additional Resources
NI Academic Web & Student Corner
http://www.ni.com/academic
LabVIEW Certification
LabVIEW Fundamentals Exam (free on www.ni.com/academic) Certified LabVIEW Associate Developer Exam (industry recognized certification )