Sometimes in a SCPI program you may need to refer to traces that you have not created. This can be a bit confusing in the PNA. Here are the THREE ways to refer to a specific measurement trace.
Note: The terms "Trace" and "Measurement" effectively mean the same thing in this discussion.
The Measurement Name is picked by you when you first create a trace using the CALCulate<cnum>:PARameter[:DEFine]:EXTended <Mname>,<param> command. The measurement name is only used by SCPI.
The Trace Number is also picked by you when ‘feeding’ a newly-created measurement name to a window number using DISP:WINDow<wmun>:TRACe<tnum>:FEED. The trace number is used ONLY by SCPI and is mainly used to refer to traces in the DISPlay node. This is NOT the number that appears as Tr# on the screen. While you can assign any Trace number you want, when a measurement is created from the GUI, the PNA assigns numbers to the traces sequentially, starting with one in each window. Therefore, when there is more than one window, these numbers are not unique.
The Tr# that appears on the PNA screen is the third and most visible way to refer to a trace. Since we already have a "Trace Number", we call this the Measurement Number in the PNA Help file. This number is issued sequentially by the PNA regardless of channel and window. It is therefore unique among all traces. Use CALC<ch>:PAR:MNUM? just after the trace is created to read the measurement number.
The concept of the Active measurement versus Selected Measurement is also a bit confusing. As seen on the screen, the Active measurement has the highlighted Tr# . While there can only be ONE active measurement, every channel has a selected measurement. The target measurement must first be selected before most CALC node settings can be made. There are two ways to select a measurement for each channel:
Use CALC<ch>:PAR:SEL <measName> which requires the channel number and measurement name.
Use CALC<ch>:PAR:MNUM <measNum> which requires the channel and measurement (Tr) number.
Here are other relevant commands for referring to traces, measurements, channels, and windows:
CALC<cnum>:PAR:CATalog:EXTended? - Catalog the Measurement Names for the specified channel.
CALC<cnum>:PAR:TNUMber? - Returns the Trace Number of the selected trace.
CALC<cnum>:PAR:WNUMber? - Returns the window number of the selected trace.
SYSTem:ACTive:CHANnel? - Returns the number of the active channel. The active channel is the channel number that contains the active measurement.
SYSTem:ACTive:MEAS? - Returns the name of the active measurement. As seen on the screen, the Active measurement has the highlighted Tr#.
SYSTem:CHANnels:CATalog? - Returns the channel numbers currently in use.
SYSTem:WINDows:CATalog? - Returns the window numbers that are currently being used.
SYSTem:MEAS:CATalog? [chan] - Returns ALL measurement numbers, or optionally measurement numbers from a specified channel.
SYSTem:MEAS<n>:NAME? - Returns the name of the specified measurement (Tr#) number.
SYSTem:MEAS<n>:TRACe? - Returns the trace number of the specified measurement number.
SYSTem:MEAS<n>:WINDow? - Returns the window number of the specified measurement number.
Added Active Meas