USBTMC drivers for windows are currently available from National Instruments and the IVI foundation.
If for some reason one of the above drivers can't be used, libusb can also be used with our devices. In that case, it's recommended to install our libusbtmc library along libusb 0.1 on Windows.
#include <stdio.h>
#include <visa.h>
int main()
{
ViSession defaultRM, instr; // Virtual Instrument Session
char meas_result[64] = ""; // Result buffer
viOpenDefaultRM(&defaultRM); // Open a default session
viOpen(defaultRM, // Open the device by
"USB0::0x1781::0x0E93::00006::INSTR", // instrument descriptor
VI_NULL, VI_NULL, &instr);
viSetAttribute(instr, VI_ATTR_TMO_VALUE, 5000); // global time out value
viWrite(instr, ":meas:xyz", 9, VI_NULL); // Send :meas:xyz command
viRead(instr, meas_result, sizeof(meas_result), VI_NULL); // Read measurement result
printf(meas_result); // Print measurement result
viClose(instr); // Close the device
viClose(defaultRM); // Close the default session
system("PAUSE");
return 0;
}
Note : The above code is very minimized. It has no error handling and is purely meant to show that with a few functions results can be received from a USBTMC device.