Instrument Control Toolbox    
gpib

Create a GPIB object

Syntax

Arguments

'vendor'
The vendor name.
boardindex
The GPIB board index.
primaryaddress
The instrument primary address.
'PropertyName'
A GPIB property name.
'PropertyValue'
A property value supported by PropertyName.
obj
The GPIB object.

Description

obj = gpib('vendor',boardindex,primaryaddress) creates the GPIB object obj associated with the board specified by boardindex, and the instrument specified by primaryaddress. The GPIB hardware is supplied by vendor. Supported vendors are given below.

Vendor
Description
agilent
Agilent Technologies hardware
cec
Capital Equipment Corporation hardware
iotech
IOTech hardware
keithley
Keithley hardware
mcc
Measurement Computing Corporation hardware
ni
National Instruments hardware

obj = gpib('vendor',boardindex,primaryaddress,'PropertyName', PropertyValue,...) creates the GPIB object with the specified property names and property values. If an invalid property name or property value is specified, an error is returned and obj is not created.

Remarks

At any time, you can use the instrhelp function to view a complete listing of properties and functions associated with GPIB objects.

When you create a GPIB object, these property value are automatically configured:

You can specify the property names and property values using any format supported by the set function. For example, you can use property name/property value cell array pairs. Additionally, you can specify property names without regard to case, and you can make use of property name completion. For example, these commands are all valid:

Before you can communicate with the instrument, it must be connected to obj with the fopen function. A connected instrument object has a Status property value of open. An error is returned if you attempt to perform a read or write operation while obj is not connected to the instrument.

You cannot connect multiple GPIB objects to the same instrument. A GPIB instrument is uniquely identified by its board index, primary address, and secondary address.

Example

This example creates the GPIB object g1 associated with a National Instruments board at index 0 with primary address 1, and then connects g1 to the instrument.

The Type, Name, BoardIndex, and PrimaryAddress properties are automatically configured.

To specify the secondary address during object creation:

See Also

Functions

fopen, instrhelp, instrhwinfo

Properties

BoardIndex, Name, PrimaryAddress, SecondaryAddress, Status, Type


  get inspect