Connecting to Moku via API Using Serial Number
-
Moku:Go
Moku:Go Arbitrary Waveform Generator Moku:Go Data Logger 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 Digital Filter Box Moku:Go FIR Filter Builder Moku:Go Lock-in Amplifier Moku:Go General Moku:Go Logic Analyzer/Pattern Generator 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 Waveform Generator Moku:Lab Time & Frequency Analyzer Moku:Lab Logic Analyzer/Pattern Generator
-
Moku:Pro
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 Digital Filter Box Moku:Pro FIR Filter Builder Moku:Pro Phasemeter Moku:Pro Multi-instrument Mode Moku:Pro General 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
Using the Moku API to connect to and configure your Moku is straightforward and well documented on our API documentation site (https://apis.liquidinstruments.com). Typically, users will opt to use the IPv4 or IPv6 address of the Moku to point to the device to connect to in the script.
## This is an example of connecting to Moku using the IPv4 address.
from moku.instruments import FIRFilterBox
i=FIRFilterBox('192.168.xx.xx', force_connect=True)
In some network configurations, this IP address can change periodically. When the IP changes, you must manually reenter the new IP of your Moku into your script to avoid receiving connection errors. One way to avoid this is to use the Moku serial number, rather than the IPv4 or IPv6 address. The Moku serial number is static and therefore won't change which allows your script to run without worrying about IP changes.
## This is an example of connecting to Moku using the serial number.
from moku.instruments import FIRFilterBox
i=FIRFilterBox('mokupro-000xxx.local', force_connect=True)
We recommend using the serial number instead of the IP address to avoid running into connection issues while using Moku API. To find your Moku's serial number, simply type mokucli list
into the command line and a list of all available Mokus on the network will be displayed with their serial numbers, hardware versions, firmware versions, and IP addresses.
Alternatively, you can right click on the device icon in the Moku App and navigate down to “Device Info”.