Skip to main content
Pre-release

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sdg1032x_tspspi-0.0.1a4.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sdg1032x_tspspi-0.0.1a4-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file sdg1032x_tspspi-0.0.1a4.tar.gz.

File metadata

  • Download URL: sdg1032x_tspspi-0.0.1a4.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for sdg1032x_tspspi-0.0.1a4.tar.gz
Algorithm Hash digest
SHA256 9a5615c70d3b03d460b7f1f1c87b39cd81270ddbf0613ada2d9d5f1cba3c45d0
MD5 0178b322c8ecb5da322d6db6426ca1aa
BLAKE2b-256 2a218e1db2797faa00624c851dd8d46997829fe02b2c8b589ba19e5f18fc6429

See more details on using hashes here.

File details

Details for the file sdg1032x_tspspi-0.0.1a4-py3-none-any.whl.

File metadata

File hashes

Hashes for sdg1032x_tspspi-0.0.1a4-py3-none-any.whl
Algorithm Hash digest
SHA256 9f97a233527f9504ccfd66a1a063285717e6b16cb9b1aa18784d414652ae29fe
MD5 710712047afbd863fa58d4daaace3701
BLAKE2b-256 51922736a274821c676eb426937a6233caa8eef693af6c537c29137b501d6d4a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.1a4 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page