Skip to content

Connecting to Rigol DG1062Z by Rigol in Python

Instrument Card

The Rigol DG1062Z is a two channel Function / Arbitrary Waveform Generator to create high quality signals up to 60 MHz (Sine) with very low jitter (200 ps) and the new SiFi (SIgnal FIdelity) technology. Beside the two analog outputs, the device includes an USB-Host- and an USB-device interface.

Rigol DG1062Z

Device Specification: here

Manufacturer card: RIGOL

RIGOL

RIGOL Technologies, Inc. specializes in development and production of test and measuring equipment and is one of the fastest growing Chinese companies in this sphere. RIGOL’s line of products includes digital storage oscilloscopesfunction/arbitrary waveform generatorsdigital multimeters, PC-based devices compatible with LXI standard etc.

  • Headquarters: Beijing, China
  • Yearly Revenue (millions, USD): 23
  • Vendor Website: here

Connect to the Rigol DG1062Z in Python

PROTOCOLS > SCPI

Here is a Python script that uses Qcodes to connect to a Rigol DG1062Z Function Generator:

from qcodes.instrument_drivers.rigol.DG1062 import RigolDG1062
# Connect to the instrument
dg = RigolDG1062("dg", "TCPIP0::169.254.187.99::inst0::INSTR")
# Set the frequency, amplitude, and offset of channel 1
dg.channels[0].freq(1E3) # Set frequency to 1 kHz
dg.channels[0].ampl(1.0) # Set amplitude to 1 V
dg.channels[0].offset(0) # Set offset to 0 V
# Enable the output of channel 1
dg.channels[0].state("ON")
# Trigger a burst on channel 1
dg.channels[0].burst.on("ON") # Enable burst mode
dg.channels[0].burst.ncycles(10) # Set number of cycles to 10
dg.channels[0].burst.trigger() # Trigger the burst
# Disconnect from the instrument
dg.close()

This script connects to a Rigol DG1062Z Function Generator using the specified address. It then sets the frequency, amplitude, and offset of channel 1 using the freq, ampl, and offset parameters of the RigolDG1062Channel class. The output of channel 1 is enabled using the state parameter. Finally, a burst is triggered on channel 1 using the on, ncycles, and trigger parameters of the RigolDG1062Burst class.

Note: Make sure to replace the instrument address ("TCPIP0::169.254.187.99::inst0::INSTR") with the actual address of your Rigol DG1062Z Function Generator.