We've recently been getting questions regarding the use of the Acroname USBHub2x4 from within National Instruments TestStand test management software. So we put together two example projects which wraps the BrainStem2 library and provides the critical interfaces you need to do basic things with the USBHub2x4, like enabling and disabling a downstream port.
From NI: What is TestStand?
TestStand is industry-standard test management software that helps test and validation engineers build and deploy automated test systems faster. TestStand includes a ready-to-run test sequence engine that supports multiple test code languages, flexible result reporting, and parallel/multithreaded test.
The project contains a VisualStudio2013 project which builds TS_USBHub2x4.dll, and that .dll is used by TestStands C/C++ DLL adapter to create sequenced actions.
- Example #1: NI-TestStand_USBHub2x4:
This example project provides interface functions to connect to a single USBHub2x4 via a serial number, as well as functions for the enabling and disabling of the downstream USB channels.
- Example #2: NI-TestStand_MultiUSBHub2x4:
This example project provides interface functions to connect to multiple USBHub2x4's via an array of serial numbers, as well as functions for the enabling and disabling of downstream USB channels based on a serial number.
- A copy of NI TestStand.
- VisualStudio Community 2013 or better.
- The BrainStem development kit download.
- The NI-TestStand-USBHub2x4 or NI-TestStand-MultiUSBHub2x4 example from gitHub (Click download zip, you get all of our examples including the NI one).
How To Start:
- There is a README.txt file, read that.
- copy the lib folder from the BrainStem Development Kit into the NI-TestStand-USBHub2x4 example folder.
- Build the VisualStudio project for the given architecture of NI TestStand you have installed (i.e. x86/x64)
- Open the sequence file included in the project.
- Edit the SerialNumber/s local variable wihin TestStand so that it matches the serial number/s of your USBHub2x4 device.
- To find your serial number, run Updater.exe from the command line; i.e. "C:\path\to\bin\Updater.exe -D
- Run the sequence file with your USBHub plugged in, and a device plugged in to channel 1. You should see the channel power off and then back on.
Please contact us if you have questions as you try out the example.