introduction to daq with labview video - halvorsen.blog · data acquisition palette in labview for...

36
Introduction to DAQ with LabVIEW Hans-Petter Halvorsen, M.Sc.

Upload: trinhdat

Post on 16-May-2018

235 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

IntroductiontoDAQwithLabVIEW

Hans-PetterHalvorsen,M.Sc.

Page 2: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

Hans-PetterHalvorsen,M.Sc.

UniversityCollegeofSoutheastNorwaywww.usn.no

E-mail:[email protected]:http://home.hit.no/~hansha/

Page 3: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

Contents• WhatisLabVIEW?• WhatisDAQ?• UsingTC-01ThermocoupleDeviceinLabVIEW

• PlottingDatafromDAQDevice• LoggingDatafromDAQDevicetoFile• UseaMeasurementFiltertoreduceNoise

Page 4: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

Software

YouneedthefollowingSoftware• LabVIEW (LabVIEWProfessionalDevelopmentSystem32-Bit:English)

• NI-DAQmx (HardwareDriverforNIUSB-6008,NITC-01,etc.)

AllLabVIEWSoftwarecanbedownloadedfrom:www.ni.com/download

Page 5: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

Hardware

NITC-01ThermocoupleDAQDevice

http://www.ni.com/datasheet/pdf/en/ds-215

Page 6: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant
Page 7: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

Hardware

cRIO

ZigBeeVisionSystem

Arduino

USB-6008Wi-FiDAQ

TC-01

NOxSensor

Pt-100

AirHeater

WaterTank

Page 8: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

LabVIEWTraininghttp://home.hit.no/~hansha/documents/labview/labview.htm

Page 9: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

Hans-PetterHalvorsen,M.Sc.

WhatisDAQ?

Page 10: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

DAQHardwareExamplesNITC-01ThermocoupleTemperatureMeasurements

NIUSB-6008I/OModule

Note!TheDAQmx DriverisneededinordertousetheminsideLabVIEW!!

Analog/DigitalInputs/Outputs

Wewillusethisdevice

Page 11: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

DAQ– DataAcquisition

ADAQSystemconsistsof4parts:1. Physicalinput/outputsignals,sensors2. DAQdevice/hardware3. Driversoftware4. Yoursoftwareapplication(Applicationsoftware)

NIDAQmx Driver

YourAppcreatedwithLabVIEW

NITC-01ThermocoupleDeviceor

NIUSB6008DAQDevice

Sensors,etc.

Page 12: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

UsingTC-01inLabVIEW

Hans-PetterHalvorsen,M.Sc.

Page 13: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

TC-01

Hans-PetterHalvorsen,M.Sc.

How-TouseTC-01withLabVIEW

USB

ConnectdevicetoPCusingUSB

Page 14: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

NITC-01

TheNIUSB-TC01providesconnectionsforonethermocouple.ThermocoupletypesJ,K,R,S,T,N,E,andBaresupported.AtTUCwewillusetheJtype.

UsedtologTemperatureDatausingtheLabVIEWsoftware

Temperature(Thermocouple)Device

DAQmx Driverneeded!

Page 15: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

GettingStartedwithTC-01ThefollowingwindowshouldpopupautomaticallywhenyoupluginyourNIUSB-TC01deviceinyourUSBport(ifnot,select“TC01Launcher.exe”):

Page 16: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

NITC-01Built-inTemperatureLoggerBuilt-inTemperatureLogger(NoDriverorprogrammingneeded)

Page 17: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

MAX– Measurement&AutomationExplorer

MakesurethatyourdevicecanbelocatedinMAX.Runa“Self-Test”andusethe“TestPanels”tomakesurethedeviceworksproperly.

Page 18: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

DataAcquisitionPaletteinLabVIEWFormore“advanced”DAQweusethesefunctions

ForbasicDAQweusetheDAQAssistant

FunctionsPalette:“MeasurementI/O”->“NIDAQmx”

Page 19: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

LabVIEWDAQAssistant

WhenyouplacetheDAQAssistantontheBlockDiagram,aWizardautomaticallypopsupwhereyouconfigurewhatyouwanttodo,i.e.,ifyouwanttoReadorWriteData,AnalogorDigitalsignals,whichchannelyouwanttouse,etc.

Page 20: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

LabVIEWDAQAssistant

SelectInput/OutputType

SelectChannel

SetProperties

Page 21: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

ReadDatafromTC-01Device

WewillCreatethisExampleandRuntheProgram

YoucreatetheNumericIndicatorontheFrontPanel

Page 22: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

PlottingDatafromtheDAQDevice

Hans-PetterHalvorsen,M.Sc.

Page 23: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

PlottingTemperature

Data

WewillCreatethisExampleandRuntheProgram

Page 24: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

MultiplePlottingandusingSubVIs

SubVI

Page 25: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

Input Output

(Control) (Indicator)

IconthatmakesiteasiertounderstandwhattheSubVIisdoing

ASubVIisthesameasafunctionoramethodusedinotherlanguages

SelectInputsandOutputsSubVI

Page 26: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

DataloggingtoFile

Hans-PetterHalvorsen,M.Sc.

Page 27: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

SaveDatatoFile(Datalogging)Right-click-Properties

RecommendedSettings

Page 28: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

RecommendedSettings

Page 29: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

DataloggingExample

Page 30: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

DataloggingExample– BlockDiagram

WewillCreatethisExampleandRuntheProgram

Page 31: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

MeasurementFilter

Hans-PetterHalvorsen,M.Sc.

Page 32: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

UsingaLowpass FiltertoreduceNoiseFunctionspalette:Express->SignalAnalysis->SimulateSignal

Functionspalette:Express->SignalAnalysis->Filter

WewillCreatethisExampleandRuntheProgram

Page 33: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

Properties

Page 34: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

ThankYou!

Page 35: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

LabVIEWTraininghttp://home.hit.no/~hansha/documents/labview/labview.htm

Page 36: Introduction to DAQ with LabVIEW Video - halvorsen.blog · Data Acquisition Palette in LabVIEW For more “advanced” DAQ we use these functions For basic DAQ we use the DAQ Assistant

Hans-PetterHalvorsen,M.Sc.

UniversityCollegeofSoutheastNorwaywww.usn.no

E-mail:[email protected]:http://home.hit.no/~hansha/