Help Icon
Search Results for

    Show / Hide Table of Contents

    :CALCulate:PARameter:DEFine

    Description

    This command selects the measurement type, which should be performed. For more details about the different measurement types please refer to the general info page about measurements (Measurement Types).

    Important

    The standard behaviour of this method is that the input parameters (gain, attenuation, termination, ...) are kept. The optional DEFault parameter allows to apply measurement relevant default (preset) settings.

    • Command
    Syntax Parameter
    :CALCulate<ch>:PARameter<tr>:DEFine { S11 | S21 | GAINphase | CH1 | CH2 | Z | R | T }[,DEFault]
    Parameters accepted format allowed suffixes possible Errors description
    <ch> { 1 | empty } none Invalid channel index Currently only one channel is supported. Empty means 1 is used as default.
    <tr> { 1 | empty } none Invalid trace index Currently only one trace is supported. Empty means 1 is used as default.
    { S11 | S21 | GAINphase | CH1 | CH2 | Z | R | T } exactly the given options none Illegal parameter value The measurement to perform
    [optional] DEFault exactly the given options none Illegal parameter value If applied the input parameters (gain, attenuation, termination, ...) are ALWAYS set to the default values; otherwise the settings from the previous measurement will be kept.
    • Query
    Syntax Response
    :CALCulate<ch>:PARameter<tr>:DEFine? { S11 | S21 | GAINphase | CH1 | CH2 | Z | R | T }
    Parameters accepted format description
    <ch> { 1 | empty } Currently only one channel is supported. Empty means 1 is used as default.
    <tr> { 1 | empty } Currently only one trace is supported. Empty means 1 is used as default.
    Response value description
    { S11 | S21 | GAINphase | CH1 | CH2 | Z | R | T } The measurement type.

    Options

    Options Description
    CH1 Absolute measurement on channel 1. (VRMS)
    CH2 Absolute measurement on channel 2. (VRMS)
    GAINphase Gain - phase measurement.
    R Absolute measurement on channel R (Ch1). (VRMS)
    S11 S11 measurement.
    S21 S21 measurement.
    T Absolute measurement on channel T (Ch2). (VRMS)
    Z Impedance measurement (Series Thru, Shunt Thru, Port 1 Reflection, External Coupler, External Bridge, Impedance Adapter and Voltage Current Gain as defined in: :SENSe:Z:METHod)

    Presets

    default value
    { S11 | S21 | GAINphase | CH1 | CH2 | Z | R | T } S11

    Sample usage

    Configure and start a S21 measurement.

    • C#
    var visaSession = new TcpipSocket(VISA_RESOURCENAME);
    visaSession.RawIO.Write(":SENS:FREQ:STAR 5kHz;STOP 50kHz\n");
    visaSession.RawIO.Write(":CALC:PAR:DEF S21\n");
    visaSession.RawIO.Write(":TRIG:SING\n");
    // wait for the measurement to finish
    visaSession.RawIO.Write("*OPC?\n");
    visaSession.RawIO.ReadString();
    visaSession.RawIO.Write(":SENS:FREQ:DATA?\n");
    var frequencyValues = visaSession.RawIO.ReadString();
    visaSession.RawIO.Write(":CALC:DATA:SDAT?\n");
    var measurementValues = visaSession.RawIO.ReadString();
    
    • Python
    visaSession.write(':SENS:FREQ:STAR 5kHz;STOP 50kHz\n')
    visaSession.write(':CALC:PAR:DEF S21\n')
    visaSession.write(':TRIG:SING\n')
    visaSession.query('*OPC?\n')
    frequencyValues = visaSession.query(':SENS:FREQ:DATA?\n')
    measurementValues = visaSession.query(':CALC:DATA:SDAT?\n')
    

    Related commands

    :CALCulate:PARameter:COUNt

    :CALCulate:PARameter:SELect

    :SENSe:FREQuency:STARt

    :SENSe:FREQuency:STOP

    In this article
    Back to top Generated by DocFX