343
Chapter 5, Advanced Operations
Passing Control
The following IBASIC program would be loaded off the Memory Card and run in the Test Set:
10 COM /Hpib_names/ INTEGER Internal_hpib,External_hpib
20 COM /Cntrl_names/ Ext_cntrl_addrs,Int_cntrl_addrs
30 COM /Io_names/ INTEGER Printer_addrs,Pwr_suply_addrs
40 COM /Io_values/ REAL Meas_power
50 !
60 Internal_hpib=800
70 External_hpib=700
80 Ext_cntrl_addrs=21
90 Int_cntrl_addrs=14
100 Printer_addrs=1
110 Pwr_suply_addrs=26
120 !
130 OUTPUT Internal_hpib;"*RST"
140 CLEAR SCREEN
150 PRINTER IS CRT
160 !
170 EXECUTE ("REQUEST_CONTROL")
180 !
190 Try_again: !
200 ON ERROR GOTO Not_actve_cntrl
210 DISP "WAITING TO GET CONTROL"
220 OUTPUT External_hpib;"" !If OUTPUT successful then Active Controller
230
!If OUTPUT not successful then not Active Controller
240 DISP "TEST SET NOW ACTIVE CONTROLLER."
250 CALL Start_program
260 !
270 Pass_back: !
280 DISP "PASSING CONTROL BACK"
290 !Control is passed back automatically when the program stops
300 !Control is passed back to address specified by *PCB command
310 DISP "PROGRAM FINISHED"
320 STOP
330 !
340 Not_actve_cntrl: !
350 OFF ERROR
360 DISP "CHECKING FOR ERROR"
370 IF ERRN=173 THEN
380 GOTO Try_again
390 ELSE
400 PRINT "ERROR =";ERRN
410 STOP
420 END IF
430 !
440 END
450 !
460 SUB Start_program
470 !
480 COM /Hpib_names/ INTEGER Internal_hpib,External_hpib
490 COM /Cntrl_names/ Ext_cntrl_addrs,Int_cntrl_addrs
500 COM /Io_names/ INTEGER Printer_addrs,Pwr_suply_addrs
510 COM /Io_values/ REAL Meas_power
520 !
530 PRINT "SETTING POWER SUPPLY"
540 OUTPUT ExternPwr_suply_addrs;"IMAX 8;ISET 5"
550 OUTPUT ExternPwr_suply_addrs;"VMAX 15;VSET 13.2"
560 !
570 PRINT "SETTING UP INTERNAL INSTRUMENTS"
580 OUTPUT Internal_hpib;"RFG:FREQ 850.030 MHz;AMPL -40 dBm"
Summary of Contents for 8920B
Page 10: ...10 ...
Page 16: ...Contents 16 9 Error Messages Index 673 ...
Page 17: ...17 1 Using HP IB ...
Page 48: ...48 Chapter 1 Using HP IB Remote Local Modes ...
Page 49: ...49 2 Methods For Reading Measurement Results ...
Page 61: ...61 3 HP IB Command Guidelines ...
Page 84: ...84 Chapter 3 HP IB Command Guidelines Guidelines for Operation ...
Page 85: ...85 4 HP IB Commands ...
Page 90: ...90 Adjacent Channel Power ACP ...
Page 116: ...116 Configure I O Configure ...
Page 156: ...156 Call Processing ...
Page 185: ...185 System System SYSTem ERRor Returns integer value quoted string ...
Page 242: ...242 Common Command Descriptions ...
Page 251: ...251 5 Advanced Operations ...
Page 377: ...377 7 IBASIC Controller ...
Page 458: ...458 Chapter 7 IBASIC Controller The TESTS Subsystem ...
Page 640: ...640 Chapter 8 Programming The Call Processing Subsystem Example Programs 11280 SUBEND 11290 ...
Page 643: ...643 9 Error Messages ...
Page 672: ...672 ...
Page 682: ...Index 682 ...