API Functions | Signal Hound
This function configures the tracking generator sweeps. Through this function you can request a sweep
size. The sweep size is the number of discrete points returned in the sweep over the configured span.
The final value chosen by the API can be different than the requested size by a factor of 2 at most. The
dynamic range of the sweep is determined by the choice of highDynamicRange and passiveDevice. A
value of true for both provides the highest dynamic range sweeps. Choosing false for passiveDevice
suggests to the API that the device under test is an active device (amplification).
Return Values
bbNoError The function returned successfully.
bbDeviceNotOpenErr The device specified is not open.
bbAdjustedParameter Sweep size was clamped to the input range of [10, 1024].
bbStoreTgThru
Perform a store thru
bbStatus bbStoreTgThru(int device, int flag);
Parameters
device Device handle.
flag Specify the type of store thru. Possible values are TG_THRU_0DB and
TG_THRU_20DB.
Description
This function, with flag set to TG_THRU_0DB, notifies the API to use the next trace as a thru (your 0 dB
reference). Connect your tracking generator RF output to your spectrum analyzer RF input. This can be
accomplished using the included SMA to SMA adapter, or anything else you want the software to
establish as the 0 dB reference (e.g. the 0 dB setting on a step attenuator, or a 20 dB attenuator you will
be including in your amplifier test setup).
After you have established your 0 dB reference, a second step may be performed to improve the
accuracy below -40 dB. With approximately 20-30 dB of insertion loss between the spectrum analyzer
and tracking generator, call saStoreTgThru with flag set to TG_THRU_20DB. This corrects for slight
variations between the high gain and low gain sweeps.
Return Values
bbNoError The function returned successfully.
bbDeviceNotOpenErr The device specified is not open.
bbInvalidParameterErr The flag parameter does not match any accepted value.
bbDeviceNotConfiguredErr The device is not configured for tracking generator sweeps.