Main Content

rfspecan

Connection to Quick-Control RF spectrum analyzer instrument

Since R2025a

    Description

    The Quick-Control RF Spectrum Analyzer can be used for any RF spectrum analyzer that uses an underlying IVI-C driver. You do not have to directly deal with the underlying drivers.

    Creation

    Description

    rfsa = rfspecan(resource,driver) creates an RF spectrum analyzer (RFSpecAn) object to communicate with an RF swept-tuned spectrum analyzer instrument, using the specified resource and underlying driver. If the arguments are valid, the connect function automatically executed and the RFSpecAn is ready to use.

    example

    rfsa = rfspecan(resource) creates an RFSpecAn with the specified resource. The driver is auto-detected.

    example

    rfsa = rfspecan creates an RFSpecAn object is created with the default driver. You must subsequently specify the resource and explicitly connect to the instrument.

    example

    Input Arguments

    expand all

    VISA resource string for your instrument, specified as a string. Set this before connecting to the instrument. Setting it during object creation is optional and can be used if you know the resource string for your instrument. Otherwise, you can set it after object creation.

    Example: rfsa = rfspecan("TCPIP0::172.28.22.99::inst0::INSTR")

    Data Types: char | string

    Underlying driver to use with the instrument, specified as a string. Set this before connecting to the instrument. If it is not specified, the driver is auto-detected.

    Example: rfsa = rfspecan("TCPIP0::172.28.22.99::inst0::INSTR","AgXSAn")

    Data Types: char | string

    Properties

    The created RFSpecAn object has applicable properties among the following:

        Resource
        Driver
        Status
        Vendor
        Model
        StartFrequency
        StopFrequency
        CenterFrequency
        Span
        SweepTime
        ResolutionBandwidth
        VideoBandwidth
        ResolutionBandwidthMode
        VideoBandwidthMode
        SweepTimeMode
        VerticalScale
        AmplitudeUnits
        InputImpedance
        Attenuation
        AttenuationMode
        ReferenceLevel
        ReferenceLevelOffset
        DetectorType
        SweepModeContinuous
        TraceSize

    Object Functions

    The following functions are unique to RF spectrum analyzers.

    readAmplitudePerform RF spectrum analyzer amplitude measurement
    readPowerSpectrumPerform RF spectrum analyzer spectral data measurement
    resetReset RF spectrum analyzer to factory state

    The following functions are common to all Quick-Control instruments.

    resourcesList of available instrument resources for Quick-Control interfaces
    driversList of available instrument drivers for Quick-Control interfaces
    connectConnect device object to instrument
    disconnectDisconnect device object from instrument

    Examples

    collapse all

    Create an RF spectrum analyzer object and connect using a specified resource string.

    rfsa = rfspecan("TCPIP0::172.28.22.99::inst0::INSTR")

    Delete the RFSpecAn object. If a connection to the instrument still exists it will be disconnected.

    clear rfsa

    Create an RF spectrum analyzer object and connect using a specified resource and driver.

    rfsa = rfspecan("TCPIP0::172.28.22.99::inst0::INSTR","AgXSAn")

    Disconnect and delete.

    clear rfsa

    Create an RF spectrum analyzer object without specifying resource and driver. Resource specification and connection can follow.

    Create an RF spectrum analyzer object.

    rfsa = rfspecan

    Get available targets, select a resource, and connect.

    targets = resources(rf)
    rf.Resource =  'TCPIP0::172.28.22.99::inst0::INSTR';
    connect(rfsa);

    Disconnect and delete.

    disconnect(rfsa)
    clear rfsa

    Version History

    Introduced in R2025a