58
1

Intro to LabVIEW and Robotics Hands-On Seminar

  • Upload
    jonahdz

  • View
    58

  • Download
    11

Embed Size (px)

Citation preview

#1What Youll Do TodayLearn LabVIEW fundamentalsInterface to an ultrasonic position sensorAim the sensor with a servo motorProgram an FPGA to blink an LED

#2National Instruments at a Glance

Net Revenue in MillionsLeaders in Computer-Based Measurement and AutomationLong-term Track Record of Growth and ProfitabilityRecord Revenue: $821M in 2008Fortune 100 Best Companies to Work For ten years in a rowMore than 4,900 employees; operations in 40+ countries Founded in 1976 with focus on Instrument ControlLabVIEW 1.0 released in 1986NI HQ#3Design, Control, Test with LabVIEW

Measurements

Industrial

EmbeddedSoftware-defined behaviorModular I/O

#4

What is LabVIEW?#5LabVIEW is a Programming LanguageGraphical ProgrammingData typesStructures (i.e. loops, case, event handling)Standard functions (i.e. File I/O)Reuse external codeCompiles to machine codeAutomatic multithreading

#6

LabVIEW is a Development EnvironmentDebugging toolsAssistantsConfigurable functionsI/O FinderEasy UI DevelopmentSoftware Engineering ToolsPerformance Tools

#7LabVIEW Includes Built-in IP LibrariesIn-line and off-line analysis and controlSignal processingAnalysis and filteringComplex mathPID/Advanced controlVisionMotion

#8LabVIEW Provides Proven MiddlewareCompactRIO,orSingle-Board RIODevice DriversBoard Support Package (BSP)Driver APIApplication SoftwareGraphical or Text programmingProgram HMI, real-time processor and FPGA with one tool flowSignal processing, control, communications libraries in LabVIEWComplete C and VHDL supportComplete Easy to Use I/O API Libraries:Built-in APIs for analog, digital, motion, etcAPIs for DMA transferAPIs for Serial, CAN, TCP and file I/OValidated Low-level Drivers:Device drivers for all analog and digital I/ODevice drivers for RS232, TCP/IP, UDP, etcDrivers for System Services such as Interrupt Control , Power Management , External Bus Interface Unit Control , Deferred Callback , DMA ManagementReady to Run Out of the Box:VxWorks RTOS with prebuilt BSPBuilt-in boot loader, flash and download utilities/driversUSB, Ethernet and other low-level software stacksFreescale MPC5200 ProcessorFPGA (Xilinx 3E)NI custom high performance bus interface ASICConnectivity for custom design or C Series I/OIt just works

#Todays System: NI Robotics Starter Kit

NI Single-Board RIO-based controllerUltrasonic sensor, encoders, motors, battery, and charger includedLabVIEW Robotics, LabVIEW Real-Time and LabVIEW FPGA software modules#NI Single-Board RIO Platform

Real-Time ProcessorFPGADigital I/OAnalog I/OC Series I/OExercise 1: Test and Configure the Robotics Starter Kit

#12

LabVIEW Fundamentals#13The LabVIEW Environment

VI = program or functionFront Panel = user interfaceBlock Diagram = code#14Controls & IndicatorsKnobs/DialsGraphs/ChartsButtonsDigital DisplaysSlidersThermometersCustomize and create your own

Front Panel

#15

Functions and VIsBlock DiagramConfiguration BasedExpress VIStandard VIs

#

Dataflow Programming123Comparison waits until all inputs are present, then executesOnce executed, output from comparison continues through codeBoth Simulate Signal Express VIs execute simultaneously

123Block Diagram#17Wires and Data TypesTransfer data between block diagram objects through wiresWires are different colors, styles, and thicknesses, depending on their data typesA broken wire appears as a dashed black line with a red X in the middle18

Scalar1D Array2D ArrayDBL NumericInteger NumericString

Block Diagram

#

Execution Control Structures

While LoopFor LoopRun until stop condition metRun N times Allow same piece of code to run multiple times Exit conditions different for eachBlock Diagram#

Timed Loop Structure MultirateDynamicPriority Configurable

20Period = 100 ms, Acquire = 50 ms, Loop idle = 50 ms LabVIEW executes lower priority tasks during idle time.

#20LabVIEW ProjectRun VIs on multiple targetsMy ComputerSingle-Board RIO Real-Time ProcessorSingle-Board RIO FPGA

#21

Interfacing with the FPGADownload and run FPGA VI on the Single-Board RIORead and write data to the FPGA VITerminate communication with the FPGA VI#Exercise 2: Introduction to the LabVIEW Development Environment

#23Built-in Programming Assistance

Highlight ExecutionBlock Diagram Cleanup Context Help#24

Analysis andSignal Processing#25Signal Processing & AnalysisWaveform GenerationWaveform ConditioningWaveform MonitoringWaveform MeasurementsSignal GenerationSignal OperationsWindowsDigital FiltersSpectral AnalysisTransformsPoint-by-PointMathematicsNumericElementary and Special FunctionsBLAS/LAPAC-based Linear AlgebraCurve FittingInterpolation / ExtrapolationProbability and StatisticsOptimizationOrdinary Differential EquationsGeometryPolynomialFormula Parsing1D & 2D EvaluationCalculusLabVIEW Signal Processing, Analysis and Math#(C) 2006 National Instruments8/11/2010Signal Processing, Analysis and Math with NI LabVIEW26

Using Analysis FunctionsConfiguration BasedExpress VIs

Programmatic, Low-Level VIsText-based MathScript Node

#27Exercise 3: Math and Debugging in LabVIEW

#28

FPGA Programming#29What is an FPGA?What it isField-programmable gate arrayA silicon chip with unconnected gatesUser can define and re-define functionalityHow it worksDefine behavior in softwareCompile and download to the hardwareHardware implementation of code

#30Importance of FPGA in SystemsHigh Reliability Designs become a custom circuitHigh Determinism Runs algorithms at deterministic rates down to 25 ns (faster in many cases)True Parallelism Enables parallel tasks and pipeliningReconfigurable Create new and alter existing task-specific personalities

#Simplified FPGA Example

ABCDFEImplementing Logic on FPGA: F = {(A+B)CD} E

LabVIEW FPGA Code#32

ABCDFE

Simplified FPGA Example

YW XZ#33Exercise 4: Your First LabVIEW FPGA Application

#34

Putting It All Together#35Overview of Our Simple Mobile Robot#36Vector Field HistogramBuilds a map of viewable area of a sensorDetermines the largest area that is not occupiedChecks for a panic threshold

robot#37Instructor Demo: Explore Roaming Code Explore final application Acquire, analyze and display temperature signal#38

Next Steps#39Order Your Evaluation Kit

$1,999$999and up#40Worldwide LabVIEW User CommunityOver 100,000 members on award-winning NI Discussion ForumsNI and LabVIEW user-contributed examples, tutorials and blogsMore than 100 LabVIEW User GroupsThird-party community web sites in over 15 languagesHundreds of third-party add-on tools on the LabVIEW Tools Network

#41Software Maintenance and Support

Membership in a National Instruments software maintenance and support program allows you to: Receive software updates and maintenance releases automatically Enjoy direct access to technical support from NI applications engineers Access special online software training modules that highlight features, application uses, and development best practicesVisit ni.com/services to learn more#42Training and Certification

Together, the National Instruments training and certification programs deliver the fastest, most certain route to increased proficiency and productivity using NI software and hardware.NI Training: Build Your KnowledgeNI training helps you build the skills to more efficiently develop robust, maintainable applications. We provide several training options including classroom, self-paced, online, or on-site training at your facility. NI Certification: Validate Your ExpertiseNI certification confirms your technical growth and skill. This professional certification is ideal for differentiating yourself from the competition and making your own informed hiring and outsourcing decisions. Visit ni.com/training to learn more#43

LabVIEW Modulesand Toolkits#44

LabVIEW Real-Time ModuleRapidly develop deterministic applications with graphical programmingEasily architect distributed control and monitoring systemsEliminate time spent integrating diverse I/O

#LabVIEW Datalogging and Supervisory Control ModuleGraphical development for distributed monitoring and control systemsTrend real-time and historical data Log data from any networked I/O to a historical database Monitor and log alarms and events Network LabVIEW Real-Time targets and OPC devicesAdd security to LabVIEW user interfaces

#LabVIEW FPGA ModuleDefine custom FPGA I/O without VHDL programmingAchieve hardware deterministic response within 25nsExecute tasks with true parallelism

NI CompactRIO

R Series Intelligent DAQ#

Create custom human-machine interface (HMI) applications for the NI TPC-2006 and other Windows CE devices

NI TPC-2006

LabVIEW Touch Panel Module#LabVIEW Statechart ModuleStatecharts provide high-level abstraction for state based applicationsSimple semantics represent complex systemsSelf-documenting design

Integrate statecharts into existing LabVIEW applications

Generate code for desktop, Real-time, FPGA, and embedded targets

#49

Wireless communication with shared variablePortable low-cost USB DAQLabVIEW Mobile Module

#

NI Vision Development ModuleLabVIEW programming libraries for machine vision and image processingIncludes Vision AssistantPrototypes and benchmarks applicationsGenerates complete code for LabVIEW, Visual Basic, and CHundreds of tools to:Enhance imagesCheck for presenceLocate featuresIdentify partsMeasure objects

#Motion Control with LabVIEWNI Motion Assistant Interactive environment with 3D visualization Ready-to-run LabVIEW or C code creation Easy trapezoidal or S-curve velocity profile implementation Teach pendant for easy prototyping

NI SoftMotion Controller for CANopen and IEEE 1394Use LabVIEW and NI Motion Assistant to program distributed motion control applicationsCompatible with intelligent CANopen drives from Copley and IEEE 1394 drives from ORMEC

NI SoftMotion Development ModuleDevelop custom motion controllers in LabVIEW Real-Time or LabVIEW FPGAUse trajectory generation, spline interpolation, position, velocity control, and encoder implementation VIs

#

LabVIEW Sound and Vibration Toolkit10 Express VIs Fractional Octave Analysis with WeightingVibration Level with Single or Double IntegrationSound Level with A-, B-, C-WeightingPower SpectrumZoom Power SpectrumFrequency ResponsePeak SearchPower in BandLimit Testing

#

LabVIEW Order Analysis ToolkitGabor order tracking algorithm analyzes signals from rotating machineryResampling order analysis for online condition monitoringFlexible order energy selection in the joint time-frequency domain Plot order versus time or RPM Order extraction tools separate order-specific signal components Digital and analog tachometer signal processing

#

PID Control ToolkitPID ControlAutotuningGain schedulingFuzzy LogicControl strategiesDecision making

#Report Generation Toolkit for Microsoft OfficeProgrammatically create and edit reports in Microsoft Word and ExcelPopulate report templates Manage report layout, format, and appearance E-mail reports and run macros Express VI included

#LabVIEW Advanced Signal Processing ToolkitTime-Frequency AnalysisTime-Series AnalysisWavelet and filter bank designApplicationsAutomotiveBiomedicalSeismologyRadar/Sonar

#Database Connectivity ToolkitInsert, select data from OLE DB, ODBC databasesMicrosoft Access, SQL Server, Oracle, etc.Create, drop tablesSave records in XML formatExecute SQL queriesImmediate, parameterizedExecute stored proceduresAccept, reject multiple operations (transactions)

#Chart90001122579132431455983106127165201241274330410385391426514572660740

Revenue in Millions

Sheet1National Instruments (NATI) RevenueYear'77'78'79'80'81'82'83'84'85'86'87'88'89'90'91'92'93'94'95'96'97'98'99'00'01'02'03'04'05'06'07Revenue in Millions$0$0$0$1$1$2$2$5$7$9$13$24$31$45$59$83$106$127$165$201$241$274$330$410$385$391$426$514$572$660$740

Sheet1

Revenue in Millions

Sheet2

Revenue in Millions

Sheet3