Skip to main content

Triggers

A trigger says what arms the capture. Build one with the Trigger helpers and hand it to capture.start() or capture.run().

Every builder takes the same two extras:

ExtraMeaning
positionThe share of the acquisition kept before the trigger, 0.0 to 0.9. 0.1 keeps 10 % of history behind the event.
modesingle captures once and stops. normal re-arms after every trigger until you stop the capture.

immediate​

No trigger: sampling starts as soon as the device is armed.

from ikalogic_scanastudio import Trigger

Trigger.immediate()

rising and falling​

An edge on one channel.

Trigger.rising(channel=0, position=0.1, mode="single")
Trigger.falling(channel=3)
Rust uses a trait

position and mode are not arguments in Rust: they are .at() and .mode() from the TriggerExt trait, which must be in scope. .at() clamps to 0.0–0.9; the other SDKs raise instead.

logic​

Fires on any logic change across a set of channels: a bus transaction starting, rather than one wire moving.

Trigger.logic([0, 1, 2, 3], position=0.2)

pulse​

A pulse on one channel, optionally bounded in width. This is how you catch a glitch: ask for a pulse shorter than anything legitimate.

# A high pulse (0-1-0) shorter than 50 ns — a runt.
Trigger.pulse(channel=2, polarity="high", max_width=50e-9, position=0.5)

# A low pulse (1-0-1) at least 1 ms long — a bus held down.
Trigger.pulse(channel=2, polarity="low", min_width=1e-3)

Parameters:

  • polarity — high for a 0‑1‑0 pulse, low for 1‑0‑1.
  • min_width, max_width — in seconds. Leaving one out leaves that side unconstrained.

steps​

A multi-step pattern: a sequence of per-channel cells, each with its own timing window. This is the most selective trigger the hardware offers.

Each step is a list of cells, one per channel:

CellMeaning
xIgnore this channel.
0 / 1The channel must be at this level.
r / fThe channel must show this edge.
from ikalogic_scanastudio import Trigger, step

# A falling edge on ch0 while ch1 is high, then 1-10 us later ch0 rises again.
Trigger.steps([
step(["f", "1"]),
step(["r", "x"], t_min=1e-6, t_max=10e-6),
], position=0.3)

external​

The device's external trigger input, for arming off something outside the signals you are watching.

Trigger.external(edge="rising", impedance="100k", position=0.1)

Parameters: edge is rising or falling; impedance is 100k for the high-impedance input or 50ohm for the terminated one. Python and NodeJS default it to 100k; Rust and C take it as a required argument.

sequence​

Combines two triggers into one condition.

OrderFires when
a_then_bB, but only after A has happened.
b_then_aA, but only after B has happened.
a_or_bEither one.
a_and_bBoth, in any order.
# A chip-select falling, then a clock edge.
Trigger.sequence(
Trigger.falling(channel=0),
Trigger.rising(channel=1),
order="a_then_b",
position=0.2,
)
What the device supports

Not every device offers every trigger. A definition the hardware cannot arm is refused rather than silently downgraded: you get a Refused error with the reason.