07-06-2010 02:50 PM
For GPIB (actually GPIB devices connected to GPIB to USB cable) I do:
static short addrList[31]; static short listList[31]; for (j=0;j<31;j++) { addrList[j] = j; } addrList[30] = -1; SendIFC(0); FindLstn(0,addrList,listList,30);
But not sure how I would do other ports such as USB. i can see it in MAX but it just seems to automatically appear.
Solved! Go to Solution.
07-07-2010 12:34 AM
Hi,
personally I use VISA. For finding all available serial ports I use viFindRsrc ( resource_manager_handle, "ASRL[0-9]*::?*INSTR", &find_handle, &return_count, instrument_descriptor ); for GPIB you would use "GPIB[0-9]*::?*INSTR" as the second argument.
07-08-2010 10:15 AM
That actually worked pretty well! I just did the generic search of "?*INSTR". As I go through each Item, I can get its properties, port, etc.
Kudos & Thanks,
Nick
07-08-2010 10:46 AM
You're welcome!