Minghe
MHS5200 Function Generator
- class instruments.minghe.MHS5200(filelike)[source]
The MHS5200 is a low-cost, 2 channel function generator.
There is no user manual, but Al Williams has reverse-engineered the communications protocol: https://github.com/wd5gnr/mhs5200a/blob/master/MHS5200AProtocol.pdf
- class Channel(mhs, idx)[source]
Class representing a channel on the MHS52000.
- property duty_cycle
Gets/Sets the duty cycle of this channel.
- Units:
A fraction
- Type:
float
- property enable
Gets/Sets the enable state of this channel.
- Type:
bool
- property frequency
Gets/Sets the frequency of this channel.
- property function
Gets/Sets the wave type of this channel.
- Type:
- property offset
Gets/Sets the offset of this channel.
The fraction of the duty cycle to offset the function by.
- Type:
float
- class Function(*values)[source]
Enum containing valid wave modes for
- sawtooth_down = 4
- sawtooth_up = 3
- sine = 0
- square = 1
- triangular = 2
- property channel
Gets a specific channel object. The desired channel is specified like one would access a list.
For instance, this would print the counts of the first channel:
>>> import instruments as ik >>> mhs = ik.minghe.MHS5200.open_serial(vid=1027, pid=24577, baud=19200, timeout=1) >>> print(mhs.channel[0].frequency)
- Return type:
list`[`MHS5200.Channel]
- property serial_number
Get the serial number, as an int
- Return type:
int