- From: Fredrik Lingvall <fl_at_signal.uu.se>
- Date: Wed, 27 Nov 2002 00:16:37 +0100
Hi all!
This is how I initialize the channel list for scanning
using comedi_command:
// Setup a channel list.
for(n=0; n<n_chans; n++) {
if (scan_down) // Reverse order (scan from high-to-low channel).
chanlist[n] = CR_PACK( (int) chan_vec[n_chans-n-1],range[n],aref);
else // Normal order (low-to-high).
chanlist[n] = CR_PACK( (int) chan_vec[n],range[n],aref);
}
where 'chan_vec' is a vector of the channels I want to scan and 'range'
is a vector of the corresponding ranges. I use a DAQCard-1200, and
and the scanning only works when I use channel 0 to N where N
ranges from 1 to 7. The channels must be consecutive, that is,
it don't work if I only use channel 1 and 4, for example. If
I only use channel 0 the code hangs at the read instruction:
ret = read(comedi_fileno(it),buf,BUFSZ);
Is this due to limitations in the DAQCard-1200 or is
it comedi related?
Fredrik
Received on 2002-11-26Z23:16:37