Prototypes, Program references – Measurement Computing Data Acquisition Systems rev.10.4 User Manual
Page 178

The first reading of the scan is position 0, and the last reading is (nscan–1). The thermocouple signal
readings must immediately follow the CJC reading in the scan data, so the first thermocouple signal must be at
scan position (cjcPosition+1), the next is at (cjcPosition+2), and so on. In the illustration, we see
that two type J thermocouple readings are taken directly after the CJC scan. In the following scan group, two
zero scans are followed by a CJC scan, which is itself followed by one type K thermocouple scan. Note that for
any single call of the conversion function, all thermocouples in a scan group must be of the same type.
If zero compensation is not being used in a scan, the CJC scan is placed in position 0, followed by the
thermocouple scans. The following illustration shows how this data would be organized:
The CJC readings must be taken with the appropriate gains set with the daqAdcSetScan function. The
required gain settings for the CJC and thermocouple channels change depending on the unipolar/bipolar
mode—see the daqCvtTCConvert function for specific info on T/C gains settings.
Moving Averages
To better illustrate the moving average feature of the avg parameter, suppose the avg value is set to 3. Since
each scan’s readings are averaged with the preceding scan, the results from the first scan (which has no
preceding scan) are not averaged at all. However, the results from the second scan are averaged with the first
scan, and the results from the third scan are averaged with the preceding two scans. After the third scan, each
subsequent scan is averaged with the preceding two scans (since the avg value is 3, and avg-1 is two). In
another instance, if the avg value is set to 5, then each scan after the fifth scan would be averaged with the
four preceding it.
Prototypes
C/C++
daqCvtTCSetup(DWORD nscan, DWORD cjcPosition, DWORD ntc, TCType tcType,
BOOL bipolar, DWORD avg);
Visual BASIC
VBdaqCvtTCSetup&(ByVal nscan&, ByVal cjcPosition&, ByVal ntc&, ByVal
tcType&, ByVal bipolar&, ByVal avg&)
Program References
DBK19EX.CPP
4.3-52 Daq API Command Reference
908494
Programmer’s
Manual