Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I determine the physical location of PCI-GPIB controllers.

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?

0 Kudos
Message 1 of 7
(3,399 Views)

The only idea is to use the serial numbers and always put them in a specific order in the slots.

In that case the card with the lowst serial number is GPIB0

greetings from the Netherlands
0 Kudos
Message 2 of 7
(3,385 Views)

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.

0 Kudos
Message 3 of 7
(3,377 Views)

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

 

LV7 List All GPIB Resourcesd.png

0 Kudos
Message 4 of 7
(3,355 Views)

Or, try this VI to get controller information.

 

-George

 

LV7 Get Interface Information for GPIB Resourcesd.png

0 Kudos
Message 5 of 7
(3,342 Views)

Thanks for the input, I should have mentioned that I need to do this using a c / c++ interface.

0 Kudos
Message 6 of 7
(3,337 Views)

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);

Applications Engineer
National Instruments
CLD Certified
0 Kudos
Message 7 of 7
(3,317 Views)