Type A & Type B
Watch the following videos or use the document below to assist you in completing this task.
Test Communication Within Measurement & Automation Explorer (MAX)
1. Open MAX and 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 how a PCI board can have multiple functions. If your device supports only one interface, you do not need to include the USB interface number.
The USB-6259 uses the RAW class, and the manufacturer code and model code are 0x3923 and 0x72A1, respectively. For the USB-6259, the instrument descriptor is USB0::0x3923::0x72A1::0125F0B3::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 3 should open.
Figure 3. VISAIC Open VISA Session
When you open a VISA session with VISAIC, the Configuration tab and the USB Settings tab are automatically selected. To read a property, select the View Attributes tab. The current value of the property specified in Attribute is displayed in the Current Value indicator.
For a list of valid commands for your USB instrument, contact your instrument's manufacturer.
When you have completed your configuration and verified communication with the instrument, you need a fast way to progress from interactive mode to programming mode so you can immediately begin writing your tests without a tedious transition process. The best way to achieve this is by using instrument drivers.