Skip to content

SINGLE_TRIGGER_MSO2X

Sets the scope into single trigger mode. Requires a CONNECT_MSO2X block to create the connection. Tested on MSO22 and MSO24. Params: connection : VisaConnection The VISA address (requires the CONNECTION_MSO2X block). Returns: out : String Trigger
Python Code
from typing import Optional
from flojoy import VisaConnection, flojoy, String, DataContainer


@flojoy(inject_connection=True)
def SINGLE_TRIGGER_MSO2X(
    connection: VisaConnection,
    input: Optional[DataContainer] = None,
) -> String:
    """Sets the scope into single trigger mode.

    Requires a CONNECT_MSO2X block to create the connection.

    Tested on MSO22 and MSO24.

    Parameters
    ----------
    connection : VisaConnection
        The VISA address (requires the CONNECTION_MSO2X block).

    Returns
    -------
    String
        Trigger
    """

    # Retrieve oscilloscope instrument connection.
    scope = connection.get_handle()
    scope.write("FPAnel:PRESS SINGleseq")

    return String(s="Trigger once.")

Find this Flojoy Block on GitHub

Example

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

This app uses the Tektronix tm_measure library to decode I2C using a Tektronix MSO24 oscilloscope.

First the necessary blocks were added:

  • 1 CONNECT_MSO2X
  • 1 I2C_TRIGGER_MSO2X
  • 1 SINGLE_TRIGGER_MSO2X
  • 1 DECODE_I2C_MSO2X
  • 1 TEXT_VIEW

Each of these blocks must change the connection parameter to the correct instrument. The parameters were changed to match the setup: the clock_channel and data_channel parameters were changed to the proper analog or digital channel. The I2C_TRIGGER_MSO2X parameters were changed to trigger on the corrent signal. For example:

  • condition = address
  • addr_bits = 7
  • addr = 0010

therefore the actual address will be XXX0010 where X corresponds to a wildcard (0 or 1).

The blocks were connected as shown and the app was run.