This release is a pre-release and may not be stable for production use.
SDG1032X Python library
This (unofficial) library allows one to control some functions of the SDG1032X arbitrary waveform generator using Python in a simple way via Ethernet.
Exposed functionality:
| Functionality | Function | Implemented | Tested | Comments |
|---|---|---|---|---|
| Identify | identify() |
y | y | Queries the output of IDN, raw binary output |
| Factory defaults | factoryDefaults() |
y | Resets all device state to factory defaults | |
| Enable output | outputEnable(channel=1, polarity=POLARITY_NORMAL, load="HZ") |
y | y | Enabled the output of the function generator |
| Disable output | outputDisable(channel=1) |
y | y | Disables the output of the function generator |
| Set duty cycle | setDutyCycle(dutycycle, channel=1) |
y | y | Sets duty cycle |
| Enabling burst mode | setBurstModeEnable(channel=1) |
y | y | |
| Disabling burst mode | setBurstModeDisable(channel=1) |
y | y | |
| Setting burst period | setBurstPeriod(period, channel=1) |
y | y | Burst period |
| Setting burst delay | setBurstDelay(delay, channel=1) |
y | y | |
| Setting burst tigger | setBurstTriggerSource(triggerSource, channel=1) |
y | y | Sets internal, external or manual trigger |
| Setting burst mode | setBurstMode(burstMode, channel=1) |
y | y | |
| Triggering burst | triggerBurst(channel=1) |
y | y | |
| Set waveform | setWaveType(waveform, channel=1) |
y | y | Sets the waveform of the signal |
| Set frequency | setWaveFrequency(frequency, channel=1) |
y | y | Sets the waves frequency |
| Set period | setWavePeriod(period, channel=1) |
y | y | Sets the waves period |
| Set wave amplitude | setWaveAmplitude(vpp, channel=1) |
y | y | Sets the amplitude of the wave in Vpp |
| Set wave offset | setWaveOffset(offsetV, channel=1) |
y | y | Sets the offset of the wave in V |
Usage example
from sdg1032x.sdg1032x import SDG1032X
with SDG1032X("10.0.0.14") as sdg:
print("Identify returns: {}".format(sdg.identify()))
sdg.setWaveType(sdg.WAVEFORM_SINE)
for f in range(100, 1100, 100):
sdg.setWavePeriod(f)
Installation
There are two ways of simply installing the library. One can install
if via pip from PyPi:
pip install pysdg1032x-tspspi
Or one can install it from the downloaded tar.gz file from the Releases section
by using pip (substituting X.Y.Z by the desired version number):
pip install pysdg1032x-tspspi-X.Y.Z.tar.gz
To install the latest package one can just leave the version number:
pip install sdg1032x-tspspi
The pip packages and the release packages are automatically generated whenever
a new tag is pushed by a Jenkins instance.
The CLI utility
There is a simple CLI utility that allows one to control the function generator
from the commandline or via scripts. This tool is called sdg1032x:
SDG1032X signal generator remote control utility
Note: This tool is an inofficial tool and in no way associated
with Siglent
Usage:
sdg1032x [settings] <commands>
Settings:
--host ADDRESS Sets the remote hostname or IP
Commands:
id Asks the SDG for it's identity
defaults Resets the SDG to it's factory defaults
Simple channel commands:
on N Enabled the channel N
off N Disabled the channel N
Waveform commands:
wavetype N WTYPE Sets the selected wave type. Valid options are:
sine Sinusoidal waveform
square Square wave
ramp Ramping
pulse Pulsing
noise Noise generator
arbitrary Arbitrary waveform from WAV
dc Discrete current
prbs Pseudo random binary sequence
frq N FREQ Set frequency of channel N to FREQ Hz
period N PERIOD Set period of channel N to PERIOD seconds
amp N AMP Set amplitude of wave for channel N to AMP Vpp
offset N OFF Set offset of channel N to OFF V
Burst mode commands (per channel):
duty N CYCLE Sets the burst duty cycle for channel N to CYCLE percent
burston N Enables burst mode for channel N
burstoff N Disables burst mode for channel N
burstperiod N PERIOD Sets the burst period for channel N to PERIOD seconds
burstdelay N DELAY Sets the burst delay for channel N to DELAY seconds
bursttrigsource N SRC Sets the given trigger source. Valid options are:
int internal trigger source
ext external trigger source
man manual trigger source
burstmode N MODE Sets the burst mode. Valid modes are:
gate Gated burst mode
ncyc Number of cycles burst mode
burst N Trigger burst on channel N
Metadata
Release files for sdg1032x-tspspi 0.0.1a4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sdg1032x_tspspi-0.0.1a4.tar.gz | 9.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sdg1032x_tspspi-0.0.1a4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.8 kB
Release files / sdg1032x_tspspi-0.0.1a4.tar.gz
| Download URL | sdg1032x_tspspi-0.0.1a4.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9a5615c70d3b03d460b7f1f1c87b39cd81270ddbf0613ada2d9d5f1cba3c45d0
|
|
BLAKE2b-256 checksum How to use checksums |
2a218e1db2797faa00624c851dd8d46997829fe02b2c8b589ba19e5f18fc6429
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|
Release files / sdg1032x_tspspi-0.0.1a4-py3-none-any.whl
| Download URL | sdg1032x_tspspi-0.0.1a4-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f97a233527f9504ccfd66a1a063285717e6b16cb9b1aa18784d414652ae29fe
|
|
BLAKE2b-256 checksum How to use checksums |
51922736a274821c676eb426937a6233caa8eef693af6c537c29137b501d6d4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|