|
|
Programming a DTMF Measurement
Last updated: June 20, 2006
General Programing Procedure
-
Make a call.
-
Configure the DTMF setup parameters using
SETup:DTMF
subsystem.
-
Start the DTMF measurement using
INITiate
subsystem.
-
Press the keypads on the mobile station to generate DTMF signals.
-
Use the
FETCh:DTMF
command to obtain the measurement results.
Programming Example
1 ! This program measures the DTMF
6 CLEAR SCREEN
7 DIM Res$[3400]
8 ! E5515C GPIB Address
9 Testset=714
11 Systype$="AMPS"
12 !System Identification
13 Sid=1
14 ! Calls "Timeout" routine
15 ON TIMEOUT 7,20 CALL Timeout
16 !
17 ! *** Specify call parameters ***
18 OUTPUT Testset;"SYST:COMM:GPIB:DEB:STAT ON"
19 OUTPUT Testset;"SYST:CORR:STAT OFF"
20 ! Operating Mode is set to be Active Cell
21 OUTPUT Testset;"CALL:OPER:MODE CALL"
22 ! System Type is set to be AMPS
23 OUTPUT Testset;"CALL:SYST ";Systype$
24 ! Set System Identification
25 OUTPUT Testset;"CALL:SID:AMPS";Sid
26 !
64 PRINT "Turn on mobile station"
65 PRINT "Press Continue when it has registred"
66 PAUSE
67 !
68 ! *** Paging the mobile station ***
69 PRINT "Paging mobile station..."
70 PRINT "Answer the mobile station when you are ready."
71 OUTPUT Testset;"CALL:ORIG"
72 !Queries for connected/idle state
73 OUTPUT Testset;"CALL:CONN:STAT?"
74 ENTER Testset;Call_connected
75 IF NOT Call_connected THEN
76 DISP "Call attempt failed"
77 STOP
78 ELSE
79 DISP "Call connected"
80 END IF
81 PRINT "Connection established, test in progress"
82 !
83 ! *** Setup DTMF measurement parameters ***
84 ! Set Single measurement
85 OUTPUT Testset;"SET:DTMF:CONT OFF"
86 OUTPUT Testset;"SET:DTMF:GTIM 5"
89 !
90 ! *** Start DTMF measurement ***
91 OUTPUT Testset;"INIT:DTMF:ON"
92 PRINT "Please press keys (1..9,*,#,A,B,C,D) on the mobile station"
98 WAIT 10
99 ! *** Obtain measurement results ***
100 OUTPUT Testset;"FETCH:DTMF:ALL?"
101 WAIT 2
110 ENTER Testset;Integrity,Num_char,Res$
112 OUTPUT Testset;"FETCH:DTMF:COUN?"
113 ENTER Testset;Num
116 PRINT "Integrity Indicator = ";Integrity
117 PRINT "Character number = ";Num_char
123 !
124 End=-1
127 FOR I=1 TO 16
129 FOR J=1 TO 9
130 ! Get the start postion of the one value
131 ! of 16 sets of 9 comma-separated value
132 Start=End+2
133 IF (I=16 AND J=9) THEN
134 ! Get the last value of the 16 sets of
135 ! 9 comma-separated value
136 End=Start+LEN(Res$[Start])-1
137 ELSE
138 ! Get the end postion of the one value
139 ! of 16 sets of 9 comma-separated value
140 End=Start+POS(Res$[Start],",")-2
141 END IF
142 SELECT J
143 CASE 1
144 PRINT "Symbol ";I;Res$[Start,End]
145 CASE 2
146 PRINT "Symbol ";I;" Low Tone Fre.=";Res$[Start,End]
147 CASE 3
148 PRINT "Symbol ";I;" Low Tone Fre. Error=";Res$[Start,End]
149 CASE 4
150 PRINT "Symbol ";I;" Low Tone Phase dev.=";Res$[Start,End]
151 CASE 5
152 PRINT "Symbol ";I;" High Tone Fre.=";Res$[Start,End]
153 CASE 6
154 PRINT "Symbol ";I;" High Tone Fre. Error=";Res$[Start,End]
155 CASE 7
156 PRINT "Symbol ";I;" High Tone Phase dev.=";Res$[Start,End]
157 CASE 8
158 PRINT "Symbol ";I;" On Time=";Res$[Start,End]
159 CASE 9
160 PRINT "Symbol ";I;" Off Time=";Res$[Start,End]
161 END SELECT
162 NEXT J
163 NEXT I
164 DISP "DTMF Test complete"
165 OUTPUT Testset;"INIT:DTMF:OFF"
166 OUTPUT Testset;"CALL:END"
167 ! *** Display the measurement results ***
168 END
178 ! Global timeout handler
185 Timeout: SUB Timeout
187 PRINT "Program timed out"
188 CLEAR 7
189 CLEAR 714
190 SUBEND
Returned Values
The results returned by this program are:
-
Integrity returns the measurement integrity indicator (see
Integrity Indicator
); 0 means a successful measurement with no errors.
-
Num_Char returns the number of DTMF characters.
-
Res$ returns the set of results for each symbol that is sent from the mobile station. It includes the symbol result, the frequency of lower tone in Hz, the frequency error of lower tone in Hz, the phase deviation of lower tone in Radian, the frequency of upper tone in Hz, the frequency error of upper tone, the phase deviation of upper tone in Radian, the length of time that the DTMF symbol is broadcast in milliseconds, the length of time that no DTMF symbol is broadcast in milliseconds.
|
|