Introduction To DAQ With LabVIEW And USB-6008 - Overview

3y ago
114 Views
12 Downloads
7.95 MB
48 Pages
Last View : 4d ago
Last Download : 3m ago
Upload by : Victor Nelms
Transcription

http://home.hit.no/ hansha/?page labviewIntroduction to DAQwith LabVIEW USB-6008with Self-paced Step-by-Step ExercisesHans-Petter Halvorsen, M.Sc.

Contents LabVIEWWhat is DAQ?Using USB-6008 in LabVIEWAnalog InAnalog OutDataloggingUSB-6008I/O Module

LabVIEW InstallationDownload the software here:Note! You get the Serial Number from your Teacher,but the software can be used for 30 days before youneed to enter a valid Serial Number.http://home.hit.no/ hansha/?page labviewThese are the main modules we use in the differentcourses at Telemark University College: LabVIEW (LabVIEW Professional Development System 32-Bit: English)NI-DAQmx (Hardware Driver for NI USB-6008, NI TC-01, etc.)LabVIEW Control Design and Simulation ModuleLabVIEW MathScript RT ModuleNote! These packages are separate downloads!All LabVIEW Software can be downloaded here: www.ni.com/download

Additional LabVIEW ResourcesHere you will find lots of Videos, Tutorials and Exercises LabVIEW Training for Students (National Instruments):http://ni.com/students/learnlabview LabVIEW Course:http://home.hit.no/ hansha/?training labviewLearning by Doing!It is recommended that you watch some of the videos before you read furter

HardwareAir HeaterUSB-6008Wi-Fi DAQWater TankPt-100TC-01ArduinoZigBeeVision SystemcRIONOx Sensor

LabVIEWThis is the core LabVIEW installation that installsthe LabVIEW Programming Environment.LabVIEW MathScript RT ModuleThis module is a text-based tool that is very similar to MATLAB. The syntaxis similar to MATLAB, you can create and run so-called m files, etc. Themodule is available from the Tools menu inside LabVIEW.LabVIEW Control Design and Simulation ModuleThis module is used for creating Control and Simulation applicationswith LabVIEW. Here you will find PID controllers, etc. The module isavailable as a palette on your block diagram.NI-DAQmxDAQmx is the Hardware Driver needed in order to use hardware devices like NIUSB-6008, NI TC-01, etc. inside LabVIEW. The module is available as a palette onyour block diagram.

http://www.ni.com/pdf/manuals/376039a.pdf

DAQHans-Petter Halvorsen, M.Sc.

DAQ Hardware ExamplesNI TC-01 Thermocouple Temperature MeasurementsNI USB-6008 I/O ModuleWe will use thisdeviceAnalog/Digital Inputs/OutputsNote! The DAQmx Driver is needed in order to use them inside LabVIEW!!

DAQ – Data AcquisitionSensors, etc.Your App createdwith LabVIEWA DAQ System consists of 4 parts:NI TC-01 Thermocouple Device1. Physical input/output signals, sensorsor2. DAQ device/hardwareNI USB 6008 DAQ Device3. Driver software4. Your software application (Application software)NI DAQmx Driver

AD & DA ConvertersMeasurement SignalAD ConverterControl SignalDA ConverterUSBAD – Analog to DigitalDA – Digital to AnalogAll Analog Signals needs to be converted toDigital Signals before the Computer can usethem (AD Converter).

Continuous SignalContinuousvs.DiscreteSignalsDiscrete SignalA computer can only dealwith discrete signalsTs Sampling TimeWhen Ts - 0, we have a continuous signal,but in a computer that is not possible.k 0, 1, 2, 3, 4, .

Sampling and AliasingOriginal SignalAliasing (“Nedfolding”) - The Sampling Rate is to low!Sampling FrequencySampling Time

Using USB-6008 in LabVIEWHans-Petter Halvorsen, M.Sc.

USB-6008How-To use USB-6008 with LabVIEWAnalog I/OUSBDigital I/OHans-Petter Halvorsen, M.Sc.

NI USB-6008 I/O ModuleUSB Connection-10-10VSpecifications: 8 analog inputs, AI (12-bit, 10 kS/s, -10-10V) 2 analog outputs, AO (12-bit, 150 S/s, 0-5V) 12 digital I/O (DI/DO) 0-5V 32-bit counterNote! DAQmx Driver is needed!!4 different types of Signals:AO – Analog OutputAI – Analog InputDO – Digital OutputDI – Digital Input

MAX – Measurement & Automation ExplorerNI USB-6008 “Dev1”You may change the name (“Dev1”)Students: Make sure that your device can be located in MAX. Run a “Self-Test” and use the“Test Panels” to make sure the device works properly.

Data Acquisition Palette in LabVIEWFunctions Palette: “Measurement I/O” - “NI DAQmx”For more “advanced” DAQ we use these functionsFor basic DAQ we usethe DAQ AssistantStudents: Make sure that you have this palette installed. If not, install the latestDAQmx driver!

LabVIEW DAQ AssistantWhen you place the DAQAssistant on the BlockDiagram, a Wizardautomatically pops upwhere you configure whatyou want to do, i.e., if youwant to Read or WriteData, Analog or Digitalsignals, which channel youwant to use, etc.

Analog InHans-Petter Halvorsen, M.Sc.

Type of SignalsAI Settings in DAQ AssistantPropertiesWhat you choose heredepends on the voltageyou want to measureChannel

Read Analog Signals with USB-6008Analog Input (AI)MultimeterSampling TimeStudents: Use the USB-6008 DAQ device in order to read the voltage from differentbatteries. Use a Multimeter to check if you read the correct values.Measure 5-10 different batteries. Use LabVIEW to find the average.

Analog OutHans-Petter Halvorsen, M.Sc.

Type of SignalsAO Settings in DAQ AssistantPropertiesChannel

Write Analog Signals using USB-6008Analog Output (AO)MultimeterStudents: Create this VI. Set different values on the Front Panel. Use aMultimeter to see if the DAQ device sends out the correct voltage signal.

Analog In Analog OutHans-Petter Halvorsen, M.Sc.

Write/ReadDatausingUSB-6008Analog Output (AO)Analog Input (AI)Students: Create these 2 VIs andrun them simultaneouslyConnect the cables from Analog Output to the cablesfor Analog Input (so-called “Loopback Test”)

Type of SignalsAO Settings in DAQ AssistantPropertiesChannel

Type of SignalsAI Settings in DAQ AssistantPropertiesChannel

Analog In Analog Out in same VINote! Here we have used low-level functions for better performanceStudents: Create this Example

Datalogging(You may skip this part)Hans-Petter Halvorsen, M.Sc.

DataloggingHere we will connect a PT-100 Temperature Sensor to the USB-6008 device in order tolog temperature data. We will plot data and save data to a File.PT-100 Temperature Sensor1-5VPT-100 SensorUSB-6008 I/O ModuleMultimeterPower SupplyTransducer/Transmitter

PT-100 Temperature Sensor2 different types (see transducer):1-5V - 0-50 degrees Celsius1-5V - 0-100 degrees Celsius1-5V

PT-100 Temperature Sensor1-5V

PT-100 Temperature SensorConverting from Voltage to Degrees Celsius𝑥) , 𝑦) (5,100)100 𝑦 𝑦( 𝑦 𝑎𝑥 𝑏𝑥(, 𝑦( (1,0)0 1𝑉5𝑉𝑦) 𝑦(𝑥 𝑥(𝑥) 𝑥(

Save Data to File (Datalogging)Right-click-PropertiesRecommended Settings

Datalogging Example

Datalogging Example – Block DiagramStudents: (1) Log Temperature Data, both Celsius and Fahrenheit (use SubVI) to a“Measurement File”. (2) Use a Multimeter in order to check the values in the circuit. (3) ThenPlot the Data in the File in Excel. (4) You should also create a new VI in LabVIEW where you plotthe data from the File in a Graph

Measurement Filter(You may skip this part)Hans-Petter Halvorsen, M.Sc.

Lowpass Filter/Measurement FilterThe measured signals contains noise, so we should remove the noise using a FilterThe differential equation for a Measurement filter may be given as:Since we shall implement the Measurement Filter in a computer, we need to make a dicrete versionof the filter. We use the Euler Backward discretization method:Where Ts is the Sampling TimeThen we get:Or:whereThis discrete Measurement Filter can be easilyimplemented in a computer using e.g.,LabVIEW, C#, etc.

LabVIEW Formula NodeFormula Node: Create and use C codewithin LabVIEWExample:Students: Use the LabVIEW Formula Node.in order to implement the Measurement Filter.

Lowpass Filter/Measurement Filter - ExampleStudents: Implement this Example using aLabVIEW Formula Node.When finished, try to log data from yoursensor with and without the MeasurementFilter. Compare the results.

Testing the FilterIn this example we add noise to a Sinefunction. We then use the MeasurementFilter to see if we can remove the noiseafterwards.Students: Try this Example.As you can see this gives goodresults.The filter removes the noisefrom the signal.

Additional LabVIEW ResourcesHere you will find lots of Videos, Tutorials and Exercises LabVIEW Training for Students (National Instruments):http://ni.com/students/learnlabview LabVIEW Course:http://home.hit.no/ hansha/?training labviewLearning by Doing!It is recommended that you watch some of the videos before you read furter

Do you need more Practice? - Select a ChallengeHans-Petter Halvorsen, M.Sc.

Temperature Logging1. Create Logging App: Log the temperature in your house e.g., during the night using e.g, a TC-01Thermocouple device. Plot the temperature in a Chart Log the temperature to a File2. Create Analysis App: Read the temperature data from the file into LabVIEW Find Max temperature and Min temperature using built-in functions in LabVIEW Find also the Average/Mean temperature and the Standard deviation using built-infunctions in LabVIEW3. Do Analysis in Excel: Import the data into Excel and create a Plot Find Max, Min, Mean/AVG, SD using Excel Compare the results

Hans-Petter Halvorsen, M.Sc.University College of Southeast Norwaywww.usn.noE-mail: hans.p.halvorsen@hit.noBlog: http://home.hit.no/ hansha/

LabVIEW (LabVIEW Professional Development System 32-Bit: English) . Arduino USB-6008 Wi-Fi DAQ TC-01 NOx Sensor Pt-100 Air Heater Water Tank. DAQmx is the Hardware Driver needed in order to use hardware devices like NI USB-6008, NI TC-01, etc. inside LabVIEW. The module is available as a palette on

Related Documents:

Certified LabVIEW Architect Exam LabVIEW Core 1 LabVIEW Core 3 LabVIEW Core 2 Managing Software Engineering in LabVIEW Advanced Architectures in LabVIEW LabVIEW Connectivity Object-Oriented Design and Programming in LabVIEW LabVIEW Performance LabVIEW Real-Time 1

LabVIEW Express: DAQ assistant Using the the DAQ assistant is the easy way to configure and read from a DAQ card! LabVIEW - Sequential DAQ design . Visualize data Save data . LabVIEW: Low-speed DAQ Sequential architecture DAQ assistant Express VI used in the block diagram Data written to file using the Write to Measurement .

examples. So launch LabVIEW and explore the LabVIEW environment as you read this section. 1.3.1 Starting LabVIEW . If your version of LabVIEW was installed using the default installation procedure, launch LabVIEW by selecting All Programs National Instruments LabVIEW 2013 (or LabVIEW 2014) LabVIEW 2013 (or LabVIEW 2014) from the Start menu .

for Windows software, your NI-DAQmx-supported DAQ device, and how to confirm that your device is operating properly. Select Start»All Programs»National Instruments»NI-DAQ»DAQ Getting Started Guide. The NI-DAQ Readme lists which devices are supported by this version of NI-DAQ. Select Start»All Programs»National Instruments»NI-DAQ» NI-DAQ .

LabVIEW Express: DAQ assistant Using the the DAQ assistant is the easy way to configure and read from a DAQ card! DAQ Assistant Express VI to standard VIs. LabVIEW - Sequential DAQ design Configure Acquire data Analyze data Visualize data Save data T1 T2 T3 Loop time: T1 T2 T3.

186 National Instruments Tel: (800) 433-3488 Fax: (512) 683-9300 info@ni.com ni.com Driver Software DAQ and Signal Conditioning LabVIEW and NI-DAQ Using NI-DAQ, you can easily acquire, analyze, and present your measurements in LabVIEW. Figure 4 shows the block diagram of a typical data acquisition in LabVIEW. With the first set of

Labview Exercises for Labview 7.0 Installation of Labview: 1. Install the Labview 7.0 software and drivers onto your computer. These files can be found by mapping a network drive to \\poohbah\labview, and by running the ‗autorun‘ file in the ‗Labview 7‘ folder. The serial num

DAQ device/hardware 3. Driver software 4. Your software application (Application software) NI DAQmx Driver Your App created with LabVIEW NI TC-01 Thermocouple Device or NI USB 6008 DAQ Device Sensors, etc. Using TC-01 in LabVIEW Hans-Petter Halvorsen, M.Sc. TC-01 Hans-Petter Halvorsen, M.Sc. How-To use TC -01 with LabVIEW USB