From db870213817c7295de82f84d76bc582b4d371308 Mon Sep 17 00:00:00 2001 From: Justin Widen Date: Wed, 7 Jan 2026 13:27:26 -0600 Subject: [PATCH] Rohde & Schwarz RTB oscilloscopes Added RohdeSchwarzRTBGrabber, only tested with the RTB2002, but should work similar models. --- grab_o_scope.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/grab_o_scope.py b/grab_o_scope.py index 11d0660..69ed87e 100644 --- a/grab_o_scope.py +++ b/grab_o_scope.py @@ -60,6 +60,17 @@ def capture_screen(cls, instrument): buf = instrument.query_binary_values(':DISP:DATA? ON,0,PNG', datatype='B') return buf +class RohdeSchwarzRTBGrabber(Grabber): + """Grabber for the Rohde & Schwarz RTB oscilloscopes.""" + # This has only been tested with the RTB2002, but likely works with all RTB models + IDN_PATTERN = r'(?i)Rohde\s*&\s*Schwarz,RTB\d+.*' # Case insensitive and all RTB models + + @classmethod + def capture_screen(cls, instrument): + instrument.write('HCOPy:LANGuage PNG') # Set format to PNG + buf = instrument.query_binary_values('HCOPy:DATA?', datatype='B') + return buf + # ****************************************************************************** # Add device-specific subclasses of Grabber above this line. # ****************************************************************************** @@ -71,6 +82,7 @@ class GrabOScope: Keysight3000XGrabber, RigolDHO924Grabber, RigolDS1054ZGrabber, + RohdeSchwarzRTBGrabber, ] def __init__(self, options):