Segment SCPI

M9370A / M9371A / M9372A / M9374A / M9375A

Sense:Segment Commands


Defines the segment sweep settings.

Enable segment sweep with SENS:SWE:TYPE SEGMent.

SENSe:Segment

       | ADD

       | ARBitrary

       | BWIDth

             | [RESolution]

                   | CONTrol

       | COUNt

       | DELete

             | ALL

       | FREQuency

             | CENTer

             | SPAN

             | STARt

             | STOP

       | LIST

       | POWer

             | [LEVel]

                   | CONTrol

       | [STATe]

       | SWEep

             | POINts

             | TIME

                   | CONTrol

       | X

             | SPACing

 

Click on a keyword to view the command details.

See Also


SENSe<cnum>:SEGMent<snum>:ADD

(Write-only) Adds a segment.

Parameters

 

<cnum>

Any existing channel number. If unspecified, value is set to 1

<snum>

Segment number to add. If unspecified, value is set to 1. Segment numbers must be sequential. If a new number is added where one currently exists, the existing segment and those following are incremented by one.

Examples

Two Segments exist (1 and 2). The following command will add a new segment (1). The existing (1 and 2) will become (2 and 3) respectively.

SENS:SEGM1:ADD
sense2:segment1:add

Query Syntax

Not applicable. Use Sense:Segment:Count to determine the number of segments in a trace.

Default

Not Applicable


SENSe<cnum>:SEGMent:ARBitrary <ON | OFF>

(Read-Write) Enables you to setup a segment sweep with arbitrary frequencies. The start and stop frequencies of each segment can overlap other segments. Also, each segment can have a start frequency that is greater than its stop frequency which causes a reverse sweep over that segment. Learn more about Arbitrary Segment Sweep.

Parameters

 

<cnum>

Any existing channel number. If unspecified, value is set to 1.

<ON | OFF>

ON (or 1) - Allows the setup of arbitrary segment sweep.
OFF
(or 0) - Prevents the setup of arbitrary segment sweep.

Examples

SENS:SEGM:ARB ON
sense2:segment:arbitrary off

Query Syntax

SENSe<cnum>:SEGMent:ARBitrary?

Return Type

Boolean (1 = ON, 0 = OFF)

Default

OFF


SENSe<cnum>:SEGMent<snum>:BWIDth[:RESolution] <num>

(Read-Write) Sets the IF Bandwidth for the specified segment. First set SENS:SEGM:BWIDth:CONTrol ON. All subsequent segments that are added assume the new IF Bandwidth value.

Parameters

 

<cnum>

Any existing channel number. If unspecified, value is set to 1

<snum>

Segment number to modify. Choose any existing segment number.

<num>

IF Bandwidth in Hz. The list of valid IF Bandwidths is different depending on the PNA model. (Click to see the lists.) If an invalid number is specified, the analyzer will round up to the closest valid number.

Note: This command will accept MIN or MAX instead of a numeric parameter. See SCPI Syntax for more information.

Examples

SENS:SEGM:BWID 1KHZ

sense2:segment2:bwidth:resolution max

Query Syntax

SENSe<cnum>:SEGMent<snum>:BWIDth[:RESolution]?

Return Type

Numeric

Default

Varies with PNA model.


SENSe<cnum>:SEGMent:BWIDth[:RESolution]:CONTrol <ON | OFF>

(Read-Write) Specifies whether the IF Bandwidth resolution can be set independently for each segment.

Parameters

 

<cnum>

Any existing channel number. If unspecified, value is set to 1

<ON | OFF>

ON (or 1) - turns Bandwidth control ON. Bandwidth can be independently set for each segment.

OFF (or 0) - turns Bandwidth control OFF. Use the channel IF bandwidth setting SENS:BWID.

Examples

SENS:SEGM:BWID:CONT ON

sense2:segment:bwidth:control off

Query Syntax

SENSe<cnum>:SEGMent:BWIDth[:RESolution]:CONTrol?

Return Type

Boolean (1 = ON, 0 = OFF)

Default

OFF


SENSe<cnum>:SEGMent:COUNt?

(Read-only) Queries the number of segments that exist in the specified channel.

Parameters

 

<cnum>

Any existing channel number. If unspecified, value is set to 1

Examples

SENS:SEGM:COUNt?
sense2:segment:count?

Return Type

Numeric

Default

1 segment


SENSe<cnum>:SEGMent<snum>:DELete

(Write-only) Deletes the specified sweep segment. When ALL segments are deleted, SENS:SWE:TYPE is automatically set to Linear because there are no segments to sweep.

<cnum>

Any existing channel number. If unspecified, value is set to 1

<snum>

Number of the segment to delete. If unspecified, value is set to 1

Examples

SENS:SEGM:DEL
sense2:segment2:delete

Query Syntax

Not applicable

Default

Not Applicable


SENSe<cnum>:SEGMent:DELete:ALL

(Write-only) Deletes all sweep segments. When this command is executed, SENS:SWE:TYPE is automatically set to Linear because there are no segments to sweep.

Parameters

 

<cnum>

Any existing channel number. If unspecified, value is set to 1

Examples

SENS:SEGM:DEL:ALL
sense2:segment:delete:all

Query Syntax

Not applicable

Default

Not Applicable


SENSe<cnum>:SEGMent<snum>:FREQuency:CENTer <num>

(Read-Write) Sets the Center Frequency for the specified segment. The Frequency Span of the segment remains the same. The Start and Stop Frequencies change accordingly.

Note: All previous segment's Start and Stop Frequencies that are larger than the new Start Frequency are changed to the new Start Frequency. All following segment's start and stop frequencies that are smaller than the new Stop Frequency are changed to the new Stop Frequency.

Parameters

 

<cnum>

Any existing channel number. If unspecified, value is set to 1

<snum>

Segment number to modify. Choose any existing segment number.

<num>

Center Frequency in Hz. Choose any number between the minimum and maximum frequency of the analyzer.

Note: This command will accept MIN or MAX instead of a numeric parameter. See SCPI Syntax for more information.

Examples

SENS:SEGM:FREQ:CENT 1MHZ
sense2:segment2:frequency:center 1e9

Query Syntax

SENSe<cnum>:SEGMent<snum>:FREQuency:CENTer?

Return Type

Numeric

Default

Stop Frequency of the previous segment. If first segment, start frequency of the analyzer.


SENSe<cnum>:SEGMent<snum>:FREQuency:SPAN <num>

(Read-Write) Sets the Frequency Span for the specified segment. The center frequency of the segment remains the same. The start and stop frequencies change accordingly.

Note: All previous segment's Start and Stop Frequencies that are larger than the new Start Frequency are changed to the new Start Frequency. All following segment's start and stop frequencies that are smaller than the new Stop Frequency are changed to the new Stop Frequency.

Parameters

 

<cnum>

Any existing channel number. If unspecified, value is set to 1

<snum>

Segment number to modify. Choose any existing segment number.

<num>

Frequency Span in Hz. Choose any number between the minimum and maximum frequency of the analyzer.

Note: This command will accept MIN or MAX instead of a numeric parameter. See SCPI Syntax for more information.

Examples

SENS:SEGM:FREQ:SPAN 1MHZ
sense2:segment2:frequency:span max

Query Syntax

SENSe<cnum>:SEGMent<snum>:FREQuency:SPAN?

Return Type

Numeric

Default

If first segment, frequency span of the analyzer. Otherwise 0.


SENSe<cnum>:SEGMent<snum>:FREQuency:START <num>

(Read-Write) Sets the Start Frequency for the specified sweep segment.

Notes

All other segment Start and Stop Frequency values that are larger than this frequency are changed to this frequency.

To return the start and stop frequency of the entire sweep (all segments), Use SENS:FREQ:STARt? and SENS:FREQ:STOP?

Parameters

 

<cnum>

Any existing channel number. If unspecified, value is set to 1

<snum>

Segment number to modify. Choose any existing segment number.

<num>

Start Frequency in Hz. Choose any number between the minimum and maximum frequency of the analyzer.

Note: This command will accept MIN or MAX instead of a numeric parameter. See SCPI Syntax for more information.

Examples

SENS:SEGM:FREQ:STAR 1MHZ
sense2:segment2:frequency:start minimum

Query Syntax

SENSe<cnum>:SEGMent<snum>:FREQuency:STARt?

Return Type

Numeric

Default

Stop Frequency of the previous segment. If first segment, start frequency of the analyzer.


SENSe<cnum>:SEGMent<snum>:FREQuency:STOP <num>

(Read-Write) Sets the Stop Frequency for the specified sweep segment.

Notes

All other segment Start and Stop Frequency values that are larger than this frequency are changed to this frequency.

To return the start and stop frequency of the entire sweep (all segments), Use SENS:FREQ:STARt? and SENS:FREQ:STOP?

Parameters

 

<cnum>

Any existing channel number. If unspecified, value is set to 1

<snum>

Segment number to modify. Choose any existing segment number.

<num>

Stop Frequency in Hz. Choose any number between the minimum and maximum frequency of the analyzer.

Note: This command will accept MIN or MAX instead of a numeric parameter. See SCPI Syntax for more information.

Examples

SENS:SEGM:FREQ:STOP 1MHZ
sense2:segment2:frequency:stop maximum

Query Syntax

SENSe<cnum>:SEGMent<snum>:FREQuency:STOP?

Return Type

Numeric

Default

If first segment, stop frequency of the analyzer. Otherwise, start frequency of the segment.


SENSe<cnum>:SEGMent:LIST <char>,<numSegs>,<data>

(Read-Write) Reads or writes the entire list of values in the segment sweep table.   

Note: For binary data transfer, specify 64-bit instead of 32-bit using FORMat[:DATA].  This is because higher frequencies used on PNA exceed the maximum value that can be represented by a 32-bit floating point number.

When sending/receiving this data as binary (FORMat[:DATA] REAL,64), use FORMat:BORDer to specify the correct 'endianness' (byte ordering) corresponding to your programming environment / computer platform.

Parameters

 

<cnum>

Any existing channel number. If unspecified, value is set to 1

<char>

Choose from:

SSTOP -  Frequency values are Start and Stop for each segment.  

CSPAN -  Frequency values are Center and Span for each segment.

<numSegs>

Total number of sweep segments being input.  This allows the PNA to determine how many values per-each-segment are in the input <data> block.

<data>

A 2-dimensional array of Segment data as a single data block.  The data elements within a segment are each represented as real floating-point numbers as follows, and the data block is formed by interleaving all the segments together consecutively:

  1. Segment state (Boolean 1 for ON and 0 for OFF)

  2. Number of Points in the segment

  3. Start Freq (when <char> is SSTOP), or Center Freq (when <char> is CSPAN)

  4. Stop Freq (when <char> is SSTOP), or Freq Span (when <char> is CSPAN)

  5. IFBW (optional for the Write)

  6. Dwell Time (optional for the Write)

  7. Power (optional for the Write) - see below.

The first four data elements must always be supplied. After those values, data must be supplied for successive optional elements. For example, to set dwell time values, you must also supply IFBW values, because IFBW (#5) precedes dwell time (#6) in the array order.

The IF Bandwidth, Sweep Time and Source Power Control settings do NOT affect the order in which elements are interpreted.

The number of elements to supply for Power depends on the following two settings:

  1. Source Power Option - ON allows segments to have independent power levels.

  2. Couple Ports = Off allows different power levels for each test port.

CouplePorts

SourcePowerOption

Number of Elements

False

False

Each port has its own channel-wide power setting, which is set using SOURce:POWer[:LEVel]. Provide exactly 7 elements per segment. The last element (power) is ignored.

False

True

Provide 6 elements + total number of ports.  The first 7 elements are still interpreted the same.

The remaining elements (in-order) are interpreted as the power levels to set on that segment for Ports 2 through N, where N is the total number of ports currently enabled for the PNA or for a PNA with multiport external test set.

True

False

Provide exactly 7 elements per segment. The last element (power) is ignored.

True

True

Provide exactly 7 elements per segment. The last element (power) is honored.

 

Examples

SENS:SEGM:LIST SSTOP,1,1,201,10E6,26.5E9,1E3,0,-10 1 segment, state ON, 201 points, 10 MHz to 26.5 GHz, 1kHz IFBW, 0 dwell time, -10 dBm (port powers coupled)

sense2:segment:list? cspan

See Upload and Download a Segment List example program

Query Syntax

SENSe<cnum>:SEGMent:LIST? [char].

If unspecified, char is set to SSTOP.

The number of data elements per segment returned will be 6 + total number of source ports, regardless of the IF Bandwidth, Sweep Time and Source Power Control settings.  For the N5264A, which has no source ports, the query will return just 6 values per segment. For all other PNA models, the last elements in each segment correspond to the power level for each port.

Return Type

Returns block data in the format specified by FORMat[:DATA].

Default

Not Applicable


SENSe<cnum>:SEGMent<snum>:POWer[<port>][:LEVel] <num>

(Read-Write) Sets the Port Power level for the specified sweep segment. First set SENS:SEGM:POW:CONTrol ON.

When port power is Coupled, setting port power for one port will apply port power for all source ports.

All subsequent segments that are added assume the new Power Level value.

Parameters

 

<cnum>

Any existing channel number. If unspecified, value is set to 1

<snum>

Segment number to modify. Choose any existing segment number.

<port>

Port number of the source. If unspecified, value is set to 1.

<num>

Power level.

Note: The range of settable power values depends on the PNA model and if source attenuators are installed. To determine the range of values, send SOUR:POW? MAX and SOUR:POW? MIN. (SOUR:POW:ATT:AUTO must be set to ON).

Actual achievable leveled power depends on frequency.

Examples

SENS:SEGM:POW 0
sense2:segment2:power1:level -10

Query Syntax

SENSe<cnum>:SEGMent<snum>:POWer[<port>][:LEVel]?

Return Type

Numeric

Default

0


SENSe<cnum>:SEGMent:POWer[:LEVel]:CONTrol <ON | OFF>

(Read-Write) Specifies whether Power Level can be set independently for each segment.

Parameters

 

<cnum>

Any existing channel number. If unspecified, value is set to 1

<ON | OFF>

ON (or 1) - turns Power Level control ON. Power level can be set for each segment.
OFF
(or 0) - turns Power Level control OFF. Use the channel power level setting.

Examples

SENS:SEGM:POW:CONT ON
sense2:segment:power:level:control off

Query Syntax

SENSe<cnum>:SEGMent:POWer[:LEVel]:CONTrol?

Return Type

Boolean (1 = ON, 0 = OFF)

Default

OFF


SENSe<cnum>:SEGMent<snum>[:STATe] <ON | OFF>

(Read-Write) Turns the specified sweep segment ON or OFF. At least ONE segment must be ON or Sweep Mode is automatically set to Linear.

Parameters

 

<cnum>

Any existing channel number. If unspecified, value is set to 1

<snum>

Segment number to be turned ON or OFF

<ON | OFF>

ON (or 1) - turns segment ON.
OFF
(or 0) - turns segment OFF.

Examples

SENS:SEGM ON
sense2:segment2:state off

Query Syntax

SENSe<cnum>:SEGMent<snum>[:STATe]?

Return Type

Boolean (1 = ON, 0 = OFF)

Default

OFF


SENSe<cnum>:SEGMent<snum>:SWEep:POINts <num>

(Read-Write) Sets the number of data points for the specified sweep segment.

Parameters

 

<cnum>

Any existing channel number. If unspecified, value is set to 1

<snum>

Any existing segment number. If unspecified, value is set to 1

<num>

Number of points in the segment. The total number of points in all segments cannot exceed 20001. A segment can have as few as 1 point.

Note: This command will accept MIN or MAX instead of a numeric parameter. See SCPI Syntax for more information.

Examples

SENS:SEGM:SWE:POIN 51
sense2:segment2:sweep:points maximum

Query Syntax

SENSe<cnum>:SEGMent<snum>:SWEep:POINts?

Return Type

Numeric

Default

21


SENSe<cnum>:SEGMent<snum>:SWEep:TIME <num>

(Read-Write) Sets the time the analyzer takes to sweep the specified sweep segment.

Parameters

 

<cnum>

Any existing channel number. If unspecified, value is set to 1

<snum>

Any existing segment number.

<num>

Sweep time in seconds. Choose a number between 0 and 100

Note: This command will accept MIN or MAX instead of a numeric parameter. See SCPI Syntax for more information.

Examples

SENS:SEGM:SWE:TIME 1ms
sense2:segment2:sweep:time .001

Query Syntax

SENSe<cnum>:SEGMent<snum>:SWEep:TIME?

Return Type

Numeric

Default

Not Applicable


SENSe<cnum>:SEGMent:SWEep:TIME:CONTrol <ON | OFF>

(Read-Write) Specifies whether Sweep Time can be set independently for each sweep segment.

Parameters

 

<cnum>

Any existing channel number. If unspecified, value is set to 1

<ON | OFF>

ON (or 1) - turns Sweep Time control ON. Sweep Time can be set for each segment.
OFF
(or 0) - turns Sweep Time control OFF. Uses the channel Sweep Time setting.

Examples

SENS:SEGM:SWE:TIME:CONT ON
sense2:segment:sweep:time:control off

Query Syntax

SENSe<cnum>:SEGMent:SWEep:TIME:CONTrol?

Return Type

Boolean (1 = ON, 0 = OFF)

Default

OFF


SENSe<cnum>:SEGMent:X:SPACing <char>

(Read-Write)  Sets X-axis spacing ON or OFF

Parameters

 

<cnum>

Any existing channel number. If unspecified, value is set to 1

<char>

LINear - turns X-axis point spacing OFF

OBASe - turns X-axis point spacing ON

Examples

SENS:SEGM:X:SPACing LIN
sense2:segment:spacing obase

Query Syntax

SENSe<cnum>:SEGMent:X:SPACing?

Return Type

Character

Default

LINear


Last Modified:

20-Aug-2013

Fixed error in finder map.

7-May-2012

Removed preset

30-Aug-2011

Removed Snum from X:Spacing

27-Oct-2009

Added Segment:List note

29-Apr-2009

Added List command (8.6)

13-May-2008

Fixed segment delete links

21-Jun-2007

Increased max number of points