- From: Lars <lars_at_sumpfralle.de>
- Date: Fri, 24 Sep 2004 16:56:09 +0200
hi,
there was an inaccrurancy in my last two postings about unwanted samples during streamed analog output with a PCI-6031E:
- if I use comedi-0.7.68, then two extra samples appear on the output channel at the beginning of the stream
- if I use a cvs-version, then only one extra sample appears
I traced this difference in behaviour down to:
- comedi/drivers/ni_mio_common.c
- between the versions: 2004/06/28 and 2004/07/15
the following lines show the difference, that matters:
[ ### diff starts here ### ]
diff -ruN cvs-20040628/comedi/comedi/drivers/ni_mio_common.c cvs-20040715/comedi/comedi/drivers/ni_mio_co
mmon.c
--- cvs-20040628/comedi/comedi/drivers/ni_mio_common.c 2004-06-28 03:03:01.000000000 +0200
+++ cvs-20040715/comedi/comedi/drivers/ni_mio_common.c 2004-07-16 00:30:24.000000000 +0200
_at__at_ -854,7 +854,8 _at__at_
/* reset fifo */
win_out(0,DAC_FIFO_Clear);
- ni_ao_win_outl(dev, 0x6, AO_FIFO_Offset_Load_611x);
+ if(boardtype.reg_type & ni_reg_6xxx_mask)
+ ni_ao_win_outl(dev, 0x6, AO_FIFO_Offset_Load_611x);
/* load some data */
n = comedi_buf_read_n_available(s);
_at__at_ -2066,7 +2067,8 _at__at_
bits = AO_Error_Interrupt_Enable;
#ifdef PCIDMA
win_out(0, DAC_FIFO_Clear);
- ni_ao_win_outl(dev, 0x6, AO_FIFO_Offset_Load_611x);
+ if(boardtype.reg_type & ni_reg_6xxx_mask)
+ ni_ao_win_outl(dev, 0x6, AO_FIFO_Offset_Load_611x);
ni_ao_setup_MITE_dma(dev, &s->async->cmd);
ret = ni_ao_wait_for_dma_load(dev);
if(ret < 0) return ret;
[ ### end of diff ### ]
if I remove the if-line, then two extra samples appear an the analog
output channel before the written data,
otherwise only one
I experimented around with the offset (0x6) that ist written to the
device, but that didn't change anything (as far as I tried).
Maybe someone can suggest, how to set the offset of the analog output
of an PCI-6031E properly, so I can test it with my board?
Any ideas are very welcome ...
thanks,
Lars
Received on 2004-09-24Z13:56:09