Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Connect Instruments via USB


  • Attach the Type-B connector of the USB cable to the USBTMC port on the stand-alone instrument and the Type-A connector of the USB cable to the USB port on the PC.

Type A & Type B (respectively)

USB Configuration

Watch the following videos or use the document below to assist you in completing this task.

Videos

Configuration in Windows

Configuration in Linux

Configuration in Mac OS X

Test Communication within NI Measurement & Automation Explorer

1. Open NI Measurement & Automation Explorer (MAX). Select View»Refresh or press F5 to refresh the view. Your USB device should be listed as a USB Device under Devices and Interfaces as shown in Figure 1.

Your USB device is now installed and configured to use NI-VISA.

Select your USB device to display the device information in the USB Settings window. Use this window to access information such as you device’s manufacturer ID, model code, and serial number.

Figure 1. USB Device Shown in MAX

2. To communicate with your device using VISA, use your device’s VISA instrument descriptor. 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. However, 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 that device. The format for the serial number 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 only supports 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 MAX. Select Tools»NI-VISA»VISA Interactive Control. A window similar to that shown in Figure 2 should open.

Figure 2. VISA Interactive Control

3. The VISA Interactive Control (VISAIC) is a utility program used to communicate easily with any VISA resource. After your USB device is configured to use VISA, it should be listed in the USB branch. Double-click on your device to open a VISA session to the device. The window shown in Figure 10 should open.

Figure 3. VISA Interactive Control Open VISA Session

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

For a list of valid commands for your USB instrument, contact your instrument’s manufacturer.

Once configuration has been completed and you have verified communication with the instrument, you need a fast way of going from interactive mode to programming mode so you can directly begin writing your tests without a tedious transition process. The best way to achieve this is by using instrument drivers.