Instrument Control Toolbox    

Creating a GPIB Object

You create a GPIB object with the gpib function. gpib requires the adaptor name, the GPIB board index, and the primary address of the instrument. As described in Configuring Properties During Object Creation, you can also configure property values during object creation. For a list of supported adaptors, refer to The Interface Driver Adaptor.

Each GPIB object is associated with one controller and one instrument. For example, to create a GPIB object associated with a National Instruments controller with board index 0, and an instrument with primary address 1:

The GPIB object g now exists in the MATLAB workspace. You can display the class of g with the whos command.

Once the GPIB object is created, the properties listed below are automatically assigned values. These general purpose properties provide descriptive information about the object based on its class type and address information.

Table 3-7: GPIB Descriptive Properties 
Property Name
Description
Name
Specify a descriptive name for the GPIB object.
Type
Indicate the object type.

You can display the values of these properties for g with the get function.


  Using Vendor Tools to Identify and Test Your Resources The GPIB Object Display