Tested on Windows 7 & 10, Ubuntu LTS, and Rasberry Pi 3. Should run anything that can handle Python and 57600 bps.
Generate a 1 Hz, 10 V-pp square wave with 0V offset:
from MHS5200 import MHS5200
from MHS5200.Enums import Wave
signal_gen = MHS5200(port="/dev/ttyUSB0")
chan1 = signal_gen.channels[0]
chan1.frequency = 1 # Hz
chan1.amplitude = 10 # V-pp
chan1.offset = 0 # V
chan1.wave = Wave.SQUARE
Also accepts "MHz" and "kHz" for setting the frequency.
chan1.frequency = "200kHz"
Install:
pip install git+https://github.com/jed-frey/python_mhs5200.git#egg=mhs5200