thermocouple measurement with ai-225 using dasylab and .net
TRANSCRIPT
-
8/14/2019 Thermocouple Measurement with AI-225 Using DASYLab and .NET
1/14
2007 United Electronic Industries, Inc. All Rights Reserved.
ApAI-225 Thermocouple Measurement Using DASYLab
-
8/14/2019 Thermocouple Measurement with AI-225 Using DASYLab and .NET
2/14
2007 United Electronic Industries, Inc. All Rights Reserved.
AI-225 Thermocouple Measurement Using DASYLab
IntroductionPurpose:This paper outlines how to use an AI-225 layer, STP-AI-U terminal,and a K-type thermocouple, or measuring temperature.
Equipment
Our setup consisted o:
(1) Omega K-type thermocouple wire (yellow with red stripe)
(1) DNA-CM5 PowerDNA Cube, equipped with
(1) DNA-AI-225 Analog Input layer, connected to
(1) DNA-STP-AI-U terminal panel via
(1) Shielded, rounded, DNA-CBL-62 cable
(1) Host PC connected to the DNA-CM5 (via Ethernet cable)
The DNA-AI-225 layer with the DNA-STP-AI-U terminal is ideaple measurement. For a good thermocouple, accurate tempcan be measured to within 0.1C!
The DNA-AI-225 layer provides an input range o 1.25 in 0.0(24-bit resolution), dierential input, sample rates o 5 to 1,00and a dedicated CJC channel.
CJC, or cold-junction compensation, adjusts the oset causedierent metal types (e.g. the thermocouple wires, and the tenector block). In detail, a thermocouple is essentially two dimetal wire connected at one end; the two thermocouple wirinto the terminal block (yet another metal), orming another
at the junction. To remove the oset o this extra junction, thSTP-AI-U terminals on-board IC (wired through the dedicateddetermine and remove the extra oset. This method is builtsation. For non-STP-AI-U connections, constant CJC compeinstead.
-
8/14/2019 Thermocouple Measurement with AI-225 Using DASYLab and .NET
3/14
2007 United Electronic Industries, Inc. All Rights Reserved.
AI-225 Thermocouple Measurement Using DASYLab
Test Setup:
This section presumes that the PowerDNA Cube is already congured andtested to connect to a Host PC via Ethernet.
PowerDNA Cube Host PC Connectivity
Connect the Ethernet line to your PC. Connect the DNA-CBL-62 cable to theDNA-STP-AI-U terminal, and to the DNA-AI-225 layer.
Supply power to the PowerDNA cube (we used a DNA-PSU-24 brick).Run thePowerDNA Explorer application rom:
Start Menu Programs UEI PowerDNA PowerDNA Explorer
Scan the network, and connect to your cube. Select the AI-225 layer. From
the menu, go to: Network Read Input Data:
Values should display in the Input tab, indicating that the layer is unctional.We incremented our precision voltage source between 0.0000V and 1.2500V,to double-check the input line or errors.
We knew that the layer was working correctly when PowerDNA Explorerreected the values on the voltage source.
Figure: Floating values read when testing reading on the
-
8/14/2019 Thermocouple Measurement with AI-225 Using DASYLab and .NET
4/14
2007 United Electronic Industries, Inc. All Rights Reserved.
AI-225 Thermocouple Measurement Using DASYLab
Terminal Setup or the DNA-STP-AI-U
The datasheet or the DNA-STP-AI-U, available online, contains block-level
diagrams o the board and tables or conguration options.
Thermocouple jumpers to set are:
JTC1/JTC2: Enable built-in CJC compensation sensor
JPOW1: Sets to AGND the VCC/AGND screw terminal
JD1 to JD23, and JG1 to JG23:
Enable Open TC detection and signal ltering.
JD24, JG24: Enable Open TC detection and ltering or CJC.
N1 to N24 (required): signal return to ground.
Open thermocouple detection (or Open TC detection) is enabled by settingJD1 to JD24. When the thermocouple wires are not correctly screwed into
the board, or the board is damaged, or the thermocouple wires are unwound,
decoupled, or otherwise broken the input channel will receive a ull voltage.
For our K-type thermocouple, using an input range o 10V to 10V, an open
thermocouple is equivalent to approximately -4,144,602C!
Setting JD1 to JD24 and JG1 to JG24 enables the low-pass l
noise oor, including on the CJC channel (channel 24).
The jumpers are now set.
Screw the thermocouple leads into the terminal panel.
You are now ready to take measurements with the AI-225 anAI-U.
-
8/14/2019 Thermocouple Measurement with AI-225 Using DASYLab and .NET
5/14
2007 United Electronic Industries, Inc. All Rights Reserved.
AI-225 Thermocouple Measurement Using DASYLab
Measuring with DASYLabDASYLab Setup: You should have the PowerDNA and Framework drivers
(both included in the PowerDNA Sotware Suite) installed; a menu UeiDAQ
should be visible in the DASYLab menubar:
Select the Analog Input module rom UeiDAQ menu:
Click in an open space on the worksheet to drop the AI modu
Select PowerDNA > Add Device... and add your Cubes IP.
Browse the Cube devices to select the AI channels you want
-
8/14/2019 Thermocouple Measurement with AI-225 Using DASYLab and .NET
6/14
-
8/14/2019 Thermocouple Measurement with AI-225 Using DASYLab and .NET
7/14
2007 United Electronic Industries, Inc. All Rights Reserved.
AI-225 Thermocouple Measurement Using DASYLab
Next, adjust the timing type rom the menu:
UeiDaqHardware Setu p
a selection page will allow tuning data acquisition settings:
Set the clock to Sotware Clock, let DASYLab determine the time base.
To adjust the time base (sampling rate), rom the menu:
UeiDAQMeasurement Setup
Select the DASYLab tab, and adjust your sample rate. The smeasurement is 10 Hz; as there is less hardware noise at loweand thermocouples do not require a high sampling rate.
-
8/14/2019 Thermocouple Measurement with AI-225 Using DASYLab and .NET
8/14
2007 United Electronic Industries, Inc. All Rights Reserved.
AI-225 Thermocouple Measurement Using DASYLab
We displayed data in a Y/t chart to add this type o chart, select:
ModuleDisplayY/ t Chart
In the menu bar:
When the Y/t Chart block is created,simply connect the output o the AnalogInput Block to the input o the Y/t chart inorder to display data that will be acquiredin this chart:
In the lower-let corner o the screen, asmall child window labeled Y/tChart00will be minimized.
Select the Y/t Chart window and restore it (or maximize it) soand usable.
From the Y/t Charts menu, select:
Axes Y Scale...
-
8/14/2019 Thermocouple Measurement with AI-225 Using DASYLab and .NET
9/14
2007 United Electronic Industries, Inc. All Rights Reserved.
AI-225 Thermocouple Measurement Using DASYLab
The deault graph will display -5 to 5. Adjust the axes o the chart to displaya range rom 0 to 100. Click OK to commit the changes.
Alternatively, a Chart Recorder graph works equally well:
Modules Display Chart Recorder
Bring the main DASYLab window into ocus. Creating a Digital Meter will helpdebug channels when they do not display on the graph.
From the menu:
Modules Display Digital Meter.
Connect the Input channels output into the Digital Meters input.
The experiment is now ready to be run.
Running the experiment under DASYLab
Run the program by pressing the Start Button. This is the vethe toolbar. This action begins the experiment.
The Y/t chart or recorder set up earlier should display the inoas the button is pressed.
Here are the results or the ollowing setup:
(1) Omega K-type thermocouple wire (yellow with red stri
(1) DNA-CM5 PowerDNA Cube, equipped with
(1) DNA-AI-225 Analog Input layer, connected to
a DNA-STP-AI-U terminal panel via
a shielded, rounded, DNA-CBL-62 cable
(1) Host PC connected to the DNA-CM5 (via Ethernet cablerunning DASYLab with parameters:
10 Hz Sample Rate in Sotware Mode
Channel 0 Setup: Dierential, K-type TC, F, Built-in CJC
-
8/14/2019 Thermocouple Measurement with AI-225 Using DASYLab and .NET
10/14
2007 United Electronic Industries, Inc. All Rights Reserved.
AI-225 Thermocouple Measurement Using DASYLab
Even in dierential mode, the noise picked up by a long piecbehaves like an antenna) is not easily overcome.
Adding a 1uF to 10uF ceramic capacitor in parallel with the treduces the bandwidth o the noise, in addition to the JDx/JG
Thicker wire (20-22 gauge rom 28gauge) helps resist noise.
Running the experiment at lower requency also helps rejectAI-225.Note the quantity o noise on the output line.
-
8/14/2019 Thermocouple Measurement with AI-225 Using DASYLab and .NET
11/14
2007 United Electronic Industries, Inc. All Rights Reserved.
AI-225 Thermocouple Measurement Using DASYLab
Sending the results to a text le (or Excel)
Modules Files Write Data
File Format: ASCII
Write Protection: Enabled
Mult i- File Wri te As Mult i File: Enabled OK
File Name Deskto p\ therm o.tx t
(it will be autosplit)
This completes the DASYLab how-to.
Next: Obtaining measurements using C#
Measurement and Results with .NETThe PowerDNA and Framework drivers (both included in theware Suite) must be installed beore continuing.
Note that all examples work with MsVS.NET including 2005 EFor a ree copy o VB.NET 2005, visit Microsots MSDN site:
http://msdn.microsot.com/vstudio/express/vb/download/
Quick results using VB.NET
Measuring thermocouples is a low-speed analog input operadone by modiying any analog input example written or Mstion on how to do this or Visual Basic .NET.
Open the Visual Basic.NET examples older:
Star t Programs UEI Framework Examples
Visual Basic.NET Examples
Thermocouple readings are normally read very slowly, so sinpoint acquisition sufces use the SingleAI example.
Open the SingleAI example: double-click the vb_examples.s
Right-click the SingleAI project, and select Set as Startup Proproject as the compile-able project.
-
8/14/2019 Thermocouple Measurement with AI-225 Using DASYLab and .NET
12/14
2007 United Electronic Industries, Inc. All Rights Reserved.
AI-225 Thermocouple Measurement Using DASYLab
You may copy and comment out the lines or Channel conguration beorechanging it:
Change the Channel conguration line to work with thermocouples:
(where 192.168.100.2 is the cubes IP address)
Thats it! Now an explanation o why we use this mode, and how it works:
Open the UEIDAQ .NET Documentation rom:
Start Programs UEI Framework Documentation UeiDaq Framework Documentation
and select help on UeiDaq::CUeiTCChannel rom the Class List.
Notice rom the documentation that the TC Channel conguration is essen-tially an enhanced AI Channel conguration that perorms linearization andvoltage-to-degrees translation or you. The unction parameters are:
As discussed in the manual, the resource string is, or exampl
or, in abstract terms:
I you are using a non-standard board/setup, bypass channelusing a plus in ront o the channel, as ollows:
The minimum and maximum voltage automatically sets the
Thermocouple type can be Type B, E, J, K, N, R, S, or T
CJC Compensation Type can be built-in (or the STP-AI-U w/ A
erwise constant (in which case, cjcConstant must be dened ent temperature o the room e.g. 70F). Otherwise, a cjcResdened.
AIChannelInputMode can be set to dierential (AI-225 only wmode) or single-ended (or SE-only boards with; connecting ground not recommended due to noise).
Thats it! Compile, and run.
// mySs.CreateAIChannel(pdna://192.168.0.61/Dev2/Ai0:3,
-10.0, 10.0, UeiDaq.AIChannelInputMode.Differential)
mySs.CreateTCChannel(pdna://192.168.100.2/Dev0/Ai2, -
10.0, 10.0, AIChannelInputMode.Differential, Tempera-
tureScale.Fahrenheit, ColdJunctionCompensationType.
BuiltIn, 70, , AIChannelInputMode.Differential)
(resource string, min voltage, max voltage, Thermocouple-
Type, TemperatureScale, ColdJunctionCompensationType,
cjcConstant, cjcResource, AIChannelInputMode)
pdna://192.168.100.2/dev0/Ai2
:////
pdna://192.168.100.2/dev0/Ai+24
-
8/14/2019 Thermocouple Measurement with AI-225 Using DASYLab and .NET
13/14
2007 United Electronic Industries, Inc. All Rights Reserved.
AI-225 Thermocouple Measurement Using DASYLab
For a Glossary o terms used in this document as well as our other
Application Notes and stories, Please reer to our online glossary at:http:/ / www.ueidaq.com/ data- acquisition- glossary/
No part o this publication may be reproduced, stored in a retrieval system, or trans-
mitted, in any orm by any means, electronic, mechanical, by photocopying, recording,
or otherwise without prior written permission.
Inormation urnished in this manual is believed to be accurate and reliable. However,
no responsibility is assumed or its use, or or any inringements o patents or other
rights o third parties that may result rom its use.
All product names listed are trademarks or trade names o their respective companies.
See UEIs website or complete terms and conditions o sale:
http://www.ueidaq.com/company/terms.aspx
Contacting United Electronic Industries
Mailing Address:27 Renmar Avenue
Walpole, MA 02081
U.S.A.
For a list o our distributors and partners in the US and around the w
http://www.ueidaq.com/partners/
Support:
Telephone: (508) 921-4600
Fax: (508) 668-2350
Also see the FAQs and online Live Help eature on our web site.
Internet Support:
Support [email protected]
Web-Site www.ueidaq.com
FTP Site tp://tp.ueidaq.com
-
8/14/2019 Thermocouple Measurement with AI-225 Using DASYLab and .NET
14/14
Founded in 0, UEI is a leader in the computer based data acquisition and con-
trol industry. Serving customers world-wide, UEI products based upon PCI, PXI, ISA
and Ethernet interaces oer unequaled perormance as well as fexibility. We are
committed to providing the highest quality hardware, sotware and services, en-
abling engineers and scientists to interace data-acquisition and control hardware
to the real world. Through our state-o-the-art technologies we serve the needs o
individual researchers and developers as well as OEMs.
2007 United Electronic Industries, Inc.