Re: Advantech PCL 818L and asynchronous aquisition problem

On Mon, Apr 26, 2004 at 09:12:18AM +0200, Nils Juergens wrote:

> > comedi_config /dev/comedi0 0x210,7,1,0,1,1 pcl818l
> Are you sure your card is actually set to IRQ 7 with the jumpers on the
> board?

Finally after some more time spent on trying to get this card working 
it seems to live now :>

The card is PCL 818L rev A6. According to the manual IRQ is software 
selectable, and jumper settings are as follows:

- SW1 210-21F
- JP1 DMA channel 3
- JP2 1 MHz
- JP3 DI0, DI2
- JP4 internal reference
- JP5 internal voltage reference -10V
- JP6 S.E. inputs
- JP7 input voltage range +/- 10V
- JP8-11 20 pin

The card seems to work with the following config:

comedi_config /dev/comedi0 pcl818l 0x210,3,3,1,1,1

Typical syslog (after recompilation with debug lines uncommented) during 
correct (it seems) aquisition looks like this:

Apr 30 16:20:06 greblus kernel: comedi: A/D mode1/3 IRQ
Apr 30 16:20:06 greblus kernel: pcl818_ai_cancel()
Apr 30 16:20:06 greblus kernel: pcl818_ai_cancel() end
Apr 30 16:20:06 greblus kernel: I

I'd like to test the card but comedi_test command (with no args) hangs 
like this:

I: driver name: pcl818
I: device name: pcl818l
I:
I: subdevice 0
I: testing info...
rev 1
I: subdevice type: 1 (analog input)
  number of channels: 16
  max data value: 4095
  ranges:
    all chans: [-10,10] [-5,5] [-2.5,2.5] [-1.25,1.25]
I: testing insn_read...
rev 1
comedi_do_insn returned 1, good
I: testing insn_read_0...
comedi_do_insn returned 0, good
I: testing insn_read_time...
rev 1
comedi_do_insn: 3
read time: 36 us
I: testing cmd_no_cmd...
not applicable
I: testing cmd_probe_src_mask...
rev 1
command source mask:
  start: now
  scan_begin: follow
  convert: timer|ext
  scan_end: count
  stop: none|count
I: testing cmd_probe_fast_1chan...
command fast 1chan:
  start: now 0
  scan_begin: follow 0
  convert: timer 25000
  scan_end: count 1
  stop: count 2
I: testing cmd_read_fast_1chan...

So maybe something is still wrong... 

I was playing a little bit and when reading data from one channel, 
with scanning frequency of 32000Hz and number of scans 32000, 
when increasing these values more I was having "read: Broken pipe" 
messages, however max scan frequency for this card is 40kHz and 
I guess it's not necessarly related to comedi itself, rather to 
system limitations but I'd like to know how to test it's 
performance. 

Also I've experienced a few times that cmd hanged as previously,
unfortunately it's hard to repeat it, not to mention to diagnose.
(Hopefully it was caused by me :>)

> Unless you really need hard realtime there is no need for RTAI (but it
> shouldn't interfere).

There is comedi_rt_timer, so I was trying to use it before commedi 
commands functionality was added.

> > I was thinking about removing rtc to release IRQ 8 for DMA mode 3, but 
> > DMA mode 1 should work, isnt it?

Now i think that DMA 1 may not work because of the jumper setting (the card 
is set to DMA 3 mode).

> good luck
> Nils

Thanks for your help and suggestions :>

	W.

-- 
You can always pick up your needle and move to another groove.
		-- Tim Leary

Received on 2004-05-06Z17:50:00