Main Content

Get Started with TCP/IP Interface for VXI-11 and HiSLIP

The TCP/IP interface is supported through a VISA-TCP/IP object. The features associated with a VISA-TCP/IP object are similar to the features associated with a tcpclient object. Therefore, only functions and properties that are unique to VISA's TCP/IP interface are discussed in this section. Both VXI-11 and HiSLIP protocols are supported.

Refer to TCP/IP Communication Overview for more information about TCP/IP communication.

Create VISA-TCP/IP Object

Create a VISA-TCP/IP object with the visadev function. Each object is associated with an instrument connected to your computer.

visadev requires the resource name or alias as an input. The resource name consists of the name of the TCP/IP board index, IP address or host name, and LAN device name of your instrument. You can find the VISA-TCP/IP 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-TCP/IP resource name has the format TCPIP[board]::remote_host[::lan_device_name]::INSTR.

For example, use the VISA-TCP/IP interface to connect to an instrument at IP address 169.254.2.20 using the VXI-11 protocol.

visatcpip = visadev("TCPIP0::169.254.2.20::inst0::INSTR")
visatcpip = 

  TCPIP with properties:

         ResourceName: "TCPIP0::169.254.2.20::inst0::INSTR"
                Alias: "Keysight_33210A"
               Vendor: "Agilent Technologies"
                Model: "33210A"
              LANName: "inst0"
    InstrumentAddress: "169.254.2.20"

  Show all properties, functions

The VISA-TCP/IP object visatcpip represents a connection to your instrument. Click properties in the object display to see a full list of VISA-TCP/IP properties.

              ResourceName: "TCPIP0::169.254.2.20::inst0::INSTR"
                     Alias: "Keysight_33210A"
                    Vendor: "Agilent Technologies"
                     Model: "33210A"
                   LANName: "inst0"
         InstrumentAddress: "169.254.2.20"

              SerialNumber: "MY57003523"
                      Type: tcpip
             PreferredVisa: "National Instruments VISA"

                BoardIndex: 0

                 ByteOrder: "little-endian"
                   Timeout: 10
                Terminator: "LF"

           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.

See Also

|

Related Topics