Skip to content

Y_AXIS_SETTINGS_FSV

The Y_AXIS_SETTINGS_FSV node sets the y axis range. Note that these settings will not affect the trace returned by EXTRACT_SWEEP_FSV. It will change the view on the instrument itself. Requires a CONNECTION_FSV 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 R&S network analyzers. Params: connection : VisaConnection The VISA address (requires the CONNECTION_FSV node). ref_level : float The reference level (top of the y axis), in dBm. spacing_type : select The type of spacing for the y axis (bottom = ref - spacing). spacing : float Spacing for the y axis (bottom = ref - spacing), in dB or %. Returns: out : String Y axis settings summary.
Python Code
from flojoy import flojoy, DataContainer, String, VisaConnection
from typing import Optional, Literal


@flojoy(inject_connection=True)
def Y_AXIS_SETTINGS_FSV(
    connection: VisaConnection,
    ref_level: float = -30,
    spacing_type: Literal["logarithmic", "linear %", "linear dB"] = "logarithmic",
    spacing: float = 40,
    default: Optional[DataContainer] = None,
) -> String:
    """The Y_AXIS_SETTINGS_FSV node sets the y axis range.

    Note that these settings will not affect the trace returned by
    EXTRACT_SWEEP_FSV. It will change the view on the instrument itself.

    Requires a CONNECTION_FSV 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 R&S network analyzers.

    Parameters
    ----------
    connection: VisaConnection
        The VISA address (requires the CONNECTION_FSV node).
    ref_level: float
        The reference level (top of the y axis), in dBm.
    spacing_type: select
        The type of spacing for the y axis (bottom = ref - spacing).
    spacing: float
        Spacing for the y axis (bottom = ref - spacing), in dB or %.

    Returns
    -------
    String
        Y axis settings summary.
    """

    rohde = connection.get_handle()

    s = f"Y axis settings: Reference level: {ref_level}, "
    s += f"Spacing type: {spacing_type}"

    rohde.write(f"DISP:TRAC:Y:RLEV {ref_level}")

    match spacing_type:
        case "logarithmic":
            rohde.write("DISP:TRAC:Y:SPAC LOG")
        case "linear %":
            rohde.write("DISP:TRAC:Y:SPAC LIN")
        case "linear dB":
            rohde.write("DISP:TRAC:Y:SPAC LDB")

    rohde.write(f"DISP:TRAC:Y {spacing}")

    return String(s=s)

Find this Flojoy Block on GitHub

Videos

Read FM Radio Signals using Flojoy

Example

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

In this example, the Rohde & Schwarz FSV Signal Analyzer is used to view the FM radio range (86-110 MHz).

First 4 FSV nodes were added: CONNECTION_FSV, SWEEP_SETTINGS_FSV, INIT_SWEEP_FSV, and EXTRACT_SWEEP_FSV. A LINE node was also added. The VISA address was set for the 4 instrument nodes. The range of the signal analyzer sweep was set with SWEEP_SETTINGS_FSV (start = 86, stop = 110 MHz).

The nodes were then connected as shown in the image, and the app was run.