Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions grab_o_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
# ******************************************************************************
Expand All @@ -71,6 +82,7 @@ class GrabOScope:
Keysight3000XGrabber,
RigolDHO924Grabber,
RigolDS1054ZGrabber,
RohdeSchwarzRTBGrabber,
]

def __init__(self, options):
Expand Down