Unformatted text preview:

Introduction to LabVIEW For Use in Embedded System Development UC Berkeley EE249 Hugo Andrade ni com Lab Goals Become comfortable with the LabVIEW environment Ability to use LabVIEW to solve problems that arise during the analysis design prototype and deployment of Embedded Systems LabVIEW Concepts Acquiring saving and loading data Find and use math and complex analysis functions Work with data types such as arrays and clusters Displaying and printing results Modeling tools Targets and Deployment LabVIEW Graphical Development System Graphical Programming Environment Compile code for multiple OS and devices Useful in a broad range of applications The Virtual Instrumentation Approach Virtual Instrumentation Applications Analysis and Design Simulation Signal and Image Processing Embedded System Programming PC DSP FPGA Microcontroller A single graphical development platform Design Prototyping And more Control Automatic Controls and Dynamic Systems Mechatronics and Robotics And more Measurement Test Circuits and Electronics Measurements and Instrumentation Prototype Deploy The NI Approach Integrated Hardware Platforms PXI Modular Instrumentation High Speed High Resolution Multifunction Dynamic Instrument Digitizers and DMMs Data Acquisition Signal Acquisition Control Digitizers Signal Conditioning and Switching Unit Under Test Laptop PC Desktop PC Digital I O Counter Timers Machine Vision Motion Control Distributed I O and Embedded Control PDA High Level Development Tools Data Flow C Code Textual Math Modeling Statechart Graphical System Design Platform Linux Macintosh Desktop Platform Windows Real Time FPGA Embedded Platform Micro Section I LabVIEW Environment A Getting Data into your Computer Data Acquisition Devices NI DAQ Simulated Data Acquisition Sound Card B LabVIEW Environment Front Panel Block Diagram Toolbar Tools Palette C Components of a LabVIEW Application Creating a VI Data Flow Execution D Additional Help Finding Functions Tips for Working in LabVIEW A Setting Up Your Hardware Data Acquisition Device DAQ Track A Actual USB PCI or PXI Device Configured in MAX Simulated Data Acquisition Device DAQ Software simulated at the driver level Configured in MAX Sound Card Track C Built into most computers Track B What type of device should I use Sound Card NI USB DAQ NI PCI DAQ Instruments AI Bandwidth 8 44 KS s 10 200 KS s 250 K 1 2 Ms s 20kS s 2 GS s Accuracy 12 16 bit 12 16 bit 14 18 bit 12 24 bit Portable x x some AI Channels 2 8 16 16 80 2 AO Channels 2 1 2 2 4 0 AC or DC AC AC DC AC DC AC DC Triggering x x x Calibrated x x x 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 and organizes all your National Instruments DAQ PCI PXI instruments GPIB IMAQ IVI Motion VISA and VXI devices Used for configuring and testing devices Icon Found on Windows Desktop Exercise 1 Setting Up Your Device Track B Use Measurement and Automation Explorer MAX to Configure and test your Simulated Data Acquisition DAQ device Open and Run LabVIEW Start All Programs National Instruments LabVIEW 8 5 Startup Screen Start from a Blank VI New Blank VI or Start from an Example Examples Find Examples LabVIEW Programs Are Called Virtual Instruments VIs 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 Controls Palette Place items on the Front Panel Window Controls Indicators Control Numeric Customize Palette View Indicator Numeric Slide Functions and Structures Palette Place items on the Block Diagram Window Structure While Loop Status Toolbar Run Button Continuous Run Button Abort Execution Additional Buttons on the Diagram Toolbar Execution Highlighting Button Retain Wire Values Button Step Function Buttons Demonstration 1 Creating a VI Front Panel Window Graph Indicator Block Diagram Window Output Terminal Boolean Control Input Terminals Dataflow Programming 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 Debugging Techniques Finding Errors Click on broken Run button Window showing error appears 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 Exercise 2 Acquiring a Signal with DAQ Use a LabVIEW template to Acquire a signal from your DAQ device This exercise should take 15 minutes Track A B Context Help Window Help Show Context Help press the Ctrl H keys Hover cursor over object to update window Additional Help Right Click on the VI icon and choose Help or Choose Detailed Help on the context help window Tips for Working in LabVIEW Keystroke Shortcuts Ctrl H Activate Deactivate Context Help Window Ctrl B Remove Broken Wires From Block Diagram Ctrl E Toggle Between Front Panel and Block Diagram Ctrl Z Undo Also in Edit Menu Tools Options Set Preferences in LabVIEW VI Properties Configure VI Appearance Documentation etc Section II Elements of Typical Programs A Loops While Loop For Loop B Functions and SubVIs Types of Functions Creating Custom Functions SubVI Functions Palette Searching C Decision Making and File IO Case Structure Select simple If statement File I O Loops While Loop 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 a Loop 2 Enclose code to be repeated 1 Select the structure 3 Drop or drag additional nodes and then wire 3 Types of Functions from the Functions Palette Express VIs interactive VIs with configurable dialog page blue border Standard VIs modularized VIs customized by wiring customizable Functions fundamental operating elements of LabVIEW no front panel or block diagram yellow What Types of Functions are Available Input and Output Signal and Data Simulation Acquire and Generate Real Signals with DAQ Instrument I O Assistant Serial GPIB ActiveX for communication with other programs Analysis Signal Processing Statistics Advanced Math and Formulas Continuous Time


View Full Document

Berkeley ELENG C249A - Introduction to LabVIEW For Use in Embedded System Development

Documents in this Course
Load more
Loading Unlocking...
Login

Join to view Introduction to LabVIEW For Use in Embedded System Development and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Introduction to LabVIEW For Use in Embedded System Development and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?