- From: Jack W Holloway <holloway_at_MIT.EDU>
- Date: Tue, 25 Jan 2005 12:49:50 -0500
The system stats: I'm running Linux 2.6.6 with comedi version 0.7.69. I've
got an NI-PCI-6534 DAQ card, which comedi detects nicely:
comedi: version 0.7.69 - David Schleef <ds_at_schleef.org>
Available NI device IDs: 0x12b0
comedi0: nidio:<6>PCI: Found IRQ 12 for device 0000:00:0c.0
PCI: Sharing IRQ 12 with 0000:00:09.0
MITE:0xe9101000 mapped to c880d000 DAQ:0xe9102000 mapped to c88b0000
pci-6534 rev=64
For additional verbosity, the info executable from the comedilib
distribution's demo directory provides me with the following information:
holloway_at_RSEG-RECV:~/comedi/demo$ ./info
overall info:
version code: 0x000745
driver name: ni_pcidio
board name: pci-6534
number of subdevices: 1
subdevice 0:
type: 5 (digital I/O)
number of channels: 32
max data value: 1
ranges:
all chans: [0,5]
command:
start: now|int
scan_begin: timer|ext
convert: now
scan_end: count
stop: none|count
command fast 1chan:
start: now 0
scan_begin: timer 50
convert: now 0
scan_end: count 1
stop: count 2
So everything looks fine there...
My problem is this: it seems as though I can't read or write bits to the
device. I've written my own simple code using comedi_dio_bitfield(), I've
tried using the comedilib demos, inp, and outp.
As far as reading bit, I've manually connected A0 (so bit 0) high, tried to
read the bit, and found that comedi's claiming it's 0.
# ./inp -v
measuring device=/dev/comedi0 subdevice=0 channel=0 range=0 analog reference=0
0
The same happens when I used comedi_dio_bitfield(). I've tried writting
bits using outp
# ./outp -v 1
writing 1 to device=/dev/comedi0 subdevice=0 channel=0 range=0 analog reference=0
1
and my own code, only to find that I've got 0 on all the
bits (I'm watching the bits on a logic anlyzer).
Any ideas?
Has anyone been able to get simple DIO working on the NI-PCI-6534?
-Jack
--
Jack W. Holloway holloway_at_mit.edu
Remote Sensing and Estimation Group
MIT Research Laboratory of Electronics
77 Massachusetts Ave., Room 26-344 617.253.3o74
Cambridge, MA o2139
3o5 Memorial Drive, Apt 6o8a 617.225.9868
Cambridge, MA o2139
Received on 2005-01-25Z17:49:50