Re: New buffer reading behaviour in continuous acquisition mode?

On Wed, 29 Jan 2003, Frank Mori Hess wrote:

> > [...]
> > > The API already supports interrupting after N bytes, as I mentioned in a
> > > previous email, the INSN_CONFIG_BLOCK_SIZE configuration insn.  So I
> > > still don't see any need for an api change/extension.
> >
Okay, one more iteration in our discussion. Please, bear with me... :-)

We've been looking very hard at the code and the documentation, and are
still not completely sure about the semantics of many Comedi commands.
(I promise to adapt the documentation accordingly, after we will have
found the correct semantics :-)

So, this is my summary of our findings.
Comedi has "commands" and "instructions". A command programs the
hardware of the bord to _autonomously_ do acquisition; i.e., the
software can go and do other things while a command is executing,
interrupted from time to time by DMA or an ISR.
In an instruction however, the software is doing acquisition _in busy
waiting_. (At least in the current implementation of the NI driver where
is see a polling on the buffer-not-empty flag.)
And the API is indeed available to program a sequence of say 6
measurements in one instruction (or instruction list). But, one looses
the real-time determinism when doing this with instructions, and/or the
performance.

What we want is something between instruction and command: to program
the card to do its acquisition job autonomously, _and_ interrupting us
with the the flexibility and determinism of the instruction.  (And
everything is real-time of course.) When I say "interrupting", I mean
processing an ISR that does a deterministic transfer of data from the
hardware buffer, but _not_ stopping the acquisition.

So, is my summary of the command vs instruction mechanism correct?

If it is, I think our needs cannot be satisfied without an API change.
Anyway, the semantics of many Comedi things are much less precise than I
used to think, so let's do something about that ASAP...

Herman

-- 
  K.U.Leuven, Mechanical Engineering, Robotics Research Group
<http://people.mech.kuleuven.ac.be/~bruyninc> Tel: +32 16 322480

Received on 2003-01-30Z14:14:30