Re: Analog Input Board Recommendations

On Wed, Oct 02, 2002 at 05:44:24PM -0400, Calin A. Culianu wrote:
> Do I have to worry about this when using insn's to sample across channels?

Note: insns are completely different from cmds.  Notably, with
insns, _everything_ is synchronous.

> 1) INSN_READ on new channel with n=0 (to switch the MUX)

Drivers are encouraged to use the fastest method possible to change
the mux channel.  "Fastest method" may involve measuring an actual
sample, and thus take a relatively long time (i.e., 5 us instead
of 500 ns).

Effectively, this instruction means that the mux is set, and then
there is "some unknown delay".

> 2) INSN_WAIT with data = MUX settling time in ns
> 3) INSN_READ with n=1

Trigger a conversion and wait for the result (5 us).

> Aside from the time it takes the code to execute on the cpu, does 1-3
> actually take ADC conversion time _plus_ mux settling time,

On an NI E series board, it will take 2 A/D conversion times + 1 mux
settling time, since step 1 requires an additional conversion on those
boards.  Note that _for this particular driver_, you are waiting
11 us for the mux to settle (assuming 5 us conversion and 6 us mux
settling time), which is longer than necessary.  However, the driver
may change in the future so that step 1 is faster.  [Curiously, the
NI E series limitation that you have to do a conversion to change
channels is one of the main reasons that Comedi doesn't have decent
mux handling.]

> What triggers the conversion internally on the ADC?

Usually writing a register with a name something like START_CONVERSION.
Then the driver repeatedly reads a status register until the
conversion is completed.



dave...

Received on 2002-10-02Z21:21:46