

Question
Answer
The
averaging algorithm is incorporated in two internal functions of GoldExI:
GetCurrent and GetVoltage. Whenever these functions are called, the
averaging is performed. Both functions are identical, so lets
consider only one -- GetVoltage It does the following:
- If
TurboAveraging is on (Options|Averaging|Turbo), sample the
voltage N times (Options|Averaging|GetVoltagesAveragingTimes)
with a sampling rate given in Options|Averaging|Sampling rate.
This results in only one call to NIDAQ.DLL!
- If
TurboAveraging is off, sample the voltage N times calling NIDAQ.DLL
point by point N times.
- After
N samples for each voltage are collected using or not using Turbo,
they are stored in the list and sorted in ascending order.
- Then
K of them (Options|Averaging|GetVoltagesAveragingStart) from
the top and K from the bottom of these list are skept.
- The
mean value of the other N-2K samples is calculated and returned as a
measured voltage.
Note,
that the main delay comes from NIDAQ calls. and of course is
proportional to N. If N is big enough (e.g. N>10), it is strongly
recommended to use Turbo averaging for acceleration of the process.
In the same time Turbo averaging will not give an advantage if N=1.
In addition, NIDAQ can return an error code for Turbo with N=1. If
NIDAQ.DLL returns an error code in Turbo mode, GoldExI
switches to regular non-Turbo way of reading the voltage. The last
status code returned by NIDAQ can be seen in Options|Averaging
dialog window. The meanings of the codes: "0" - Turbo was
used successfully, "-13" - Turbo is off,
"10xxx" - Turbo is on, but NIDAQ returned error, so GoldExI
used old way of getting voltage. The reason of the failure, can be
understood, if you check the meaning of the error code in NIDAQ manual.

[Review]
[Download]
[Gallery]
[Links]
[F.A.Q.]
[HerStory]
[Bugs]
[Suggestions]
[Author]
[EMDAQ.DLL] [Home]
[forum]
