Author Topic: Rigol DG5000 Pro raw TCP/SCPI control from MATLAB and Python  (Read 393 times)

0 Members and 1 Guest are viewing this topic.

Offline RonFred2Topic starter

  • Contributor
  • Posts: 30
  • Country: us
    • Biophysics Lab
Rigol DG5000 Pro raw TCP/SCPI control from MATLAB and Python
« on: August 28, 2026, 03:50:58 am »
I recently developed and tested some driverless MATLAB and Python examples for controlling the new Rigol DG5000 Pro waveform generators over a raw TCP/SCPI connection—without VISA.



The work was tested on a four-channel DG5254 Pro and includes:

  • Finding the instrument’s SCPI socket port rather than assuming a fixed port
  • Small MATLAB and Python identification/control examples
  • MATLAB configuration for selected channels on 2-, 4-, or 8-channel models
  • Read-back verification of frequency, amplitude, phase, load and output state
  • Bundled-channel phase alignment
  • Independent waveform confirmation with a Tektronix MSO64B

The article and downloadable ZIP are here:

https://www.biophysicslab.com/2026/08/25/dg5254-pro-waveform-generator-introduction/

I wrote the article and code and am sharing them in case they are useful to other DG5000 Pro owners. I would particularly welcome feedback from anyone using a DG5252/5258, DG535x or DG550x Pro, since only the DG5254 Pro hardware was available for my testing.

Has anyone else been controlling these generators directly through the raw SCPI socket, or found model-specific differences in the commands or phase-alignment behavior?
« Last Edit: August 28, 2026, 03:54:21 am by RonFred2 »
 

Offline Obin

  • Regular Contributor
  • *
  • Posts: 136
  • Country: be
  • Hi
    • nacho.works
Re: Rigol DG5000 Pro raw TCP/SCPI control from MATLAB and Python
« Reply #1 on: August 28, 2026, 06:14:32 am »
Can I ask why? Since you're already using python, pyvisa and pyvisa-py should got you covered in terms of VISA framework-needs

Offline RonFred2Topic starter

  • Contributor
  • Posts: 30
  • Country: us
    • Biophysics Lab
Re: Rigol DG5000 Pro raw TCP/SCPI control from MATLAB and Python
« Reply #2 on: August 30, 2026, 06:01:30 am »
Hi Obin:

NI‑VISA on macOS hasn’t been updated since 2023, and Apple Silicon (M1 and newer) makes those old Rosetta‑based installers increasingly fragile — in many cases, nearly impossible to install reliably. And ha ha, Rigol’s UltraSigma drivers are Windows‑only and haven’t been updated since 2015.

Your suggestion to use pyvisa‑py, though, is a good one; it’s a solid library for both Python and MATLAB now that MATLAB supports Python integration.

My current instruments (Rigol DG5254 Pro and Tektronix MSO64B) both include built‑in web servers, so I can control them directly through a browser and access their programming interfaces over TCP/IP — no VISA layer required.
That’s really the sweet spot of this article: programming the recently released DG5000 Pro series instruments as well as demonstrating VISA drivers/support layers are no longer needed.

Thank you for your comment, I am always looking for ways to better address real users such as yourself even with better positioning so a reader can better understand where I am focused.
« Last Edit: August 30, 2026, 06:15:59 am by RonFred2 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->