How to programmatically set up a basic measurement
There are two basic measurement methods for the sensor, both are described below. Triggered measurements can be utilized on either, please refer to the programming guide for details on triggered measurements.
1. The most common measurement is a trailing measurement. In this case the sensor continuously takes and averages readings utilizing a circular buffer. When requested, the most recent capture (number of averages) is returned using the FETCh? query. For more details refer to the programming guide.
The sequence below sets the sensor to make a trailing measurement. Refer to the programming guide for details on step detection and automatic averaging.
// Set sensor to default settings
SYST:PRES DEF
// Turn off automatic averaging
AVER:COUN:AUTO OFF
// Turn off Step Detection
SENS:AVER:SDET OFF
// Turn on continuous triggering
INIT:CONT ON
// Set 5 averages (use your own)
SENS:AVER:COUN 5
// Set to 2.6 GHz (Use your own)
FREQ 2600 MHz
// Make the measurement
FETCh?
// Repeat as desired
FETCh?
2. In many cases, the user wishes to determine the start of a measurement capture (number of averages). In this case, the sensor is set to begin collecting readings when the READ? Query is sent.
The sequence of commands below sets the sensor to make a measurement beginning at the time of the query. Refer to the programming guide for details on step detection, and automatic averaging.
// Set sensor to default settings
SYST:PRES DEF
// Turn off automatic averaging
AVER:COUN:AUTO OFF
// Turn off Step Detection
SENS:AVER:SDET OFF
// Turn on continuous triggering
INIT:CONT ON
// Set 5 averages (use your own)
SENS:AVER:COUN 5
// Set to 2.6 GHz (Use your own)
FREQ 2600 MHz
// Make the measurement
READ?
// Repeat as desired
READ?