IndustrialDAQSystemfor MeasurementsandMonitoring Hans-PetterHalvorsen,M.Sc. SystemOverview Mobile Device Sensors DAQ System IndustrialDAQ Hardware DataLogging Computer LabVIEW Monitoring Data Cloud WebService DataDashboard forLabVIEW LabTopics • DataAcquisition- DAQ • IndustrialDataloggingandMonitoringSystems • WirelessSystems – Wi-FiDAQ,ZigBee • IndustrialIT,NetworkInfrastructureand Protocols • WebServices– Themodern“OPCapproach”! 3 AssignmentOverview 1. DAQSystem:CreateaDAQsystemusingtheavailible hardwareatTUC(chooseonlyoneofthealternatives). CreateanApplicationinLabVIEWwithproperGUI/HMI (LoggingandPresentationofData) 1. DataPublishing&Monitoring:Usethe“DataDashboard forLabVIEW”inordertocreateanapplicationusedfor Measurement,andMonitoring. Seenextslidesfordetails... Software Software +DriverSoftware: NI-WSN NI-DAQmx LabVIEWReal-TimeModule NI-cRIO NI-IMAQdx VisionModule 5 Hardware Hardware Youmayselectbetweendifferent alternatives NIWLS-9163 MeasurementNode (NIWSN-3202) I/OModule (e.g.,NI-9234,NI-9201,NI-9211) NIWAP-3711 Gateway (NIWSN-9791) cRIO(cRIO-9074/9024) BaslerscA640-70gcCamera I/OModule(e.g.,NI-9234,NI-9201,NI-9211) PT-100LabEquipment 6 DAQ Theory Dataacquisition(DAQ)istheprocessofsamplingsignalsthat measurerealworldphysicalconditionsandconvertingtheresulting samplesintodigitalnumericvaluesthatcanbemanipulatedbya computer.Thecomponentsofdataacquisitionsystemsinclude: • Sensorsthatconvertphysicalparameterstoelectricalsignals. • Signalconditioningcircuitrytoconvertsensorsignalsintoaform thatcanbeconvertedtodigitalvalues. • Analog-to-digitalconverters,whichconvertconditionedsensor signalstodigitalvalues. InthisassignmentwewillusemoreadvancedandDAQhardwareusedintheindustry today (Wi-FiDAQ,ZigBee, cRIO,cDAQ,etc.)– notthesimple USB-6008thatyouarefamiliarwith DAQ Theory InthisassignmentwewillusemoreadvancedandDAQhardwareusedintheindustry today (Wi-FiDAQ,ZigBee, cRIO,cDAQ,etc.)– notthesimple USB-6008thatyouarefamiliarwith DAQSystemOverview Theory 9 “NextGenerationDAQSystems” 10 Theory WirelessDAQSystem Overview Sensor Incl.Transmitter Wi-Fi (IEEE802.11) orZigBee(IEEE802.15.4) DAQ Gateway/Rou ter/WAP I/OModule TwistedPair Cable 0-5V/4-20mA Ethernet (IEEE802.3) EthernetCable orWi-Fi (IEEE802.11) PC Internet Mobile Device Wi-Fi (IEEE802.11) 11 TypesofWirelessDAQ Theory Herearesomeexamples: • Cellular • Bluetooth • ZigBee • WirelessUSB • Wi-Fi • WirelessHART 12 Theory WirelessDAQ SeeTutorial“WirelessDataAcquisitionin LabVIEW”formoredetails... 13 DAQwithWebServices Theory • AgrowingtrendistouseatechnologybuiltonTCPand HTTPcalledWebServices. • AWebService isanapplicationprogramminginterface (API)thatcanbeaccessedviaHTTPrequests. • Whencalled,WebServices returnahuman-readable response. • ModernWebServicesuseJSONresponsesbutother responseoptionsareXML,HTML,orplaintext. 14 DAQwithWebServices Theory • ThereareseveralreasonswhyengineersandITdepartmentsare choosingWebServicesoverothercommunicationtechnologies. • First,WebServicesarestraightforwardandsimpletoaccessfrom anyprogramminglanguage,includingC++,ObjectiveC,C#and LabVIEW. • Second,sinceWebServicessitontopofcommonnetwork protocols,thecommunicationisconsidered“ITfriendly”compared withproprietarynetworkprotocols. • Third,WebServicescanalsobeeasilyencryptedviaindustrystandardtechnologieslikeSecureSocketsLayer(SSL)orTransport LayerSecurity(TLS). 15 LabEquipment Alternatives Hans-PetterHalvorsen,M.Sc. HardwareAlternatives Chooseone ofthefollowinghardwarealternatives(we haveonly2ofeachequipment): 1. 2. 3. 4. 5. VisionSystem ZigBee cRIO CompactDAQ(cDAQ) Wi-FiDAQ Seenextpagesfordetails 17 Alt1:Vision Numberof Units:2 LabVIEWVision Module Counting number of partsusing aCameraandLabVIEW EthernetCable DataDashboard App/NativeApp WebService iPhone,iPad, Android Deviceor Windows8ComputerorTablet BaslerscA640-70gcCamera 18 Alt2:ZigBee DAQSystem Gateway (NIWSN-9791) Numberof Units:2 DataDashboard App/NativeApp WebService PT-100Device iPhone, iPad,Android deviceorWindows 8 Computer orTablet Ethernet Cable ZigBee MeasurementNode (NIWSN-3202) 1-5V Alt3:cRIO DAQSystem Numberof Units:2 DataDashboard App/NativeApp WebService Ethernet Cable iPhone,iPad, Android Deviceor Windows8ComputerorTablet cRIO(cRIO-9074/9024) I/OModule(e.g.,NI-9234,NI-9201,NI-9211) 1-5V PT-100Device 20 Alt4:CompactDAQ Numberof Units:3 DataDashboard App/NativeApp WebService Ethernet Cable iPhone,iPad, Android Deviceor Windows8ComputerorTablet cDAQ NIcDAQ-9174 1-5V PT-100Device NIcDAQ-9171 I/OModule(e.g.,NI-9234,NI-9201,NI-9211) 21 Alt5:Wi-FiDAQSystem NIWAP-3711 Numberof Units:2 DataDashboard App/NativeApp WebService Ethernet Cable Wi-Fi iPhone,iPad, Android Deviceor Windows8ComputerorTablet NIWLS-9163 1-5V PT-100Device I/OModule (e.g.,NI-9234,NI-9201,NI-9211)22 DAQSystem Hans-PetterHalvorsen,M.Sc. ImplementyourDAQSystem,eg.: Sensor incl. Transmitter Pt-100 DAQ Hardware Ethernet/Wi-Fi/ZigBee Wi-FiDAQ ZigBeeDAQ cRIO Makeaproper GUIforMonitoring Data 24 Sensors Calibration:Acomparisonbetweenmeasurements.Oneof known magnitudeorcorrectnessmadeorsetwithonedevice andanothermeasurementmadeinassimilarawayaspossible withaseconddevice.Thedevicewiththeknown orassigned correctnessiscalledthestandard.Theseconddeviceistheunit undertest,testinstrument,oranyofseveralothernamesfor thedevicebeingcalibrated. Theory Accuracy:Howclosethe measuredvalueisthethe actual/realvalue,eg.,±0.1% Resolution:Thesmallestchangeitcandetectinthe quantitythatitismeasuring.Thefollowingformulamaybe used(whereSisthemeasurementspan,e.g.,0-100deg.C): Intheassignment youneedtodealwiththeseparameters.Youfindinformation abouttheseparametersintheData sheetforyourdevice http://en.wikipedia.org/wiki/Calibration http://en.wikipedia.org/wiki/Measurement_uncertainty http://en.wikipedia.org/wiki/Accuracy_and_precision Congratulations!- YouarefinishedwiththeTask 26 DataPublishingand Monitoring Hans-PetterHalvorsen,M.Sc. LabVIEWWebService Extendyour DAQsystemwithaWebServiceinordertomaketheDataPublic DataDashboard forLabVIEW CreateaWebServiceinLabVIEW WebService WLAN/ Internet Usethe“DataDashboardfor Tip!Tryonyour personalcomputer LabVIEW”Appinorder toread beforeyoutryitinaWLANor DAQ Internet(this requiresthatyouhave theDataonaMobileDevice Hardware (Smartphone/Tablet) aWindows8PCwiththeData Dashboard Appinstalled) 28 http://zone.ni.com/reference/en-XX/help/371361K-01/lvhowto/build_web_service DataDashboardforLabVIEW • AvailableforiOS(iPhone,iPad),Android andWindows8ModernUI/Windows StoreApp • ThisAppcanreceiveDatagenerated fromaWebServicecreatedinLabVIEW • RetrieveandMonitorDatafromthe DAQhardwareusingthe“Data Dashboard”forLabVIEWApp • MakesuretocreateaproperGUI/HMI 29 Congratulations!- YouarefinishedwiththeTask 30 Congratulations!- Youarefinishedwithall theTasksintheAssignment! Hans-PetterHalvorsen,M.Sc. UniversityCollegeofSoutheastNorway www.usn.no E-mail:hans.p.halvorsen@hit.no Blog:http://home.hit.no/~hansha/