- From: Fredrik Lingvall <fl_at_signal.uu.se>
- Date: Fri, 29 Nov 2002 00:33:56 +0100
Hi Frank!
I think you should add something like this:
if(scan_up == 0 && cmd->chanlist_len > 1) {
if (CR_CHAN(cmd->chanlist[cmd->chanlist_len-2]) != 1) err++;
}
at line 959 in ni_labpc.c. Otherwise, you get no error report if
you specify channels [x 0] for scanning with x !=1 (reverse
order scanning is assumed).
Also, I have browsed through the user manual and the register munual for
the DAQCard-1200 and I could not find that they explicity write that one
must scan the channels in consecutive order. In the user man (p. 4-6)
they write
"...the mux counter decrements from the highest numbered channel to
the channel 0 and repeats the process. Thus you can scan any number
of channels from eight to two". By looking at your code in labpc_ai_cmdtest
function you return 5 if the channel list isn't consecutive. I got very
strange readings when I scanned channel 2 and 0, but not 1 and 0 so
its probably correct.
Reading the manual I also get the impression that one treats single-channel
scanning and multiple-channel scanning differently.. This may be a clue to
why the read instruction never returns (waits for ever).
Fredrik
Received on 2002-11-28Z23:33:56