Skip to main content

Rigol DG1000Z arbitrary waveform generator Python library (unofficial)

A Rigol DG1000Z setup

A simple Python library and utility to control Rigol DG1000Z arbitrary waveform generator. This library implements the functiongenerator class from the pylabdevs package which exposes the public interface.

Installing

There is a PyPi package that can be installed using

pip install pydg1000z

Simple example to generate waveforms:

import time
from pydg1000z import *
from labdevices.scpi import SCPIDeviceEthernet
from labdevices.functiongenerator import FunctionGeneratorWaveform

with PYDG1000Z(address="10.0.0.124") as awg:

  awg.set_channel_enabled(0, True)
  awg.set_channel_enabled(1, True)

  awg.set_channel_frequency(0, 600000)
  awg.set_channel_waveform(channel=0, waveform=FunctionGeneratorWaveform.SINE)
  awg.set_channel_waveform(channel=1, waveform=FunctionGeneratorWaveform.SINE)

  awg.set_channel_amplitude(0, 5.0)
  awg.set_coupling(True)

  awg.set_channel_frequency(0, 1000)
  time.sleep(10)

  awg.set_channel_frequency(0, 10000)

  print("Press Key to switch off")
  input()

  awg.set_channel_enabled(0, False)
  awg.set_channel_enabled(1, False)

Supported waveforms

  • FunctionGeneratorWaveform.SINE : Set the waveform of the specified channel to sine waveform with the specified frequency, amplitude, offset and phase
  • FunctionGeneratorWaveform.SQUARE : Set the waveform of the specified channel to square waveform with the specified frequency, amplitude, offset and phase.
  • FunctionGeneratorWaveform.RAMP : Set the waveform of the specified channel to ramp waveform with the specifiedfrequency, amplitude, offset and phase.
  • FunctionGeneratorWaveform.TRGL : Set the waveform of the specified channel to triangle waveform with the specified frequency, amplitude, offset and phase.
  • FunctionGeneratorWaveform.DC : Set the waveform of the specified channel to DC with the specified offset.
  • FunctionGeneratorWaveform.WHITENOISE : Set the waveform of the specified channel to noise with the specified amplitude and offset.

For more detailed information about waveforms see :SOURce:FUNCtion in DG1000Z Progamming Guide

Supported methods

  • identify()
  • Connection management (when not using with context management):
    • connect()
    • disconnect()
  • set_channel_enable(channel, enabled)
  • is_channel_enabled(channel)
  • set_channel_waveform(channel, waveform[, arbitrary])
  • get_channel_waveform(channel)
  • set_channel_frequency(channel, freq_Hz)
  • get_channel_frequency(channel)
  • set_channel_phase(channel, phase_deg:float)
  • get_channel_phase(channel)
  • set_channel_amplitude(channel, amp_Vpp:float)
  • get_channel_amplitude(channel)
  • set_channel_offset(channel, offset_V:float)
  • get_channel_offset(channel)
  • set_coupling(on)
  • get_coupling()

Metadata

Release files for pydg1000z 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydg1000z 0.1.1
File Size Uploaded
pydg1000z-0.1.1.tar.gz 5.4 kB Details

Release files / pydg1000z-0.1.1.tar.gz

Download URL pydg1000z-0.1.1.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b016ef95b9a62985fdc482826c09908afa68549861f40cdbc409a3f512a71ef9
BLAKE2b-256 checksum
How to use checksums
abf6710fe22225d520532c70e2a2888bf5ab42ed062172106e84378af9a377e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1.0

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page