Connecting to Rigol DS4000-Series by Rigol in Python
Instrument Card
The Rigol DS4000 series consists of 8 high level Oscilloscopes for professional operation, which come off very well compared to higher prices models of other brands.
Device Specification: here
Manufacturer card: 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 oscilloscopes, function/arbitrary waveform generators, digital multimeters, PC-based devices compatible with LXI standard etc.
- Headquarters: Beijing, China
- Yearly Revenue (millions, USD): 23
- Vendor Website: here
Demo: Measure signal width and phase with a Tektronix oscilloscope
Connect to the Rigol DS4000-Series in Python
Read our guide for turning Python scripts into Flojoy nodes.
PROTOCOLS > SCPI
To connect to a Rigol DS4000-Series Oscilloscope using Qcodes, you can use the following Python script:
import qcodes as qcfrom qcodes.instrument_drivers.rigol.DS4000 import RigolDS4000
# Connect to the oscilloscopeoscilloscope = RigolDS4000("oscilloscope", "USB0::0x1AB1::0x04CE::DS4A203100839::INSTR")
# Print the IDN information of the oscilloscopeprint(oscilloscope.get_idn())
# Set the time base to 1 ms/divoscilloscope.time_base(0.001)
# Enable autoscaleoscilloscope.enable_auto_scale(True)
# Start acquisitionoscilloscope.run()
# Wait for the acquisition to completeqc.WaitInterval(1).wait()
# Stop acquisitionoscilloscope.stop()
# Get the waveform data from channel 1waveform_data = oscilloscope.channels.ch1.curvedata()
# Print the waveform dataprint(waveform_data)
# Disconnect from the oscilloscopeoscilloscope.close()
This script connects to the oscilloscope using the VISA address “USB0::0x1AB1::0x04CE::DS4A203100839::INSTR”. You may need to modify this address to match the actual address of your oscilloscope.
The script then performs various operations on the oscilloscope, such as setting the time base, enabling autoscale, starting and stopping the acquisition, and retrieving the waveform data from channel 1.
Finally, the script closes the connection to the oscilloscope using the close()
method.
Note: This script assumes that you have already installed the necessary dependencies, including Qcodes and the Rigol DS4000 driver.