Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to program for two PCI cards with identical device ID?

I have 2 PCI-6713 cards, and they have identical device ID. I'm trying to program in Linux using C++. I got some examples from NI, but non of them seems considering this problem. Where can I get help for this?
Thanks.

flofish
0 Kudos
Message 1 of 6
(10,406 Views)
In the examples you have, there should be a file named /OSinterface/Linux/osiUserCode.cpp which implements the code that finds the specified card in your system.

This file includes a function named FindPCICard which finds the first card of the type (device ID) specified. You need to edit the function so that it will also find additional cards of the same type.

Christian L
authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
0 Kudos
Message 2 of 6
(10,406 Views)
Thanks Christian. I understand that I can find the addresses of both cards by reading "/proc/bus/pci/devices", but I don't know which one is which. Of course I can find out by some experiments, but I'm worried that the addresses will change each time I turn on the computer. If so, I have to experiemtally decide which is which each time, and that's not what I want.
So, is there anything we can do about it? Such as a special ID which can distinguish them?

Thanks

flofish
0 Kudos
Message 3 of 6
(10,406 Views)
Hi flofish,

I am assuming that you are running DAQmxBase for linux found here:

http://digital.ni.com/softlib.nsf/websearch/47D4C7DDD7C777C886256F230070A606?opendocument&node=132070_US

You may have to determine which card is which experimentally, but the device numbers should not change when the computer is rebooted. Your cards are given a unique serial number. In windows, this property can be seen from the Measurement and Automation Explorer (MAX). You may have a similiar device manager in Linux that will allow you to see the device serial number.
0 Kudos
Message 4 of 6
(10,406 Views)
The short answer is that you should read out the EEPROM on each of the two cards you find to determine which one is which.

I don't have specific examples for the 6713 on how to do this, but here are the necessary pieces.

EEPROM Read Example - this example is for the E series MIO card, but will be similar for the 6713.

E Series RLPM - in chapter 5 it describes how to read the EEPROM, which corresponds to the example. The 6713 may have a different EEPROM on it than the example uses and you may have to adjust the code accordingly. Look on the 6713 to find the EEPROM and then look up its manual online. Most likely it is one of the following chips: MB88341, DAC8043, 8800.

EEPROM Map for the 6713 - this is the roug
h allocation of information within the 6713. I don't see the serial number listed, but it should be stored on there somewhere. You may want to read out the complete EEPROM and compare the values to the known serial numbers of your boards.

Christian L
authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
0 Kudos
Message 5 of 6
(10,406 Views)
I have a 6713 and I've dumped its eeprom, but the serial number isn't in there. Are you sure E-series store their serial number in their eeprom? I've attached my eeprom dump for a 6713 with serial number 1143fc3. I am able to get the serial number off an m-series board by the way (with the help of the example in the m-series ddk). The m-series board required twiddling a bit in the iodwcr1 mite register before the serial number part of the eeprom was readable.
0 Kudos
Message 6 of 6
(8,516 Views)