Function Reference


_viFindGpib

Send a Command/Query to an Instrument/Device through the VISA interface (GPIB / TCP)

#include <Visa.au3>
_viFindGpib ( ByRef $aDescriptorList, ByRef $aIDNList [, $iShow_Search_Results = 0] )

Parameters

$aDescriptorList RETURNS an array of the VISA resource descriptors of the instruments that were found in the GPIB bus (see the Remarks of the _viExecCommand() for more info)
$aIDNList RETURNS an array of the IDNs (i.e names) of the instruments that were found in the GPIB bus
$iShow_Search_Results [optional] If 1 a message box showing the results of the search will be shown.
The default is 0, which means that the results are not shown

Return Value

Success: the number of instruments found (0 or more).
Failure: a NEGATIVE value and sets the @error flag to non-zero.

Remarks

As for all the VISA functions the VISA libraries must be installed (you can check whether visa32.dll is in {WINDOWS}\system32) and a GPIB card (such as a National Instruments NI PCI-GPIB card or an Agilent 82350B PCI High-Performance GPIB card) must be installed

* For a detailed description of the most common VISA DESCRIPTORS look at the Remarks of the help on the _viExecCommand() function

Related

_viClose, _viExecCommand, _viGpibBusReset, _viGTL, _viOpen

Example

; This example performs a search on the GPIB bus and shows the results in a MsgBox

#include <Visa.au3>

Local $a_Descriptor_list[1], $a_Idn_list[1]
_viFindGpib($a_Descriptor_list, $a_Idn_list, 1)