From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Get HW-Identifier for PCI-CAN/2 card?

I am using a CAN HW PCI-CAN/2.
Because of distributing our software to others, I want to detect the type of HW exactly.
Therefore I need to detect a hw id, for example the string "PCI-CAN/2".
The vi ncGetHArdwareInfo.vi returns only the Serialnumber, which is not enough for me,
because if we buy several cards, the SW must know all serial numbers.

So in the end, is there any function (dll) where I can read out an HW-identifier for this sort of CAN HW?
0 Kudos
Message 1 of 2
(3,206 Views)
Hi airplane,

There is no direct way to get the full hardware name. However you can use multiple calls to the ncGetHardwareInfo.vi to programmatically generate that name:

ncGetHardwareInfo(Number of Cards)
FOR Number of Cards
(
ncGetHardwareInfo(Form Factor)
ncGetHardwareInfo(Number of Ports)
ncGetHardwareInfo(Transceiver Type)
ncGetHardwareInfo(Series)
)

What is unknown right now is, whether a Series 2 card is a software selectable type (XS), but you can try to set the transceiver type using ncSetAttr.vi for the first port. If you get an error, the card is not a software selectable type (XS).

Hope this helps,
-B2k
0 Kudos
Message 2 of 2
(3,192 Views)