The GPIB interface is supported through a VISA-GPIB object. The features associated with a VISA-GPIB object are similar to the features associated with a GPIB object. Therefore, only functions and properties that are unique to VISA's GPIB interface are discussed in this section.
Create a VISA-GPIB object with the visadev
function. Each VISA-GPIB object is associated with:
A GPIB controller installed in your computer
An instrument with a GPIB interface
visadev
requires the resource name or alias as an input. The
resource name consists of the GPIB board index, the instrument primary address, and
the instrument secondary address. You can find the VISA-GPIB resource name or alias
for a given instrument with the configuration tool provided by your vendor or with
the visadevlist
function. Define the alias using your VISA vendor
configuration tool.
The VISA-GPIB resource name has the format
GPIB[board]::primary_address[::secondary_address]::INSTR
.
For example, use the VISA-GPIB interface to connect to a National Instruments® controller with board index 0 and a Tektronix® TDS1002 digital oscilloscope with primary address 1 and secondary address 0.
visagpib = visadev("GPIB0::1::0::INSTR")
visagpib = GPIB with properties: ResourceName: "GPIB0::1::0::INSTR" Alias: "OSCOPE_2CH" Vendor: "TEKTRONIX" Model: "TDS 1002" BoardIndex: 0 PrimaryAddress: 1 SecondaryAddress: 0 NumBytesAvailable: 0 Show all properties, functions
The VISA-GPIB object visagpib
represents a connection to your
instrument. Click properties
in the object display to see a full
list of VISA-GPIB properties.
ResourceName: "GPIB0::1::0::INSTR" Alias: "OSCOPE_2CH" Vendor: "TEKTRONIX" Model: "TDS 1002" BoardIndex: 0 PrimaryAddress: 1 SecondaryAddress: 0 NumBytesAvailable: 0 SerialNumber: "0" Type: gpib PreferredVisa: "National Instruments VISA" ByteOrder: "little-endian" Timeout: 10 Terminator: "LF" EOIMode: on BytesAvailableFcnMode: "off" BytesAvailableFcnCount: 64 BytesAvailableFcn: [] NumBytesWritten: 0 ErrorOccurredFcn: [] UserData: []
You can use dot notation to configure and display property values. For more information about configuring these properties, see visadev Properties.
You can communicate with your instrument using the visadev
Object Functions.