Test Communication with VISA Interactive Control

NI-VISA

Test Communication with VISA Interactive Control

To test communication with VISA Interactive Control (VISAIC), follow these steps:

  1. Open Measurement & Automation Explorer. Select Tools»Refresh to refresh the view. Your USB device should be listed under Devices and Interfaces, as shown in the following figure. Your USB device is now installed and configured to use NI-VISA.

    If you select your USB device, the USB Settings window displays the device information. You can use this information to access device information such as the manufacturer ID, model code, and serial number.

    USB Device Shown in Measurement & Automation Explorer

  2. To communicate with your device using VISA, use the VISA instrument descriptor for your device. The instrument descriptor format for a USB INSTR device is USB[board]:: manufacturer ID:: model code:: serial number[:: USB interface number]::INSTR. The instrument descriptor format for a USB RAW device is USB[board]:: manufacturer ID:: model code:: serial number[:: USB interface number]::RAW.

    According to the USBTMC specification, all USBTMC devices must have a serial number. Some USB RAW devices may not have serial numbers. If your device does not have a serial number, NI-VISA automatically assigns a VISA-specific serial number for the device. The serial number format is NI-VISA-#, where # is an automatically generated number.

    Some USB devices have multiple interfaces. This is similar to the way a PCI device can have multiple functions. If your device supports only one interface, you do not need to include the USB interface number.

    The DAQPad-6020E uses the RAW class, and the manufacturer code and model code are 0x3923 and 0x12C0, respectively. For the DAQPad-6020E, the instrument descriptor is USB0::0x3923::0x12C0::00B50DAE::RAW.

    To test communication with this device, open Measurement & Automation Explorer. Select Tools»NI-VISA»VISA Interactive Control. A window similar to the following figure should open.

    VISA Interactive Control

  3. VISA Interactive Control (VISAIC) is a utility program for communicating easily with any VISA resource. After you configure your USB device to use VISA, it should be listed in the USB branch. Double-click on your device to open a VISA session to it. The window shown in the following figure should open.

    VISA Interactive Control Open VISA Session

    When you open a VISA Session with VISAIC, the Template and Property Node (Set) tabs are automatically selected. To read a property, select the Property Node (Get) tab, choose the desired property, and click Execute. The Current Value indicator displays the current value of the property specified in Attribute Name. In the figure above, the Resource Name property was read.

    For more information about using VISAIC, refer to the NI Developer Zone VISA Interactive Control (VISAIC) document. For a list of valid commands for your USB instrument, contact your instrument manufacturer.