02-22-2008 12:21 AM
02-25-2008 03:35 PM
angelmcdoggie,
Take a look at this knowledge base article that describes how to list all of your configured NI Hardware in many different programming Languages.
02-27-2008 04:00 AM
02-28-2008 10:50 AM
angelmcdoggie,
The above knowledge base article will give you a list of all the NI hardware attached to your system. To get more information on each of those devices you will need to use the CNiDAQmxDevice class. For example to get the hardware identification number (ex. NI USB 6009) you will want to use:
CNiDAQmxSystem::LoadDevice("DEVICE_NAME").ProductNumber;
You can then replace “DEVICE_NAME” with the results from:
CNiDAQmxSystem::GetDevices();
02-28-2008 10:37 PM
02-29-2008 05:25 PM
angelmcdoggie,
I used the following code snippet to grab the devices in my system and determine their device types. You will need to add code to manage an array of strings to keep the device list throughout your program.
NI::CNiStringVector myVector = CNiDAQmxSystem::GetDevices();
CString deviceType;
for(int i=0; i<myVector.GetSize(); i++) {
deviceType = CNiDAQmxSystem::LoadDevice(myVector[i]).ProductType; //Gets device name for every element in the vector then returns the product type
}