LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to detect PXI chassis cards and their serial numbers in CVI?

I have a PXI-1045 chassis with various PXI cards (5600,5620,5124,6040E,2593,6509). Is there a way using LabWindows/CVI to detect slot number, model number, AND serial number of all cards installed in the chassis?
0 Kudos
Message 1 of 2
(4,215 Views)
Hi kwseitz3,

If you know the device alias name for the devices, you can use DAQmx and niModInst commands to find the slot number, model number, and the serial number of your devices. 

Here are some examples of the function calls that you need to make. 

For your DAQmx devices, take a look here for more information.

DAQmxGetSystemInfoAttribute (DAQmx_Sys_DevNames,)

DAQmxGetDeviceAttribute("dev1",DAQmx_Dev_SerialNum, &test, 4); /* Serial Number */
DAQmxGetDeviceAttribute ("dev1", DAQmx_Dev_PXI_SlotNum, &test2, 4); /* PXI Slot Number */
DAQmxGetDeviceAttribute ("dev1", DAQmx_Dev_ProductType, test3, 128); /* Product Name */

For your Modular Instruments, you will need to use niModinst functions to gather the information.

To begin, you will need to open a niModinst session for the type of modular instruments you want to detect.

For example, for NI-scope (digitizers) you will need to use the following:
*Note - for your downcoverter (5600) use NI-RFSA and for your 2593 use NI-Switch.

niModInst_OpenInstalledDevicesSession (NI-Scope, handle, deviceCount);

Here are the three functions once you open the session:
niModInst_GetInstalledDeviceAttributeViInt32 (handle, index, NIMODINST_ATTR_SLOT_NUMBER,
                                                       attributeValue); /* Slot Number */
niModInst_GetInstalledDeviceAttributeViString (handle, index, NIMODINST_ATTR_SERIAL_NUMBER,
                                               attributeValueBufferSize, attributeValue); /* Serial Number */
niModInst_GetInstalledDeviceAttributeViString (handle, index, NIMODINST_ATTR_DEVICE_MODEL,
                                               attributeValueBufferSize, attributeValue); /* Device Model */

Remember to close the niModinst Session using the following function:
niModInst_CloseInstalledDevicesSession (handle);

Also, if you want more information about the niModinst functions, take a look at the help file that should have been installed to the following directory: C:\Program Files\IVI\Drivers\niModInst\Documentation\niModInst.chm.

I hope this helps,
Paul C.
0 Kudos
Message 2 of 2
(4,183 Views)