Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Access device via /dev/nipalk?

I'm inheriting an old application that communicates with a NI 6070E card via a link in /dev, as in:
    fd = open("/dev/mydevice", O_RDWR);
 
Then, the values the application needs are read:
    cnt = read(fd, pValues, 8);
 
This was done from an old installation of RH, with an old kernel (maybe 2.2).  Is there a way I can do the same with the new drivers and 2.6 kernel?  I see there is a /dev/nipalk, but changing the link to that in the code doesn't work.
 
I suppose what my question boils down to is this: is there a way to get a file descriptor to the card via an open() call?
 
I have two cards installed in my machine, as listed by lsdaq:
    NI 6508     "Dev 1"    (PXI4::11::INSTR)
    NI 6070 E   "Dev 1"    (PX3::14::INSTR)
 
I hope this is enough information.  I'd provide more if knew anything more.  The other end of the cable runs into a rack of untold horror and disgust.  I just want to get this done with minimal effort to escape what could otherwise turn into very bad situation. 😉
 
Thanks,
Paxton
0 Kudos
Message 1 of 2
(2,673 Views)

I bit the bullet and decided to use the API that comes with the software distro than write my own driver for the two cards.

I do have one question, though.  I manipulated writeDigPort.c to write out a different value.  Checking a break-out box with a meter, I found that sure enough, it worked.  All I changed was to Port 11 and writing out the value 0x1.

Now when I use the same configuration (Port 11) to read the value back out via software, by making the required changes in readDigPort.c, I always get 0xFF.

Any ideas where I may be going wrong?

0 Kudos
Message 2 of 2
(2,626 Views)