

10 '***************************************************************************
20 ' Compensation of frequency response of device under test (DUT) with
30 ' equalization file.
40 '***************************************************************************
50 FOR I=1 TO 10: PRINT : NEXT I: '                               Cleans screen
60 IEC TERM 10: '          Controller expects LF as a delimiter of an UPL reply
70 IEC TIME 10000: '     Controller waits for a maximum of 10 s for a UPL reply
80 IEC OUT 20,"*RST": '                                 Loads UPL default setup
90 IEC OUT 20,"INP:TYPE GEN2": '     Internal connection to generator channel 1
100 IEC OUT 20,"SENS:FILT:AWE ON": 'AWE filter in RMS measurement simulates ...
110 '                                       ... the frequency response of a DUT
120 IEC OUT 20,"SOUR:SWE:MODE AUTO;:SOUR:FREQ:MODE SWE2": '          Auto sweep
130 IEC OUT 20,"SOUR:FREQ:STAR 100 HZ": '                       Start frequency
140 IEC OUT 20,"SOUR:FREQ:STOP 15000 HZ": '                      Stop frequency
150 IEC OUT 20,"INIT;*WAI": '                           Initialisation of Sweep
160 IEC OUT 20,"DISP:TRAC:OPER CURV": '                      Selects curve plot
170 IEC OUT 20,"DISP:CONF AP": '         Shows analyzer panel and graphic panel
180 IEC LAD 20: IEC GTL : '                              Switches to local mode
190 PRINT "Look at UPL!"
200 PRINT "UPL shows uncompensated frequency response of DUT!"
210 INPUT "Any key to continue: ";X$
220 IEC OUT 20,"CALC:EQU:INV ON": '        Inverts the trace of the DUT and ...
230 IEC OUT 20,"MMEM:STOR:LIST EQU,'MYEQU.VEQ'": '  ... stores it as equal.file
240 IEC OUT 20,"SOUR:VOLT:EQU:STAT ON": '         Selects the use of equal.file
250 IEC OUT 20,"MMEM:LOAD:LIST EQU,'MYEQU.VEQ'": '             Loads equal.file
260 IEC OUT 20,"INIT;*WAI": '                     Initialization of sweep again
270 IEC OUT 20,"DISP:CONF GP": '        Shows generator panel and graphic panel
280 IEC LAD 20: IEC GTL : '                        Switches to local mode again
290 PRINT : PRINT "Look at UPL again!"
300 PRINT "UPL shows now compensated frequency response, using equal. file!"
310 END 
