LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Program identifies the pxi chassis

I have a utility in Lab Windows CVI 2012 that runs on a PC, PXI or PXIe. I would like the program to be able to identify which of these it is running on.

Right now we have a read of a device in the PXI chassis, just initialize a switch card, if it is successful, we have the PXI or the PXIe. My concern is if that one card is not present, also this results in a run time error if the card is not there, or if it is a PC.

I would really like something to read directly from the PXi, a serial or device number or something. Sort of like we have in our code to read the type of CAN device, first we get the CAN device number, then the device type:

 

/* find "can_num" for NI CAN device (just not USB) */
Status = ncGetHardwareInfo(can_num, 1, NC_ATTR_HW_FORMFACTOR, 4, port_check);

/* use "can_num" from PCI, PXI, or PCMCIA Device to get port number */
Status = ncGetHardwareInfo(can_num, 1, NC_ATTR_INTERFACE_NUM, 4, port_check);

 

 

Is there any such function to read the PXI chassis?

0 Kudos
Message 1 of 2
(4,103 Views)

Hi Ken-this-..., 

 

I think what you want is DAQmxGetDeviceAttribute().  Here is a link to a similar post:

 

http://forums.ni.com/t5/LabWindows-CVI/How-to-detect-PXI-chassis-cards-and-their-serial-numbers-in-C...

 

 

Peter T
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(4,077 Views)