Re: Simultaneous AO!

On Fri, Mar 28, 2003 at 05:58:39PM +0100, Codrut VISA wrote:
> Hello,
> 
> I use RTAI and Comedi with a NI6713 card.
> I saw that performing simultaneous digital output works, but I want to 
> know if it is possible to perform simultaneous analog output?
> 
> I did some tests with this card in order to mesure the comutational 
> times on digital and also analogic. Digital seems to be ok. But, I done 
> two succesives analog outputs. In this case the the elapsed time between 
> the begining at the first output and the second output was initialy 
> about 2us. After some modification in the comedi code source I've got 1.2us.
> 
> Does someone know if it is possible to reduce this time in the case 
> where simultaneous outputs it is not possible?

The best way to handle this in Comedi is to use an AO command
with n_chan=2, n=1.  A command has to be used, since the
instruction interface has no concept of timing.  One problem
is that the setup time for a command is a lot longer than
for an instruction.

One way to get around this is to use external triggering with
a large N.  Then connect the external trigger to a digital
out line (i.e., using a wire), and write a 1 to the digital
line to output 2 new samples.  One possible problem with this
method is that I'm not sure the driver will allow the FIFO
to get as low as 2 samples, thus requiring a huge lag between
writing the samples to the FIFO and having them appear in
analog form.  (This is a bug, IMO).

A clever hacker may wish to add a special case in the AO
command handling to notice the n_chan=2, n=1 case, and
perform the action using the same method as AO instruction
handling, but use the simultaneous DAC update feature on
the NI boards.



dave...

Received on 2003-04-01Z01:04:09