Welcome to mpo_api’s documentation!
The MPO-2000 supports the execution of Python scripts, which is based on MicroPython V1.19.1. Users can place Python scripts on a USB flash disk and insert it into the USB slot of the MPO-2000, or copy the Python scripts to the internal disk for execution. Here we have compiled the documentation for the Python API of the main functions of the MPO, as well as the documentation for the Python API of several external devices.
Important Considerations for Using MPO’s API
Please ensure your MPO-2000 is version V1.04 or newer before starting Python programming.
Please refer to the MicroPython standard library documentation for version V1.19.1.
The Python GUI Library for MPO is based on LVGL version 8.3. Users who need to utilize graphics and UI design features can refer to the LVGL documentation for version 8.3 on the LVGL official website.
Most MicroPython standard library modules implement a subset of the functionality of their equivalent Python 3 modules.
When calling multiple API functions consecutively, it is important to include some delay to ensure that the previous control commands have been fully executed. Additionally, at lower speed timebase, the oscilloscope sampling may take more time. Avoid querying the oscilloscope for automatic measurement data before the sampling is complete, as this may result in incorrect data.
Usage for mpo_api
try:
# This module is a built-in module
import gds_info as gds
except ImportError:
# Or you can import specific module
import dso2kp as gds
dso = gds.Dso()
dso.connect() # connect as internal port
# Now you should control your DSO, add your code below.
# ========
dso.channel.set_on(2) # Set CH2 to ON
dso.channel.set_off(2) # Set CH2 to OFF
dso.awg.set_on(1, wave='SQUAre', freq=10e3) # Set AWG1 ON and waveform is SQUARE, frequency is 10e3
dso.awg.set_off(1) # Set AWG1 OFF
# ========
# Don't forget to close the connection.
dso.close()
Contents:
- dso2kp module
- dso_acquire module
- dso_awg module
- dso_basic module
- dso_bus module
- dso_channel module
- dso_colors module
- dso_const module
- dso_display module
- dso_dmm module
- dso_draw module
- dso_gonogo module
- dso_gui module
- dso_hardcopy module
- dso_math module
- dso_meas module
- dso_power_supply module
- dso_ref module
- dso_sns module
- dso_spectrum module
- dso_timebase module
- dso_trigger module
- load module
- psw module
- gdm module
- asr module