top01.jpg (17169 bytes)
mleft.jpg (4986 bytes) m01a.jpg (6169 bytes)     m02a.jpg (6905 bytes)     m03a.jpg (7743 bytes)    m04a.jpg (7456 bytes)     m05a.jpg (7878 bytes)     m06a.jpg (6862 bytes)     m07a.jpg (6076 bytes) mright01.jpg (5078 bytes)

Using AduHidTest USB Device Test Software         adulogo.jpg (1752 bytes)

AduHidTest is a FREE USB Device test program used to test the connection of ADU data acquisition devices to a USB port. The program is also a useful tool to allow programmers to become familiar with the ADU command set.

For this tutorial we will use an ADU200 USB Relay I/O Interface to demonstrate use of the software.

ADU200s.jpg (4210 bytes)ADU200

Getting Started:

There are three steps in using a USB device in any application software. The three steps are ,

  1. Obtain a handle for the USB device.
  2. Send commands to the USB device.
  3. Receive data from a USB device.

 

STEP 1: Obtain a handle for the USB Device ( ADU200 USB Relay I/O Interface )

A handle is a unique code that application software uses to identify a USB device for the purpose of reading and writing to the device.  A USB bus can have up to 128 devices connected to a single host and there are three criteria that can be used to open a handle. The three criteria are, Vendor ID, Product ID and Serial Number. If a single device is connected to the bus, any of the three criteria may be used.  If multiple devices are connected, we recommend using the Serial Number to open the handle ( All ADU devices have their unique serial number printed on the top label ) The AduHidTest program main Window  is shown in Figure 1.

Aduhid1.gif (11797 bytes)

Figure 1: AduHidTest Main Window

The Open/Close  section of the window is where the handle is determined and  there is a Show List  button in the section. Click on the Show List  button to view the devices connected to the USB bus. ( Note: Only ADU devices will be listed ) Figure 2 is the window that appears when the  Show List Button is clicked.

Aduhid2.gif (6933 bytes)

Figure 2: " Show List " Display

The display indicates that we have two ADU200 devices connected with serial numbers A00222 and B00099. Select a device by clicking on the desired device. The AduHidTest main window will now display the product ID and Serial number. Click the  By Serial # radio button and then click  Open to open the handle to the selected ADU200.

Aduhid3.gif (11410 bytes)

Figure 3:  Connected to B00099

STEP 2: Send Commands to the USB Device ( ADU200 USB Relay I/O Interface)

Once connected, you may now send commands to the available "pipes" on the device. Pipes are the individual connections to functional sections of the ADU200. The Device Pipe is used to send standard ASCII ADU commands to control the peripherals built into the ADU200 such as the relay outputs or event counter inputs.   Type "sk3" ( Close relay K3 ) into the device pipe send window and click  Send ADU .   Relay K3 on the ADU200 will close and the software will display a small "OK" next to the Send ADU button indicating the command was sent.

Aduhid4.gif (11671 bytes)

Figure 4:  Sending "sk3" Command

STEP 3: Receive Data from the  USB Device ( ADU200 USB Relay I/O Interface)

Some commands will cause a response to be sent  from the ADU device to the host computer. For example, if an "re1" ( read event counter 1 )   command is sent, the ADU200 will send back the 5 digit count. To read responsive commands, simply click the  Receive ADU button and the data will be displayed.

Aduhid5.gif (11702 bytes)

Figure 5:  Sending "re1"  and Receiving Count Data

The RS232 Pipe is used to send and receive ASCII strings to any RS232 based device connected to the ADU200 auxiliary serial port.  The method of sending commands  is identical to device pipe, in that you simply enter the ASCII command string, and click the Send 232  button. Data is received, and then displayed when the Receive 232 button is clicked.

In the following example, an "rd" ( analog array read ) command is sent to an ADR2000B Data Acquisition Interface connected the the ADU200 auxiliary serial port. Figure 6 shows the "rd" command being sent and Figure 7 shows the returned data displayed after the Receive 232 button is clicked.

Aduhid6.gif (11747 bytes)

Figure 6:  Sending "rd"  Command to RS232 Pipe

Aduhid7.gif (12421 bytes)

Figure 7:  Receiving Data on  RS232 Pipe

Presently, there are no ADU devices available that support the stream pipe and thus no explanation of this feature will be presented at this time.

 

Download AduHidTest now, in ZIP Format ( 39K ).

 Back to Programming Page

NEWS         PRODUCTS         PROGRAMMING          APPLICATIONS          CUSTOM DESIGN          ORDERING          HOME


TestPoint is a trademark of Capital Equipment Corp.   
LabVIEW is a trademark of National Instruments.
Visual BASIC is a trademark of Microsoft Corporation


Copyright © 2002 ONTRAK CONTROL SYSTEMS 764 Notre Dame Ave, Unit #1 , Sudbury, Ontario, CANADA P3A 2T2  
"Quality serial Data Acquisition Interfaces"           PH. (705) 671-2652 FAX (705) 671-6127