Skip to content

DIGITAL_TRIGGER_DS1047Z

Download Flojoy Studio to try this app
Sets the digital triggering channel and threshold level. Requires a CONNECTION_DS1074Z node at the start of the app to connect with the instrument. The VISA address will then be listed under 'connection'. This node should also work with compatible DS1000Z oscilloscopes Params: connection : VisaConnection The VISA address (requires the CONNECTION_DS1074Z node). channel : int Set the triggering channel, from 0-15. level : float The triggering level, in V. slope : select Which slope to detect the triggering time on. Returns: out : DataContainer String: summary of channel settings.
Python Code
from flojoy import flojoy, DataContainer, String, VisaConnection
from typing import Optional, Literal


@flojoy(inject_connection=True)
def DIGITAL_TRIGGER_DS1047Z(
    connection: VisaConnection,
    channel: int = 0,
    level: float = 0.1,
    slope: Literal["positive", "negative", "either", "unchanged"] = "positive",
    default: Optional[DataContainer] = None,
) -> String:
    """Sets the digital triggering channel and threshold level.

    Requires a CONNECTION_DS1074Z node at the start of the app to connect with
    the instrument. The VISA address will then be listed under 'connection'.

    This node should also work with compatible DS1000Z oscilloscopes

    Parameters
    ----------
    connection: VisaConnection
        The VISA address (requires the CONNECTION_DS1074Z node).
    channel: int
        Set the triggering channel, from 0-15.
    level: float
        The triggering level, in V.
    slope: select
        Which slope to detect the triggering time on.

    Returns
    -------
    DataContainer
        String: summary of channel settings.
    """

    rigol = connection.get_handle()

    assert 0 <= channel <= 15, "The channel must be between 0 and 15."

    rigol.write_raw(f":TRIG:EDGe:SOURce D{channel}")
    rigol.write_raw(f":TRIG:EDGe:LEVel {level}")

    if slope == "either":
        rigol.trigger_edge_slope("neither")
    elif slope != ("unchanged" or "either"):
        rigol.trigger_edge_slope(slope)

    s = f"Channel: {channel}; Level: {level}; Slope: {slope}"

    return String(s=s)

Find this Flojoy Block on GitHub

Videos

Digital Signals Oscilloscope

Example App

Having problems with this example app? Join our Discord community and we will help you out!
React Flow mini map

In this example the digital function blocks are used to control the LA channels of the Rigol DS1047Z oscilloscope.

A CONNECTION_DS1047Z block must first be used to make the connection between Flojoy and the instrument.

The DIGITAL_ON_OFF_DS1047Z block turns the LA digital channel off as well as indiviual sub-channels.

The DIGITAL_TRIGGER_DS1047Z block chooses the triggering digital channel (e.g. D0 here) and the triggering level.

The SINGLE_TRIGGER_DS1047Z block sets the triggering mode to single which stops the oscilloscope as soon as a triggering signal is detected, leaving a static trace on the screen.

The DIGITAL_TRACE_DS1047Z block extracts traces from digital channels such as D0.