NI官方labview培训教材Lesson+1-4.ppt_第1页
NI官方labview培训教材Lesson+1-4.ppt_第2页
NI官方labview培训教材Lesson+1-4.ppt_第3页
NI官方labview培训教材Lesson+1-4.ppt_第4页
NI官方labview培训教材Lesson+1-4.ppt_第5页
已阅读5页,还剩87页未读 继续免费阅读

下载本文档

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

文档简介

NationalInstrumentsConfidential,1,LabVIEWIntroductionCourseSemester,NationalInstruments11500N.MopacExpresswayAustin,Texas78759(512)683-0100,2,GraphicalProgrammingforTest,Measurement,andControlRapidapplicationdevelopmentwithExpressVIsandeasy-to-usegraphicalenvironmentInteractivemeasurementassistantsandpowerfulredesignedDAQinterfaceforconnectingtoalltypesofI/OExpandedtargetingoptionsfromReal-TimetoFPGAtoPDALocalizedinFrench,German,andJapanese(Koreandocumentation),3,ReadersofElectronicDesignnameinventionofLabVIEWasoneoftheTop50MilestonesfortheElectronicsIndustryLabVIEW6.1receivesIANAutomationExcellenceAwardof2002DesignNewsawardsLabVIEW6iBestComputerProductivityToolof2000LabVIEW6ichosenthe“BestoftheBest”inthesoftwarecategorybyreadersofEvaluationEngineering,LabVIEWAwards,4,May2003January2002August2000March1998February1996August1993September1992January1990October1986April1983,LabVIEW7ExpressVIs,I/OAssistants,FPGA/PDAtargetsLabVIEW6.1Enhancednetworkingcapabilities,analysisLabVIEW6iInternet-readymeasurementintelligenceLabVIEW5.0ActiveX,MultithreadingLabVIEW4.0Addedprofessionaltools,improveddebuggingLabVIEW3.0MultiplatformversionofLabVIEWLabVIEWforWindowsLabVIEW2.0forMacintoshLabVIEW1.0forMacintoshLabVIEWprojectbegins,NILabVIEW:AHistoryofInnovation,5,Third-PartySoftwareWolframResearchMathematicaMicrosoftExcelTheMathWorksMATLABandSimulinkMathSoftMathCADElectronicWorkbenchMultiSimTexasInstrumentsCodeComposerStudioAnsoftRFcircuitdesignsoftwareMicrosoftAccessMicrosoftSQLServerOracle,LeveragingCommercialTechnologies,CommunicationProtocolsEthernetCANDeviceNetUSBIEEE1394RS-232GPIBRS-485,6,PC,Mac,Linux,Sun,LabVIEWEverywhere,NetworkedI/O,PCBoards,Workstation,Handheld,Embedded(FPGA),IndustrialComputer(PXI),Wireless,Sensor,TektronixOpenWindowsOscilloscopes,7,TheLabVIEWFamily,NILabVIEWGraphicalProgrammingSoftwareforMeasurementandAutomation,LabVIEWReal-TimeModule,LabVIEWFPGAModule,LabVIEWPDAModule,LabVIEWDataloggingandSupervisoryControlModule,8,Acquire,Analyze,andPresent,Nearlyalltest,measurement,andcontrolapplicationscanbedividedinto3maincomponents:theabilitytoacquire,analyze,andpresentdata.LabVIEWistheeasiest,mostpowerfultoolforacquiring,analyzing,andpresentingreal-worlddata.,9,AcquirewithLabVIEW,LabVIEWcanacquiredatausingthefollowingdevicesandmore:GPIB,Serial,Ethernet,VXI,PXIInstrumentsDataAcquisition(DAQ)PCIeXtensionsforInstrumentation(PXI)ImageAcquisition(IMAQ)MotionControlReal-Time(RT)PXIPLC(throughOPCServer)PDAModularInstruments,LabVIEWistightlyintegratedwithallNIhardware,inadditiontoconnectingtothousandsofI/Odevicesfromhundredsofdifferentvendors.,10,AnalyzewithLabVIEW,LabVIEWincludesthefollowingtoolstohelpyouanalyzeyourdata:Morethan400measurementanalysisfunctionsforDifferentialEquations,Optimization,CurveFitting,Calculus,LinearAlgebra,Statistics,etc.12newExpressVIsspecificallydesignedformeasurementanalysis,includingfilteringandspectralanalysisSignalProcessingVIsforFiltering,Windowing,Transforms,PeakDetection,HarmonicAnalysis,SpectrumAnalysis,etc.,PowerfulmeasurementanalysisisbuiltintotheLabVIEWdevelopmentenvironment.,11,PresentwithLabVIEW,LabVIEWincludesthefollowingtoolstohelpyoupresentyourdata:OnyourmachineGraphs,Charts,Tables,Gauges,Meters,Tanks,3DControls,PictureControl,3DGraphs(WindowsOnly),ReportGeneration(WindowsOnly)OvertheInternetWebPublishingTools,Datasocket(WindowsOnly),TCP/IP,VIServer,RemotePanels,EmailEnterpriseConnectivityToolsetSQLTools(Databases),InternetTools(FTP,Telnet,HTML),PresentationwithLabVIEWcanbedoneonyourPCoroveranetwork,oryoucantakeadvantageofadditionalapplicationssuchasDIAdem.,12,CourseMap,IntroductiontoLabVIEW,Repetitionnofrontpanelorblockdiagram,35,BlockDiagramNodes,IconExpandableNodeExpandedNode,FunctionGeneratorVISameVI,viewedthreedifferentwaysYellowfielddesignatesastandardVIBluefielddesignatesanExpressVI,36,BlockDiagramTerminals,TerminalsareentryandexitportsthatexchangeinformationbetweenthepanelanddiagramTerminalsareanalogoustoparametersandconstantsintext-basedprogramminglanguagesRight-clickandtoggleViewAsIcontochangetheiconview,37,WiringtheBlockDiagram,Scalar,Numeric,Boolean,String,2DArray,1DArray,Dynamic,38,WiringTechniques,HotSpot,AutomaticWiringUseContextHelpWindowwhenwiringRight-clickwireandselectCleanUpWireTipStripsAutomaticwireroutingRight-clickterminalsandselectVisibleItemsTerminals,Viewtheterminalconnectionstoafunction,39,Blockdiagramexecutesdependentontheflowofdata;blockdiagramdoesNOTexecutelefttorightNodeexecuteswhendataisavailabletoALLinputterminalsNodessupplydatatoalloutputterminalswhendone,DataflowProgramming,40,ContextHelp,TodisplaytheContextHelpwindow,selectHelpShowContextHelp,pressthekeys,orpresstheShowContextHelpWindowbuttoninthetoolbarMovecursoroverobjecttodisplayhelpConnections:RequiredboldRecommendednormalOptional-dimmed,Simple/DetailedContextHelpLockHelpMoreHelp,41,LabVIEWHelp,ClicktheMoreHelpbuttonintheContextHelpwindowSelectHelpVI,Function,dataflowisanimatedusingbubbles.Valuesaredisplayedonwires.,44,DebuggingTechniques,ProbeRight-clickonwireandselectprobeanditshowsdataasitflowsthroughthewiresegmentBreakpointsRight-clickonwireandselectSetBreakpoint;pauseexecutionatthebreakpoint.ConditionalProbeCombinationofabreakpointandaprobe.Right-clickonwireandselectcustomprobe.,45,DebuggingTechniques,StepInto,Over,andOutbuttonsforSingleStepping,ClickonStepIntobuttontoenablesinglesteppingOnceSingleSteppinghasbegun,thebuttonstepsintonodesClickonStepOverbuttontoenablesinglesteppingortostepovernodesClickonStepOutbuttontostepoutofnodes,46,Summary,Virtualinstruments(VIs)havethreemainpartsthefrontpanel,theblockdiagram,andtheiconandconnectorpaneThefrontpanelistheuserinterfaceofaLabVIEWprogramandtheblockdiagramistheexecutablecodeTheblockdiagramcontainsthegraphicalsourcecodecomposedofnodes,terminals,andwiresUseExpressVIs,standardVIsandfunctionsontheblockdiagramtocreateyourmeasurementcode.Forthemostcommonrequirements,useExpressVIswithinteractiveconfigurationdialogstodefineyourapplication.FloatingPalettes:ToolsPalette,ControlsPalette(onlywhenFrontPanelWindowisactive),andFunctionsPalette(onlywhenBlockDiagramWindowisactive)TherearehelputilitiesincludingtheContextHelpWindowandLabVIEWHelp,47,Summary,Placecontrols(inputs)andindicators(outputs)inthefrontpanelwindowUsetheOperatingtooltomanipulatepanelobjects.UsethePositioningtooltoselect,move,andresizepanelobjects.UsetheWiringtooltoconnectdiagramobjectsControlterminalshavethickerbordersthanindicatorterminalsAllfrontpanelobjectshavepropertypagesandshortcutmenusWiringisthemechanismtocontroldataflowandproduceLabVIEWprogramsBrokenRunarrowmeansanonexecutableVIVariousdebuggingtoolsandoptionsavailablesuchassettingprobesandbreakpoints,executionhighlighting,andsinglestepping,48,Tips,CommonkeyboardshortcutsAccessToolsPalettewith-right-clickIncrement/DecrementfasterusingkeyToolsOptionsselectionsetpreferencesinLabVIEWVIProperties(Filemenu),WindowsSunLinuxMacOSRunaVIFindobjectActivateContextHelpwindowRemoveallbrokenwiresClosetheactivewindowTogglebtwnDiagram/PanelWindow,49,Lesson2ModularProgramming,TOPICSSubVIsIconandConnectorPaneUsingSubVIsCreatingaSubVIfromsectionsofaVI,50,LabVIEWHierarchy,SubVI,51,SubVIs,FunctionPseudoCodefunctionaverage(in1,in2,out)out=(in1+in2)/2.0;SubVIBlockDiagram,CallingProgramPseudoCodemainaverage(point1,point2,pointavg)CallingVIBlockDiagram,52,Icon/Connector,AniconrepresentsaVIinotherblockdiagramsAconnectorpassesdatatoandreceivesdatafromasubVIthroughterminals,Icon,Connector,terminals,terminals,53,SubVIExampleCalculatingSlope,AVIwithinanotherVIiscalledasubVITouseaVIasasubVI,createaniconandaconnectorpaneafterbuildingthefrontpanelandblockdiagram,54,CreatingtheIcon,Icon:graphicalrepresentationofaVIRight-clickintheiconpane(PanelorDiagram)Alwayscreateablackandwhiteicon,DefaultIcon,Createacustomicon,55,CreatingtheConnector,Right-clicktheicon(FrontPanelonly),56,CreatingtheConnector-continued,Clickwithwiringtool,57,TheConnectorPane,TerminalcolorsmatchthedatatypestowhichtheyareconnectedClicktheterminaltoseeitsassociatedfrontpanelobject,58,UsingaVIasaSubVI,AllFunctionsSelectaVIDragiconontotargetdiagram,59,HelpandClassifyingTerminals,Classifyinputsandoutputs:RequiredErrorifnoconnectionRecommendedWarningifnoconnectionOptionalNoeffectifnoconnection,60,CreateSubVIOption,EncloseareatobeconvertedintoasubVISelectCreateSubVIfromtheEditMenu,61,Summary,VIscanbeusedassubVIsafteryoumaketheiconandconnectorIconcreatedusingIconEditorConnectordefinedbychoosingnumberofterminalsLoadsubVIsusingtheSelectaVIoptionintheAllFunctionspaletteordraggingtheiconontoanewdiagramOnlinehelpforsubVIsusingtheShowContextHelpoptionDescriptionsdocumentfunctionalityUseCreateSubVIfeaturetoeasilymodularizetheblockdiagram,62,Lesson3RepetitionandLoops,TOPICSWhileLoopsForLoopsAccessingPreviousLoopData,63,WhileLoops,LabVIEWWhileLoopFlowChartPseudoCode,Repeat(code);UntilConditionmet;End;,64,WhileLoops,1.SelectWhileLoop,2.Enclosecodetoberepeated,3.Dropordragadditionalnodesandthenwire,65,SelecttheLoopCondition,ClicktheConditionalTerminalwiththeOperatingtooltodefinewhentheloopstopsDefault:StopifTrue,IterationTerminal,ConditionalTerminal,66,StructureTunnels,Tunnelsfeeddataintoandoutofstructures.Thetunnelisablockthatappearsontheborder;thecoloroftheblockisrelatedtothedatatypewiredtothetunnel.Whenatunnelpassesdataintoaloop,theloopexecutesonlyafterdataarriveatthetunnel.Datapassoutofaloopaftertheloopterminates.,67,ForLoops,LabVIEWForLoopFlowChartPseudoCode,N=100;i=0;Untili=N:Repeat(code;i=i+1);End;,68,ForLoops,InStructuressubpaletteofFunctionspaletteEnclosecodetoberepeatedand/orresizeandaddnodesinsideboundaryExecutesdiagraminsideofloopapredeterminednumberoftimes,Countterminal(Numericalinput),WaitUntilNextmsMultiplefunction,69,WaitFunctions,WaitUntilNextmsMultipleFunctionsTimefirstelementisindex0,31,index10-elementarray,2Darray,Fiverowbysevencolumnarrayof35elements,0123456,0,1,2,3,4,Arrays,82,AddDimensionfor2Darrays,1.SelecttheArrayshellfromtheControlspalette,2.Placedataobjectinsideshell,ArrayControlsandIndicators,83,1.SelectArrayConstantshellfromtheArraysubpalette,2.Placethedataobjectinthearrayshell,CreatingArrayConstants,84,Loopscanaccumulatearraysattheirboundarieswithauto-indexingForLoopsauto-indexbydefaultWhileLoopsoutputthefinalvaluebydefaultRight-clickontunnelandenable/disableauto-indexing,Auto-Indexing,Wirebecomesthicker,Wireremainsthesamesize,Auto-IndexingDisabled,Auto-IndexingEnabled,Onlyonevalue(lastiteration)ispassedoutoftheloop,1DArray,012345,85,InnerloopcreatescolumnelementsOuterloopstacksthemintorows,Creating2DArrays,1DArray,012345,2DArray,86,Auto-IndexInput,AnarrayinputcanbeusedtosettheForLoopcountterminalNumberofel

温馨提示

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

评论

0/150

提交评论