06-11-2006 08:59 PM
06-12-2006 08:57 AM
Hi David-
You can use
DAQmxGetSysDevNames(char *data, uInt32 bufferSize);
to obtain a comma-delimited list of the devices installed in your system and then use
DAQmxGetDevProductType(const char device[], char *data, uInt32 bufferSize);
to return the device type (i.e. PCI-6251, etc). There are also a number of other useful properties you can query for a device including I/O capabilities, serial number, etc. These are all listed in the NI-DAQmx C Reference Help (Start>>National Instruments>>NI-DAQ) under NI-DAQmx C Properties>>List of Device Properties.
Hopefully this helps-
06-12-2006 08:08 PM
06-14-2006 03:46 AM - edited 06-14-2006 03:46 AM
Hi, Tom,
I tried the functions you suggested, but it seems not working well. Here is what I did:
char data[256];
DAQmxGetSysDevNames(data,256);
int32 temp = DAQmxGetDevProductType("PCI-MIO-16E-1",data,256);
I guess the return value of DAQmxGetDevProductType could tell me something about the card. But the return value is always -20020. I also tried this way:
char data[256];
DAQmxGetSysDevNames(data,256);
char device[256];
DAQmxGetDevProductType(device,data,256);
And the device tell me nothing either. Since there is no examples and no detailed function explanation, would you please show me how to use this two functions to get the card name. If there is another card installed besides PCI-MIO-16E-1, say PCI-6251, how to know the name of each card?
Thank you very much!
David
Message Edited by RedGrouper on 06-14-2006 03:48 AM
06-14-2006 09:49 AM
06-14-2006 07:59 PM
Hi, Tom,
I've tested it and it woks. Thanks a lot!
David
06-14-2006 09:59 PM