DIGITAL_ON_OFF_DS1074Z
 
 The DIGITAL_ON_OFF_DS1074Z node turns digital channels on or off for the DS1074Z. 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).   digi_on_off : select  Turn digital channel (i.e. LA) on the scope on or off.   d0 : select  Turn digital channel 0 on or off.   d1 : select  Turn digital channel 1 on or off.   d2 : select  Turn digital channel 2 on or off.   d3 : select  Turn digital channel 3 on or off.   use_pods : select  Use pod1 and pod2 parameters? If True, d0-d3 parameters are not used.   pod1 : select  Turn digital channels 0-7 on or off.   pod2 : select  Turn digital channels 8-15 on or off.     Returns:    out : DataContainer  TextBlob: summary of channel settings.    
   Python Code
from flojoy import flojoy, DataContainer, TextBlob, VisaConnection
from typing import Optional, Literal
@flojoy(inject_connection=True)
def DIGITAL_ON_OFF_DS1074Z(
    connection: VisaConnection,
    digi_on_off: Literal["ON", "OFF"] = "ON",
    d0: Literal["ON", "OFF"] = "ON",
    d1: Literal["ON", "OFF"] = "ON",
    d2: Literal["ON", "OFF"] = "ON",
    d3: Literal["ON", "OFF"] = "ON",
    use_pods: bool = False,
    pod1: Literal["ON", "OFF"] = "ON",
    pod2: Literal["ON", "OFF"] = "OFF",
    default: Optional[DataContainer] = None,
) -> TextBlob:
    """The DIGITAL_ON_OFF_DS1074Z node turns digital channels on or off for the DS1074Z.
    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).
    digi_on_off: select
        Turn digital channel (i.e. LA) on the scope on or off.
    d0: select
        Turn digital channel 0 on or off.
    d1: select
        Turn digital channel 1 on or off.
    d2: select
        Turn digital channel 2 on or off.
    d3: select
        Turn digital channel 3 on or off.
    use_pods: select
        Use pod1 and pod2 parameters? If True, d0-d3 parameters are not used.
    pod1: select
        Turn digital channels 0-7 on or off.
    pod2: select
        Turn digital channels 8-15 on or off.
    Returns
    -------
    DataContainer
        TextBlob: summary of channel settings.
    """
    rigol = connection.get_handle()
    rigol.write_raw(f":LA:STATe {digi_on_off}")
    if not use_pods:
        rigol.write_raw(f":LA:DIG0:DISPlay {d0}")
        rigol.write_raw(f":LA:DIG1:DISPlay {d1}")
        rigol.write_raw(f":LA:DIG2:DISPlay {d2}")
        rigol.write_raw(f":LA:DIG3:DISPlay {d3}")
        s = f"Digital 0: {d0}, "
        s += f"Digital 1: {d1}, "
        s += f"Digital 2: {d2}, "
        s += f"Digital 3: {d3}"
    else:
        rigol.write_raw(f":LA:POD1:DISPlay {pod1}")
        rigol.write_raw(f":LA:POD2:DISPlay {pod2}")
        s = f"Pod 1: {pod1}, "
        s += f"Pod 2: {pod2} "
    return TextBlob(text_blob=s)
Videos
Digital Signals Oscilloscope
Example
Having problems with this example app? Join our Discord community and we will help you out!
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.