课件教程ni培训online labview core1v_第1页
课件教程ni培训online labview core1v_第2页
课件教程ni培训online labview core1v_第3页
课件教程ni培训online labview core1v_第4页
课件教程ni培训online labview core1v_第5页
已阅读5页,还剩411页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、LabVIEW Core 1What You Need To Get StartedComputer running LabVIEW 2011 or later and Windows XP or laterLabVIEW Core 1 Course Manual LabVIEW Core 1 Exercise Manual LabVIEW Core 1 Course CDMultifunction DAQ deviceGPIB interfaceDAQ Signal Accessory or BNC-2120, wires, and cableNI Instrument Simulator

2、and power supplySerial and GPIB cablesFile LocationsThe course installer places the course files in the following location:Instructional MethodsGetting The Most Out Of This CourseAsk questions!Experiment with hands-on exercises to understand the methods usedExplore solutionsImplementations explore a

3、 possible solutionyou may find a better one New Users Experienced Users Advanced UsersLabVIEW Core 1LabVIEW Core 2LabVIEW Core 3Managing Software Engineering in LabVIEW LabVIEW OOP System Design Advanced Architectures in LabVIEWCertificationsCertified LV Associate Developer ExamCertified LabVIEW Dev

4、eloper ExamCertified LabVIEW Architect ExamCourse Learning MapCourse GoalsThis course prepares you for the following:Solve problems using LabVIEWUse data acquisition and instrument control in LabVIEW applicationsUse modular programming practicesDevelop, debug, and test LabVIEW VIsEffectively use a s

5、tate machine architectureParallelism and variablesLesson 1Setting Up HardwareDAQ HardwareUsing DAQ SoftwareInstrument ControlGPIBSerial Port CommunicationUsing Instrument Control SoftwareSetting Up HardwareLabVIEW is a graphical programming environment used by millions of engineers and scientists to

6、 develop sophisticated measurement, test, and control systemsLabVIEW can integrate with wide variety of hardware devicesIn this course, you will interact with DAQ, GPIB, and serial hardwareA. DAQ HardwareSignalTerminal BlockCableDAQ DeviceComputerDAQ Hardware Terminal Block & CableDAQ Signal Accesso

7、ryQuadrature Encoder4 LEDs for Digital I/ODigital TriggerCounter I/OFunction GeneratorFunction Generator Frequency ControlTemperature SensorAnalog InputAnalog OutputMicrophone InputDAQ Hardware Terminal Block & CableBNC-2120Quadrature Encoder8 LEDs for Digital I/OCounter I/OFunction GeneratorFunctio

8、n Generator Frequency and Amplitude ControlTemperature SensorAnalog InputAnalog OutputDAQ Hardware DAQ DeviceMost DAQ devices have four standard elements: analog input, analog output, digital I/O, and counters You can transfer the signal you measure with the DAQ device to the computer through a vari

9、ety of different bus structuresDAQ Hardware Analog InputThe process of measuring an analog signal and transferring the measurement to a computer for analysis, display, or storageAn analog signal is a signal that varies continuouslyAnalog input most commonly measures voltage or currentDAQ Hardware An

10、alog OutputThe process of generating analog signals from your computerPerforming digital-to-analog (D/A) conversions generates analog output Theavailable analog output types are voltage and currentTo perform a voltage or current output, a compatible device must be installed that can generate that ty

11、pe of signalDAQ Hardware Digital I/ODigital signals: Electrical signals that transfer digital data (on/off, high/low, 1/0) using a wireUsed to control or measure digital or finite state devices, such as switches and LEDsUsed to transfer dataprogram devicescommunicate between devicesUse digital signa

12、ls as clocks or triggers to control or synchronize other measurementsDAQ Hardware CountersA counter is a digital timing device typically used for event counting, frequency measurement, period measurement, position measurement, and pulse generationA counter has a fixed number it can count to as deter

13、mined by the resolution of the counterFor example, a 24-bit counter can count to:2(Counter Resolution) 1 = 224 1 = 16,777,215B. Using DAQ Software ConfigurationConfigure and test your DAQ device using the Measurement & Automation Explorer (MAX)Simulating a DAQ DeviceUsing NI-DAQmx simulated devices,

14、 you can try NI products in your application without the hardwareWith NI-DAQmx simulated devices, you also can export a physical device configuration onto a system that does not have the physical device installedExercise 1-1Concept: Measurement and Automation ExplorerUse MAX to examine, configure, a

15、nd test a DAQ device.Exercise 1-1Concept: Measurement and Automation ExplorerWhat is a possible real-world application using DAQ?C. Instrument ControlUse software on a PC to control an instrument over an instrument control busMix and match instruments from various categoriesUnderstand the properties

16、 of the instrument, such as the communication protocols to useC. Instrument ControlBenefits of Instrument ControlAutomate processesSave timeOne platform for multiple tasksEase of useMany types of instruments availableD. GPIBGPIB (general purpose interface bus) is a standard interface for communicati

17、on between instruments and controllers from various vendorsGPIBThe bus supports one system controller, usually a computer, and up to 14 additional instruments Controller: Defines the communication linksResponds to devices that request serviceSends GPIB commandsPasses/receives control of the busE. Se

18、rial Port CommunicationSerial communicationTransmits data between a computer and a peripheral device, such as a programmable instrument or another computerUses a transmitter to send data one bit at a time over a single communication line to a receiverBest method when data transfer rates are low, or

19、you must transfer data over long distancesF. Using Instrument Control SoftwareInterface Drivers: Instrument interfaces such as GPIB include a set of drivers for the interface Configuration: Use MAX to configure the interfaceExercise 1-2Concept: GPIB Configuration with MAXLearn to configure the NI In

20、strument Simulator and use MAX to examine the GPIB interface settings, detect instruments, andcommunicate with an instrument.Exercise 1-2Concept: GPIB Configuration with MAXWhat is a possible real-world application using instrument control?SummaryQuizYou can use the Measurement & Automation Explorer

21、 (MAX) to examine, configure, and test your DAQ device and GPIB instruments.TrueFalseSummaryQuiz AnswerYou can use the Measurement & Automation Explorer (MAX) to examine, configure, and test your DAQ device and GPIB instruments.TrueFalseSummaryQuizWhich of the following are benefits of instrument co

22、ntrol?Automate processesSave timeOne platform for multiple tasksLimited to only one type of instrumentSummaryQuiz AnswersWhich of the following are benefits of instrument control?Automate processesSave timeOne platform for multiple tasksLimited to only one type of instrumentLesson 2Navigating LabVIE

23、WVirtual Instruments (VIs)Parts of a VIStarting a VIProject ExplorerFront PanelBlock DiagramSearching for Controls, VIs and FunctionsSelecting a ToolDataflowBuilding a Simple VIA. Virtual Instruments (VIs)The appearance and operation of VIs imitate physical instruments, such as oscilloscopes and dig

24、ital multimeters.B. Parts of a VILabVIEW VIs contain three main components:1. Front Panel 2. Block Diagram 3. Icon/Connector PaneB. Parts of a VI Front PanelYou build the front panel with controls (inputs) and indicators (outputs)B. Parts of a VI Block DiagramFront panel objects appear as terminals

25、on the block diagramB. Parts of a VI Icon/Connector PaneIcon: graphical representation of a VIConnector Pane: map of the inputs and outputs of a VIIcons and connector panes are necessary to use a VI as a subVIA subVI is a VI that is inside of another VISimilar to a function in a text-based programmi

26、ng language IconConnector PaneC. Starting a VI Demonstrate using the Getting Started dialog box and the New dialog box to start a VI.D. Project ExplorerUse LabVIEW Projects to:Group LabVIEW files and non-LabVIEW filesCreate build specificationsDeploy or download files to targetsUsing the Project Exp

27、lorerDemonstrate creating a project, adding files, and removing files.E. Front Panel Controls PaletteContains the controls and indicators you use to create the front panelAccess from the front panel by selecting ViewControls PaletteE. Front Panel Front Panel ToolbarE. Front Panel Controls & Indicato

28、rsControlsKnobs, push buttons, dials, and other input devicesSimulate instrument input devices and supply data to the block diagram of the VIIndicatorsGraphs, LEDs, and other displaysSimulate instrument output devices and display data the block diagram acquires or generatesE. Front Panel Numeric Con

29、trols/IndicatorsThe numeric data type can represent numbers of various types, such as integer or realNumeric IndicatorNumeric ControlIncrement/Decrement ButtonsE. Front Panel Boolean Controls/IndicatorsThe Boolean data type represents data that only has two parts, such as True and False or On and Of

30、fUse Boolean controls and indicators to enter and display Boolean (True or False) valuesBoolean objects simulate switches, push buttons, and LEDsBooleanControlBooleanIndicatorE. Front Panel StringsThe string data type is a sequence of ASCII characters Use string controls to receive text from the use

31、r such as a password or user nameUse string indicators to display text to the userE. Front Panel Shortcut MenusAll LabVIEW objects have associated shortcut menusAs you create a VI, use the shortcut menu items to change the look or behavior of front panel and block diagram objectsTo access the shortc

32、ut menu, right-click the objectE. Front Panel Property Dialog BoxRight-click a front panel object and select Properties to displayThe options available on the property dialog box are similar to the options available on the shortcut menu for that objectE. Front Panel Configure Multiple ObjectsSelect

33、multiple objects to simultaneously configure shared propertiesF. Block DiagramBlock diagram objects include the following:TerminalsSubVIsFunctionsConstantsStructuresWiresF. Block Diagram Functions PaletteContains the VIs, functions, and constants you use to create the block diagramF. Block Diagram B

34、lock Diagram ToolbarF. Block Diagram Terminals Terminals are:Block diagram appearance of front panel objectsEntry and exit ports that exchange information between the front panel and block diagramAnalogous to parameters and constants in text-based programming languagesChange the view type of a termi

35、nal by toggling the View as Icon selection from the context menu F. Block Diagram TerminalsF. Block Diagram NodesObjects on the block diagram that have inputs and/or outputs and perform operations when a VI runsAnalogous to statements, operators, functions, and subroutines in text-based programming

36、languagesNodes can be functions, subVIs, or structuresNodesF. Block Diagram Function NodesFundamental operating elements of LabVIEWDo not have front panels or block diagrams, but do have connector panesDouble-clicking a function only selects the function does not open it like a VIHas a pale yellow b

37、ackground on its iconF. Block Diagram SubVI NodesSubVI: VIs that you build to use inside of another VIAny VI has the potential to be used as a subVIWhen you double-click a subVI on the block diagram, you can view the front panel and block diagram of the subVIThe upper right corner of the front panel

38、 and block diagram displays the icon for the current VIThis is the icon that appears when you place the VI on a block diagram as a subVIF. Block Diagram SubVI NodesExpress VIs are a special type of subVIRequire minimal wiring because you configure them with dialog boxesSave the configuration of an E

39、xpress VI as a subVIIcons for Express VIs appear on the block diagram as icons surrounded by a blue fieldF. Block Diagram Icons/Expandable NodesF. Block Diagram WiresTransfer data between block diagram objects through wiresWires are different colors, styles, and thicknesses, depending on their data

40、typesA broken wire appears as a dashed black line with a red X in the middleScalar1D Array2D ArrayDBL NumericInteger NumericStringF. Block Diagram Wiring Tips Press -B to delete all broken wiresRight-click and select Clean Up Wire to reroute the wireF. Block Diagram Wiring Tips Use the Clean Up Diag

41、ram tool to reroute multiple wires and objects to improve readabilitySelect a section of your block diagramClick the Clean Up Diagram button on the block diagram toolbarExercise 2-1Concept: Exploring a VIIdentify the parts of an existing VI.Exercise 2-1Concept: Exploring a VIWhat are constants and w

42、hen should you use them?What are free labels and when should you use them?G. Searching for Controls, VIs & FunctionsFind controls, functions, and VIs using the Search button on the Controls and Functions palette.G. Searching with Quick DropIn the Quick Drop dialog box, you can search for project ite

43、ms in addition to controls, functions, and VIs. To display the Quick Drop dialog box, press or select ViewQuick Drop.G. Global SearchUse the Search bar in the top right of the front panel and block diagram windows to search palettes, LabVIEW Help, and .Exercise 2-2Concept: Navigating PalettesLearn t

44、o use the palettes and search for controls, functions and VIs.Exercise 2-2Concept: Navigating PalettesWhy would you want to add a function to the Favorites category in the Functions palette?Why would you use the Quick Drop dialog box instead of the Search button on the Controls and Functions palette

45、s?H. Selecting A ToolCreate, modify, and debug VIs using the tools provided by LabVIEWA tool is a special operating mode of the mouse cursorThe operating mode of the cursor corresponds to the icon of the tool selectedWhen using the Automatic Tool Selection, LabVIEW chooses which tool to select based

46、 on the current location of the mouseExercise 2-3Concept: Selecting A ToolGain experience using the Automatic Tool Selection to select which tool to use.Exercise 2-3Concept: Selecting A ToolHow do you enable automatic tool selection?I. DataflowLabVIEW follows a dataflow model for running VIsA node e

47、xecutes only when data are available at all of its input terminalsA node supplies data to the output terminals only when the node finishes executionI. Dataflow QuizWhich node executes first? AddSubtractRandom NumberDivide SineI. Dataflow Quiz AnswersNO CORRECT ANSWERWhich node executes first? Add po

48、ssiblySubtract definitely notRandom Number possiblyDivide possiblySine definitely notExercise 2-4Concept: DataflowUnderstand how dataflow determines the execution order in a VI.Exercise 2-4Concept: DataflowShould a well-designed block diagram flow in a particular direction?J. Building a Simple VIJ.

49、Building a Simple VI Acquire Acquire Express VIs:DAQ Assistant Express VIInstrument I/O Assistant Express VISimulate Signal Express VIRead from Measurement File Express VIJ. Building a Simple VI Analyze Analyze Express VIs:Amplitude and Level Measurements Express VIStatistics Express VISpectral Meas

50、urements Express VITone Measurements Express VIFilter Express VIJ. Building a Simple VI Present Present tasks are Express VIs that perform a function or indicators that present data on the front panel of the VI Indicators include the Waveform Chart, the Waveform Graph, and the XY GraphExpress VIs in

51、clude the Write to Measurement File Express VI, Build Text Express VI, DAQ Assistant Express VI, and the Instrument I/O Assistant Express VIJ. Building A Simple VI RunningPlace Express VI on the block diagramConfigure the dialog box that opensWire Express VIs togetherSave and run the VI The Run butt

52、on appears broken when the VI you are creating or editing contains errorsExercise 2-5Simple Acquire, Analyze, and Present VICreate a simple VI that acquires data, analyzes data, and presents the results.Exercise 2-5Simple Acquire, Analyze, and Present VIHow do you determine the file path of the gene

53、rated text file?SummaryQuizWhich function executes first: Add or Subtract?AddSubtractUnknownSummaryQuiz AnswerWhich function executes first: Add or Subtract?AddSubtractUnknownSummaryQuizWhich function executes first: Sine or Divide?SineDivideUnknownSummaryQuiz AnswerWhich function executes first: Si

54、ne or Divide?SineDivideUnknownSummaryQuizWhich of the following functions executes first: Random Number, Add or Divide?Random NumberDivideAddUnknownSummaryQuiz AnswerWhich of the following functions executes first: Random Number, Add or Divide?Random NumberDivideAddUnknownSummaryQuizWhich of the fol

55、lowing functions execute last: Random Number, Subtract or Add?Random NumberSubtractAddUnknownSummaryQuiz AnswerWhich of the following functions execute last: Random Number, Subtract or Add?Random NumberSubtractAddUnknownSummaryQuizWhat are the three parts of a VI?Front PanelBlock DiagramProjectIcon/

56、Connector PaneSummaryQuiz AnswerWhat are the three parts of a VI?Front PanelBlock DiagramProjectIcon/Connector PaneLesson 3Troubleshooting and Debugging VIsLabVIEW Help UtilitiesCorrecting Broken VIsDebugging TechniquesUndefined or Unexpected DataError Checking and Error HandlingA. LabVIEW Help Util

57、ities Context HelpDisplays basic information about LabVIEW objects when you move the cursor over each objectSelect HelpShow Context Help, press or click the Show Context Help Window button on the toolbarA. LabVIEW Help Utilities LabVIEW HelpDetailed descriptions of most palettes, menus, tools, VIs,

58、and functions and instructions for using LabVIEW featuresAccessing the LabVIEW Help: Select HelpLabVIEW HelpUse the Detailed help link or button in the Context Help window Right-click an object and select Help from the shortcut menuA. LabVIEW Help Utilities NI Example FinderExercise 3-1Concept: Usin

59、g Help e familiar with using the Context Help window, the LabVIEW Help, and the NI Example Finder.Exercise 3-1Concept: Using HelpYou are given a VI containing unfamiliar functions. How do you determine the functionality in the block diagram? B. Correcting Broken VIsB. Correcting Broken VIsCommon Iss

60、uesBroken wire You wired a Boolean control to a String indicatorYou wired a Numeric control to a Numeric controlA required block diagram terminal is unwiredA subVI is broken or you edited its connector pane after you placed its icon on the block diagram of the VIC. Debugging TechniquesYour VI isnt b

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论