LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get GPIB address from VISA resource

Hi All,

 

Is there a way (CVI API) to get the GPIB address of a GPIB instrument from an alias or a VISA resource name defined in MAX?

 

Thanks,

Rick.

0 Kudos
Message 1 of 3
(4,697 Views)

Open the resource , check if if is really a GPIB resource by reading its VI_ATTR_INTF_TYPE attribute, then read the VI_ATTR_GPIB_PRIMARY_ADDR ( and maybe VI_ATTR_GPIB_SECONDARY_ADDR) attributes with viGetAttribute().

0 Kudos
Message 2 of 3
(4,682 Views)

Thanks mkossmann, I was actually looking for an api that would get the gpib address from the visa resource name defined in MAX which has already scanned in the gpib instruments.

 

I guess it may not be good that way even if there's such an api because instrument gpib address might get changed and if MAX has not been asked to rescan then the address will be out of sync.

0 Kudos
Message 3 of 3
(4,610 Views)