- From: Lars <lars_at_sumpfralle.de>
- Date: Fri, 17 Sep 2004 14:12:41 +0200
hello,
I would like to explain my problem again with more details to avoid
misinterpretation.
my specs:
- PIII-666Mhz with 512 MB
- vanilla-kernel 2.4.26
- comedi 0.7.68 and comedilib 0.7.21
(the current cvs-snapshots showed the same odd behaviour)
- comedi_parport as /dev/comedi0
- daq-card from NI: PCI-6031E as /dev/comedi1
I was testing streaming analog output. Therefor I started
"demo/ao_waveform", that was shipped with comedilib. This
program starts an infinite streaming output to create a sine
wave. At first glance it looked ok.
Then I used an oscilloscope to take a closer look at the start of the
output:
- before I started to write to the channel, it stayed at a fixed value
(the last one, that was written)
- after I startedt to write, the oscilloscope showed that the channel
was reset to 0 V (bipolar) for two
measures; then the samples of the sine wave started to appear
Further tests showed, that analog output streaming to channel 1 resets
channel 0 (to 0V)for no obvious reasen.
However, streaming output to channel 0 does not affect channel 1.
I also experienced exactly the same behaviour with a program I had
indepently written by myself without
using code from "demo/ao_waveform". thus it doesn't look like a bug in
them demo-program.
here is a part of the code of "demo/ao_waveform":
m=write(comedi_fileno(dev),data,BUF_LEN*sizeof(sampl_t));
if(m<0) { perror("write"); exit(1); }
ret = comedi_internal_trigger(dev, subdevice, 0);
if(ret<0) { perror("comedi_internal_trigger\n"); exit(1); }
while(1){
dds_output(data,BUF_LEN);
n=BUF_LEN*sizeof(sampl_t);
while(n>0){
m=write(comedi_fileno(dev),(void*)data+(BUF_LEN*sizeof(sampl_t)-n),n);
if(m<0) { error("write"); exit(0); }
printf("m=%d\n",m);
n-=m;
}
total+=BUF_LEN;
}
just before, the comedi_command was succesfully initialized and returned
the following output via dump_cmd:
start: int 0
scan_begin: timer 1000000
convert: now 0
scan_end: count 1
stop: none 0
did anyone ever experienced a similar behaviour of this card?
again, thanks for every help or advise,
you could give,
Lars
> Hi,
> while trying to stream analog output to a pci-6031e (module:
> ni_pcimio) I discovered three oddities:(1) there were always two extra
> samples written before the wanted samples started to appear; these
> extra values unsually are 0V, but they may change by time
> (2) if I use TRIG_COUNT as the stop_src, then the last sample is
> ignored(3) a streaming output to channel 0 does not affect channel 1
> (just as expected), but channel 0 gets reset to 0V, when I start to
> stream through channel 1
>
> this behaviour occours while using both self-written programs and the
> demo "ao_waveform" of comedilib
>
> I am using comedi 0.7.68 and comedilib 0.7.21, but I also experienced
> the same results with yesterday's cvs-snapshots.
Received on 2004-09-17Z11:12:41