Documentation

Contents

Working with the GPIB-VXI Interface

Understanding VISA-GPIB-VXI

The GPIB-VXI interface is associated with a GPIB-VXI command module that you install in slot 0 of a VXI chassis. This interface, along with the other relevant hardware, is shown below.

The GPIB-VXI interface is supported through a VISA-GPIB-VXI object. The features associated with a VISA-GPIB-VXI object are similar to the features associated with GPIB and VISA-VXI objects. Therefore, only functions and properties that are unique to VISA's GPIB-VXI interface are discussed in this section.

Refer to GPIB Overview to learn about writing and reading text and binary data, using events and callbacks, using triggers, and so on. Refer to Register-Based Communicationto learn about accessing VXI registers.

    Note   The VISA-GPIB-VXI object does not support the spoll and trigger functions, or the BusManagementStatus, HandshakeStatus, InterruptFcn, TriggerFcn, TriggerLine, and TriggerType properties.

Creating a VISA-GPIB-VXI Object

You create a VISA-GPIB-VXI object with the visa function. As shown in the preceding figure, each object is associated with the following:

  • A GPIB controller installed in your computer

  • A VXI chassis

  • A GPIB-VXI command module in slot 0 of the VXI chassis

  • An instrument installed in the VXI chassis

visa requires the vendor name and the resource name as input arguments. The vendor name is either agilent or ni. The resource name consists of the VXI chassis index and the instrument logical address. You can find the VISA-GPIB-VXI resource name for a given instrument with the configuration tool provided by your vendor, or with the instrhwinfo function. (In place of the resource name, you can use an alias as defined with your VISA vendor configuration tool.) As described in Connecting to the Instrument, you can also configure property values during object creation.

Before you create a VISA object, you must find the instrument in the appropriate vendor VISA explorer. When you find the instrument configured, note the resource string and create the object using that information. For example, to create a VISA-GPIB-VXI object associated with a VXI chassis with index 0, an Agilent® E1406A Command Module in slot 0, and an Agilent E1441A Arbitrary Waveform Generator in slot 2 with logical address 80,

vgv = visa('agilent','GPIB-VXI0::80::INSTR');

The VISA-GPIB-VXI object vgv now exists in the MATLAB® workspace.

To open a connection to the instrument type:

fopen (vgv);

You can then display the class of vgv with the whos command.

whos vgv
  Name      Size         Bytes  Class

  vgv       1x1            892  visa object

Grand total is 20 elements using 892 bytes

After you create the VISA-GPIB-VXI object, the properties listed below are automatically assigned values. These properties provide descriptive information about the object based on its class type and address information.

VISA-GPIB-VXI Descriptive Properties

Property Name

Description

Name

Specify a descriptive name for the VISA-GPIB-VXI object.

RsrcName

Indicate the resource name for a VISA instrument.

Type

Indicate the object type.

You can display the values of these properties for vgv.

vgv.Name
ans = 
VISA-GPIB-VXI0-80
vgv.RsrcName
ans = 
GPIB-VXI0::80::INSTR
vgv.Type
ans = 
visa-gpib-vxi

    Note   The GPIB-VXI communication interface is a combination of the GPIB and VXI interfaces. Therefore, you can also use a VISA-GPIB object to communicate with instruments installed in the VXI chassis, or to communicate with non-VXI instruments connected to the slot 0 controller.

VISA-GPIB-VXI Object Display

The VISA-GPIB-VXI object provides you with a convenient display that summarizes important address and state information. You can invoke the display summary these three ways:

  • Type the VISA-GPIB-VXI object at the command line.

  • Exclude the semicolon when creating a VISA-GPIB-VXI object.

  • Exclude the semicolon when configuring properties using the dot notation.

You can also display summary information via the Workspace browser by right-clicking an instrument object and selecting Display Summary from the context menu.

The display summary for the VISA-GPIB-VXI object vgv is given below.

VISA-GPIB-VXI Object Using AGILENT Adaptor : VISA-GPIB-VXI0-80

Communication Address 
   ChassisIndex:       0
   LogicalAddress:     80

Communication State 
   Status:             closed
   RecordStatus:       off

Read/Write State  
   TransferStatus:     idle
   BytesAvailable:     0
   ValuesReceived:     0
   ValuesSent:         0

VISA-GPIB-VXI Address

The VISA-GPIB-VXI address consists of a VXI component and a GPIB component. The VXI component includes the following:

  • The chassis index of the VXI chassis

  • The logical address of the VXI instrument; the logical address must be 0, or it must be divisible by 8

  • The slot of the VXI instrument

The GPIB component includes

  • The board index of the GPIB controller installed in your computer

  • The primary address of the GPIB-VXI command module in slot 0

  • The secondary address of the VXI instrument

You must specify the logical address value via the resource name during VISA-GPIB-VXI object creation. Additionally, you must include the chassis index value as part of the resource name if it differs from the default value of 0. The properties associated with the VISA-GPIB-VXI address are given below.

VISA-GPIB-VXI Address Properties

Property Name

Description

BoardIndex

Indicate the index number of the GPIB board.

ChassisIndex

Specify the index number of the VXI chassis.

LogicalAddress

Specify the logical address of the VXI instrument.

PrimaryAddress

Indicate the primary address of the GPIB-VXI command module.

SecondaryAddress

Indicate the secondary address of the VXI instrument.

Slot

Indicate the slot location of the VXI instrument.

The ChassisIndex and LogicalAddress properties are automatically updated with the specified resource name values when you create the VISA-GPIB-VXI object. The BoardIndex, PrimaryAddress, SecondaryAddress, and Slot properties are automatically updated after the object is connected to the instrument with the fopen function.

You can display the address property values for the VISA-GPIB-VXI object vgv created in Creating a VISA-GPIB-VXI Object.

fopen(vgv)
get(vgv,{'BoardIndex','ChassisIndex','LogicalAddress',...
'PrimaryAddress','SecondaryAddress','Slot'})
ans = 
    [0]    [0]    [80]    [9]    [10]    [2]
Was this topic helpful?