![]() |
SP API
|
Sweep mode represents the common spectrum analyzer measurement of plotting amplitude over frequency. The API provides a simple interface through spGetSweep for acquiring single sweeps.
For a list of all examples, please see the examples/ folder in the SDK.
Only 1 sweep configuration can be active at a time.
Changing a sweep setting requires reconfiguring the device with a new sweep configuration.
All sweeps must be finished to change sweep configuration.
The maximum sweep speed that can be achieved is ~200GHz/s. This can only be achieved with wide spans and large RBWs.
Only linear spaced sweeps can be performed.
A sweep is returned from the API as a 1-dimensional array of measurement values. Each element in the array corresponds to a specific frequency. The frequency of any given element can be calculated as
Frequency of N'th element in sweep = StartFreq + N * BinSize
where StartFreq
and BinSize
are reported in the spGetSweepParameters function.
The measurement values can be returned in dBm or mV units.
All sweep functions in the API return 2 separate sweep arrays. The parameters are typically named sweepMin and sweepMax. To understand the purpose of these arrays, it is important to understand their relation to the analyzer’s detector setting. Traditionally, spectrum analyzers offer several detector settings, the most common being peak-, peak+, and average. The API reduces this to either minmax or average. When the detector is set to minmax, the sweepMin array will contain the sweep as if a peak- detector is running, and the sweepMax array will contain the sweep of a peak+ detector. When average detector is enabled, sweepMin and sweepMax will be identical arrays and will be the result of an average detector.
If you are not interested in one of the sweeps, you can pass a NULL pointer for this parameter and it will be ignored.
Most users will be interested in the sweepMax array as it will provide you either the peak+ and average detector results depending on detector setting. In this case, pass NULL for the sweepMin parameter.