Prototypes, Program references, Using resistance temperature detectors (rtds) – Measurement Computing Data Acquisition Systems rev.10.4 User Manual
Page 164: Visual basic

Using Resistance Temperature Detectors (RTDs)
Many devices can measure temperatures through use of DBK9 RTD expansion cards. Up to 8 RTDs can
attach to each DBK9 and up to 32 DBK9s can be attached to a single device; allowing for up to 256
temperature readings. The software currently supports 100, 500, and 1000 ohm RTDs. The RTDs must all be
of the same type, and the reading groups for all RTDs must follow each other in the scan sequence. All non-
RTD data conversion, if any, must be done by other means.
The RTD measurement functions are designed for simple temperature measurement in which each RTD
channel is read 4 times. These 4 readings must be grouped together consecutively during a scan in the
following order, with the appropriate gain: Dbk9VoltageA (gain=0), Dbk9VoltageB (gain=1),
Dbk9VoltageC
(gain=3), and Dbk9VoltageD (gain=3).
The temperature conversion functions use input data from one or more device scans. They take 4 voltage
readings for each RTD channel, apply the appropriate averaging method, convert the voltages to a resistance,
and then (using the appropriate curves for the RTD type) convert the resistance into a temperature. To
illustrate, suppose the data in the following table was gathered:
Readings Channel 0
Readings Channel 1
Scan
0
1
2
3
4
5
6
7
1
Ch 0 Va
Ch 0 Vb
Ch 0 Vc
Ch 0 Vd
Ch 1 Va
Ch 1 Vb
Ch 1 Vc
Ch 1 Vd
2
Ch 0 Va
Ch 0 Vb
Ch 0 Vc
Ch 0 Vd
Ch 1 Va
Ch 1 Vb
Ch 1 Vc
Ch 1 Vd
3
Ch 0 Va
Ch 0 Vb
Ch 0 Vc
Ch 0 Vd
Ch 1 Va
Ch 1 Vb
Ch 1 Vc
Ch 1 Vd
4
Ch 0 Va
Ch 0 Vb
Ch 0 Vc
Ch 0 Vd
Ch 1 Va
Ch 1 Vb
Ch 1 Vc
Ch 1 Vd
5
Ch 0 Va
Ch 0 Vb
Ch 0 Vc
Ch 0 Vd
Ch 1 Va
Ch 1 Vb
Ch 1 Vc
Ch 1 Vd
Temperatures
Scan
0
1
1
Ch 0
°C
Ch 1
°C
2
Ch 0
°C
Ch 1
°C
3
Ch 0
°C
Ch 1
°C
4
Ch 0
°C
Ch 1
°C
The 4 readings for each channel are grouped together in order.
If this scan data is passed to daqCvtRtdConvert(through
the counts parameter) with averaging disabled (avg
parameter in daqCvtRtdSetup set to 1), the function will
return the temp parameters shown in the table. Temperatures
returned will be in tenths of a degree Celsius.
5
Ch 0
°C
Ch 1
°C
Temperatures
0
1
If the scan data is passed to daqCvtRtdConvert (through
the counts parameter) with averaging set to block averaging
(avg parameter in daqCvtRtdSetup set to 0), the
function will return the temp parameter values shown in the
table.
Average of
all Temps
Ch 0
°C Ch
1
°C
Prototypes
C/C++
daqCvtRtdConvert(PWORD counts, DWORD scans, PSHORT temp, DWORD ntemp);
Visual BASIC
VBdaqCvtRtdConvert&(counts%, ByVal scans&, temp%, ByVal ntemp&)
Program References
None
4.3-38 Daq API Command Reference
908494
Programmer’s
Manual