关闭

关闭

封号提示

内容

首页 labview数组和簇的应用教程.pdf

labview数组和簇的应用教程.pdf

labview数组和簇的应用教程.pdf

上传者: 寒江雪 2014-02-23 评分1 评论0 下载1 收藏0 阅读量286 暂无简介 简介 举报

简介:本文档为《labview数组和簇的应用教程pdf》,可适用于IT/计算机领域,主题内容包含wwwnicomExercise:ArraysandClustersOverviewThisexercisewillgooverhowtocreat符等。

wwwnicomExercise:ArraysandClustersOverviewThisexercisewillgooverhowtocreatearraysandclustersYouwillalsolearnabouthowtopassdatatoandfromarraysandhowtobundleandunbundleclustersGoalUnderstandthebasicbehaviorofarraysandclustersintheLabVIEWenvironmentDescription ThisexerciseconsistsofaseriesoftasksinwhichwillwalkyouthroughhowdataispassedtoandfromarraysIndexingarrayswillbeexploredindetailHowtobundledatawillbeexplainedaswellashowtounbundleinformationfromclustersArraysDescriptionYouaregivenaVIandaskedtoenhanceitforavarietyofpurposesForeachpartofthisexercise,beginwiththeArrayInvestigationvilocatedatthebottomofthispageThefrontpanelofthisVIisshowninthefigurebelowThenextfigureshowstheblockdiagramofthisVIThisexerciseisdividedintopartsYouaregiventhescenarioforeachpartfirstRefertotheendofthisexercisefordetailedimplementationinstructionsforeachpartPart : Iterate, Modify, and Graph ArrayModifytheArrayInvestigationVIsothatafterthearrayiscreated,thearrayisindexedintoForLoopswhereyoumultiplyeachelementofthearraybyandcoerceeachelementtothenearestwholenumberGraphtheresultingDarraytoanintensitygraphPart : Simplified Iterate, Modify, and Graph ArrayModifytheArrayInvestigationVIorthesolutionfromParttoaccomplishthesamegoalswithoutusingthenestedForLoopsPart : Create Subset ArraysModifytheArrayInvestigationVIsothattheVIcreatesanewarraythatcontainsthecontentsofthethirdrow,andanothernewarraythatcontainsthecontentsofthesecondcolumnPart : ImplementationModifytheArrayInvestigationVIsothatafterthearrayiscreated,thearrayisindexedintoForLoopswhereyoumultiplyeachelementofthearraybyandcoerceeachelementtothenearestwholenumberGraphtheresultingDarrayonanintensitygraphOpenlocatedatthebottomofthispageArray InvestigationviSavetheVIasArray Investigation Part viAddantothefrontpaneloftheVIandautoscaletheXandYaxes,asshowninthefigurebelowToautoscaletheaxes,rightclicktheintensitygraphandselectintensity graphXandScaleAutoScale XY ScaleAutoScale Y:Document TypeTutorial:YesNI Supported:Jul,Publish DatewwwnicomOpentheblockdiagramoftheVIInthefollowingsteps,youcreateablockdiagramsimilartothenextfigureIteratetheArrayAddatotherightoftheexistingcodeFor LoopAddasecondinsidethefirstFor LoopFor LoopWiretheterminaltotheinteriorborderThiscreatesanautoindexedinputtunnelonbothForLoopsarray indicatorFor LoopMultiplyeachelementofthearraybyAddafunctiontotheinteriorMultiplyFor LoopWiretheindexedinputtunneltotheinputofthefunctionxMultiplyRightclicktheinputandselectfromtheshortcutmenuyCreateConstantEnterintheconstantRoundeachelementtothenearestwholenumberAddafunctiontotherightofthefunctionRound To NearestMultipleWiretheoutputofthefunctiontotheinputofthefunctionMultiplyRound To NearestCreateaDarrayontheoutputoftheForLoopstorecreatethemodifiedarrayWiretheoutputofthefunctiontotheouterThiscreatesanautoindexedoutputtunnelonbothForLoops Round To NearestFor LoopWiretheoutputarraytotheindicatorIntensity GraphSwitchtothefrontpanelSavetheVIEntervaluesforRowsandColumnsRuntheVIPart : ImplementationModifyParttoaccomplishthesamegoalswithoutusingthenestedForLoopsOpenifitisnotstillopenArray Investigation Part viSavetheVIas Array Investigation Part viOpentheblockdiagramRightclicktheborderoftheinteriorForLoop,containingthefunctionandthefunction,andselectMultiplyRound to NearestRemove For LoopwwwnicomRightclicktheborderoftheremainingandselectfromtheshortcutmenuYourblockdiagramshouldresemblethefigurebelowFor LoopRemove For LoopSavetheVISwitchtothefrontpanelEntervaluesforRowsandColumnsRuntheVINoticethattheVIbehavesthesameasthesolutionforPartThisisbecausemathematicalfunctionsarepolymorphicForexample,becausetheinputoftheMultiplyfunctionisaxtwodimensionalarray,andtheinputisascalar,thefunctionmultiplieseachelementinthearraybythescalar,andoutputsanarrayofthesamedimensionastheinputyMultiplyxPart : ImplementationModifyArrayInvestigationVIsothattheVIcreatesanewarraythatcontainsthecontentsofthethirdrow,andanothernewarraythatcontainsthecontentsofthesecondcolumnOpenlocatedatthebottomofthispageArray InvestigationviSavetheVIasArrayInvestigation Part viOpentheblockdiagramoftheVIInthefollowingsteps,youbuildablockdiagramsimilartothatshowninthenextfigureRetrievethethirdrowofdatafromArrayusingtheIndexArrayfunctionAddthefunctiontotheblockdiagramIndex ArrayWiretotheinputofthefunctionArrayarrayIndex ArrayTip:TheIndexArrayfunctionacceptsanndimensionalarrayAfteryouwiretheinputarraytotheIndexArrayfunction,theinputandoutputterminalnameschangetomatchthedimensionofthearraywiredTherefore,wiretheinputarraytotheIndexArrayfunctionbeforewiringanyotherterminalsRightclicktheinputoftheIndexArrayfunctionindex(row)SelectfromtheshortcutmenuCreateConstantEnterintheconstanttoretrievethethirdrowRememberthattheindexbeginsatzeroRightclicktheoutputofthefunctionsubarrayIndex ArraySelectfromtheshortcutmenu CreateIndicatorNametheindicatorThird RowRetrievethesecondcolumnofdatafromtheArrayusingtheIndexArrayfunctionAddanotherfunctiontotheblockdiagramIndex ArrayWiretotheinputofthefunctionArrayarrayIndex ArrayRightclicktheinputofthefunctiondisable index(col)Index ArraySelectCreateConstantEnterintheconstanttoretrievethesecondcolumnbecausetheindexbeginsatzeroRightclicktheoutputofthefunctionsubarrayIndex ArraySelectCreateIndicatorNametheindicatorSecond ColumnSavetheVIwwwnicomSwitchtothefrontpanelEntervaluesforRowsandColumnsRuntheVIClustersOpenablankVISavetheVIasCluster ExperimentviInthefollowingsteps,youcreateafrontpanelsimilartothefigurebelowAddaStothefrontpanelwindowtop buttonAddaNindicatortothefrontpanelwindowumericAddatothefrontpanelRound LEDRenametheLEDBoolean Createaclusternamed,containingaClusternumeric control, two toggle switches, and a slide controlAddatothefrontpanelCluster ShellAddacontroltotheclusterNumericAddtwototheclusterVertical Toggle SwitchesRenametheBooleantoggleswitchesto Boolean AddatotheclusterHorizontal Fill SlideCreate,containingthesamecontentsasCluster,butindicatorsinsteadofcontrolsModified ClusterCreateacopyofClusterRelabelthecopyModified ClusterRightclicktheshellof,andselectfromtheshortcutmenuModified ClusterChange to IndicatorCreate,containingaandaSmall ClusterBoolean indicatornumeric indicatorCreateacopyofModified ClusterRelabelthecopySmall ClusterDeletethesecondtoggleswitchDeletethehorizontalfillslideindicatorRightclickSmallClusterandselectAutosizingSize to FitRelabelthenumericindicatortovalueSlideResizetheclusterasneededVerifytheclusterorderofCluster, Modified Cluster, and Small ClusterRightclicktheboundaryofandselectfromtheshortcutmenuClusterReorder Controls in ClusterwwwnicomConfirmtheclusterordershowninthefigurebelowClickthebuttononthetoolbartosettheclusterorderandexittheclusterordereditmodeConfirmRightclicktheboundaryofandselectfromtheshortcutmenuModified ClusterReorder Controlsin ClusterConfirmtheclusterordersshowninthefigurebelowshouldhavethesameclusterorderasModified ClusterClusterClickthebuttononthetoolbartosettheclusterorderandexittheclusterordereditmodeConfirmRightclicktheboundaryofandselectfromtheshortcutmenuClickthebuttononthetoolbartosettheclusterorderandexittheclusterorderSmall ClusterReorder Controls in ClusterOKeditmodeConfirmtheclusterordersshowninthefigurebelowInthefollowingsteps,buildtheblockdiagramshowninthenextfigureAddthefromtheStructurespalettetotheblockdiagramWhile LoopDisassembleClusterAddthefunctiontotheblockdiagramUnbundleWiretotheinputofthetoresizethefunctionautomaticallyClusterUnbundle functionAssembleSmallClusterAddthefunctiontotheblockdiagramBundleWirethefunctionasshowninthefigureaboveBundleAssembleModifiedClusterAddthefunctiontotheblockdiagramUnbundle by NameWirethetothefunctionClusterUnbundle by NameResizethefunctiontohavetwooutputterminalsUnbundle by NameSelectinthefirstnode,andinthesecondnodeIfalabelnameisnotcorrect,usetheOperatingtooltoselectthecorrectitemNumericBoolean AddthefunctiontotheblockdiagramIncrementWiretheoutputofthefunctiontotheinputofthefunctionThisfunctionaddsonetothevalueofNumeric Unbundle By NameIncrementNumericAddthefunctiontotheblockdiagramNotWiretheoutputofthefunctiontotheinputofthefunctionThisfunctionreturnsthelogicaloppositeofthevalueofBooleanBooleanUnbundle By NamexNotwwwnicomAddthefunctiontotheblockdiagramBundle by NameWiretotheinputClusterinput clusterResizethisfunctiontohavetwoinputterminalsSelectinthefirstnodeandinthesecondnodeIfalabelnameisnotcorrect,usethetooltoselectthecorrectitemNumericBooleanOperatingWiretheoutputofthefunctiontoIncrementNumericWiretheoutputofthefunctiontoNotBooleanWiretheoutputofthefunctiontotheindicatorBundle By NameModified ClusterAddafunctiontoprovidetheprocessorwithtimetocompleteothertaskswaitAddthefunctiontotheblockdiagramWait Until Next ms MultipleRightclicktheterminalofthefunctionmillisecondmultipleWait Until Next ms MultipleSelectfromtheshortcutmenuCreateConstantEnterintheconstantCompletetheblockdiagramandwiretheobjectsasshowninthepreviousfigureSavetheVIDisplaythefrontpanelRuntheVIEnterdifferentvaluesinClusterandnoticehowvaluesenteredinClusteraffecttheModifiedClusterandSmallClusterindicatorsIsthisthebehavioryouexpectedClicktheStopbuttonwhenyouaredoneChangetheclusterorderofModifiedClusterRuntheVIHowdidthechangedorderaffectthebehaviorClosetheVIDonotsavechangesTutorialVideoArrays,Clusters,andTextBasedNodesModulesHomeFIRSTCommunityDownloadsarrayinvestigationviarrayinvpartsolutionviclusterexpsolutionviarrayinvpartsolutionviarrayinvpartsolutionviLegalThistutorial(this"tutorial")wasdevelopedbyNationalInstruments("NI")AlthoughtechnicalsupportofthistutorialmaybemadeavailablebyNationalInstruments,thecontentinthistutorialmaynotbecompletelytestedandverified,andNIdoesnotguaranteeitsqualityinanywayorthatNIwillcontinuetosupportthiscontentwitheachnewrevisionofrelatedproductsanddriversTHISTUTORIALISPROVIDED"ASIS"WITHOUTWARRANTYOFANYKINDANDSUBJECTTOCERTAINRESTRICTIONSASMORESPECIFICALLYSETFORTHINNICOM'STERMSOFUSE()http:nicomlegaltermsofuseunitedstatesus

类似资料

该用户的其他资料

基于ZigBee的数据采集系统.pdf

基于LabVIEW与USB接口的实时数据采集系统.pdf

CH374DS1.pdf

高精度AD转换器AD7705_06在单片机数据采集系统中的应用.pdf

基于单片机的数据采集与近距离无线传输系统.pdf

职业精品

精彩专题

结婚彩礼真有那么重要吗?

原创于西周而后沿袭至今的彩礼,虽然被一部分家长奉为圭臬,但越来越多的年轻人对结婚必须要彩礼不以为然。彩礼引发的社会矛盾越来越受到关注,结婚是自己的事,如人饮水冷暖自知,至于要不要彩礼或者要多少彩礼,因人而异,因财力而已,不可一概而论。

用户评论

0/200
    暂无评论
上传我的资料

精选资料

热门资料排行换一换

  • 组织生活会.doc

  • 生产成本的核算.doc

  • 林武樟心易占卜执业课程.doc

  • 中文版 EN285 灭菌-蒸汽灭…

  • 承兑汇票背书粘贴单.doc

  • 道门点穴绝技医疗.doc

  • [DOC]-产妇月子食谱大全&#…

  • [考试]《金符经》.doc

  • 国学基础知识100题.doc

  • 资料评价:

    / 6
    所需积分:1 立即下载

    意见
    反馈

    返回
    顶部