Post on 16-May-2018
transcript
IntroductiontoDAQwithLabVIEW
Hans-PetterHalvorsen,M.Sc.
Hans-PetterHalvorsen,M.Sc.
UniversityCollegeofSoutheastNorwaywww.usn.no
E-mail:hans.p.halvorsen@hit.noBlog:http://home.hit.no/~hansha/
Contents• WhatisLabVIEW?• WhatisDAQ?• UsingTC-01ThermocoupleDeviceinLabVIEW
• PlottingDatafromDAQDevice• LoggingDatafromDAQDevicetoFile• UseaMeasurementFiltertoreduceNoise
Software
YouneedthefollowingSoftware• LabVIEW (LabVIEWProfessionalDevelopmentSystem32-Bit:English)
• NI-DAQmx (HardwareDriverforNIUSB-6008,NITC-01,etc.)
AllLabVIEWSoftwarecanbedownloadedfrom:www.ni.com/download
Hardware
NITC-01ThermocoupleDAQDevice
http://www.ni.com/datasheet/pdf/en/ds-215
Hardware
cRIO
ZigBeeVisionSystem
Arduino
USB-6008Wi-FiDAQ
TC-01
NOxSensor
Pt-100
AirHeater
WaterTank
LabVIEWTraininghttp://home.hit.no/~hansha/documents/labview/labview.htm
Hans-PetterHalvorsen,M.Sc.
WhatisDAQ?
DAQHardwareExamplesNITC-01ThermocoupleTemperatureMeasurements
NIUSB-6008I/OModule
Note!TheDAQmx DriverisneededinordertousetheminsideLabVIEW!!
Analog/DigitalInputs/Outputs
Wewillusethisdevice
DAQ– DataAcquisition
ADAQSystemconsistsof4parts:1. Physicalinput/outputsignals,sensors2. DAQdevice/hardware3. Driversoftware4. Yoursoftwareapplication(Applicationsoftware)
NIDAQmx Driver
YourAppcreatedwithLabVIEW
NITC-01ThermocoupleDeviceor
NIUSB6008DAQDevice
Sensors,etc.
UsingTC-01inLabVIEW
Hans-PetterHalvorsen,M.Sc.
TC-01
Hans-PetterHalvorsen,M.Sc.
How-TouseTC-01withLabVIEW
USB
ConnectdevicetoPCusingUSB
NITC-01
TheNIUSB-TC01providesconnectionsforonethermocouple.ThermocoupletypesJ,K,R,S,T,N,E,andBaresupported.AtTUCwewillusetheJtype.
UsedtologTemperatureDatausingtheLabVIEWsoftware
Temperature(Thermocouple)Device
DAQmx Driverneeded!
GettingStartedwithTC-01ThefollowingwindowshouldpopupautomaticallywhenyoupluginyourNIUSB-TC01deviceinyourUSBport(ifnot,select“TC01Launcher.exe”):
NITC-01Built-inTemperatureLoggerBuilt-inTemperatureLogger(NoDriverorprogrammingneeded)
MAX– Measurement&AutomationExplorer
MakesurethatyourdevicecanbelocatedinMAX.Runa“Self-Test”andusethe“TestPanels”tomakesurethedeviceworksproperly.
DataAcquisitionPaletteinLabVIEWFormore“advanced”DAQweusethesefunctions
ForbasicDAQweusetheDAQAssistant
FunctionsPalette:“MeasurementI/O”->“NIDAQmx”
LabVIEWDAQAssistant
WhenyouplacetheDAQAssistantontheBlockDiagram,aWizardautomaticallypopsupwhereyouconfigurewhatyouwanttodo,i.e.,ifyouwanttoReadorWriteData,AnalogorDigitalsignals,whichchannelyouwanttouse,etc.
LabVIEWDAQAssistant
SelectInput/OutputType
SelectChannel
SetProperties
ReadDatafromTC-01Device
WewillCreatethisExampleandRuntheProgram
YoucreatetheNumericIndicatorontheFrontPanel
PlottingDatafromtheDAQDevice
Hans-PetterHalvorsen,M.Sc.
PlottingTemperature
Data
WewillCreatethisExampleandRuntheProgram
MultiplePlottingandusingSubVIs
SubVI
Input Output
(Control) (Indicator)
IconthatmakesiteasiertounderstandwhattheSubVIisdoing
ASubVIisthesameasafunctionoramethodusedinotherlanguages
SelectInputsandOutputsSubVI
DataloggingtoFile
Hans-PetterHalvorsen,M.Sc.
SaveDatatoFile(Datalogging)Right-click-Properties
RecommendedSettings
RecommendedSettings
DataloggingExample
DataloggingExample– BlockDiagram
WewillCreatethisExampleandRuntheProgram
MeasurementFilter
Hans-PetterHalvorsen,M.Sc.
UsingaLowpass FiltertoreduceNoiseFunctionspalette:Express->SignalAnalysis->SimulateSignal
Functionspalette:Express->SignalAnalysis->Filter
WewillCreatethisExampleandRuntheProgram
Properties
ThankYou!
LabVIEWTraininghttp://home.hit.no/~hansha/documents/labview/labview.htm
Hans-PetterHalvorsen,M.Sc.
UniversityCollegeofSoutheastNorwaywww.usn.no
E-mail:hans.p.halvorsen@hit.noBlog:http://home.hit.no/~hansha/