Trigger

src.trigger.trigger(oscope: Rigol_DS1000Z, sweep: str | None = None, holdoff: float | None = None, nreject: bool | None = None, mode: str | None = None, coupling: str | None = None, edge_source: int | str | None = None, edge_slope: str | None = None, edge_level: float | None = None, pulse_source: int | str | None = None, pulse_when: str | None = None, pulse_width: float | None = None, pulse_uwidth: float | None = None, pulse_lwidth: float | None = None, pulse_level: float | None = None, slope_source: int | str | None = None, slope_when: str | None = None, slope_time: float | None = None, slope_tupper: float | None = None, slope_tlower: float | None = None, slope_window: str | None = None, slope_alevel: float | None = None, slope_blevel: float | None = None)[source]

Send commands to control an oscilloscope’s trigger system. All arguments are optional. Field names mirror the SCPI command tree (edge_level <- :TRIGger:EDGe:LEVel). Provided fields are written, then the top-level fields and the fields of the active :TRIGger:MODE are queried back; the other modes’ fields come back None.

Parameters:
  • sweep (str) – :TRIGger:SWEep (AUTO/NORMal/SINGle). Setting SINGle arms one acquisition; let it settle (e.g. sleep) before reading status.

  • holdoff (float) – :TRIGger:HOLDoff (16ns to 10s).

  • nreject (bool) – :TRIGger:NREJect noise rejection.

  • mode (str) – :TRIGger:MODE (EDGE/PULSe/SLOPe).

  • coupling (str) – :TRIGger:COUPling (AC/DC/LFReject/ HFReject); edge trigger only.

  • edge_source (int, str) – :TRIGger:EDGe:SOURce (a channel or AC).

  • edge_slope (str) – :TRIGger:EDGe:SLOPe (POSitive/NEGative/RFALl).

  • edge_level (float) – :TRIGger:EDGe:LEVel.

  • pulse_source (int, str) – :TRIGger:PULSe:SOURce.

  • pulse_when (str) – :TRIGger:PULSe:WHEN (PGReater/PLESs/ NGReater/NLESs/PGLess/NGLess).

  • pulse_width (float) – :TRIGger:PULSe:WIDTh (single-threshold WHEN).

  • pulse_uwidth (float) – :TRIGger:PULSe:UWIDth (PGLess/NGLess).

  • pulse_lwidth (float) – :TRIGger:PULSe:LWIDth (PGLess/NGLess).

  • pulse_level (float) – :TRIGger:PULSe:LEVel.

  • slope_source (int, str) – :TRIGger:SLOPe:SOURce.

  • slope_when (str) – :TRIGger:SLOPe:WHEN (same set as pulse_when).

  • slope_time (float) – :TRIGger:SLOPe:TIME (single-threshold WHEN).

  • slope_tupper (float) – :TRIGger:SLOPe:TUPPer (PGLess/NGLess).

  • slope_tlower (float) – :TRIGger:SLOPe:TLOWer (PGLess/NGLess).

  • slope_window (str) – :TRIGger:SLOPe:WINDow (TA/TB/TAB).

  • slope_alevel (float) – :TRIGger:SLOPe:ALEVel (upper trigger level).

  • slope_blevel (float) – :TRIGger:SLOPe:BLEVel (lower trigger level).

Returns:

A namedtuple with a field for each argument, queried back regardless of which were provided, plus the read-only status (:TRIGger:STATus?) and position (:TRIGger:POSition?). Fields belonging to a non-active mode are None.