Commands Interface

The SARK-110 implements a USB composite device including the existing mass storage class for accessing to the internal disk and a custom HID interface allowing the remote control of the device.
 
The advantage of the selected USB classes is that they are available for the common operating systems: Windows, MAC OS, and Linux; without the need of installing drivers.
 
In order to facilitate the integration with any client software it is provided the HID interface functions for these three operating systems. This interface code has been taken from the Teensy RawHID example:
Simple Raw HID functions for Windows - for use with Teensy RawHID example
 
In addition it is provided the client functions that abstract the command interface and a simple demo including the project file for Visual Studio (Windows platform). Also it is provided a Windows DLL for simple interfacing.
 
All this client code can be downloaded in the link available in the bottom of this page.
 

Basic Client functions


int Sark_Connect (int16 maxDev )

Connects to the SARK-110 device.

 

Parameters:

  • maxDev       maximum number of devices to open (use one for a single device)
Return values:
  • >= 1: Ok, number of devices opened
  • -1: device not detected
  • -2: device HID detected but not in Computer Control mode

int Sark_Close (int16 num)

Close connection with the device.

 

Parameters:

  • num              device number (starting from zero)

Return values:

  • 1: Ok

int Sark_Meas_Rx (int16 num, uint32 u32Freq, bool bCal, uint8 u8Samples, float * pfR, float * pfX, float *pfS21re, float *pfS21im)

Measure R and X.


Parameters:

  • num              device number (starting from zero)
  • u32Freq        frequency
  • bCal              {TRUE: OSL calibrated measurement; FALSE: not calibrated}
  • u8Samples     number of samples to average (zero for no average)
  • pfR                return R
  • pfX                return X 
  • pfS21re         reserved (future device)
  • pfS21im        reserved (future device)

Return values:

  • 1: Ok
  • -1: comm error
  • -2: device answered error

int Sark_Meas_Vect (int16 num, uint32 u32Freq, float * pfMagV, float * pfPhV, float * pfMagI, float * pfPhI)

Measure raw vector.

 

Parameters:

  • num              device number (starting from zero)
  • u32Freq        frequency
  • pfMagV        magnitude voltage
  • pfPhV           phase voltage
  • pfMagI          magnitude current
  • pfPhI             phase current

Return values:

  • 1: Ok
  • -1: comm error
  • -2: device answered error
SelectionFile type iconFile nameDescriptionSizeRevisionTimeUser
ċ

Download
Client demo source files  28k v. 1 Jun 25, 2016, 10:34 AM Melchor Varela
ċ

Download
Client demo using DLL   23k v. 1 Jun 25, 2016, 10:34 AM Melchor Varela