Chapter 4 Making Measurements 121
The following program uses the real-time DB operation to determine an
amplifier's voltage gain. Line 40 stores the amplifier's input voltage (0.1 V)
in the REF register. The amplifier's output voltage is measured and the gain
of the amplifier is computed.
10 OUTPUT 722;"PRESET NORM" !PRESET,NRDGS 1,AUTO, DCV 10, TRIG SYN
20 OUTPUT 722;"ACV" !AC VOLTAGE MEASUREMENTS, AUTORANGE
30 OUTPUT 722;"SETACV ANA" !ANALOG ACV METHOD
40 OUTPUT 722;"SMATH REF 0.1" !WRITE 0.1 TO REF REGISTER
50 OUTPUT 722;"MATH DB" !ENABLE REAL-TIME DB OPERATION
60 ENTER 722;A !SYN EVENT, ENTER DB
70 PRINT A !PRINT DB
80 END
For example, if the input voltage is 0.1 V and the output voltage is 10V, the
gain is:
20
·log
10
(10/0.1 )= 20·log
10
100= 40dB
The following program is similar to the preceding program except that it uses
the post-process DB operation.
10 OUTPUT 722;"PRESET NORM" !PRESET,NRDGS 1,AUTO, DCV 10, TRIG SYN
20 OUTPUT 722;"ACV" !AC VOLTAGE MEASUREMENTS, AUTORANGE
30 OUTPUT 722;"SETACV ANA" !ANALOG ACV METHOD
40 OUTPUT 722;"MEM FIFO" !ENABLE READING MEMORY, FIFO MODE
50 OUTPUT 722;"SMATH REF 0.1" !WRITE 0.1 TO REF REGISTER
60 OUTPUT 722;"MMATH DB" !ENABLE POST-PROCESS DB OPERATION
70 OUTPUT 722;"TRIG SGL" !TRIGGER READING
80 ENTER 722;A !RECALL READING USING IMPLIED READ,
85 !PERFORM DB OPERATION
90 PRINT A !PRINT DB RESULT
100 END
DBM The DBM math operation calculates the power delivered to a resistance
referenced to 1 mW. The equation is:
Result = 10
·log
10
(Reading
2
/RES/1 mW)
Where:
Reading is any voltage reading.
RES is the resistance value in the RES register (default = 50)
You can change the value in the RES register using the SMATH command.
The following program uses the real-time DBM operation to determine the
input power to a loudspeaker. Line 40 stores the speaker's impedance in the
RES register (for this example, 8 W). The input voltage to the speaker is then
measured and the DBM operation is performed.
10 OUTPUT 722;"PRESET NORM" !PRESET, NRDGS 1,AUTO, DCV 10, TRIG SYN
20 OUTPUT 722;"ACV" !AC VOLTAGE MEASUREMENTS, AUTORANGE
30 OUTPUT 722;"SETACV ANA" !ANALOG ACV METHOD
40 OUTPUT 722;"SMATH RES 8" !WRITE 8 TO RES REGISTER
50 OUTPUT 722;"MATH DBM" !ENABLE REAL-TIME DBM OPERATION