This section provides an example of how to make swept audio measurements via the GPIB.
The following example assumes that some device under test is connected between the test set's AUDIO OUT and AUDIO IN ports. The default audio level measurement, and the optional SINAD and distortion measurements, are performed at each frequency point in the sweep.
10 OUTPUT 714;"SETup:SAUDio:FREQuency:STARt 300 Hz" !Start the frequency 20 !sweep at 300 Hz. 30 OUTPUT 714;"SETup:SAUDio:FREQuency:STOP 4 kHz" !Stop the frequency 40 !sweep at 4 kHz. 50 OUTPUT 714;"SETup:SAUDio:FREQuency:POINts 5" !Make measurements at 5 frequencies 60 !spaced evenly between the start and stop frequencies. 70 OUTPUT 714;"SETup:SAUDio:SETTling 1.5 ms" !Set a settling time of 80 !1.5 milliseconds. 90 OUTPUT 714;"SETup:SAUDio:VOLTage:AMPLitude 1 V" !SET the audio generator 100 !voltage to 1 volt peak. 110 OUTPUT 714;"SETup:SAUDio:DETector PEAK" !Select the peak detector for 120 !the audio analyzer. 130 OUTPUT 714;"SETup:SAUDio:FILTer TBPass" !Select the AF analyzer's 100 Hz bandwidth 140 !band pass filter for making the measurements. The center frequency for the filter 150 !automatically tracks the AF generator's frequency. 160 OUTPUT 714;"SETup:SAUDio:PEAK:VOLTage 1 V" !Set the expected peak voltage 170 !at the AUDIO IN port. 180 OUTPUT 714;"SETup:SAUDio:SDIStortion:STATe ON" !Turn on the SINAD 190 !and distortion measurements. 200 OUTPUT 714;"SETup:SAUDio:CONTinuous OFF" !Set the swept audio 210 !measurement to single trigger mode. 220 OUTPUT 714;"SETup:SAUDio:TIMeout 5 S" !Set a measurement timeout of 230 !5 seconds in case the measurement cannot be made. 240 OUTPUT 714;"INITiate:SAUDio" !Start the swept audio measurements. 250 OUTPUT 714;"FETCh:SAUDio?" !Query the audio level and distortion results. 260 ENTER 714;Integrity,Lev1,Dist1,Lev2,Dist2,Lev3,Dist3,Lev4,Dist4,Lev5,Dist5 !Enter the 270 !returned integrity value, and the level and distortion values 280 !for each of the five measurement points, into variables. 290 OUTPUT 714;"FETCh:SAUDio:SINAD?" !Query the SINAD results. 300 ENTER 714;Sinad1,Sinad2,Sinad3,Sinad4,Sinad5 !Enter the 5 returned SINAD values 310 !into variables. 320 END
The results returned by this program are:
Integrity
returns the measurement integrity indicator (see
Integrity Indicator
); 0 means a successful measurement with no errors.
Lev1
through
Lev5
return the audio level (voltage) at each of the five measurement points. In this example, the value is returned in volts peak because the peak detector was specified.
Dist1
through
Dist5
return the distortion value at each of the five measurement points.
Sinad1
through
Sinad5
return the SINAD value at each of the five measurement points.The example program uses the single FETCh:SAUDio[:ALL]? query to return the integrity value, the audio level (voltage) values, and the distortion values, at one time. These values can also be queried separately if required. The SINAD value is always queried separately.