12-06-2011 01:52 PM
I have two PCI GPIB controllers in a system and want to insure that a controller plugged into a specific PCI slot is always named GPIB0 and the other GPIB1. I need to do this without any human intervention - i.e. NOT using measurement and automation explorer to check which devices are plugged into the controller. How can I accomplish this?
12-07-2011 08:00 AM
12-07-2011 09:59 AM
Thank-you for the interesting idea. It would be better if I could tie the serial number to a PCI slot somehow. I don't think I can guarantee that the serial numbers will be inserted in the slots in order.
12-07-2011 03:04 PM
Hi Marcateagle,
You can use "VISA Find Resorces" to determine what devices are plugged into GPIBx. I have attached example code. I hope this helps.
George
12-07-2011 05:13 PM
Or, try this VI to get controller information.
-George
12-07-2011 05:54 PM
Thanks for the input, I should have mentioned that I need to do this using a c / c++ interface.
12-08-2011 05:05 PM
How are you communicating to the devices in C?
If you have the NI-488.2 driver installed you can use the same functions as the LabVIEW code above. The functions should be in the GPIB/GBIP 488.2 library.
There is also a ibpad function that looks fairly promising. Here is an excerpt from the LabWindows help about it:
This function sets the primary GPIB address of the specified board or device.
Note: When this function is called and an error does not occur,
the previous primary address is stored in the global
error variable "iberr".
/*-------------------- Prototype ---------------------*/
int ibpad (int BoardDevice, int Primary_Address);