SiglentSDS1000XE#
- class SiglentSDS1000XE(
- visa_resource: str | VisaConfig,
Bases:
ScopeDriverBaseSCPI driver for Siglent SDS1000X-E series oscilloscopes (SDS1104X-E and family).
Methods
Poll
CMR?thenEXR?and raise on the first non-zero code (no error queue on Siglent).Close the underlying transport.
Arm a single acquisition then poll
INR?bit 0 (new signal acquired) until set ortimeout.Fetch the full waveform from
channeloverC{n}:WF? DAT2(signed 8-bit codes).Force a trigger event immediately, regardless of the configured conditions.
Read back the current acquisition mode.
Read back the acquisition run state (RUNNING / STOPPED).
Read back the waveforms-to-average count.
Read back input coupling on
channel.Read back the timebase (seconds/div).
Read back
channel's probe attenuation ratio.Read back the current sample rate (samples per second).
Read back the trigger status (ARMED / READY / TRIGGERED / …).
Read back
channel's vertical offset (volts).Read back
channel's vertical scale (V/div).Recall a panel setup from a USB file (
RCPN) or push host bytes back (PNSU).Query a built-in parameter via
C{n}:PAVA?; unavailable/sentinel results map toNaN.Open the transport and disable comm headers so query replies are bare values.
Start continuous (free-running) acquisition.
Transfer a screen dump (
SCDP, a raw BMP) to the host and write it tofilepath.Save the panel setup to a USB file (
STPN) or transfer it to the host (PNSU?).Set the acquisition mode.
Set the number of waveforms to average.
Set AC/DC input coupling on
channel.Set the timebase to
seconds_per_div.Set
channel's probe attenuation ratio (e.g. 1, 10, 100, 1000).Set the trigger threshold to
level(volts).Set the trigger sweep mode (AUTO / NORMAL).
Set the trigger edge slope (RISING / FALLING / EITHER).
Set the trigger source to analog
channel.Set the trigger type (EDGE, PULSE, …).
Set
channel's vertical offset tooffset(volts).Set
channel's vertical scale tovolts_per_div(V/div).Ensure a measurement slot exists for
measurement_type/channelbefore the scope triggers.Arm a single-shot acquisition.
Stop acquisition.
- check_errors() None[source]#
Poll
CMR?thenEXR?and raise on the first non-zero code (no error queue on Siglent).
- set_vertical_scale( ) None[source]#
Set
channel’s vertical scale tovolts_per_div(V/div).Drivers may snap to the nearest hardware-supported step. Callers that need the actual applied value should
get_vertical_scale()afterward.
- set_probe_attenuation( ) None[source]#
Set
channel’s probe attenuation ratio (e.g. 1, 10, 100, 1000).
- set_horizontal_scale(seconds_per_div: float) None[source]#
Set the timebase to
seconds_per_div. Applies globally to all channels.
- get_sample_rate() float[source]#
Read back the current sample rate (samples per second).
This is the effective hardware rate the scope is acquiring at; it depends on the timebase, memory depth, and interpolation settings.
- set_acquisition_mode(
- mode: AcquisitionMode,
Set the acquisition mode.
Drivers should raise
NotImplementedErrorforAcquisitionModevalues their scope doesn’t support (e.g. Keysight 1200X has no ENVELOPE mode).
- get_acquisition_mode() AcquisitionMode[source]#
Read back the current acquisition mode.
- set_average_count(count: int) None[source]#
Set the number of waveforms to average. Only takes effect in
AcquisitionMode.AVERAGE.
- stop() None[source]#
Stop acquisition. Leaves the captured data intact for
fetch_waveform/measure.
- single() None[source]#
Arm a single-shot acquisition.
Non-blocking — use
get_acquisition_stateto poll for STOPPED, or preferdigitize()which combines arming and waiting.
- digitize(timeout: float) None[source]#
Arm a single acquisition then poll
INR?bit 0 (new signal acquired) until set ortimeout.
- get_acquisition_state() AcquisitionState[source]#
Read back the acquisition run state (RUNNING / STOPPED).
- fetch_waveform(
- channel: int,
Fetch the full waveform from
channeloverC{n}:WF? DAT2(signed 8-bit codes).
- measure(
- measurement_type: ScopeMeasurementType,
- channel: int,
Query a built-in parameter via
C{n}:PAVA?; unavailable/sentinel results map toNaN.
- set_trigger_source(channel: int) None[source]#
Set the trigger source to analog
channel.Drivers typically cache this value because the trigger-level SCPI on some scopes requires the source channel in the same command.
- set_trigger_type(
- trigger_type: TriggerType,
Set the trigger type (EDGE, PULSE, …).
- set_trigger_level(level: float) None[source]#
Set the trigger threshold to
level(volts). Applies to the configured trigger source.
- set_trigger_slope(
- slope: TriggerSlope,
Set the trigger edge slope (RISING / FALLING / EITHER).
- set_trigger_mode(
- mode: TriggerMode,
Set the trigger sweep mode (AUTO / NORMAL).
AUTO forces an acquisition if no trigger fires within the timeout; NORMAL waits indefinitely for a real trigger.
- force_trigger() None[source]#
Force a trigger event immediately, regardless of the configured conditions.
- get_trigger_status() TriggerStatus[source]#
Read back the trigger status (ARMED / READY / TRIGGERED / …).
- save_screenshot( ) bytes[source]#
Transfer a screen dump (
SCDP, a raw BMP) to the host and write it tofilepath.
- save_settings( ) bytes[source]#
Save the panel setup to a USB file (
STPN) or transfer it to the host (PNSU?).
- load_settings( ) None[source]#
Recall a panel setup from a USB file (
RCPN) or push host bytes back (PNSU).The host-side
PNSUwrite-back is known to wedge the USBTMC interface on some SDS1000X-E firmware; preferfrom_instrument=True(USB stick) over USB connections.
- setup_measurement(
- measurement_type: ScopeMeasurementType,
- channel: int,
Ensure a measurement slot exists for
measurement_type/channelbefore the scope triggers.Required for instruments (e.g. Tektronix) that compute measurements during acquisition — the slot must be present at trigger time or the first
measure()returns stale/invalid data. Default is a no-op for instruments (e.g. Keysight 1200X) that compute on demand.