beautypg.com

Function usage, Prototypes, Program references – Measurement Computing Data Acquisition Systems rev.10.4 User Manual

Page 158

background image

Function Usage

For all functions of the form daqCvt..., raw data to be converted must be unsigned
(i.e., the dafUnsigned value must be set using the daqAdcSetScan function).


For T/C and RTD conversion, users of Daq/2000 Series devices* and/or Daq PC Cards must
be sure that the main unit is using ten volt range gains settings, either unipolar (0 V to 10 V)
or bipolar (-5 V to +5 V).

See the “T/C Gains Settings” section in the daqCvtTCConvert function entry for the
appropriate settings.

*
Daq/2000 Series devices include DaqBook/2000 Series, DaqScan/2000 Series, DaqLab/2000

Series, and DaqBoard/2000 Series devices.

For convenience, daqCvtLinearSetupConvert can perform both setup and conversion.

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++

daqCvtLinearSetup(DWORD nscan, DWORD readingsPos, DWORD nReadings, FLOAT
signal1, FLOAT voltage1, FLOAT signal2, FLOAT voltage2, DWORD avg);

Visual BASIC

VBdaqCvtLinearSetup (ByVal nscan&, ByVal readingsPos&, ByVal nReadings&,
ByVal signal1!, ByVal voltage1!, ByVal signal2!, ByVal voltage2!, ByVal
avg&)

Program References

None

4.3-32 Daq API Command Reference

908494

Programmer’s

Manual