Remote Connectivity Demo Script labview移动化教程.docx

上传人:b****7 文档编号:9625278 上传时间:2023-02-05 格式:DOCX 页数:29 大小:1.92MB
下载 相关 举报
Remote Connectivity Demo Script labview移动化教程.docx_第1页
第1页 / 共29页
Remote Connectivity Demo Script labview移动化教程.docx_第2页
第2页 / 共29页
Remote Connectivity Demo Script labview移动化教程.docx_第3页
第3页 / 共29页
Remote Connectivity Demo Script labview移动化教程.docx_第4页
第4页 / 共29页
Remote Connectivity Demo Script labview移动化教程.docx_第5页
第5页 / 共29页
点击查看更多>>
下载资源
资源描述

Remote Connectivity Demo Script labview移动化教程.docx

《Remote Connectivity Demo Script labview移动化教程.docx》由会员分享,可在线阅读,更多相关《Remote Connectivity Demo Script labview移动化教程.docx(29页珍藏版)》请在冰豆网上搜索。

Remote Connectivity Demo Script labview移动化教程.docx

RemoteConnectivityDemoScriptlabview移动化教程

 

LabVIEW

RemoteConnectivitywithLabVIEW

DemoScriptVersion1.0,February2013

GrantHeimbach,LabVIEWProductMarketingManager

grant.heimbach@

512-683-5862(work)

512-944-0128(personalcell)

 

RemoteFrontPanelDemo2

DataDashboardDemo7

HTML/JavascriptDemo16

MoreInformation24

TodownloadacopyofthismanualandthelatestversionofLabVIEWcodereferencedintheexercises,pleasevisit:

andsearchforthepresentationtitle.

RemoteFrontPanelDemo

Goal/目标

TheprimarypurposeofthisdemoistoshowhoweasyitistocreateaRemoteFrontPanelandhowitfunctions./最初目的用于如何容易地创建出远程前面板并使用其功能

Scenario/方案

Thepresentation/陈诉justtalkedthroughthebasicscenariooflocalmonitoring.AquickandeasyoptionispreferredsoRemoteFrontPanelswerethebestsolutioninthisscenario.Thefictional/虚构的customerinthescenariohasanexistingapplicationandwewillbebuildingaRemoteFrontPanelforitsoitcanberemotelyinteractedwith.

ConceptsCovered

∙SettingupLabVIEWenvironmentaloptionsforRemoteFrontPaneluse

∙StartingfromoneofthenewSampleProjectsinLabVIEW2012

∙CreatingaRemoteFrontPanelfromaMainVIwithinaproject

∙Talkingtothepoint(notshowing)howitcouldthenbebuiltintoanexecutable/可执行的ortransferredtoareal-timeoperatingsystem

Setup

∙TheRemoteFrontPanelserverintheLabVIEWenvironmentaloptionsneedstobeturnedonandLabVIEWrestartedafterenablingit.Leaveallthedefaultsettingsandjustclickthecheckbox.

∙Createanewinstance/实例oftheContinuousMeasurementandLoggingSampleProjectinLabVIEW2012(orlater).CallitwhateveryouwouldlikebuthavetheLabVIEWprojectopenandreadybeforebeginningthepresentation.WewillbeshowinghowtheSampleProjectfunctionsandcreatingtheRemoteFrontPanelfortheMainVI.

1.ShowhowtoenabletheRemotePanelserverintheLabVIEWenvironmentaloptions

a.OpenLabVIEWandgotoTools>>Options

b.GototheWebServercategory

c.Showthe“EnableRemotePanelServer”checkboxisenabled(thisjustbedonebeforethepresentation)

d.LeavetheotheroptionsasdefaultbutthisiswhereyouwouldchangetheportthatitusestocommunicatethroughorenableSSLsecurity.

2.ShowhowtheContinuousMeasurementandLoggingSampleProjectworks

a.OpentheMain.VIfromtheproject

b.Showtheblockdiagramtoexplainthatthisisascalable/可升级的andcustomizablearchitecture/可重用结构

c.RuntheVIandhittheStartbuttontogetthesinewaveonthegraphandthenclicktheStopbutton

d.ClicktheSettingsbuttonandchangefromSignalTypefromSineWavetoSquarewithNoiseandthenclicktheStartbuttonagaintoshowtheothersignal.

e.ClicktheStopbuttonandthentheExitbuttontostoptheVIfromrunningbutleavethefrontpanelopen.

3.CreatetheRemoteFrontPanelhtmlpagethatwillbeinteracted/沟通,交流withremotely

a.FromtheMain.VIfrontpanel,gotoTools>>WebPublishingTool.Thiswizardwillwalkthroughthestepsofscrapingthefrontpanelandcreatingcorresponding/对应的HTMLcodeforyou.

b.UndertheVINamedropdown,selecttheMain.VIintheprojectfileinstance.Youcanrunintoproblemsifyoudon’topentheMain.VIfromtheprojectfileandthenchooseitfromthedropdown.IfyoujustcreateaRemoteFrontPanelbyopeningaVIondiskandgoingthroughthewizard,LabVIEWisn’tawareofallthedependencies/属性needed.OpeningitfromtheLabVIEWprojectgetsaroundthisissue.

c.PointoutthedifferentViewingModeoptions.Embeddedisformonitoringandcontrol.Snapshotwilljustshowastaticimageofthefrontpanel.MonitordoesthesamethingasSnapshotbutautomaticallyrefreshesthebrowseratgiveninteveralstogetnewinformation.PointoutthattheHelpbuttonhasreallygoodhelpforcreatingRemoteFrontPanels.Leaveallthesettingsasdefault(i.e.Embedded)andclickNext.

d.Onthenextpage,youcanchangetheTitle,Header,andFooterifyouwanttoandseeitupdateinthepreviewwindowbutIleaveitasdefaultandmoveon.

e.Onthenextpage,pointoutthatthelocaldirectorybeingusedbydefaultisthe“www”folder.ThisisspecifiedintheTools>>Options>>WebServercategorythatweshowedearlier.TheRemotePanelserverissetuptolookinthe“www”folderbydefaultsojustchangetheenvironmentalsettingsyouwanttostoretheHTMLfileinadifferentlocation.IfyoumovetheHTMLfilefromthefolderthattheRemotePanelServerislookingforthenitwon’twork.Thefilenameshouldbeleftasdefault.PointoutthatthefilenamereferencesthatMain.VIisinaProjectunderMyComputer.IfaVIwasopenedfromthelocaldiskinsteadoffromaproject(anditneededotherfileswithintheprojecttorun),thisformattingwouldneedtobeaddedmanuallytothefilenamesectionfortheRemoteFrontPaneltowork.ThisiswhyopeningtheVIintheprojectisbetterbecauseLabVIEWhandlesitforyou.TheURLiscreatedfromthefilenameandisnotcustomizable.ClicktheSavetoDiskbuttonandthentheConnectbutton.

f.SincetheMain.VIshouldstillbeopenfrombefore(andthereforeinmemory),theRemoteFrontPanelshouldshowthefrontpanelinthebrowser.IfitsaysthattheVIisnotinmemorythenopentheMain.VIfromthesampleprojectandrefreshthebrowser.RuntheVIagainandshowthatthewebbrowserisupdatingwithinformation.TrytoclicktheStopbuttoninthewebbrowserandshowyoucannotpressit.Right-clickontheRemoteFrontPanelandchoose“RequestControlOfVI”.YoucannowclicktheStopbuttonandotherwiseinteractwiththeVIremotely.ShowtheMain.VIfrontpanelanditsmessagethatcontrolhasbeentransferred.Ifauserdoesn’twantpeopletocontroltheVI,thentheycanright-clickontheMain.VIandchoose“LockControl”whileitisrunningoruseSnapshotorMonitoroptionsinsteadofEmbedded.IfsomeoneelseiscontrollingtheVIwhenyourequestcontrol,theywillgetamessageaskingwhethertheywanttotransfercontrolandtoclickyesorno.

g.IfsomeoneelseonthenetworkwantedtointeractwiththeMain.VI,theywouldjustchangetheURLtopointtothemachineIPAddresswheretheHTMLfileandRemotePanelServerwere.

h.IfsomeonewantedtocreatethisforacRIO,thenyouwouldaddittotheprojectfileunderthetargetinformation,configuretheremotepanelserveronthecRIObyright-clickingonthetargetandgoingintoProperties,andthenbuildthereal-timeexecutablewiththeHTMLfileintheAlwaysIncludedsection.TheRemotePanelServersoftwarecomponentwouldneedtobeinstalledonthecRIOthroughMAX(normalsoftwareinstallwizard).Thereisatutorialonwalkingthroughthesestepssocustomerscanjustsearchfor“real-timeremotefrontpanel”tofinditlater

i.IMPORTANT:

TellcustomersthatremotefrontpanelslicensesarenolongerneededinLabVIEW2012andlater.Beforeyouhavetopurchaseextralicensesforeverytabthatwasopenatatime.ThisshouldbewellreceivednewsfromanycustomersthathavedealtwithRemoteFrontPanelsinthepast.

 

DataDashboardDemo

Goal

TheprimarypurposeofthisdemoistoshowhowwebservicesarecreatedandoperateandalsohowDataDashboardcaninteractwithrunningLabVIEWcode

Scenario

Thepresentationjusttalkedthroughtheremoteaccessscenario.SomethingsecurebutstillrelativelyeasytocreatewaspreferredsoLabVIEWWebServicesandDataDashboardwaschosen.ThefictionalcustomerhasanexistingLabVIEWapplicationthatwe’lladdawebservicetoandthenlinkDataDashboardtothat.

ConceptsCovered

∙SettingupLabVIEWenvironmentaloptionsforLabVIEWWebServiceuse

∙CreatingaLabVIEWWebServicethatcanhandlerequestsfromtheoutsideworldandcommunicatewiththeseparaterunningLabVIEWcode

∙CreatingadashboardinDataDashboardthatcaninteractwithaLabVIEWWebService

∙Talkingtothepoint(notshowing)howwebservicescouldrunonreal-timetargetsorbuiltintoanexecutable.

Setup

∙TheWebserverintheLabVIEWenvironmentaloptionsneedstobeturnedonandwholecomputerrestartedifit’snotalreadyturnedon.GotoTools>>Options>>WebServerinLabVIEWandthenclicktheConfigureWebApplicationServerbutton.ThiswillopentheWebInterface(thisiswhattheoverallsettingspageiscalled)whereyoucanconfiguretheserver.

∙GototheWebServerConfigurationpage(clickthebuttonontheleftthathasaPCandGlobeimage).ClicktheLoginbuttoninthetoprightcornerandputintheusername“admin”andleavethepasswordblank.MakesurethattheSystemWebServerandtheApplicationWebServerareEnabledandiftheyarenotthendoso.Leavetheothersettingsasdefault.AfterEnablingforthefirsttime,youwillbepromptedtorestartthecomputer.Keepthispageopenaswewillbeshowingittocustomersduringthisdemo.

∙MakesurethattheiPadissetupproperlyandthedashboardhasbeenimported.IfyouopentheDataDashboardappontheiPad.IfyouclicktheNIcloudiconatthetopandthenclicktheManagemyAccountbutton.Usetheusernamedatadashboard.nic@andthepassword“welcomenic”.Oncetheaccountissignedin,clicktheNIcloudiconagainandchooseImportfromNICloudandthenimporttheDataDashboardDemodashboard.

1.ShowhowtoenablethewebserverthroughtheLabVIEWenvironmentaloptionsandtheWebInterface

a.OpenLabVIEWandgotoTools>>Options

b.GototheWebServercategory

c.Clickthe“ConfigureWebApplicationServer”buttontoopentheWebInterface.Thiscanalsobeaccessedbytypinghttp:

//localhost:

3580intothewebbrowser.

d.Showthateverythingisenabledandthewebserverp

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 医药卫生 > 预防医学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1