Using the Control_LW API

Installing Dependencies and Driver

If you plan to use the AxsunOCTControl_LW library for USB-based communication with an Axsun device, follow the installation steps below. RS-232 or Ethernet-based communication with Axsun devices do not require additional dependencies and the installation steps below can be skipped.


The AxsunOCTControl_LW library uses the libusb library for communication with Axsun devices connected via USB to a Windows or Linux host computer.

Windows Installation

DOWNLOAD and copy the file "libusb-1.0.dll" into your C:\Windows\System32 directory.

Ubuntu Linux Installation

Ubuntu users can install libusb via the Terminal command:

sudo apt-get install libusb-1.0-0-dev

The USB device requires modified permissions which can be achieved in a persistent fashion (across reboots) by creating and saving a new text file named "axsun.rules" with the following contents:

SUBSYSTEM=="usb", ATTRS{idVendor}=="1363", MODE="0666"
SUBSYSTEM=="usb_device", ATTRS{idVendor}=="1363", MODE="0666"

and then copying the file to the /etc/udev/rules.d directory and triggering a rule update:

sudo cp axsun.rules /etc/udev/rules.d/
sudo udevadm trigger

USB Device Driver (Windows OS only)

If you plan to use AxsunOCTControl_LW to connect to devices via USB on Windows OS, you must install the USB device driver libusb-win32 v1.2.6 (or upgrade the USB device driver to v1.2.6 if an older version was previously installed during installation of OCT Host).

Following installation of OCT Host, a connected Axsun device (DAQ or laser engine) will be displayed in Device Manager as "Axsun OCT Engine" in the "Axsun OCT Devices" device class with "Driver Provider: Axsun" and "Digital Signer: Axsun Technologies, Inc."

To install or update the USB driver for compatibility with AxsunOCTControl_LW:

  • DOWNLOAD and extract the .zip on your local disk.

  • With the Axsun device connected to the PC via USB and powered-on, run the batch file titled RunMeAsAdministrator.bat by right-clicking on its icon and selecting the Run as administrator menu item.

  • Answer YES if a Microsoft User Account Control pop-up requests permission to make changes to your computer.

  • A cmd terminal window will launch and display the driver installation status. Press any key to close the cmd window once prompted.

NOTE: If the USB driver installation is unsuccessful after selecting the Run as administrator menu item on the .bat file in Windows Explorer, launch a Command Prompt as administrator, change directory to the location of the .bat file on your disk, and execute it directly from the command prompt.

Following successful installation, each connected Axsun USB device will appear in Device Manager as "Axsun OCT USB Device" in the "Axsun OCT Devices" class, and the Device Properties window will indicate "Driver Provider: Excelitas Technologies" and "Digital Signer: Excelitas Technologies Corp." (Linux OS only)

Symbol version GLIBCXX_3.4.26 is required, which is packaged with GCC 9.1 (or a newer version if you prefer). GCC 9 can be installed on Ubuntu 18.04 using:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-9

Congratulations! You have successfully installed the device driver and dependencies for communicating with your Axsun devices via the AxsunOCTControl_LW library. You can now incorporate this library into your client application via the C API or use the Hardware Control Tool to access library functionality in a convenient GUI form.

Integrating Into Your Application

Basic functionality of the AxsunOCTControl_LW API can be achieved with only several function calls as demonstrated in the AxsunOCTControl_LW Function Reference example programs.

  • The AxsunOCTControl_LW API is a "plain-old" ANSI C interface which can be directly called from applications coded in native C or C++.

  • LabVIEW integration can be achieved using the Call Library Function Node.

  • C#/.NET Framework integration can be achieved using P/Invoke and the DllImport attribute discussed here.

  • Python integration can be achieved using the ctypes library.

Last updated