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

This preview shows page 1-2-3-4-5-6-7-48-49-50-51-52-53-96-97-98-99-100-101-102 out of 102 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 102 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 102 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 102 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 102 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 102 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 102 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 102 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 102 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 102 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 102 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 102 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 102 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 102 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 102 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 102 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 102 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 102 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 102 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 102 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 102 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 102 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

UC Berkeley [email protected] to LabVIEWFor Use in Embedded System DevelopmentLab 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 DeploymentLabVIEW Graphical Development System• Graphical Programming Environment• Compile code for multiple OS and devices• Useful in a broad range of applicationsThe Virtual Instrumentation ApproachVirtual Instrumentation Applications• Analysis and Design– Simulation– Signal and Image Processing– Embedded System Programming• (PC, DSP, FPGA, Microcontroller)– Prototyping– And more…• Control– Automatic Controls and Dynamic Systems– Mechatronics and Robotics– And more…• Measurement/Test– Circuits and Electronics– Measurements and Instrumentation…Design Prototype DeployA single graphical development platformThe NI Approach – Integrated Hardware PlatformsHigh-SpeedDigitizersHigh-ResolutionDigitizers and DMMsMultifunction Data AcquisitionDynamicSignal AcquisitionDigital I/OInstrumentControlCounter/TimersMachineVisionMotion ControlDistributed I/O andEmbedded ControlLaptop PCPDADesktop PCPXI Modular InstrumentationSignal Conditioningand SwitchingUnit Under TestHigh-Level Development ToolsData FlowC CodeTextual Math Modeling StatechartGraphical System Design PlatformMacintoshLinux®WindowsReal-Time FPGAMicroDesktop PlatformEmbedded PlatformSection I – LabVIEW EnvironmentA. Getting Data into your Computer• Data Acquisition Devices– NI-DAQ– Simulated Data Acquisition– Sound CardB. LabVIEW Environment• Front Panel / Block Diagram• Toolbar /Tools PaletteC. Components of a LabVIEW Application• Creating a VI• Data Flow ExecutionD. Additional Help• Finding Functions• Tips for Working in LabVIEWA. Setting Up Your Hardware• Data Acquisition Device (DAQ)– 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– Built into most computersTrack ATrack BTrack CWhat type of device should I use? Sound Card* NI USB DAQ NI PCI DAQInstruments*AI Bandwidth8–44 KS/s 10–200 KS/s 250 K–1.2 Ms/s 20kS/s–2 GS/sAccuracy12–16 bit 12–16 bit 14–18 bit 12–24 bitPortablex x — someAI Channels2 8–16 16–80 2AO Channels2 1–2 2–4 0AC or DCAC AC/DC AC/DC AC/DCTriggering— x x xCalibrated— x x x* The above table may not be representative of all device variations that exist in each categoryWhat 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 onWindows DesktopExercise 1 – Setting Up Your Device• Use Measurement and Automation Explorer (MAX) to:– Configure and test your Simulated Data Acquisition (DAQ) deviceTrack BStart»All Programs»National Instruments LabVIEW 8.5Startup Screen:Start from a Blank VI:New»Blank VIStart from an Example:Examples»Find Examples…orOpen and Run LabVIEWEach VI has 2 WindowsFront Panel• User Interface (UI)– Controls = Inputs– Indicators = OutputsBlock Diagram• Graphical Code– Data travels on wires from controls through functions to indicators– Blocks execute by DataflowLabVIEW Programs Are Called Virtual Instruments (VIs)Controls Palette(Controls & Indicators)(Place items on the Front Panel Window)Indicator:Numeric SlideControl:NumericCustomize Palette ViewFunctions (and Structures) Palette(Place items on theBlock Diagram Window)Structure:While LoopRun Button Continuous Run ButtonAbort ExecutionExecution Highlighting ButtonAdditional Buttons on the Diagram ToolbarStatus ToolbarRetain Wire Values ButtonStep Function ButtonsBlock Diagram WindowFront Panel WindowDemonstration 1: Creating a VIInputTerminalsOutputTerminalBooleanControlGraphIndicator• 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 doneDataflow ProgrammingDebugging Techniques• Finding Errors• Execution Highlighting• ProbesClick on broken Run button.Window showing error appears.Click on Execution Highlighting button; data flow is animated using bubbles. Values are displayed on wires.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 DAQTrack A&BThis exercise should take 15 minutes.• Use a LabVIEW template to:– Acquire a signal from your DAQ deviceContext 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 windowTips 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 ProgramsA. Loops• While Loop• For LoopB. Functions and SubVIs• Types of Functions• Creating Custom Functions (SubVI)• Functions Palette & SearchingC. Decision Making and File IO• Case Structure• Select (simple If statement)• File I/OLoops•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 terminalWhile LoopFor LoopDrawing a Loop1. Select the structure2. Enclose code to be repeated3. Drop or drag additional nodes and then wire3 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


View Full Document

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

Documents in this Course
Load more
Download Introduction to LabVIEW For Use in Embedded System Development
Our administrator received your request to download this document. We will send you the file to your email shortly.
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 2 2 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?