Skip to content

QUERY_CURVE_MSO

Run a SCPI curve query on a MSO2XX oscilloscope.Params:channel : intOscilloscope channel to query (eg 1 or 2 for a 2 channel scope)Returns:out : VectorA list containing the curve query results.
Python Code
from typing import Optional
from flojoy import VisaConnection, flojoy, Vector, DataContainer
import numpy as np


@flojoy(deps={"tm_devices": "0.1.24"}, inject_connection=True)
def QUERY_CURVE_MSO(
    connection: VisaConnection,
    default: Optional[DataContainer] = None,
    channel: int = 1,
) -> Vector:
    """Run a SCPI curve query on a MSO2XX oscilloscope.

    Parameters
    ----------
    channel : int
        Oscilloscope channel to query (eg 1 or 2 for a 2 channel scope)

    Returns
    -------
    Vector
        A list containing the curve query results.
    """

    # Retrieve oscilloscope instrument connection
    dm, scope = connection.get_handle()

    curve = scope.curve_query(channel)

    return Vector(v=np.array(curve))

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 query and plot data from a Tektronix MSO22 oscilloscope.