PCI-DIO-96 problems

Hello -

We're working on setting up a small data acquistion system using Comedi,
and we've run into problems that we could use some help with. (comedi
v.0.7.64 and comedilib v0.7.18)

We've purchased two data acquisition cards: a Nat. Inst. PCI-6025E multi
I/O card which (so far) works fine, and a Nat. Inst. PCI-DIO-96 which is
misbehaving quite badly.

Any code that outputs to the PCI-DIO-96 doesn't appear to do anything
physical. All of the bits are stuck high (5V). However, if I write
values to the board, and then switch the channel to an 'input', and read
back, the values read back are the values that were written. It's just
that we don't see that on the actual output of the board.

8255 support is compiled into comedi: we increased the log level to 4
and do not see any problems being reported. In the system log, comedi
outputs "comedi: subdevice 0 does not support commands" for all
subdevices of the PCI-DIO-96 (0,1,2,3: substitute the number in) but
only once per time we run the program (It must happen during the
'comedi_open' routine, but I don't know where...). Anyway, this
shouldn't be a problem since I'm not using commands, just
comedi_dio_write and comedi_dio_read.

I'm including the test code here, followed by as much information as I
could get. If any more is needed, let me know.

=======================================================================
This code is just a framework for trying to figure out if anything is
actually happening: we've been changing the values in it, rather than
making a user-changeable values. Here, it was writing alternating values
to the channels. If all of the channels are written to 0 using a similar
program (with '0' instead of 'chan % 2'), the channels will read back
'0' the first time the program is run, and then will alternate the next
time.
=======================================================================
#include <stdio.h>
#include <comedilib.h>


comedi_t *dev;
int subdev;
int chan;
int bit;
int status;

int main(void)
{
  comedi_loglevel(4);
  dev = comedi_open("/dev/comedi1");
  
  for (subdev=0; subdev<4; subdev++)
    {
      for (chan=0; chan<24; chan++)
        {
          comedi_dio_config(dev, subdev, chan, COMEDI_INPUT);
          status=comedi_dio_read(dev, subdev, chan, &bit);

          printf("read: subdev: %d, chan: %d, status: %d, bit: %d\n",
subdev, chan, status, bit);
        }
      for (chan=0; chan<24; chan++)
        {
          comedi_dio_config(dev,subdev,chan, COMEDI_OUTPUT);
          status=comedi_dio_write(dev, subdev, chan, chan % 2);
          printf("write: subdev: %d, chan: %d, status: %d, bit: %d\n",
subdev, chan, status, chan % 2);
        }
      printf("\n");
    }
}
=================================================================
Here's the test setup we have:
PC: AMD Athlon 1GHz on an Iwill KT133A-based board
Output of lspci:
00:00.0 Host bridge: VIA Technologies, Inc. VT8363/8365 [KT133/KM133]
(rev 03)
00:01.0 PCI bridge: VIA Technologies, Inc. VT8363/8365 [KT133/KM133 AGP]
00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South]
(rev 40)
00:07.1 IDE interface: VIA Technologies, Inc. Bus Master IDE (rev 06)
00:07.4 Bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev
40)
00:09.0 Ethernet controller: Accton Technology Corporation SMC2-1211TX
(rev 10)
00:0a.0 Class ff00: National Instruments PCI-DIO-96
00:0b.0 Class ff00: National Instruments: Unknown device 2a80
00:0f.0 Multimedia audio controller: C-Media Electronics Inc CM8738 (rev
10)
00:10.0 RAID bus controller: CMD Technology Inc PCI0649 (rev 02)
01:00.0 VGA compatible controller: nVidia Corporation Vanta [NV6] (rev
15)

OS: /proc/version shows:
Linux version 2.2.19 (root_at_daq) (gcc version 2.95.4 20011006 (Debian
prerelease)) #4 Tue Dec 18 08:44:54 EST 2001

Comedi: /proc/comedi shows 
comedi version 0.7.64
format string: "%2d: %-20s %-20s
%4d",i,driver_name,board_name,n_subdevices
 0: ni_pcimio            pci-6025e               7
 1: ni_pcidio            pci-dio-96              4
ni_pcidio:
 ni_pcidio
ni_pcimio:
 ni_pcimio
8255:
 8255

"info" for the PCI-DIO-96 shows
overall info:
  version code: 0x000740
  driver name: ni_pcidio
  board name: pci-dio-96
  number of subdevices: 4
subdevice 0:
  type: 5 (digital I/O)
  number of channels: 24
  max data value: 1
  ranges:
    all chans: [0,5]
  command:
subdevice 1:
  type: 5 (digital I/O)
  number of channels: 24
  max data value: 1
  ranges:
    all chans: [0,5]
  command:
subdevice 2:
  type: 5 (digital I/O)
  number of channels: 24
  max data value: 1
  ranges:
    all chans: [0,5]
  command:
subdevice 3:
  type: 5 (digital I/O)
  number of channels: 24
  max data value: 1
  ranges:
    all chans: [0,5]
  command:

Any help would be appreciated. Is there something we're missing to
"really" enable the output? It appears as if we're writing to something
internal to the card, but nothing is being output from it.

We did try switching the card to a Windows machine and using the Nat
Inst software on Windows (the test panel) to set bits, and that part
worked fine.

I'm a bit confused, as the NI PCI-6025E also has an 8255 on it, and it
works fine, but the PCI-DIO-96 just isn't working for us.

Has anyone else been able to get this card working? Any info greatly
appreciated.

Patrick

Received on 2002-06-03Z18:34:08