Programming an Audio Frequency Measurement
Last updated: May 8, 2002
This measurement is
not
applicable to GPRS.
This section provides an example of how to make an Audio Frequency measurement via the GPIB.
The following procedure assumes that an audio source is connected to the AUDIO IN connectors. See
Analog Audio Measurement Description
.
-
Configure the analog audio measurement parameters using the SETup subsystem. When more than one audio frequency signal may be present, use the 100 Hz bandpass filter to isolate the desired signal to measure (see the Programming Example below).
-
Start the audio frequency measurement using the INITiate subsystem.
-
Use the FETCh? subsystem to obtain analog audio measurement results.
Programming Example
10 OUTPUT 714;"SETup:AAUDio:CONTinuous OFF" !Set the audio
20 !measurements to single trigger mode.
30 OUTPUT 714;"SETup:AAUDio:EXPected:VOLTage 3V" !Set the Expected peak voltage
40 !for the audio input level in Vpeak.
50 OUTPUT 714;"SETup:AAUDio:FREQuency:STATe ON" !Enable audio frequency measurement.
60 OUTPUT 714;"SETup:AAUDio:FILTer:STATe ON" !Enable the bandpass filter.
70 OUTPUT 714;"SETup:AAUDio:FILTer:FREQuency 8000 Hz" !Set the filter's center
80 !frequency to 8 kHz.
90 OUTPUT 714;"SETup:AAUDio:TIMeout 3S" !Set a timeout value of 3 seconds
100 !in case the measurement cannot be made.
110 OUTPUT 714;"INITiate:AAUDio" !Start the Analog Audio measurement.
120 OUTPUT 714;"FETCh:AAUDio:INTegrity?" !Query the integrity indicator to
130 !verify that a reliable measurement was made.
140 ENTER 714;Integrity !Enter the returned value into a variable for comparison
150 !with possible integrity indicator values (not shown here).
160 IF Integrity=0 THEN !Only fetch measurement result if integrity indicator is 0.
170 OUTPUT 714;"FETCh:AAUDio:FREQuency?" !Fetch the analog audio frequency result.
180 ENTER 714;Audio_frequency !Enter the result into a variable.
190 END IF
200 END
Returned Values
The results returned by this program are:
-
Integrity returns the measurement integrity indicator (0 means a successful measurement with no errors). See
Integrity Indicator
.
-
Audio_frequency returns the average audio frequency in hertz.