Post on 30-Jan-2018
UniversityCollegeofSoutheastNorway
http://home.hit.no/~hansha
WirelessDataAcquisitioninLabVIEW
Hans-PetterHalvorsen,2016.10.31
ii
PrefaceIt'snotjustphonesandcomputersthatcancommunicatewirelesslywiththeoutsideworld.Wirelesssensorsappearbothinmedicine,inbuildingsandespeciallyinindustrialapplications.
Itisdevelopedmorestandardizedradionetworkforwirelesssensors.Zigbeeisprobablythemostfamous,wheremorethan300largeandsmallcompaniesworkingtodevelopsolutions.Forindustrialuserequiresspecialsafetyrequirements.Radionetworkmusthavesufficientcoveragetoobtainanacceptableerrorrate.Thenetworkshouldhaveredundancysothattherandomoutcomecanberepairedautomatically.Itisachievedinthatmessagescangoseveralwaysfromthesensorstothecenters.Also,thenetworkforerrorhandlinganderrorcorrectionsothatrandomerrorsarecorrected.BecauseoftheserequirementsithasbeenshownthatZigBeeisnotalwayssuitableforuseintheindustrialcontext.Thisparticularlyappliesitinprocesscontrol,whereresistancetoelectromagneticnoiseandencryptionofthesignalsisimportant.
AwirelessstandardspecificallydesignedtosatisfyindustrialrequirementsisWirelessHART.ThisisbasedonthesamephysicalradiotechnologysuchasZigBee,butspecifiesadditionalfrequencyhoppingtomitigateinterference,betterencryptionandthatprovidesforlowerpowerconsumption.
Currently,thewirelesssensorshavebeenusedformonitoring,whereahumanoperatormustdecidewhethertheprocessparametersshouldbechangedornot.Theobjectiveisthatthetechnologywillprovetoberobustenoughtoalsobeusedtoprocesscontrolwherethechangesintheindustrialprocessesshouldhappenautomaticallywithouthumanintervention.Thiswillbethenextmajorchallengeforsystemsbasedonwirelesstechnology.
Wirelesstechnologyhasmanypotentialbenefitsforremotemonitoringapplications;however,ithasbeenslowtoseeadoptioninindustrybecauseofthecomplexitiesofprogramminganddeployingareliable,secure,andhigh-performancewirelesssystem.NIWi-Fidataacquisition(DAQ)devicesmeetthesechallengesbycombiningIEEE802.11wirelessorEthernetcommunication,directsensorconnectivity,andtheflexibilityofNILabVIEWsoftware.
SomeApplicationAreasforWirelesstechnologysuchasWi-Fimonitoring:
http://home.hit.no/~hansha
Challengeswithwirelessdataacquisitiontechnology:
• Proprietaryprotocolsandnetworkhardware• IncompleteI/Oofferings• High-speedwaveformmeasurements• Lackofinteroperabilitybetweensuppliers• Integrationwithexistingwiredsystems• Non-standardvendor-definedsolutions
NationalInstruments(NI),thevendoroftheLabVIEWprogrammingenvironmentdeliversseveralsolutionsforwirelessmonitoringanddataacquisition.
NIWi-Fidataacquisition(NIWi-FiDAQ)devicescombineIEEE802.11b/gwirelessorEthernetcommunication,directsensorconnectivity,andtheflexibilityofNI-DAQmxsoftwareforremotemonitoringofelectrical,physical,mechanical,andacousticsignals
http://home.hit.no/~hansha
Thisdocumentintroduceswirelessdataacquisitionfeaturesandteachesyouhowyoucansimplifywirelessremotemeasurementswithoutcompromisingonthesecurityorperformanceofacableddataacquisitionsolution.
v
TableofContentsPreface......................................................................................................................................ii
TableofContents......................................................................................................................v
1 WirelessTechnology.........................................................................................................1
1.1 Bluetooth....................................................................................................................2
1.2 WirelessUSB...............................................................................................................3
1.3 ZigBee(IEEE802.15.4)................................................................................................4
1.4 Wi-Fi(IEEE802.11)......................................................................................................5
2 WirelessSensorNetwork(WSN).......................................................................................1
2.1 WirelessStandards.....................................................................................................1
2.1.1 ZigBee(IEEE802.15.4).........................................................................................2
2.1.2 IEEE802.11..........................................................................................................3
2.1.3 WirelessHART......................................................................................................3
2.2 WirelessMeshNetwork(WMN).................................................................................4
3 IntroductiontoLabVIEW...................................................................................................6
3.1 Dataflowprogramming...............................................................................................6
3.2 Graphicalprogramming..............................................................................................6
3.3 Benefits.......................................................................................................................7
4 IntroductiontoDataAcquisition(DAQ)............................................................................8
4.1 IntroductiontoDAQ-DataAcquisition......................................................................8
4.1.1 Physicalinput/outputsignals..............................................................................9
4.1.2 DAQdevice/hardware.........................................................................................9
4.1.3 Driversoftware..................................................................................................10
4.1.4 Yoursoftwareapplication(Applicationsoftware).............................................11
vi TableofContents
Tutorial: Wireless Data Acquisition in LabVIEW
4.2 MAX–MeasurementandAutomationExplorer......................................................11
4.3 NI-DAQmx.................................................................................................................12
4.3.1 DAQAssistant....................................................................................................13
5 IntroductiontoWirelessDataAcquisition......................................................................14
6 NIWirelessDAQDevices.................................................................................................17
6.1 NIWLS-9234.............................................................................................................18
6.2 NIWAP-3701............................................................................................................19
6.3 NIUES-3880..............................................................................................................20
6.4 PS-5PowerSupply....................................................................................................21
7 NIWSNDevices...............................................................................................................22
7.1 Devices......................................................................................................................24
7.1.1 NIWSN-9791-WSNEthernetGateway............................................................24
7.1.2 NIWSN-3212-ThermocoupleInputNode........................................................24
7.1.3 NIWSN-3202-AnalogInputNode....................................................................25
7.2 LabVIEWDrivers.......................................................................................................25
1
1 WirelessTechnologyWirelesstechnologyandwirelessnetworksarewidelyusedtoday,butit’squitenewinindustrialautomationsystems.
[www.ni.com]
Therearedifferenttechnologiesandwirelessstandardsavailable:
• Bluetooth• WirelessUSB• ZigBee(IEEE802.15.4)• Wi-Fi(IEEE802.11)
2 WirelessTechnology
Tutorial: Wireless Data Acquisition in LabVIEW
Differentwirelesstechnologies:
[www.ni.com]
TheFigurebelowcomparethedifferentwirelesstechnologies:
[www.ni.com]
Wi-FiandZigBeearetheprimarywirelesstechnologiesformeasurementandcontrolsystems.
1.1 Bluetooth
3 WirelessTechnology
Tutorial: Wireless Data Acquisition in LabVIEW
[www.ni.com]
1.2 WirelessUSB
[www.ni.com]
4 WirelessTechnology
Tutorial: Wireless Data Acquisition in LabVIEW
1.3 ZigBee(IEEE802.15.4)
[www.ni.com]
[www.ni.com]
5 WirelessTechnology
Tutorial: Wireless Data Acquisition in LabVIEW
1.4 Wi-Fi(IEEE802.11)
[www.ni.com]
1
2 WirelessSensorNetwork(WSN)Source:www.wikipedia.org
Awirelesssensornetwork(WSN)consistsofspatiallydistributedautonomoussensorstocooperativelymonitorphysicalorenvironmentalconditions,suchastemperature,sound,vibration,pressure,motionorpollutants.
Thedevelopmentofwirelesssensornetworkswasmotivatedbymilitaryapplicationssuchasbattlefieldsurveillance.Theyarenowusedinmanyindustrialandcivilianapplicationareas,includingindustrialprocessmonitoringandcontrol,machinehealthmonitoring,environmentandhabitatmonitoring,healthcareapplications,homeautomation,andtrafficcontrol.
Inadditiontooneormoresensors,eachnodeinasensornetworkistypicallyequippedwitharadiotransceiverorotherwirelesscommunicationsdevice,asmallmicrocontroller,andanenergysource,usuallyabattery.
[Wikipedia]
TheapplicationsforWSNsarevaried,typicallyinvolvingsomekindofmonitoring,tracking,orcontrolling.Specificapplicationsincludehabitatmonitoring,objecttracking,nuclearreactorcontrol,firedetection,andtrafficmonitoring.Inatypicalapplication,aWSNisscatteredinaregionwhereitismeanttocollectdatathroughitssensornodes.
2.1 WirelessStandards
Severalstandardsarecurrentlyeitherratifiedorunderdevelopmentforwirelesssensornetworks.ZigBeeisaproprietarymesh-networkingspecificationintendedforusessuchas
2 WirelessSensorNetwork(WSN)
Tutorial: Wireless Data Acquisition in LabVIEW
embeddedsensing,medicaldatacollection,consumerdevicesliketelevisionremotecontrols,andhomeautomation.Zigbeeispromotedbyalargeconsortiumofindustryplayers.WirelessHARTisanextensionoftheHARTProtocolandisspecificallydesignedforIndustrialapplicationslikeProcessMonitoringandControl.
[www.ni.com]
2.1.1 ZigBee(IEEE802.15.4)
ZigBeeisalow-cost,low-power,wirelessmeshnetworkingproprietarystandard.Thelowcostallowsthetechnologytobewidelydeployedinwirelesscontrolandmonitoringapplications,thelowpower-usageallowslongerlifewithsmallerbatteries,andthemeshnetworkingprovideshighreliabilityandlargerrange.
3 WirelessSensorNetwork(WSN)
Tutorial: Wireless Data Acquisition in LabVIEW
[www.ni.com]
ReadmoreaboutZigBee:
ZigBeeAlliance:http://www.zigbee.org/
Wikipedia:http://en.wikipedia.org/wiki/ZigBee
2.1.2 IEEE802.11
WirelessDAQProductsformNationalInstrumentsusetheWi-FiIEEE802.11standard.
NIWSNMeasurementSystemsusetheZigBee(IEEE802.15.4)standard.
ReadmoreaboutwirelesstechnologyandproductsfromNationalInstruments:
NIWirelessDataAcquisition:http://sine.ni.com/np/app/main/p/ap/daq/lang/en/pg/1/sn/n17:daq,n24:Wireless
NIWirelessRemoteMonitoring:http://www.ni.com/wireless/remote_monitoring.htm
NIWirelessDevices:http://www.ni.com/wireless/
NIWirelessSensorNetworks:http://www.ni.com/wsn/
2.1.3 WirelessHART
WirelessHARTisanopen-standardwirelessnetworkingtechnologydevelopedbyHARTCommunicationFoundation.
4 WirelessSensorNetwork(WSN)
Tutorial: Wireless Data Acquisition in LabVIEW
Developedasamulti-vendor,interoperablewirelessstandard,WirelessHARTwasdefinedspecificallyfortherequirementsofProcessfielddevicenetworks
ReadmoreaboutWirelessHART:
HARTCommunicationFoundation:http://www.hartcomm.org/
Wikipedia:http://en.wikipedia.org/wiki/WirelessHART
2.2 WirelessMeshNetwork(WMN)
Meshnetworkingisatypeofnetworkingwhereeachnodeinthenetworkmayactasanindependentrouter,regardlessofwhetheritisconnectedtoanothernetworkornot.Itallowsforcontinuousconnectionsandreconfigurationaroundbrokenorblockedpathsby“hopping”fromnodetonodeuntilthedestinationisreached.Ameshnetworkwhosenodesareallconnectedtoeachotherisafullyconnectednetwork.Meshnetworksdifferfromothernetworksinthatthecomponentpartscanallconnecttoeachotherviamultiplehops.
Awirelessmeshnetwork(WMN)isacommunicationsnetworkmadeupofradionodesorganizedinameshtopology.Wirelessmeshnetworksoftenconsistofmeshclients,meshroutersandgateways.Themeshclientsareoftenlaptops,cellphonesandotherwirelessdeviceswhilethemeshroutersforwardtraffictoandfromthegatewayswhichmaybutneednotconnecttotheInternet.Thecoverageareaoftheradionodesworkingasasinglenetworkissometimescalledameshcloud.Accesstothismeshcloudisdependentontheradionodesworkinginharmonywitheachothertocreatearadionetwork.Ameshnetworkisreliableandoffersredundancy.Whenonenodecannolongeroperate,therestofthenodescanstillcommunicatewitheachother,directlyorthroughoneormoreintermediatenodes.
Wirelessmesharchitectureisafirststeptowardsprovidinghigh-bandwidthnetworkoveraspecificcoveragearea.Wirelessmesharchitecture’sinfrastructureis,ineffect,arouternetworkminusthecablingbetweennodes.It'sbuiltofpeerradiodevicesthatdon'thavetobecabledtoawiredportliketraditionalWLANaccesspoints(AP)do.Mesharchitecturesustainssignalstrengthbybreakinglongdistancesintoaseriesofshorterhops
BelowweseeanexampleofaWirelessMeshTopology:
5 WirelessSensorNetwork(WSN)
Tutorial: Wireless Data Acquisition in LabVIEW
WirelessMessNetworks(WMN)iswidelyusedinWirelessSensorNetworks(WSN).
[www.ni.com]
6
3 IntroductiontoLabVIEWSources:www.Wikipedia.org,www.ni.com
LabVIEW(shortforLaboratoryVirtualInstrumentationEngineeringWorkbench)isaplatformanddevelopmentenvironmentforavisualprogramminglanguagefromNationalInstruments.Thegraphicallanguageisnamed"G".OriginallyreleasedfortheAppleMacintoshin1986,LabVIEWiscommonlyusedfordataacquisition,instrumentcontrol,andindustrialautomationonavarietyofplatformsincludingMicrosoftWindows,variousflavorsofUNIX,Linux,andMacOSX.VisitNationalInstrumentsatwww.ni.com.
Thecodefileshavetheextension“.vi”,whichisaabbreviationfor“VirtualInstrument”.LabVIEWofferslotsofadditionalAdd-OnsandToolkits.
3.1 Dataflowprogramming
TheprogramminglanguageusedinLabVIEW,alsoreferredtoasG,isadataflowprogramminglanguage.Executionisdeterminedbythestructureofagraphicalblockdiagram(theLV-sourcecode)onwhichtheprogrammerconnectsdifferentfunction-nodesbydrawingwires.Thesewirespropagatevariablesandanynodecanexecuteassoonasallitsinputdatabecomeavailable.Sincethismightbethecaseformultiplenodessimultaneously,Gisinherentlycapableofparallelexecution.Multi-processingandmulti-threadinghardwareisautomaticallyexploitedbythebuilt-inscheduler,whichmultiplexesmultipleOSthreadsoverthenodesreadyforexecution.
3.2 Graphicalprogramming
LabVIEWtiesthecreationofuserinterfaces(calledfrontpanels)intothedevelopmentcycle.LabVIEWprograms/subroutinesarecalledvirtualinstruments(VIs).EachVIhasthreecomponents:ablockdiagram,afrontpanel,andaconnectorpanel.ThelastisusedtorepresenttheVIintheblockdiagramsofother,callingVIs.Controlsandindicatorsonthefrontpanelallowanoperatortoinputdataintoorextractdatafromarunningvirtualinstrument.However,thefrontpanelcanalsoserveasaprogrammaticinterface.Thusavirtualinstrumentcaneitherberunasaprogram,withthefrontpanelservingasauserinterface,or,whendroppedasanodeontotheblockdiagram,thefrontpaneldefinestheinputsandoutputsforthegivennodethroughtheconnectorpane.ThisimplieseachVIcanbeeasilytestedbeforebeingembeddedasasubroutineintoalargerprogram.
7 IntroductiontoLabVIEW
Tutorial: Wireless Data Acquisition in LabVIEW
Thegraphicalapproachalsoallowsnon-programmerstobuildprogramssimplybydragginganddroppingvirtualrepresentationsoflabequipmentwithwhichtheyarealreadyfamiliar.TheLabVIEWprogrammingenvironment,withtheincludedexamplesandthedocumentation,makesitsimpletocreatesmallapplications.Thisisabenefitononeside,butthereisalsoacertaindangerofunderestimatingtheexpertiseneededforgoodquality"G"programming.Forcomplexalgorithmsorlarge-scalecode,itisimportantthattheprogrammerpossessanextensiveknowledgeofthespecialLabVIEWsyntaxandthetopologyofitsmemorymanagement.ThemostadvancedLabVIEWdevelopmentsystemsofferthepossibilityofbuildingstand-aloneapplications.Furthermore,itispossibletocreatedistributedapplications,whichcommunicatebyaclient/serverscheme,andarethereforeeasiertoimplementduetotheinherentlyparallelnatureofG-code.
3.3 BenefitsOnebenefitofLabVIEWoverotherdevelopmentenvironmentsistheextensivesupportforaccessinginstrumentationhardware.Driversandabstractionlayersformanydifferenttypesofinstrumentsandbusesareincludedorareavailableforinclusion.Thesepresentthemselvesasgraphicalnodes.Theabstractionlayersofferstandardsoftwareinterfacestocommunicatewithhardwaredevices.Theprovideddriverinterfacessaveprogramdevelopmenttime.ThesalespitchofNationalInstrumentsis,therefore,thatevenpeoplewithlimitedcodingexperiencecanwriteprogramsanddeploytestsolutionsinareducedtimeframewhencomparedtomoreconventionalorcompetingsystems.Anewhardwaredrivertopology(DAQmxBase),whichconsistsmainlyofG-codedcomponentswithonlyafewregistercallsthroughNIMeasurementHardwareDDK(DriverDevelopmentKit)functions,providesplatformindependenthardwareaccesstonumerousdataacquisitionandinstrumentationdevices.TheDAQmxBasedriverisavailableforLabVIEWonWindows,MacOSXandLinuxplatforms.
8
4 IntroductiontoDataAcquisition(DAQ)
ThischapterexplainsthebasicconceptsofusingDAQinLabVIEW.
Topics:
• IntroductiontoDAQ-DataAcquisition• MAX–MeasurementandAutomationExplorer• NI-DAQmxDriversoftware
LabVIEWisverypowerfulwhenitcomestocreatingDAQapplications.LabVIEWincludesasetofVIsthatletyouconfigure,acquiredatafrom,andsenddatatoDAQdevices.Often,onedevicecanperformavarietyoffunctions,suchasanalog-to-digital(A/D)conversion,digital-to-analog(D/A)conversion,digitalI/O,andcounter/timeroperations.EachdevicesupportsdifferentDAQandsignalgenerationspeeds.Also,eachDAQdeviceisdesignedforspecifichardware,platformsandoperatingsystems.
NationalInstruments,theinventorofLabVIEW,alsomakeDAQdevices,sotheintegrationwiththeDAQdevicesfromNIandtheLabVIEWsoftwareisseamlessandmakesiteasytodoI/OoperationsfromtheLabVIEWenvironment.
4.1 IntroductiontoDAQ-DataAcquisitionThepurposeofdataacquisitionistomeasureanelectricalorphysicalphenomenonsuchasvoltage,current,temperature,pressure,orsound.PC-baseddataacquisitionusesacombinationofmodularhardware,applicationsoftware,andacomputertotakemeasurements.Whileeachdataacquisitionsystemisdefinedbyitsapplicationrequirements,everysystemsharesacommongoalofacquiring,analyzing,andpresentinginformation.Dataacquisitionsystemsincorporatesignals,sensors,actuators,signalconditioning,dataacquisitiondevices,andapplicationsoftware.
Sosummingup,DataAcquisitionistheprocessof:
• Acquiringsignalsfromreal-worldphenomena• Digitizingthesignals• Analyzing,presentingandsavingthedata
9 IntroductiontoDataAcquisition(DAQ)
Tutorial: Wireless Data Acquisition in LabVIEW
TheDAQsystemhasthefollowingpartsinvolved,seeFigure:
[www.ni.com]
Thepartsare:
• Physicalinput/outputsignals• DAQdevice/hardware• Driversoftware• Yoursoftwareapplication(Applicationsoftware)
ForanIntroductiontoDataAcquisition,seethiswebcast:http://zone.ni.com/wv/app/doc/p/id/wv-169
4.1.1 Physicalinput/outputsignals
Aphysicalinput/outputsignalistypicallyavoltageorcurrentsignal.
4.1.2 DAQdevice/hardware
DAQhardwareactsastheinterfacebetweenthecomputerandtheoutsideworld.Itprimarilyfunctionsasadevicethatdigitizesincominganalogsignalssothatthecomputercaninterpretthem
ADAQdevice(DataAcquisitionHardware)usuallyhasthesefunctions:
• Analoginput• Analogoutput• DigitalI/O• Counter/timers
WehavedifferentDAQdevices,suchas:
10 IntroductiontoDataAcquisition(DAQ)
Tutorial: Wireless Data Acquisition in LabVIEW
• “DesktopDAQdevices”whereyouneedtoplugaPCIDAQboardintoyourcomputer.Thesoftwareisrunningonacomputer.
• “PortableDAQdevices”forconnectiontotheUSBport,Wi-Ficonnections,etc.Thesoftwareisrunningonacomputer
• “DistributedDAQdevices”wherethesoftwareisdevelopedonyourcomputerandthenlaterdownloadedtothedistributedDAQdevice.
• Wi-FiDAQDevices
[www.ni.com]
Wireless:
[www.ni.com]
4.1.3 Driversoftware
11 IntroductiontoDataAcquisition(DAQ)
Tutorial: Wireless Data Acquisition in LabVIEW
Driversoftwareisthelayerofsoftwareforeasilycommunicatingwiththehardware.Itformsthemiddlelayerbetweentheapplicationsoftwareandthehardware.Driversoftwarealsopreventsaprogrammerfromhavingtodoregister-levelprogrammingorcomplicatedcommandsinordertoaccessthehardwarefunctions.
DriversoftwarefromNationalInstruments:
• NI-DAQmx• NI-DAQmxBase
TheDAQAssistant,includedwithNI-DAQmx,isagraphical,interactiveguideforconfiguring,testing,andacquiringmeasurementdata.Withasingleclick,youcanevengeneratecodebasedonyourconfiguration,makingiteasierandfastertodevelopcomplexoperations.BecauseDAQAssistantiscompletelymenu-driven,youwillmakefewerprogrammingerrorsanddrasticallydecreasethetimefromsettingupyourDAQsystemtotakingyourfirstmeasurement.
NI-DAQmxBaseoffersasubsetofNI-DAQmxfunctionalityonWindowsandLinux,MacOSX,WindowsMobileandWindowsCE.
4.1.4 Yoursoftwareapplication(Applicationsoftware)
Applicationsoftwareaddsanalysisandpresentationcapabilitiestothedriversoftware.Yoursoftwareapplicationnormallydoessuchtasksas:
• Real-timemonitoring• Dataanalysis• Datalogging• Controlalgorithms• Humanmachineinterface(HMI)
InordertocreateyourDAQapplicationyouneedaprogrammingdevelopmenttool,suchasLabVIEW.
4.2 MAX–MeasurementandAutomationExplorer
Measurement&AutomationExplorer(MAX)providesaccesstoyourNationalInstrumentsdevicesandsystems.
WithMAX,youcan:
• ConfigureyourNationalInstrumentshardwareandsoftware • Createandeditchannels,tasks,interfaces,scales,andvirtualinstruments
12 IntroductiontoDataAcquisition(DAQ)
Tutorial: Wireless Data Acquisition in LabVIEW
• Executesystemdiagnostics • Viewdevicesandinstrumentsconnectedtoyoursystem • UpdateyourNationalInstrumentssoftware
Inadditiontothestandardtools,MAXcanexposeitem-specifictoolsyoucanusetoconfigure,diagnose,ortestyoursystem,dependingonwhichNIproductsyouinstall.AsyounavigatethroughMAX,thecontentsoftheapplicationmenuandtoolbarchangetoreflectthesenewtools.
4.3 NI-DAQmx
13 IntroductiontoDataAcquisition(DAQ)
Tutorial: Wireless Data Acquisition in LabVIEW
TheNI-DAQmxDriversoftwareisthelayerofsoftwareforeasilycommunicatingwiththehardware.Itformsthemiddlelayerbetweentheapplicationsoftwareandthehardware.Driversoftwarealsopreventsaprogrammerfromhavingtodoregister-levelprogrammingorcomplicatedcommandsinordertoaccessthehardwarefunctions.
[www.ni.com]
TheDAQmxpaletteinLabVIEW:
4.3.1 DAQAssistant
TheDAQAssistant,includedwithNI-DAQmx,isagraphical,interactiveguideforconfiguring,testing,andacquiringmeasurementdata.Withasingleclick,youcanevengeneratecodebasedonyourconfiguration,makingiteasierandfastertodevelopcomplexoperations.BecauseDAQAssistantiscompletelymenu-driven,youwillmakefewerprogrammingerrorsanddrasticallydecreasethetimefromsettingupyourDAQsystemtotakingyourfirstmeasurement.
14
5 IntroductiontoWirelessDataAcquisition
Source:www.ni.com
Wi-FiDAQis:
• Simple–Directsensorsconnectivityandgraphicalprogramming• Secure–Highestcommerciallyavailabledataencryptionandauthentication• Wireless–802.11g
Wi-FidataacquisitionisanextensionofPC-baseddataacquisitiontomeasurementapplicationswherecablesareinconvenientoruneconomical.NIWi-Fidataacquisition(DAQ)devicescombineIEEE802.11gwirelessorEthernetcommunication;directsensorconnectivity;andtheflexibilityofNI-DAQmxdriversoftwareforremotemonitoringofelectrical,physical,mechanical,andacousticalsignals.
[www.ni.com]
NIWi-FiDAQdevicescanstreamdataoneachchannelatupto250kS/s.Inaddition,built-inNIST-approved128-bitAESencryptionandadvancednetworkauthenticationmethodsofferthehighestcommerciallyavailablenetworksecurity.
WiththeflexibilityofNILabVIEWgraphicalprogrammingandtheubiquityof802.11networkinfrastructure,NIWi-FiDAQmakesiteasytoincorporatewirelessconnectivityintoneworexistingPC-basedmeasurementorcontrolsystems.
15 IntroductiontoWirelessDataAcquisition
Tutorial: Wireless Data Acquisition in LabVIEW
TheDataFlowinWi-FiDAQisasfollows:
[www.ni.com]
Unlikemostwirelesssensorsorwirelesssensornetworks,wirelessdataacquisitiondevicesaremeanttostreamdatacontinuouslybacktoahostPCorlaptop.
Awirelesssensornodeistypicallyalow-power,autonomousbattery-operateddeviceintendedforlong-termdeploymentinapplicationswheremeasurementsareneededonlyeveryfewminutes,hours,orevendays.
Wi-Fidataacquisitiondevices,ontheotherhand,behaveinmuchthesamewayasaUSBdataacquisitiondevice–ahostPCcollectsdatacontinuously(inrealtime)asthedeviceacquiresit.Thedataacquisitiondevicemaybebattery-operated,butthefocusisonthemeasurementversusthebatterylife.Also,Wi-Fidataacquisitiondevicesusethenear-ubiquitouswirelessnetworkingstandard,IEEE802.11becauseofitshigherbandwidthand
16 IntroductiontoWirelessDataAcquisition
Tutorial: Wireless Data Acquisition in LabVIEW
broaderapplicability.Finally,becauseNIWi-FidataacquisitionusesthesameNI-DAQmxdriversoftwareasotherNIdataacquisitiondevices,youcandevelopyourapplicationsusingNILabVIEW,LabWindows™/CVI;ANSIC/C++;orMicrosoftC#,VisualBasic,orVisualBasic.NET.
MoreInformationaboutWi-FiDAQ:
WatchtheWi-FiDAQTour:http://sine.ni.com/np/app/culdesac/p/ap/daq/lang/en/pg/1/sn/n17:daq,n21:10423/docid/wv-795
Wi-FiDAQWebcast:
http://zone.ni.com/wv/app/doc/p/id/wv-794
17
6 NIWirelessDAQDevicesCommoncomponentsinWi-FiDAQareasfollows:
• DAQDevices• WirelessAccessPoints(WAP)oraWirelessRouter• NetworkSwitches
HowdoIconnecttoanNIWi-FiDAQdevice?
WhensettingupyourNIWi-FiDAQdevice,youmaychoosetoconnecttoanexistingenterprisenetworkthroughawirelessaccesspointorsetupyourownnetworkwithawirelessrouter.ForexistingITinfrastructure,NIWi-FiDAQdevicessupportWPAEnterpriseandWPA2Enterprise(IEEE802.11i).Ifyousetupyourownnetwork,youmayuseWEP,WPAPersonal(WPA-PSK),orWPA2Personal(WPA2-PSK)security.NIWi-FiDAQdevicesalsosupportadhocorpeer-to-peernetworks,whichdonotrequireanyroutersoraccesspoints.However,adhocsupportisinconsistentacrosswirelessnetworkinterfacecardsandisnotsecure.Communicationthroughawirelessaccesspointorwirelessrouteristhepreferredmodeofoperation.
HowdoIprogramNIWi-FiDAQdevices?
AllNIWi-FiandEthernetDAQdevicesusethesameNI-DAQmxmeasurementservicesanddriversoftwareasotherNationalInstrumentsPCI,PXI,andUSBDAQdevices.NI-DAQmxmeasurementservicessoftwarecontrolseveryaspectofyourdataacquisitionsystemfromconfigurationtoprogramming.WithNI-DAQmxsoftware,youcanquicklyconfigureandacquiremeasurementsusingtheDAQAssistantandautomaticallygeneratecodetogetyourapplicationstartedquickly.NI-DAQmxalsofeaturesvirtualchannelsthatautomaticallyscalerawdataintoengineeringunits.BecauseyoucanusethesamedriverAPItoprogramnewNIWi-FiDAQdevices,incorporatingwirelessconnectivityintoyourexistingapplicationsiseasy.
Wi-FiDAQDevicesfromNationalInstruments:
18 NIWirelessDAQDevices
Tutorial: Wireless Data Acquisition in LabVIEW
[www.ni.com]
TUChavethefollowingwirelessDAQdevicesavailable:
• NIWLS-9234-Wireless4-ChannelAccelerometerandMicrophoneInput• NIWAP-3701-Wirelessaccesspoints(WAPs)addwirelessconnectivitytoall
Ethernet-basedNIprogrammableautomation• NIUES-3880-Aneight-portunmanagedentry-levelswitchfornetworkingbetween
NIEthernet-basedcontrollersanddevicesusingstandardEthernetprotocols• PS-5PowerSupply
6.1 NIWLS-9234
TheNIWLS-9234isafour-channelIEEE802.11wirelessorEthernetCSeriesdynamicsignalacquisitionmoduleformakinghigh-accuracyaudiofrequencymeasurementsfromintegratedelectronicpiezoelectric(IEPE)andnon-IEPEsensors.
4-Channel,51.2kS/s/ch,24-Bit,±5VIEPEInput
• IEEE802.11b/g(Wi-Fi)wirelessandEthernetcommunicationsinterfaces• 51.2kS/sper-channelmaximumsamplingrate;±5Vinput
19 NIWirelessDAQDevices
Tutorial: Wireless Data Acquisition in LabVIEW
• 24-bitresolution;102dBdynamicrange;antialiasingfilters• Software-selectableAC/DCcoupling;AC-coupled(0.5Hz)• Software-selectableIEPEsignalconditioning(0or2mA)
TheNIWLS-9234isafour-channelIEEE802.11wirelessorEthernetCSeriesdynamicsignalacquisitionmoduleformakinghigh-accuracyaudiofrequencymeasurementsfromintegratedelectronicpiezoelectric(IEPE)andnon-IEPEsensors.TheWLS-9234delivers102dBofdynamicrangeandincorporatessoftware-selectableAC/DCcouplingandIEPEsignalconditioningforaccelerometersandmicrophones.Thefourinputchannelssimultaneouslydigitizesignalsatratesupto51.2kHzperchannelwithbuilt-inantialiasingfiltersthatautomaticallyadjusttoyoursamplingrate.
TheWLS-9234iswell-suitedfornoiseandvibrationanalysisapplications.TheNISoundandVibrationMeasurementSuite,whichspecificallyaddressestheseapplications,hastwocomponents:theNISoundandVibrationAssistantandLabVIEWAnalysisVIs(functions)forpowerspectra,frequencyresponse(FRF),fractionaloctaveanalysis,sound-levelmeasurements,orderspectra,ordermaps,orderextraction,sensorcalibration,humanvibrationfilters,andtorsionalvibration.
WLS-9234has4BNCconnectors.TheBNCconnectorisusedforRFsignalconnections.TheBNCconnectorisoneofseveralradiofrequency(RF)connectorsonthemarkettoday.
6.2 NIWAP-3701
20 NIWirelessDAQDevices
Tutorial: Wireless Data Acquisition in LabVIEW
WAP–WirelessAccessPoint
TheNIWAP-3701wirelessaccesspoints(WAPs)addwirelessconnectivitytoallEthernet-basedNIprogrammableautomationcontrollers(PACs).AWAP-37x1canconnectwirelessdevicestoawirednetworkandhasanIPaddresssootherwirelessclientscanaccessthedevice.AWAP-37x1canalsoserveasaDynamicHostConfigurationProtocol(DHCP)serverandconfigureotherWAP-37x1devicesaswirelessclients.AsingleWAP-37x1typicallysupportsupto30clientdevices,withtherangedependingonthewirelessantennaeselection.Italsoservesasawirelessbridgeandallowstwodevicestotalktoeachother.
• EEE802.11g/bwirelessaccesspoint,client,andbridge• Web-basedmanagementsoftwareincluded• 64-and128-bitwiredequivalentprivacy(WEP)security• Redundantdual24VDCpowerinputs • Metalenclosure,IP30rated;ClassI,Division2hazardouslocations • DIN-railmountingsupport
6.3 NIUES-3880UES–UnmanagedEthernetSwitch
TheNIUES-3880isaneight-portunmanagedentry-levelswitchfornetworkingbetweenNIEthernet-basedcontrollersanddevicesusingstandardEthernetprotocols.TonetworkwithNIprogrammableautomationcontrollers(PACs),theUES-3880providesindustrialfeaturesincluding-40to70°Coperatingtemperature;ClassI,Division2andATEXClass1,Zone2certificationsforhazardouslocations;andredundantdual24VDCpowerinputs.
21 NIWirelessDAQDevices
Tutorial: Wireless Data Acquisition in LabVIEW
6.4 PS-5PowerSupplyPS–PowerSupply
ThePS-5isaDIN-rail-mountable24VDCpowersupplythatprovides5Aofcurrentandisratedforoperationfrom-25Cto60C.TwoPS-5suppliescanbewiredinparalleltoprovideupto10A.ThePS-5isrecommendedforindustrialinstallations.ThePS-4isaDIN-rail-mountable24VpowersupplyinFieldPointpackaging.ThePS-3andPS-2arepowersupply"bricks"withauniversalIECpowerinput.ThePS-3canalsooperateasafloatchargerfor12VDCbatteries.ThePS-1isawall-mountpowersupply.
22
7 NIWSNDevicesAwirelesssensornetwork(WSN)isawirelessnetworkconsistingofspatiallydistributedautonomousdevicesthatusesensorstomonitorphysicalorenvironmentalconditions.Theseautonomousdevices,ornodes,combinewithroutersandagatewaytocreateatypicalWSNsystem.Thedistributedmeasurementnodescommunicatewirelesslytoacentralgateway,whichprovidesaconnectiontothewiredworldwhereyoucancollect,process,analyze,andpresentyourmeasurementdata.ToextenddistanceandreliabilityinaWSN,youcanuserouterstogainanadditionalcommunicationlinkbetweenendnodesandthegateway.
TheproprietaryNIWSNprotocolisbasedonIEEE802.15.4andZigBeetechnology.TheIEEE802.15.4communicationstandarddefinesthePhysicalandMediumAccessControllayersinthenetworkingmodel,providingcommunicationinthreefrequencybandsincludingthe2.4GHzISMband.ZigBeebuildsonthe802.15.4standardwiththenetworkandapplicationlayers,offeringfeaturessuchasdevicecoordination,reliabilitythroughmeshnetworkingtopologies,andthefunctionalitytocreateuser-definedprofilesthatallowforcustomizationandflexibilitywithintheprotocol.
WhatisthedifferencebetweenNIWi-Fidataacquisition(DAQ)andNIWSNdevices?
NIWi-FiDAQdevicescombineIEEE802.11b/g(Wi-Fi)wirelessorEthernetcommunication,directsensorconnectivity,andtheflexibilityofNI-DAQmxsoftwareforabreadthofremotemeasurementandcontroloptions.Externallypowered,NIWi-FiDAQdevicescanstreamcontinuouswaveformdataoneachchannelatmorethan50kS/sandofferthehighestcommerciallyavailablenetworksecurity(WPA2Enterprise).
NIWSNdevicesdeliverlow-powermeasurementnodesthatoperateforuptothreeyearson4AAbatteriesandcanbedeployedforlong-term,remoteoperation.ThewirelessmeasurementnodescommunicatewithacentralgatewayusingaprotocolbasedonIEEE802.15.4(ZigBee)tooffermeshroutingcapabilitiesthatextendnetworkdistanceandreliability.NIWSNsystemssupportlowerdataratestopreservepower,areeasilyprogrammedusingI/Ovariables,andcurrentlyaccommodatethermocoupleand±10Vmeasurements.
23 NIWSNDevices
Tutorial: Wireless Data Acquisition in LabVIEW
[www.ni.com]
ManyoftheWSNsystemstodayarebasedonZigBeeorIEEE802.15.4protocolsduetotheirlow-powerconsumption. ZigBeebuildsonthe802.15.4layerstoprovidesecurity,reliabilitythroughmeshnetworkingtopologies,andinteroperabilitywithotherdevicesandstandards.
[www.ni.com]
24 NIWSNDevices
Tutorial: Wireless Data Acquisition in LabVIEW
[www.ni.com]
7.1 Devices
7.1.1 NIWSN-9791-WSNEthernetGateway
TheNIWSN-9791EthernetgatewaycoordinatescommunicationbetweendistributedmeasurementnodesandthehostcontrollerinyourNIwirelesssensornetwork(WSN).Thegatewayhasa2.4GHz,IEEE802.15.4radiobasedonZigBeetechnologytocollectmeasurementdatafromthesensornetworkanda10/100Mbits/sEthernetporttoprovideflexibleconnectivitytoaWindowsorLabVIEWReal-TimeOShostcontroller.
7.1.2 NIWSN-3212-ThermocoupleInputNode
TheNIWSN-3212measurementnodeisawirelessdevicethatprovidesfour24-bitthermocoupleinputchannelsandfourbidirectionaldigitalchannelsthatyoucanconfigureonaper-channelbasisforinput,sinkingoutput,orsourcingoutput.
25 NIWSNDevices
Tutorial: Wireless Data Acquisition in LabVIEW
7.1.3 NIWSN-3202-AnalogInputNode
TheNIWSN-3202measurementnodeisawirelessdevicethatprovidesfour±10Vanaloginputchannelsandfourbidirectionaldigitalchannelsthatyoucanconfigureonaper-channelbasisforinput,sinkingoutput,orsourcingoutput.
7.2 LabVIEWDrivers
NationalInstrumentsoffertheNI-WSNsoftware.
26 NIWSNDevices
Tutorial: Wireless Data Acquisition in LabVIEW
With NI-WSN software you can easily configure your network in the Measurement &Automation Explorer (MAX) utility. MAX provides an intuitive user interface to add andremovemeasurementnodesandconfigurewirelesssettings.
NI-WSNsoftwareprovidesseamlessLabVIEWintegrationsothatyoucanquicklyandeasilyextractmeasurementdatafromyourWSN.AfteraddingtheNIWSNEthernetgatewaytoaLabVIEWProject,thenodesconfiguredwiththegatewayinMAXautomaticallypopulateintheLabVIEWProject,givingyouinstantaccesstotheirI/Oandproperties.SimplydraganddropI/OvariablesfromtheLabVIEWProjecttoaLabVIEWBlockDiagramfordataextraction,analysis,andpresentation.
NationalInstrumentsalsoofferWSNdriversforWSNequipmentsfromothervendors:
http://zone.ni.com/devzone/cda/tut/p/id/5435
Hans-PetterHalvorsen,M.Sc.
E-mail:hans.p.halvorsen@hit.no
Blog:http://home.hit.no/~hansha/
UniversityCollegeofSoutheastNorway
www.usn.no