Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to obtain GPIB my address

All,
Does anyone know how to obtain the GPIB controller address of the GPIB0,
GPIB1, etc using a VISA function? I know the default address value is 0 in
NI and 21 in Agilent, but this value can be changed by the user and the
assumption should not be applied in app.

makoto
0 Kudos
Message 1 of 3
(3,704 Views)
The attribute VI_ATTR_RSRC_NAME should give you the interface address and type.

Makoto wrote:

> All,
> Does anyone know how to obtain the GPIB controller address of the GPIB0,
> GPIB1, etc using a VISA function? I know the default address value is 0 in
> NI and 21 in Agilent, but this value can be changed by the user and the
> assumption should not be applied in app.
>
> makoto
0 Kudos
Message 2 of 3
(3,704 Views)
Makoto:

You need to open the GPIB controller's interface resource, which should look like GPIB0::INTFC or GPIB1::INTFC, from your examples. If you are in LabVIEW, the VISA class should be set to "GPIB BoardInterface".

Then just query the primary and secondary address attributes. They are the same attributes as for INSTR.

Dan Mondrik
Senior Software Engineer, VISA
National Instruments
0 Kudos
Message 3 of 3
(3,704 Views)