How to use APIs with MokuOS 4.0
-
Moku:Go
Moku:Go General Moku:Go Arbitrary Waveform Generator Moku:Go Data Logger Moku:Go Digital Filter Box Moku:Go FIR Filter Builder Moku:Go Frequency Response Analyzer Moku:Go Logic Analyzer & Pattern Generator Moku:Go Oscilloscope & Voltmeter Moku:Go PID Controller Moku:Go Spectrum Analyzer Moku:Go Waveform Generator Moku:Go Power Supplies Moku:Go Lock-in Amplifier Moku:Go Time & Frequency Analyzer Moku:Go Laser Lock Box Moku:Go Phasemeter
-
Moku:Lab
Moku:Lab General Moku:Lab Arbitrary Waveform Generator Moku:Lab Data Logger Moku:Lab Digital Filter Box Moku:Lab FIR Filter Builder Moku:Lab Frequency Response Analyzer Moku:Lab Laser Lock Box Moku:Lab Lock-in Amplifier Moku:Lab Oscilloscope Moku:Lab Phasemeter Moku:Lab PID Controller Moku:Lab Spectrum Analyzer Moku:Lab Time & Frequency Analyzer Moku:Lab Waveform Generator Moku:Lab Logic Analyzer/Pattern Generator
-
Moku:Pro
Moku:Pro General Moku:Pro Arbitrary Waveform Generator Moku:Pro Data Logger Moku:Pro Frequency Response Analyzer Moku:Pro Oscilloscope Moku:Pro PID Controller Moku:Pro Spectrum Analyzer Moku:Pro Waveform Generator Moku:Pro Lock-in Amplifier Moku:Pro Laser Lock Box Moku:Pro Digital Filter Box Moku:Pro FIR Filter Builder Moku:Pro Phasemeter Moku:Pro Multi-instrument Mode Moku:Pro Logic Analyzer/Pattern Generator Moku:Pro Time & Frequency Analyzer
- Python API
- MATLAB API
- Arbitrary Waveform Generator
- Data Logger
- Digital Filter Box
- FIR Filter Builder
- Frequency Response Analyzer
- Laser Lock Box
- Lock-in Amplifier
- Oscilloscope
- Phasemeter
- PID Controller
- Spectrum Analyzer
- Time & Frequency Analyzer
- Waveform Generator
- Logic Analyzer & Pattern Generator
- Multi Instrument Mode
- Moku Cloud Compile
- Moku general
- LabVIEW
Moku offers APIs for Python, MATLAB, and LabVIEW for seamless automation and integration into your workflow. Starting with MokuOS 4.0, the use of APIs requires the command line utility, mokucli.
What is mokucli?
Mokucli allows users to access and manage Moku hardware through their command terminal. Functionalities include bitstream downloads, device discovery, data streaming, among others. More information on how to use mokucli can be found on this documentation page.
With the release of MokuOS 4.0, mokucli is required for API integration.
How do I setup mokucli?
Mokucli can be downloaded from the download links at the bottom of the Utilities page.
Once downloaded, follow the instructions for installation:

NOTE: If needed, type mokucli --help
to list possible functionalities, check the mokucli version, among other tools.
Getting the APIs up and running:
Please make sure the API server is installed after you've updated to MokuOS 4.0. You can check this by right clicking on your Moku device in the app and hovering over “Device Info”. The “API server” should show a version number, as shown in the image below. If it says it is not installed, please follow the instructions in this knowledge base article to install the API server before proceeding to the next step.

Run the following command in your terminal: mokucli instrument download 4.0.1
to download the instrument bitstreams. Replace 4.0.1 with the current most up-to-date firmware release.
If you have not yet used APIs prior to updating to 4.0, please follow the instructions in this Getting Started Guide on how to get the APIs installed.
Below are the steps to update the APIs with MokuOS 4.0 and above, after mokucli has been installed:
Python:
- Open your command terminal and update the Python client package by running:
pip install --upgrade moku
MATLAB:
- Open MATLAB after the new mokucli has installed.
-
Go to the “Home” tab and select “Add-ons” to open the sub-menu. Click “Manage Add-Ons”.
-
Look for the moku-MATLAB add-on listed with an available update. NOTE: If you do not see an update option, you likely need to restart MATLAB and try again.
- Click “Update” and restart MATLAB. The API will be ready for use.
LabVIEW:
- After installing mokucli and downloading the instrument bitstreams, download the LabVIEW driver from the Liquid Instruments website.
-
Open the file
moku_labview_driver.vip
with the VI Package Manager (VIPM) and install it. Installation typically takes about one minute. (VIPM is a tool for managing LabVIEW add-ons. The VIPM Desktop App can be downloaded here.)

- Once installed, the
Liquid Instruments Moku
package will appear under the Installed list in VIPM.

- The Moku VI examples can be found at:
C:\Program Files (x86)\National Instruments\LabVIEW 2016\examples\Liquid Instruments\Liquid Instruments Moku
. The exact path may vary depending on your LabVIEW version and installation directory. Alternatively, the example files can be accessed through the NI Example Finder. - More information about getting started with LabVIEW is available on the Liquid Instruments website.
Note: LabVIEW driver version 4.0.1.3 does not currently support Moku:Delta.