1 ! RE-STORE "VERIFY_6XE" 2 ! RE-SAVE "VERIFY_6XE.ascii" 3 !----------------------------------------------------------------------- 4 !----------------------------------------------------------------------- 5 ! 6 ! PROGRAM VERIFY_6XE: HP 8560 E-SERIES OPERATION VERIFICATION REV E.00.01 7 ! Revision also appears in Draw_alpha_hdr and Header_prnt 8 ! 050525:0848 BDT 9 ! REV E.00.01 Fixed Flatness specification for 8562E 10 ! REV E.00.00 Added support for 856xEC models. 11 ! Changed "HPIB" and "HP-IB" to "GPIB" 12 ! Fixed TIMEOUT bugs in Noise_sidebands test 13 ! REV D.02.02 Fixed bug in "USER CAL" of power meter driver. 14 ! REV D.02.01 Added No_data_flag in Test_Band0 to fix bug with 8560E 15 ! REV D.02.00 Added spec improvements for Noise Sidebands and Frequency 16 ! Response over a limited range. 17 ! Changed serial prefix breaks for DANL & SHD improvements for 18 ! 8563E to 3645A and for 8564E/65E to 3641A. 19 ! REV D.01.00 Changes serial prefix break for DANL & SHD improvements to 20 ! 9999A for 8563E/64E/65E and to 3632A for 8560E. 21 ! REV D.00.00 Fixes bug in Frequency Response test (applies to 8565E only 22 ! Fixes bug in DANL test (8564E/65E w/ Opt 006 only) 23 ! Adds support for Opt EMI; tests 1M & 100k RBW 6dB BW 24 ! (characteristic only) 25 ! Added Op Ver revision to printed header information 26 ! Adds support for 8562E and DANL and SHI improvements for 27 ! 8560E, 8563E, 8564E, and 8565E 28 ! Adds support for Opt H13, which retrofits DANL & SHD 29 ! improvements into older 8560E/63E/64E/65E 30 ! Adds support for 535x microwave frequency counter 31 ! REV C.01.00 Loosens Log Fidelity spec for RBW >=300 Hz for ALL 856xEs, 32 ! not just newer ones as was done with REV B.00.00. 33 ! Added audible prompts using Beeper 34 ! Fixed bug in Noise Sidebands test 35 ! REV C.00.00 Adds support for 8564E/65E 36 ! REV B.01.00 Reflects change to low freq limit on SHD 37 ! REV B.00.00 Adds support of Option 007, Digitized Fast Time Domain Sweeps 38 ! Also supports Log Fidelity change for RBW >= 300 Hz 39 ! REV A.01.01 Fixes a defect in the DANL test for 8563E Opt 006 40 ! REV A.01.00 Supports looser DANL spec in Band 0 of 8563E 41 ! Leveraged from VERIFY_62, Rev D.01.04 (for 8560A/61A/61B/62A/62B/63A) 42 ! 43 COM /Equipment/Present(1:20),Power_mtr_avail,Counter_avail,Sensor_avail(1:20),Source_avail(1:20),Source2_avail(1:20),Enough_equip(1:20) 44 COM /Test_flags/Test_number,Sequence_type,Last_test 45 COM /Sensor/Current_channel,Sensor(1:2),Cal_time(1:2),Cal_data(1:2,1:65) 46 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 47 COM /Sum_errors/Sum_error$[128] 48 COM /Conditions/Conditions$(0:44,1:2)[160] ! Rev D.00.00 Changed "0:26" 49 ! to "0:44" 50 COM /Tests/Tests$(0:128,1:2)[37],Short_name$(1:128)[16],Conn_check(1:128) 51 COM /Trace_data/Trace_data(0:600) 52 COM /Bandwidths/Bw(1:14),Bw$(1:14)[7] 53 COM /Menu/Menu$[50] 54 COM /Coupling/ INTEGER Ac_dc 55 ! 56 OUTPUT KBD;"K";"GCLEARX";"SCRATCH KEYX";"PRINTER IS CRTX"; 57 CONTROL 2,1;0 ! Printall OFF 58 CONTROL 1,12;2 ! Softkeys ON 59 STATUS KBD,9;Kbd_status 60 IF BIT(Kbd_status,5) AND NOT BIT(Kbd_status,1) THEN CONTROL KBD,15;1 ! Turn keyboard compatibility on for HP46020A HIL keyboard 61 Comp$=SYSTEM$("SYSTEM ID") !Turn display compatibility in- 62 IF Comp$[1,4]="S300" THEN CONTROL CRT,21;0 !terface off if computer is 310 63 ! 64 Conditions_menu ! Call Conditions_menu subprogram 65 ! which will call Test_menu subprogram 66 OUTPUT KBD;"K";"GCLEARX";"MM";!Clr text,graphics,alpha on 67 ! 68 END 69 ! 70 ! 71 Conditions_menu: SUB Conditions_menu ! Set test condition information 72 ! Rev E.00.00 Added support for 856xEC 73 ! 74 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 75 COM /Conditions/Conditions$(*) 76 COM /Sensor/Current_channel,Sensor(*),Cal_time(*),Cal_data(*) 77 COM /Menu/Menu$ 78 ! 79 DIM Mode$[80],File$[80],Key$[160] ! Mode=Key_pressed$&" mode";File$=Sensor file$ 80 DIM Catalog$(1:1000)[80] ! Used to see if mass storage device is present 81 DIM Input$[160] 82 DIM Comp$[7] 83 DIM Default_msus$[160] 84 DIM Model$[80] 85 DIM Model_num$[80] 86 DIM Option$[31] 87 ! 88 STATUS KBD,9;Kbd_status 89 IF BIT(Kbd_status,5) THEN ! HIL keyboard 90 Ul$=CHR$(132) 91 Clr$=CHR$(128) 92 ELSE 93 Ul$=CHR$(132) 94 Clr$=CHR$(128) 95 END IF 96 ! 97 Comp$=SYSTEM$("SYSTEM ID") ! Select default mass storage file loca- 98 SELECT Comp$[1,4] ! tion based upon the computer being 99 CASE "S300" ! used. 100 Default_msus$=":,700,1" ! The first attempt to load the CONDI- 101 CASE "9816" ! TIONS file will be from the default 102 Default_msus$=":,700,1" ! msus. Refer to Load_conds 103 CASE "9836" 104 Default_msus$=":,700,1" 105 END SELECT 106 Default_msus$=SYSTEM$("MSI") 107 ! 108 ! LOAD CONDITIONS$(*) 109 ! 110 RESTORE Conditions_data ! Read Conditions$(*) 111 READ Cond_menu_len ! # of lines in conditions menu 112 REDIM Conditions$(0:Cond_menu_len,1:2) 113 RESTORE Conditions_data 114 READ Conditions$(*) 115 Conditions$(3,2)=DATE$(TIMEDATE) ! Set current time and date 116 Conditions$(4,2)=TIME$(TIMEDATE) 117 GOSUB Query_dut_sn 118 Init_load_attpt=1 119 GOSUB Load_conds 120 Init_load_attpt=0 121 Menu$="Conditions Menu" 122 ! 123 ! CONDITIONS_MENU MAIN LOOP 124 ! 125 REPEAT ! Main menu loop 126 Quit=0 ! Set to 1 to exit program 127 Next_menu=0 ! Set to 1 to go to Test menu 128 Draw_alpha_hdr("Conditions Menu") ! Draw Menu graphics header 129 ! 130 REPEAT ! Key press loop 131 STATUS KBD,9;Kbd_status 132 IF BIT(Kbd_status,5) THEN 133 Key$="Test Menu,Load Conds,Sensor Utils,Change Entry,Verify Bus,Query DUT S/N,,Exit Program,,Store Conds," 134 ELSE 135 Key$="Test Menu,Load Conds,Sensor Utils,,Store Conds,Change Entry,Verify Bus,Query DUT S/N,Exit Program,," 136 END IF 137 Conditions$(3,2)=DATE$(TIMEDATE) 138 Conditions$(4,2)=TIME$(TIMEDATE) 139 Label_keys(Key$,Key_pressed$,Conditions$(*),Selection,Page) 140 GOSUB Interpret_keys ! Process key selection 141 UNTIL Quit OR Next_menu 142 ! 143 IF Next_menu THEN ! Check for errors before leaving 144 Checking_cond=1 145 Cond_error=0 146 Verify ! Verify instruments on GPIB 147 Check_addresses("",Cond_error) ! Check address non-duplicity 148 GOSUB Prntr_available ! Check if printer is available 149 GOSUB Query_dut_sn ! Checks that DUT's there and responding 150 GOSUB Check_model_num ! Check that DUT is 8560 E-Series REV B.00.00 151 GOSUB Check_sensors ! Check sensor data availability 152 Checking_cond=0 153 Cal_it: IF NOT Cond_error THEN CALL Ref_level_cal(Cond_error) 154 IF NOT Cond_error THEN CALL Test_menu 155 END IF 156 ! 157 UNTIL Quit ! Head for the next menu 158 ! 159 SUBEXIT 160 ! 161 Prntr_available: ! Cannot allow entry to Test Menu if printer is not 162 ! available; results only go to printer 163 IF Conditions$(15,2)[6,6]<>"*" THEN ! Printer is not available 164 Cond_error=1 165 Prompt_user("ERROR: Printer not available; cannot perform tests.") 166 ELSE ! Printer is available, assign IO path 167 ASSIGN @Printer TO VAL(Conditions$(15,2)[1,4]) 168 END IF 169 RETURN ! from Prntr_available 170 ! 171 Check_sensors: ! 172 DISP "Checking availability of sensor files..." 173 FOR Line=9 TO 12 ! C.00.00 Changed from 11 to 12 to accommodate 8487A 174 IF NOT POS(Conditions$(Line,2),"NA") THEN 175 OUTPUT File$ USING "#,K,2A,5Z";"SEN",Conditions$(Line,1)[3,4],VAL(Conditions$(Line,2)[1,5]) 176 ON ERROR GOTO Cs_no_file 177 ASSIGN @File TO FNFile$(File$,Conditions$(7,2)) 178 OFF ERROR 179 ON ERROR GOTO Cs_load_err 180 ENTER @File;Cal_data(*) 181 OFF ERROR 182 Check_cal_data(File$,Cond_error) 183 GOTO Check_sen_cont 184 ! 185 Cs_no_file: OFF ERROR 186 Prompt_user("ERROR: "&FNFile$(File$,Conditions$(7,2))&" file not found.",Cond_error) 187 GOTO Check_sen_cont 188 ! 189 Cs_load_err:! off error 190 Prompt_user("ERROR: Unable to load data from "&FNFile$(File$,Conditions$(7,2))&".",Cond_error) 191 ! 192 Check_sen_cont: ! 193 END IF 194 NEXT Line 195 DISP 196 RETURN 197 ! 198 ! INTERPRET CONDITIONS MENU SFKs 199 ! 200 Interpret_keys: ! Take action indicated by key press and pointer position 201 Mode$=Ul$&Key_pressed$&" Mode"&RPT$(" ",13-MIN(LEN(Key_pressed$),13))&Clr$ 202 SELECT Key_pressed$ 203 CASE "Test Menu","Test Menu" ! Go to Test_menu subprogram 204 PRINT TABXY(61,4); 205 OUTPUT CRT;Ul$&"Test Menu mode ";Clr$ 206 Next_menu=1 207 CASE "Load Conds","Load Conds" 208 PRINT TABXY(61,4); 209 OUTPUT CRT;Ul$&"Load Conds mode ";Clr$ 210 GOSUB Load_conds 211 CASE "Store Conds","Store Conds" 212 PRINT TABXY(61,4); 213 OUTPUT CRT;Ul$&"Store Conds mode ";Clr$ 214 GOSUB Store_conds 215 CASE "Sensor Utils" 216 CALL Sensorutilities 217 Draw_alpha_hdr("Conditions Menu") 218 CASE "Change Entry" 219 PRINT TABXY(61,4); 220 OUTPUT CRT;Mode$ 221 GOSUB Change_key 222 CASE "Verify Bus" ! Verify presence of instruments on GPIB 223 PRINT TABXY(61,4); 224 OUTPUT CRT;Mode$ 225 Verify 226 CASE "Query DUT S/N","Query DUT S/N" 227 PRINT TABXY(61,4); 228 OUTPUT CRT;Ul$;"Query DUT S/N mode ";Clr$ 229 GOSUB Query_dut_sn 230 CASE "Exit Program","Exit Program" ! Quit the program 231 Quit=1 232 END SELECT 233 RETURN 234 ! 235 Load_conds: ! Load conditions data 236 ON ERROR GOTO Lc_no_cond_file 237 DISP "Checking availability of conditions file..." 238 IF Init_load_attpt THEN ! Load from default_msus$ 239 ASSIGN @Path TO FNFile$("CONDITIONS",Default_msus$) 240 DISP "Loading conditions from ";FNFile$("CONDITIONS",Default_msus$);"..." 241 ELSE 242 ASSIGN @Path TO FNFile$("CONDITIONS",Conditions$(7,2)) 243 DISP "Loading conditions from ";FNFile$("CONDITIONS",Conditions$(7,2));"..." 244 END IF 245 ENTER @Path;Conditions$(*) 246 OFF ERROR 247 IF VAL(Conditions$(0,1))<>25 THEN ! Conditions file is not compatible with 248 RESTORE Conditions_data ! Rev D.00.00; use defaults instead. 249 READ Conditions$(*) 250 Prompt_user("WARNING: CONDITIONS file from system file location is not compatible!") 251 END IF 252 Verify ! Overwrite stored verification data 253 GOSUB Query_dut_sn ! See if DUT at GPIB address 254 Conditions$(3,2)=DATE$(TIMEDATE) ! Set current time and date 255 Conditions$(4,2)=TIME$(TIMEDATE) 256 RETURN 257 Lc_no_cond_file: ! 258 OFF ERROR 259 IF VAL(Conditions$(0,1))<>24 THEN ! Conditions file is not compatible with 260 RESTORE Conditions_data ! Rev C.00.00; use defaults instead. 261 READ Conditions$(*) 262 Conditions$(3,2)=DATE$(TIMEDATE) ! Set current time and date 263 Conditions$(4,2)=TIME$(TIMEDATE) 264 GOSUB Query_dut_sn 265 Prompt_user("WARNING: CONDITIONS file from system file location is not compatible!") 266 END IF 267 IF Init_load_attpt THEN Conditions$(7,2)=Default_msus$ 268 IF NOT Init_load_attpt THEN CALL Prompt_user("ERROR: Unable to load CONDITIONS file from system file location.") 269 RETURN 270 ! 271 Store_conds: ! Store Conditions$(*) onto file 272 ON ERROR GOTO Sc_no_sys_file 273 DISP "Checking availability of conditions file..." 274 CAT Conditions$(7,2) TO Catalog$(*) 275 ON ERROR GOTO Sc_create_file 276 ASSIGN @Path TO FNFile$("CONDITIONS",Conditions$(7,2)) 277 OFF ERROR 278 Output_conditns: DISP "Storing conditions onto ";FNFile$("CONDITIONS",Conditions$(7,2));"..." 279 OUTPUT @Path;Conditions$(*) 280 ASSIGN @Path TO * 281 RETURN 282 Sc_create_file:! 283 OFF ERROR 284 CREATE BDAT FNFile$("CONDITIONS",Conditions$(7,2)),9,256 285 ASSIGN @Path TO FNFile$("CONDITIONS",Conditions$(7,2)) 286 GOTO Output_conditns 287 Sc_no_sys_file:! 288 OFF ERROR 289 Prompt_user("ERROR: System mass storage file location catalog cannot be read.") 290 RETURN 291 ! 292 Query_dut_sn: ! 293 DISP "Querying DUT S/N..." 294 IF POS(Conditions$(14,2),"NA") THEN ! DUT GPIB address location 295 Conditions$(1,2)="No GPIB address listed for DUT" 296 IF Checking_cond THEN CALL Prompt_user("ERROR: No GPIB address listed for DUT",Cond_error) 297 ELSE 298 Full_address=VAL(Conditions$(14,2)) 299 Select_code=INT(Full_address/100) 300 ON ERROR GOTO Nothing_there 301 LOCAL Select_code 302 REMOTE Select_code 303 OFF ERROR 304 Address=Full_address MOD 100 305 ON TIMEOUT Select_code,1 GOTO Nothing_there 306 ASSIGN @Dut TO Full_address 307 OUTPUT @Dut;"IP" 308 WAIT 2 309 OUTPUT @Dut;"ID?" 310 ENTER @Dut;Model_num$ 311 IF LEN(Model_num$)>7 THEN 312 Option$=Model_num$[8;19] ! Display up to 3 options 313 ELSE 314 Option$="" 315 END IF 316 ! 317 OUTPUT @Dut;"SER?" 318 ENTER @Dut;Ser_num$ 319 OFF TIMEOUT 320 Model$=Model_num$[1,7] 321 C_flag$=FNColor_flag$(Model$,Ser_num$) 322 Conditions$(1,2)=Model$&C_flag$&Option$&" "&Ser_num$ 323 DISP 324 RETURN 325 ! 326 Check_model_num: ! Added in Rev B.00.00 327 IF Conditions$(1,2)[7;1]<>"E" THEN 328 Cond_error=1 329 Prompt_user("ERROR: This program does not support the current DUT") 330 END IF 331 RETURN 332 ! 333 Nothing_there: ! 334 Conditions$(1,2)="DUT doesn't respond at address listed" 335 IF Checking_cond THEN CALL Prompt_user("ERROR: DUT doesn't respond at address listed.",Cond_error) 336 END IF 337 DISP 338 RETURN 339 ! 340 ! PROCESS CHANGES IN THE CONDITIONS MENU 341 ! 342 Change_key: ! Change selection pointed to 343 ON ERROR GOTO Entry_error ! Blanket error trapping command 344 IF Selection=2 THEN GOSUB Change_id ! Operator id 345 IF Selection=3 THEN GOSUB Change_date ! System date 346 IF Selection=4 THEN GOSUB Change_time ! System time 347 IF Selection=5 THEN GOSUB Change_cond ! Test conditions 348 IF Selection=6 THEN GOSUB Change_comment ! User comment 349 IF Selection=7 THEN GOSUB Change_file ! System mass storage file 350 IF Selection>=9 AND Selection<=12 THEN GOSUB Change_sensor ! Rev C.00.00 351 IF Selection>=14 THEN GOSUB Change_address ! GPIB addresses 352 OFF ERROR ! ON ERROR GOTO entry_error 353 RETURN ! from Change_key 354 ! 355 Change_date: ! 356 DISP "Enter the new system date:"; 357 Input$=Conditions$(3,2) ! Rev C.00.00 358 Input(Input$) 359 IF Input$<>"" THEN 360 Time=TIMEDATE MOD 86400 361 SET TIMEDATE DATE(Input$) 362 SET TIME (Time) 363 Conditions$(3,2)=DATE$(TIMEDATE) 364 END IF 365 RETURN 366 ! 367 Change_time: ! 368 DISP "Enter the new system time:"; 369 Input$=Conditions$(4,2) ! Rev C.00.00 370 Input(Input$) 371 IF Input$<>"" THEN 372 SET TIME TIME(Input$) 373 Conditions$(4,2)=TIME$(TIMEDATE) 374 END IF 375 RETURN 376 ! 377 Change_id:! 378 DISP "Enter the new operator ID |<=MAX"; 379 Input$=Conditions$(2,2) ! Rev C.00.00 380 Input(Input$) 381 IF Input$<>"" THEN Conditions$(2,2)=Input$[1,37] 382 RETURN 383 ! 384 Change_sensor: ! 385 Sensor_type=VAL(Conditions$(Selection,1)[3,4]) ! 81,82,85 or 87 386 Sensor_sn=-1 387 DISP "Enter the last 5 digits of Sensor serial number or 0 if not available:"; 388 I$="" 389 Input(I$) 390 IF LEN(I$)=0 OR POS(I$,"NA") THEN I$="0" 391 Sensor_sn=VAL(I$) 392 IF Sensor_sn>=0 AND Sensor_sn<100000 THEN 393 IF Sensor_sn=0 THEN 394 Conditions$(Selection,2)=" NA" 395 ELSE 396 ON ERROR GOTO No_sensor_warn 397 ASSIGN @File TO FNSensor_file$(Sensor_type,Sensor_sn) 398 OUTPUT Conditions$(Selection,2) USING "#,5Z";INT(Sensor_sn) 399 OFF ERROR 400 END IF 401 ELSE 402 IF Sensor_sn<>-1 THEN CALL Prompt_user("ERROR: Sensor serial number must be from 1 to 99999.") 403 END IF 404 RETURN 405 No_sensor_warn: OFF ERROR 406 Prompt_user("ERROR: No sensor file found for "&Conditions$(Selection,1)[1,5]&" S/N "&VAL$(INT(Sensor_sn))) 407 RETURN 408 ! 409 Change_comment: ! 410 DISP "Enter your comments |<=MAX"; 411 Input$=Conditions$(6,2) ! Rev C.00.00 412 Input(Input$) 413 IF Input$<>"" THEN Conditions$(6,2)=Input$[1,37] 414 RETURN 415 ! 416 Change_cond: ! 417 DISP "Enter test conditions description |<=MAX"; 418 Input$=Conditions$(5,2) ! Rev C.00.00 419 Input(Input$) 420 IF Input$<>"" THEN Conditions$(5,2)=Input$[1,37] 421 RETURN 422 ! 423 Change_file: ! system mass storage file 424 DISP "Enter mass storage file location"; 425 Input$=Conditions$(7,2) ! Rev C.00.00 426 Input(Input$) 427 IF Input$<>"" THEN 428 Input$=Input$[1,160] ! Rev C.00.00 429 ON ERROR GOTO Bad_file 430 DISP 431 DISP "Checking availability of mass storage file..." 432 CAT Input$ TO Catalog$(*) 433 Conditions$(7,2)=Input$ 434 END IF 435 RETURN 436 ! 437 Bad_file: Prompt_user("ERROR: Unable to obtain catalog from """&Input$&""".") 438 RETURN 439 ! 440 Change_address: ! Change GPIB addresses 441 Address_ok=1 442 Full_address=-1 443 DISP "Enter the GPIB address, or 0 if device not applicable: "; 444 I$="" ! Rev C.00.00 445 Input(I$) 446 IF LEN(I$)=0 OR POS(I$,"NA") THEN I$="0" 447 Full_address=VAL(I$) 448 IF Full_address=-1 THEN RETURN 449 IF Full_address=0 THEN 450 Conditions$(Selection,2)=" NA " 451 ELSE 452 Select_code=MIN(99,INT(Full_address/100)) 453 Address=Full_address MOD 100 454 ON ERROR GOTO Bad_select_code 455 LOCAL Select_code 456 REMOTE Select_code 457 GOTO Check_address 458 Bad_select_code: ! 459 Address_ok=0 460 Prompt_user("ERROR: Select code "&VAL$(Select_code)&" does not currently support GPIB operations.") 461 Check_address:! 462 IF Address<0 OR Address>30 THEN 463 Address_ok=0 464 Prompt_user("ERROR: Address must be from 0 to 30 inclusive.") 465 END IF 466 IF Address_ok THEN 467 OUTPUT Conditions$(Selection,2) USING "#,4D,X,K";Full_address,"?" 468 Check_addresses("ERROR:") 469 END IF 470 END IF 471 RETURN 472 ! 473 Entry_error: ! 474 Prompt_user("ERROR: Data not accepted, check entry format.") 475 RETURN 476 ! 477 ! CONDITIONS$(*) AND TEST_CONDITIONS$(*) DATA 478 Conditions_data: ! 479 ! Rev E.00.00 Changed "HPIB" and "HP-IB" to "GPIB" 480 DATA 25,3 ! Number of lines,pages 481 DATA "Spectrum Analyzer Under Test.......","" 482 DATA "Operator ..........................","" 483 DATA "Date ..............................","" 484 DATA "Time ..............................","" 485 DATA "Test Conditions ...................","" 486 DATA "Other comments ....................","" 487 DATA "System mass storage file location .",":,700,1" 488 DATA " POWER SENSOR SERIAL NUMBERS ","" 489 DATA "8481A ............................."," NA" 490 DATA "8482A ............................."," NA" 491 DATA "8485A ............................."," NA" 492 DATA "8487A ............................."," NA" 493 DATA " GPIB ADDRESSES ","" 494 DATA "Spectrum Analyzer Under Test - - -"," 718 ?" 495 DATA "GPIB Printer - - - - - - - - - - -"," 701 ?" 496 DATA "436A Power Meter - - - - - - - - -"," 713 ?" 497 DATA "438A Power Meter - - - - - - - - -"," 712 ?" 498 DATA "8902A Measuring Receiver - - - - -"," 714 ?" 499 DATA "3335A Frequency Synthesizer - - - -"," 704 ?" 500 DATA "8662/63A Synthesized Sig Gen - - -"," 717 ?" 501 DATA "8340A/B Synthesized Sweeper - - - -"," 719 ?" 502 DATA "83640A/650A Synthesized Sweeper - -"," 716 ?" 503 DATA "5342A Microwave Frequency Counter -"," 703 ?" 504 DATA "5343A Microwave Frequency Counter -"," 702 ?" 505 DATA "535x Microwave Frequency Counter -"," 715 ?" ! Rev D.00.00 506 ! 507 SUBEND 508 ! 509 ! 510 Test_menu: SUB Test_menu !Selects a test and test mode 511 ! 512 ! Sequence type: 1=Run all tests once 513 ! 2=Single sequence 514 ! 3=Single test 515 ! 4=Repeat sequence 516 ! 5=Repeat test 517 ! 518 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 519 COM /Test_flags/Test_number,Sequence_type,Last_test 520 COM /Conditions/Conditions$(*) 521 COM /Tests/Tests$(*),Short_name$(*),Conn_check(*) 522 COM /Menu/Menu$ 523 ! 524 DIM Key_title$[160],Mode$[80],Test_link$[3000],Working_link$[160] 525 DIM Model_num$[80],Option$[31] 526 ! 527 Last_test=0 ! Reset last_test when entering Test_menu 528 STATUS KBD,9;Kbd_status 529 IF BIT(Kbd_status,5) THEN ! HIL keyboard 530 Ul$=CHR$(132) 531 Clr$=CHR$(128) 532 ELSE 533 Ul$=CHR$(132) 534 Clr$=CHR$(128) 535 END IF 536 ! 537 Menu$="Test Menu" 538 Header_prnt 539 ! 540 ! LOAD TEST$(*), SHORT_NAME$(*) 541 ! 542 READ Tests$(0,1),Tests$(0,2) ! Num entries, pages 543 FOR I=1 TO VAL(Tests$(0,1)) 544 READ Tests$(I,1),Short_name$(I),Tests$(I,2),Conn_check(I) 545 NEXT I 546 ! 547 Check_equipment(1) ! Check for sufficient equip 548 Check_options 549 ! 550 ! TEST_MENU MAIN LOOP 551 ! 552 REPEAT ! Selection loop 553 Draw_alpha_hdr("Test Menu") 554 STATUS KBD,9;Kbd_status 555 IF BIT(Kbd_status,5) THEN ! HP46020A keyboard 556 Key_title$="All tests,Single sequenc,Single test,Repeat sequenc,Repeat Test,,Cal sensor,List equip,,Cond menu," 557 ELSE 558 Key_title$="All tests,Single sequenc,Single test,Repeat sequenc,Repeat Test,Cal sensor,,List equipment,,Cond menu," 559 END IF 560 Page=1+(Test_number>14) 561 Label_keys(Key_title$,Key_pressed$,Tests$(*),Test_number,Page) ! Write page and label soft keys 562 GOSUB Inter_test_keys ! Decode key press selection 563 UNTIL Quit ! Abort key exits this loop by 564 SUBEXIT ! setting Quit to 1 565 ! 566 ! INTERPRET TEST MENU SFKs 567 ! 568 Inter_test_keys: ! Decodes selection and mode and calls proper routines 569 Mode$=Ul$&Key_pressed$&" Mode"&RPT$(" ",14-MIN(LEN(Key_pressed$),14))&Clr$ ! Mode annotation on menu 570 IF Key_pressed$<>"Cond menu" AND Key_pressed$<>"Cond menu" AND Key_pressed$<>"List equip" AND Key_pressed$<>"List equipment" THEN 571 IF Key_pressed$<>"Cal sensor" AND Key_pressed$<>"Cal sensor" THEN 572 OUTPUT @Dut;"IP ID?" ! First check instrument identity 573 ENTER @Dut;Model_num$ 574 IF LEN(Model_num$)>23 THEN Model_num$=Model_num$[1,23] 575 ! 576 OUTPUT @Dut;"SER?" 577 ENTER @Dut;Ser_num$ 578 IF LEN(Model_num$)>7 THEN 579 Option$=Model_num$[8;19] ! Display up to 3 options 580 ELSE 581 Option$="" 582 END IF 583 ! 584 Model$=Model_num$[1,7] 585 C_flag$=FNColor_flag$(Model$,Ser_num$) 586 Model_num$=Model$&C_flag$&Option$&" "&Ser_num$ 587 IF Conditions$(1,2)<>Model_num$ THEN 588 Prompt_user("ERROR: Conditions Menu DUT ID disagrees with responding DUT ID.") 589 Prompt_user("Conditions Menu ID: "&Conditions$(1,2)) 590 Prompt_user("Responding DUT ID: "&Model_num$) 591 Prompt_user("Change Conditions Menu ID or cycle DUT power if bus hangup suspected.") 592 RETURN 593 END IF 594 END IF 595 END IF 596 SELECT Key_pressed$ ! The name of the key pressed 597 CASE "All tests","All tests" 598 Sequence_type=1 599 GOSUB Link_it 600 CASE "Single sequenc" 601 Sequence_type=2 602 GOSUB Link_it 603 CASE "Single test" 604 PRINT TABXY(61,4); 605 OUTPUT CRT;Mode$ 606 Sequence_type=3 607 Do_test 608 CASE "Repeat sequenc" 609 Sequence_type=4 610 GOSUB Link_it 611 CASE "Repeat Test" 612 Sequence_type=5 613 GOSUB Repeat_it 614 CASE "List equipment","List equip" 615 PRINT TABXY(61,4); 616 OUTPUT CRT;Ul$&"List equipment mode";Clr$ 617 Check_equipment(2) 618 Prompt_user("Press") 619 CASE "Cal sensor","Cal sensor" 620 PRINT TABXY(61,4); 621 OUTPUT CRT;Ul$&"Cal sensor mode ";Clr$ 622 Power_meter("USER CAL") 623 CASE "Cond menu","Cond menu" 624 Quit=1 625 END SELECT 626 RETURN 627 ! 628 ! LINKED TESTS ROUTINE 629 ! 630 Link_it: ! Allows entry of a list of tests that run in entry order 631 PRINT TABXY(61,4); 632 OUTPUT CRT;Mode$ 633 Offset=4 ! Top 4 lines of page are for header 634 IF Last_test=0 THEN Last_test=Offset+1 635 Test_link$="" ! Clear test sequence string 636 ! Rev B.00.00 Added 17th test, FADC Accy, and reordered for better flow during 637 ! All Tests 638 IF Sequence_type=1 THEN Test_link$="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,*," 639 IF Sequence_type=2 OR Sequence_type=4 THEN CALL Linker(Test_link$,VAL(Tests$(0,1))) 640 ! 641 Repeat_seq: ! 642 STATUS KBD,9;Kbd_status 643 IF BIT(Kbd_status,5) THEN ! HIL keyboard 644 ON KEY 6 LABEL "ABORT SEQUENC" RECOVER Seq_abort 645 ELSE 646 ON KEY 6 LABEL "ABORT SEQUENCE" RECOVER Seq_abort 647 END IF 648 Working_link$=Test_link$ 649 Comma=POS(Working_link$,",") 650 Test_num$=Working_link$[1,Comma-1] ! Parse out test # 651 WHILE Test_num$<>"*" ! Decode test_link$, call tests 652 Working_link$=Working_link$[Comma+1] 653 Test_number=VAL(Test_num$) 654 IF Test_num$<>"*" THEN ! Not done with tests 655 Draw_alpha_hdr("Test Menu") 656 Page=1+(Test_number>14) 657 Last_page=1+(Last_test>14) 658 Point_pos=Test_number-(10*(Page-1))+Offset 659 Last_point=Last_test-(10*(Last_page-1))+Offset 660 PRINT TABXY(2,Last_point);" " ! Clear last pointer 661 Write_page(Tests$(*),Page) ! Write new page 662 PRINT TABXY(2,Point_pos);"=>" 663 PRINT TABXY(61,4); 664 OUTPUT CRT;Mode$;Clr$ 665 END IF 666 Do_test ! Perform test 667 Comma=POS(Working_link$,",") 668 Test_num$=Working_link$[1,Comma-1] ! Parse out test # 669 END WHILE 670 IF Sequence_type=4 THEN GOTO Repeat_seq 671 ! 672 Seq_abort: ! 673 Test_link$="" 674 OFF KEY 6 675 RETURN 676 ! 677 Repeat_it: ! Allows a single test to be repeated until aborted 678 PRINT TABXY(61,4); 679 OUTPUT CRT;Mode$ 680 ! 681 Do_it_again: ! 682 STATUS KBD,9;Kbd_status 683 IF BIT(Kbd_status,5) THEN ! HIL keyboard 684 ON KEY 6 LABEL "ABORT REPEAT " RECOVER Rep_abort 685 ELSE 686 ON KEY 6 LABEL "ABORT REPEAT " RECOVER Rep_abort 687 END IF 688 Do_test ! Perform test 689 GOTO Do_it_again 690 ! 691 Rep_abort: ! 692 OFF KEY 6 693 RETURN 694 ! 695 ! Rev B.00.00 Following data reorganized for better flow when 696 ! running All Tests 697 ! 698 Test_data: DATA 17,2 ! Test title, Short name, Conn check 699 DATA " 1) 10 MHz Reference Accuracy ","10_MHz_Ref_Acc","",3 700 DATA " 2) Fast Sweep Time Accuracy, Opt 007","FADC_Accy","",3 ! Rev B.00.00 701 DATA " 3) Calibrator Amplitude Accuracy ","Calibrator_Amp","",2 702 DATA " 4) RES BW Switching Uncertainty ","RBW_Switching","",5 703 DATA " 5) RES BW Accuracy and Selectivity ","Res_Bandwith_Acc","",6 704 DATA " 6) Input Attenuator Accuracy ","Input_Atten_Acc","",0 705 DATA " 7) IF Gain Uncertainty ","IF_Gain_Accuracy","",6 706 DATA " 8) Scale Fidelity ","Scale_Fidelity","",6 707 DATA " 9) Residual FM ","Residual_FM","",32 708 DATA "10) Noise Sidebands ","Noise_sidebands","",17 709 DATA "11) Frequency Readout/Counter Accy ","Freq_Readout_Acc","",32 710 DATA "12) Frequency Span Accuracy ","Span_Accuracy","",33 711 DATA "13) Second Harmonic Distortion ","2nd Harm Dist","",7 712 DATA "14) Frequency Response ","Frequency Resp","",34 713 DATA "15) Image and Multiple Responses ","Image_Multiples","",2 714 DATA "16) 1ST LO OUTPUT Amplitude Accuracy ","1st_LO_Output","",3 715 DATA "17) Displayed Average Noise Level ","Disp_Avg_Noise","",1 716 ! 717 SUBEND ! Test_menu 718 ! 719 ! 720 Prompt_user: SUB Prompt_user(Message$,OPTIONAL Flag) ! 721 ! REV C.01.00 Added call to Beeper for audible prompts 722 ! 723 DIM Append$[25],Key$[160] 724 ! 725 IF NPAR=2 THEN 726 IF Flag=3 THEN SUBEXIT 727 END IF 728 ! 729 IF POS(Message$,"ERROR:") THEN 730 Beeper("ERROR") 731 ELSE 732 Beeper("PROMPT") 733 END IF 734 ! 735 Append$=" (any key)" 736 IF NPAR=2 THEN 737 IF Flag=2 THEN Append$=" (any key or 'Q' to quit)" 738 END IF 739 DISP ! Rev C.00.00 740 DISP Message$&Append$ 741 CONTROL 1,12;1 ! SFKs OFF 742 ON KBD ALL,15 GOTO Kbd_cont 743 GOTO 742 744 Kbd_cont: Key$=KBD$ 745 OFF KBD 746 CONTROL 1,12;2 ! SFKs ON 747 DISP 748 ! 749 IF NPAR=2 THEN 750 IF Flag=2 THEN ! Quit flag 751 IF UPC$(Key$[1,1])="Q" THEN Flag=3 ! See if Q key pressed 752 ELSE 753 Flag=1 754 END IF 755 END IF 756 ! 757 SUBEND !Prompt_user 758 ! 759 Label_keys: SUB Label_keys(Label$,Key_pressed$,Page_info$(*),Pointer,Page) 760 ! 761 ! Labels the softkeys according to Label$, which is in the form: 762 ! "Keys_name1,...,Key_name10," 763 ! Returns the literal name of the softkey selected in Key_pressed$ 764 ! Prints an array of selections held in Page_info$ (Conditions or 765 ! Test menu). Page_info$(0,1) = # of lines. Page_info$(0,2) = 766 ! # of pages (14 lines/page). Page_info$(1:# lines) is 37 767 ! characters long 768 ! Pointer keeps track of the line in Page_info$(*) a pointer is set to. 769 ! 770 DIM Defined(0:15),Key_label$(0:11)[14],Kbd_buffer$[200] 771 REDIM Page_info$(0:44,1:2) ! Rev D.00.00 Same dimensions as Conditions$ 772 ! 773 Offset=4 ! First line of Page_info$(*) is printed with 4 blank lines between it and the top of screen 774 Num_entries=VAL(Page_info$(0,1)) ! Length of Page_info$(*) 775 Delta_page=10 ! SH arrow keys move ptr 10 lines 776 Total_pages=VAL(Page_info$(0,2)) ! Total pages in Page_info$(*) 777 Items_per_page=MIN(14,Num_entries) 778 Pointer=MIN(MAX(1,Pointer),Num_entries)! Ensure pointer is in range 779 Page=MIN(MAX(1,Page),Total_pages) ! Set correct page 780 Point=Pointer-(10*(Page-1))+Offset ! Line # for TABXY function 781 ! 782 ON KBD ALL GOSUB Read_keyboard ! Read keyboard entries 783 GOSUB Wrt_softkeys ! Write special function keys 784 GOSUB Write_new_page ! Write page 785 GOSUB Wrt_pointer ! Write the pointer indicator 786 ! 787 Clear: Keyboard$="" 788 Wait: ! 789 IF Page_info$(3,1)[1,4]="Date" THEN 790 Page_info$(3,2)=DATE$(TIMEDATE) 791 Page_info$(4,2)=TIME$(TIMEDATE) 792 IF Page=1 THEN 793 PRINT TABXY(40,7);Page_info$(3,2) 794 PRINT TABXY(40,8);Page_info$(4,2) 795 END IF 796 END IF 797 IF LEN(Keyboard$)=0 THEN Wait ! Wait for a key press 798 Softkey=POS("0123456789^VWT",Keyboard$[2,2])-1!SFK0-9,up,down,shup,shdn 799 IF Softkey=14 THEN ! CNTL tkey pressed 800 Softkey=POS("WT",Keyboard$[3,3])-1 ! CNTL-SHIFT up & down arrow 801 IF Softkey>=0 THEN Softkey=Softkey+14 ! Valid CNTL key pressd 802 END IF 803 IF Softkey=-1 THEN Clear ! Undefined key pressed 804 IF (Softkey>9) THEN ! Motion of 1 to 6 indicates 805 Motion=Softkey-9 ! up,down,pageup,pagedown,top page, middle of pages 806 GOSUB Position_point ! Set new pointer position 807 GOSUB Wrt_pointer ! Print the pointer 808 END IF 809 IF NOT Defined(Softkey) THEN Clear ! Ignore undefined softkeys and 810 Key_pressed$=Key_label$(Softkey) ! don't exit subprogram 811 Pointer=(Delta_page*(Page-1))+(Point)-Offset ! Set pointer based on Page 812 SUBEXIT ! and Point 813 ! 814 Wrt_softkeys: ! Write the softkeys 815 FOR Key=0 TO 9 816 Comma=POS(Label$,",") 817 Key_label$(Key)=Label$[1,Comma-1] ! Parse out next label 818 Label$=Label$[Comma+1] 819 Defined(Key)=(Key_label$(Key)<>"") ! Does key have non-blank def.? 820 ON KEY Key LABEL Key_label$(Key) GOSUB Ignore 821 NEXT Key 822 RETURN 823 ! 824 Position_point: ! Determine a new pointer pos. 825 IF Motion=1 THEN Point=Point-1 ! Up 826 IF Motion=2 THEN Point=Point+1 ! Down 827 IF Motion=3 THEN Page=MAX(1,Page-1) ! Page up 828 IF Motion=4 THEN Page=MIN(Total_pages,Page+1) ! Page down 829 IF Motion=4 THEN Point=MIN(Point,Num_entries-(Page-1)*Delta_page+Offset) ! Make sure you don't go beyond last test 830 IF Motion=5 THEN Page=1 ! Top page 831 IF Motion=5 THEN Point=Offset+1 832 IF Motion=6 THEN Page=MIN(5,Total_pages) ! Page 2 (Conditions menu) or Page 5 (HF sequence on Tests menu) 833 IF Motion=6 THEN Point=Offset+1 834 ! 835 IF Motion<=2 THEN GOSUB Check_position ! Up or Down 836 IF Motion>=3 THEN GOSUB Write_new_page ! Have possibly jumped a page 837 RETURN 838 ! 839 Check_position: ! Determine what needs to be changed from new pos. 840 Change_page=0 841 IF Point1 ! Change the page if page > 1 843 Page=MAX(1,Page-1) ! Determine new page # 844 IF Change_page THEN Point=Delta_page+Offset ! If Change page, then Point is at top, 845 IF NOT Change_page THEN Point=Offset+1 ! otherwise Move point by 1 846 END IF 847 ! 848 IF (Point-Offset)>Items_per_page OR (Page-1)*Delta_page+Point-Offset>Num_entries THEN ! Off end of page or Beyond last entry 849 Change_page=Page" ! Write new pointer 885 Last_point=Point 886 RETURN 887 ! 888 SUBEND !***Label_keys*** 889 ! 890 ! 891 Write_page: SUB Write_page(Page_info$(*),Page) 892 ! 893 ! Writes page # Page of Page_info$(*). Assumes pages are 14 lines long, 894 ! but that each page starts at 10 line intervals. Thus, page 3 consists 895 ! of lines 31-44 of Page_info$(*). 896 ! 897 DIM T$[37] 898 COM /Test_flags/Test_number,Sequence_type,Last_test 899 ! 900 PRINT TABXY(1,5); 901 FOR Item=Page*10-9 TO Page*10+4 ! For items on the page 902 T$="" 903 Item_len=LEN(Page_info$(Item,2)) 904 IF Item<=VAL(Page_info$(0,1)) AND Item_len<=37 THEN T$=Page_info$(Item,2) 905 IF Item<=VAL(Page_info$(0,1)) AND Item_len>37 THEN 906 T$[1,17]=Page_info$(Item,2)[1,17] 907 T$=T$&"..."&Page_info$(Item,2)[(Item_len-16),Item_len] 908 END IF 909 IF Item>VAL(Page_info$(0,1)) THEN PRINT RPT$(" ",80) 910 IF Item<=VAL(Page_info$(0,1)) THEN PRINT " ";Page_info$(Item,1);" ";T$;RPT$(" ",MAX(0,37-LEN(Page_info$(Item,2)))) 911 ! IF Item<=VAL(Page_info$(0,1)) THEN PRINT " ";Page_info$(Item,1);" ";Page_info$(Item,2);RPT$(" ",37-LEN(Page_info$(Item,2))) 912 NEXT Item 913 DISP ! Rev C.00.00 914 DISP "Use arrow keys to move pointer, softkeys to select." 915 ! 916 SUBEND !Write_page 917 ! 918 ! 919 Verify: SUB Verify !Writes '*' for instruments found on bus 920 ! Rev C.00.00 Modified to add 8487A Power Sensor 921 ! Rev D.00.00 Modified to add support for 5350 microwave freq counter 922 COM /Equipment/Present(*),Power_mtr_avail,Counter_avail,Sensor_avail(*),Source_avail(*),Source2_avail(*),Enough_equip(*) 923 COM /Conditions/Conditions$(*) 924 ! 925 DISP "Checking the bus ..." 926 MAT Present=(0) 927 FOR Line=14 TO VAL(Conditions$(0,1)) ! Rev C.00.00 928 IF POS(Conditions$(Line,2),"NA") THEN GOTO Next_line 929 DISP "Checking for an instrument at GPIB location ";Conditions$(Line,2)[1,4] 930 Bus=VAL(Conditions$(Line,2)[1,2]) ! Select code 931 ON ERROR GOTO No_sel_code 932 LOCAL Bus 933 REMOTE Bus 934 OFF ERROR 935 ON TIMEOUT Bus,.5 GOTO Not_there ! Skip the non-responding ones 936 ON ERROR GOTO Not_there 937 OUTPUT VAL(Conditions$(Line,2)[1,4]) 938 OFF ERROR 939 OFF TIMEOUT Bus 940 Conditions$(Line,2)[6,6]="*" ! Device present 941 Present(Line-13)=1 ! Rev C.00.00 Changed 12 to 13 942 GOTO Next_line 943 Not_there: ! 944 OFF ERROR 945 OFF TIMEOUT Bus 946 No_sel_code: OFF ERROR 947 Conditions$(Line,2)[6,6]=" " 948 Next_line: NEXT Line 949 DISP 950 ! 951 FOR Line=9 TO 12 ! Rev C.00.00 Changed 11 to 12 952 IF NOT POS(Conditions$(Line,2),"NA") THEN Present(Line+4)=1 953 ! Rev D.00.00 Changed "Line+3" to "Line+4" in line above 954 NEXT Line 955 ! 956 Power_mtr_avail=0 957 IF Present(5) THEN Power_mtr_avail=8902 958 IF Present(3) THEN Power_mtr_avail=436 959 IF Present(4) THEN Power_mtr_avail=438 960 Counter_avail=0 961 IF Present(10) THEN Counter_avail=5342 962 IF Present(11) THEN Counter_avail=5343 963 IF Present(12) THEN Counter_avail=5350 ! Rev D.00.00 Added 5350 964 ! 965 ! 966 SUBEND ! Verify 967 ! 968 ! 969 Setup_graph: SUB Setup_graph(X_units,Xmin,Xmax,Xdiv,X_title$,Y_units,Ymin,Ymax,Ydiv,Y_title$,Graph_title$) 970 ! 971 ! Sets up the graphics area for plotting. 972 ! * Prints horizontal, vertical and graph labels 973 ! * Scales the X and Y coordinates to units of X_units & Y_units 974 ! * Sets the start & stop coordinates, Xmin, Xmax, Ymin & Ymax 975 ! * Draws tick marks every Xdiv & Ydiv scaled to Xunits & Y units 976 ! 977 IF X_units<0 THEN Xmin=LGT(Xmin) ! Semilog graph 978 IF X_units<0 THEN Xmax=LGT(Xmax) 979 Plot_ratio=FNPlot_ratio 980 OUTPUT KBD;"K";"DEGX";"GCLEARX";"GINITX";"GRAPHICS ONX";"ALPHA OFFX"; 981 PLOTTER IS CRT,"INTERNAL" 982 CSIZE FNCsize_val(5,Plot_ratio) 983 IF Plot_ratio>1 THEN 984 VIEWPORT 0,90,35,95 985 Label_off=.01 986 ELSE 987 VIEWPORT 0,100*RATIO,8,100 988 Label_off=.15 989 END IF 990 MOVE (100*RATIO+5)/2,0 ! X title 991 LORG 4 992 LABEL X_title$ 993 MOVE (100*RATIO+5)/2,100 ! Graph title 994 LORG 6 995 LABEL Graph_title$ 996 MOVE 0,50 ! Y title 997 LDIR 90 998 LABEL Y_title$ 999 IF Plot_ratio>1 THEN 1000 VIEWPORT 7,80,43,89 1001 ELSE 1002 VIEWPORT 10,RATIO*100-5,18,100-5 ! Area applied to WINDOW 1003 END IF 1004 WINDOW Xmin,Xmax,Ymin,Ymax ! Normal grid 1005 FRAME ! Frame & Grid 1006 LINE TYPE 3 1007 IF X_units>0 THEN GRID Xdiv,Ydiv,0,0 ! Normal grid 1008 IF X_units<0 THEN GRID Xmax-Xmin,Ydiv,Xmin,0 ! Y grid for semi-log 1009 IF X_units<0 THEN 1010 FOR X=INT(Xmin*Xdiv+.99)/Xdiv TO Xmax STEP 1/Xdiv 1011 MOVE LGT(DROUND(10^X,1)),Ymin 1012 DRAW LGT(DROUND(10^X,1)),Ymax 1013 NEXT X 1014 END IF 1015 LINE TYPE 1 ! Y labels 1016 CLIP OFF 1017 LORG 4 1018 FOR Y=PROUND(Ymin,INT(LGT(Ydiv))) TO PROUND(Ymax,INT(LGT(Ydiv))) STEP Ydiv*SGN(Ymax-Ymin) 1019 MOVE Xmin,Y 1020 IF (YYmin) THEN 1021 LABEL PROUND(Y,INT(LGT(Ydiv))) 1022 END IF 1023 NEXT Y 1024 LDIR 0 ! X labels 1025 LORG 6 1026 IF X_units>0 THEN 1027 FOR X=PROUND(Xmin,INT(LGT(Xdiv))) TO PROUND(Xmax,INT(LGT(Xdiv))) STEP Xdiv 1028 MOVE X,Ymin 1029 LABEL PROUND(X,INT(LGT(Xdiv))) 1030 NEXT X 1031 ELSE 1032 FOR X=INT(Xmin*Xdiv+.99)/Xdiv TO Xmax STEP 1/Xdiv 1033 MOVE LGT(DROUND(10^X,1)),Ymin 1034 LABEL DROUND(10^X,1) 1035 NEXT X 1036 END IF 1037 CLIP Xmin,Xmax,Ymin,Ymax ! Clip area for plotting 1038 ! 1039 SUBEND 1040 ! 1041 ! 1042 Sensor_file: DEF FNSensor_file$(Sensor_type,Sensor_sn) 1043 ! 1044 COM /Conditions/Conditions$(*) 1045 ! 1046 DIM File$[80],Msi$[80],Units$[6],Test$[2] 1047 ! 1048 OUTPUT File$ USING "#,K,DD,5Z";"SEN",Sensor_type,Sensor_sn 1049 RETURN FNFile$(File$,Conditions$(7,2)) 1050 ! 1051 FNEND 1052 ! 1053 ! 1054 Parse: SUB Parse(Input$,Return$,OPTIONAL Value) 1055 ! 1056 ! Take the Input$, return in Return$ all characters up to an "=" or ",", 1057 ! return in Value the numeric value of the characters from "=" to ",", 1058 ! and return in Input$ all characters after the ",". 1059 ! 1060 IF NPAR=3 THEN Value=-999 1061 IF POS(Input$,",") THEN 1062 Return$=Input$[1,POS(Input$,",")-1] ! All characters up to a "," 1063 Input$=Input$[POS(Input$,",")+1] ! All characters after a "," 1064 ELSE ! No "," present 1065 Return$=Input$ 1066 Input$="" 1067 END IF 1068 IF POS(Return$,"=") THEN 1069 Value=VAL(Return$[POS(Return$,"=")+1]) ! Characters after "=" 1070 Return$=Return$[1,POS(Return$,"=")-1] ! Stip characters after "=" 1071 END IF 1072 ! 1073 SUBEND 1074 ! 1075 ! 1076 Dut: SUB Dut(Input$,OPTIONAL Io_value,Char$)!***DUT Driver*** 1077 ! REVISED 900320:1000 MLG 1078 ! REVISED 960502:1408 BDT Rev D.00.00 Added AUNITS VOLTS, modified 1079 ! DIGITAL AVERAGE routine 1080 ! REVISED 960717:1053 BDT Rev D.01.00 Modified DIGITAL AVERAGE routine 1081 ! to use TDF B, rather than TDF P. 1082 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 1083 COM /Sum_errors/Sum_errors$ 1084 COM /Tests/Tests$(*),Short_name$(*),Conn_check(*) 1085 COM /Test_flags/Test_number,Sequence_type,Last_test 1086 COM /Conditions/Conditions$(*) 1087 COM /Trace_data/Trace_data(*) 1088 ! 1089 Rigel_fw=960401 ! First date of 8562E (Rigel) firmware 1090 ! 1091 DIM Function$[80],Entry$[80],Instruction$[160] 1092 ! 1093 Instruction$=Input$ ! Save org input$ for err routine 1094 REPEAT 1095 Parse(Input$,Function$,Parse_value) 1096 IF NPAR>=2 THEN Value=Io_value ! Default value 1097 IF Parse_value<>-999 THEN Value=Parse_value ! Value if passed in func$ 1098 SELECT Function$ 1099 ! INSTRUMENT STATE 1100 CASE "IP" 1101 OUTPUT @Dut;"IP" 1102 CASE "INITIALIZE" 1103 OUTPUT @Dut;"IP","TITLE %TEST #"&VAL$(Test_number)&RPT$(" ",(Test_number<10))&" "&Short_name$(Test_number)&"%" 1104 CASE "ADJUST ALL" ! Rev B.00.00 Added RLCAL commands 1105 OUTPUT @Dut;"RLCAL ?;" ! to ensure that REF LEVEL CAL value 1106 ENTER @Dut;Rlcal ! before ADJALL is maintained after 1107 OUTPUT @Dut;"ADJALL;TS;DONE?;" ! ADJALL is done. 1108 ENTER @Dut;Done 1109 OUTPUT @Dut;"RLCAL "&VAL$(Rlcal)&";" 1110 CASE "ADJUST CURRENT STATE" 1111 OUTPUT @Dut;"ADJIF CURR;TS;DONE?;" 1112 ENTER @Dut;Done 1113 CASE "AUTOCAL ON" 1114 OUTPUT @Dut;"ADJIF ON" 1115 CASE "AUTOCAL OFF" 1116 OUTPUT @Dut;"ADJIF OFF" 1117 CASE "TRACKING GENERATOR ON" 1118 IF FNOption_present("002") THEN OUTPUT @Dut;"SRCPWR 1;SRCPWR ON;" 1119 CASE "TRACKING GENERATOR OFF" 1120 IF FNOption_present("002") THEN OUTPUT @Dut;"SRCPWR -10;SRCPWR OFF;" 1121 CASE "PEAK TRACKING GENERATOR" 1122 IF FNOption_present("002") THEN OUTPUT @Dut;"SRCTKPK;" 1123 CASE "SAVE STATE" 1124 OUTPUT @Dut;"PSTATE OFF;" 1125 OUTPUT @Dut;"SAVES";Value 1126 CASE "RECALL STATE" 1127 OUTPUT @Dut;"RCLS";Value 1128 CASE "SAVE POWER ON" 1129 OUTPUT @Dut;"SAVES PWRON" 1130 CASE "DONE?" 1131 OUTPUT @Dut;"DONE?;" 1132 ENTER @Dut;Dummy_value 1133 CASE "COUPLE AC" 1134 OUTPUT @Dut;"COUPLE AC" 1135 CASE "COUPLE DC" 1136 OUTPUT @Dut;"COUPLE DC" 1137 ! AMPLITUDE CONTROL 1138 CASE "REF LEVEL CAL" 1139 OUTPUT @Dut;"RLCAL";Value 1140 CASE "READ REF LEVEL CAL" 1141 OUTPUT @Dut;"RLCAL?" 1142 ENTER @Dut;Io_value 1143 CASE "ATTENUATOR" 1144 OUTPUT @Dut;"AT";Value 1145 CASE "REF LEVEL" 1146 OUTPUT @Dut;"RL";Value 1147 CASE "READ REF LEVEL" 1148 OUTPUT @Dut;"RL?" 1149 ENTER @Dut;Io_value 1150 CASE "SCALE" 1151 IF Value=0 THEN OUTPUT @Dut;"LN" 1152 IF Value>0 THEN OUTPUT @Dut;"LG";Value 1153 CASE "READ SCALE" 1154 OUTPUT @Dut;"LG?" 1155 ENTER @Dut;Io_value 1156 CASE "UNITS DBM" 1157 OUTPUT @Dut;"AUNITS DBM" 1158 CASE "UNITS VOLTS" ! Rev D.00.00 1159 OUTPUT @Dut;"AUNITS V;" 1160 ! BANDWIDTH CONTROL 1161 CASE "RBW" 1162 OUTPUT @Dut;"RB";Value 1163 CASE "READ RBW" 1164 OUTPUT @Dut;"RB?" 1165 ENTER @Dut;Io_value 1166 CASE "AUTO RBW" 1167 OUTPUT @Dut;"RB AUTO" 1168 CASE "VBW" 1169 OUTPUT @Dut;"VB";Value 1170 CASE "READ VBW" 1171 OUTPUT @Dut;"VB?" 1172 ENTER @Dut;Io_value 1173 CASE "AUTO VBW" 1174 OUTPUT @Dut;"VB AUTO" 1175 CASE "VBW AVERAGE" 1176 OUTPUT @Dut;"VAVG";Value;";" 1177 CASE "VBW AVERAGE OFF" 1178 OUTPUT @Dut;"VAVG OFF;" 1179 CASE "AM DEMOD ON" 1180 OUTPUT @Dut;"DEMOD AM" 1181 CASE "VOLUME" 1182 OUTPUT @Dut;"VOL";Value 1183 ! FREQUENCY CONTROL 1184 CASE "CENTER FREQ","CENTER FREQUENCY" 1185 OUTPUT @Dut;"CF";Value 1186 CASE "FREQUENCY OFFSET" 1187 OUTPUT @Dut;"FOFFSET ";Value;";" 1188 CASE "READ CENTER FREQUENCY" 1189 OUTPUT @Dut;"CF?;" 1190 ENTER @Dut;Io_value 1191 CASE "SPAN" 1192 OUTPUT @Dut;"SP";Value 1193 CASE "START FREQ" 1194 OUTPUT @Dut;"FA";Value 1195 CASE "STOP FREQ" 1196 OUTPUT @Dut;"FB";Value 1197 CASE "READ SPAN" 1198 OUTPUT @Dut;"SP?" 1199 ENTER @Dut;Io_value 1200 CASE "INTERNAL REF" 1201 OUTPUT @Dut;"FREF INT" 1202 CASE "EXTERNAL REF" 1203 OUTPUT @Dut;"FREF EXT" 1204 CASE "MARKER FREQ COUNT RES" 1205 OUTPUT @Dut;"MKFCR";Value 1206 CASE "COUNT MARKER FREQUENCY" 1207 OUTPUT @Dut;"MKFC ON","TS","MKF?" 1208 ENTER @Dut;Io_value 1209 IF Io_value<0 THEN GOTO 1207 1210 OUTPUT @Dut;"MKFC OFF" 1211 CASE "EXTERNAL MIXER" 1212 OUTPUT @Dut;"MXRMODE EXT;" 1213 CASE "HARMONIC NUMBER" 1214 OUTPUT @Dut;"HNLOCK";Value 1215 ! SWEEP & TRIGGER CONTROL 1216 CASE "SWEEP TIME" 1217 OUTPUT @Dut;"ST";Value 1218 CASE "READ SWEEP TIME" 1219 OUTPUT @Dut;"ST?" 1220 ENTER @Dut;Io_value 1221 CASE "AUTO SWEEP TIME" 1222 OUTPUT @Dut;"ST AUTO" 1223 CASE "TRIGGER SWEEP" 1224 OUTPUT @Dut;"TS" 1225 CASE "SINGLE SWEEP" 1226 OUTPUT @Dut;"SNGLS" 1227 CASE "CONTINUOUS SWEEP" 1228 OUTPUT @Dut;"CONTS" 1229 CASE "EXTERNAL TRIGGER" 1230 OUTPUT @Dut;"TM EXT" 1231 CASE "VIDEO TRIGGER" 1232 OUTPUT @Dut;"TM VID" 1233 CASE "VIDEO TRIGGER LEVEL" 1234 OUTPUT @Dut;"VTL";Value 1235 CASE "LINE TRIGGER" 1236 OUTPUT @Dut;"TM LINE" 1237 CASE "RAMP SWEEP OUTPUT" 1238 OUTPUT @Dut;"SWPOUT RAMP" 1239 CASE "FAV SWEEP OUTPUT" 1240 OUTPUT @Dut;"SWPOUT FAV" 1241 ! MARKER CONTROL 1242 CASE "MARKER ON" 1243 OUTPUT @Dut;"MKN" 1244 CASE "MARKER OFF" 1245 OUTPUT @Dut;"MKOFF" 1246 CASE "PEAK SEARCH" 1247 OUTPUT @Dut;"MKPK" 1248 CASE "PEAK EXCURSION" 1249 OUTPUT @Dut;"MKPX";Value 1250 CASE "PEAK THRESHOLD" 1251 OUTPUT @Dut;"MKPT";Value 1252 CASE "NEXT PEAK" 1253 OUTPUT @Dut;"MKPK NH" 1254 CASE "RIGHT PEAK" 1255 OUTPUT @Dut;"MKPK NR" 1256 CASE "MIN SEARCH" 1257 OUTPUT @Dut;"MKMIN" 1258 CASE "READ MARKER AMPLITUDE" 1259 OUTPUT @Dut;"MKA?" 1260 ENTER @Dut;Io_value 1261 CASE "READ EXTRAPOLATED PEAK AMPLITUDE" ! Read amplitude in non-zero spans even if off top of screen. Uses RBW equations to figure aprox. amplitude 1262 Dut("DUMP TRACE A,READ REF LEVEL",Ref_level) 1263 Dut("READ SPAN",Span) 1264 Dut("READ RBW",Rbw) 1265 Io_value=MAX(Trace_data(*)) 1266 IF Io_value>Ref_level THEN ! Max above ref level 1267 MAT Trace_data=Trace_data>=(Ref_level) ! Sum = # pts. >= RL 1268 Delta_freq=(SUM(Trace_data)-1)*Span/600 ! Delta freq at ref level 1269 Io_value=Ref_level+40*LGT((Delta_freq/Rbw/2)^2/1.151627^2+1) ! Use 4 pole BW equations & delta freq @ ref level to determine peak amplitude 1270 END IF 1271 CASE "MARKER FREQ" 1272 OUTPUT @Dut;"MKF";Value 1273 CASE "READ MARKER FREQ","READ MARKER FREQUENCY" 1274 OUTPUT @Dut;"MKF?" 1275 ENTER @Dut;Io_value 1276 CASE "MARKER TIME" 1277 OUTPUT @Dut;"MKT";Value 1278 CASE "READ MARKER TIME" 1279 OUTPUT @Dut;"MKT?" 1280 ENTER @Dut;Io_value 1281 CASE "MARKER TO REF LEVEL" 1282 OUTPUT @Dut;"MKRL" 1283 CASE "MKR TO CENTER FREQ" 1284 OUTPUT @Dut;"MKCF" 1285 CASE "NOISE MARKER ON" 1286 OUTPUT @Dut;"MKNOISE ON;" 1287 CASE "NOISE MARKER OFF" 1288 OUTPUT @Dut;"MKNOISE OFF;" 1289 CASE "MARKER TRACK ON" 1290 OUTPUT @Dut;"MKTRACK ON;" 1291 CASE "MARKER TRACK OFF" 1292 OUTPUT @Dut;"MKTRACK OFF;" 1293 ! INFORMATION & SERVICE DIAG. 1294 CASE "READ MODEL NUMBER" 1295 OUTPUT @Dut;"ID?" 1296 ENTER @Dut;Char$ 1297 CASE "READ SERIAL NUMBER" 1298 OUTPUT @Dut;"SER?" 1299 ENTER @Dut;Char$ 1300 CASE "READ F/W REVISION" 1301 OUTPUT @Dut;"REV ?;" 1302 ENTER @Dut;Io_value 1303 ! TRACE FUNCTIONS 1304 CASE "CLEAR WRITE A" 1305 OUTPUT @Dut;"CLRW TRA" 1306 CASE "MAX HOLD B" 1307 OUTPUT @Dut;"MXMH TRB" 1308 CASE "VIEW A" 1309 OUTPUT @Dut;"VIEW TRA" 1310 CASE "SAVE TRACE A" 1311 OUTPUT @Dut;"PSTATE OFF;" 1312 OUTPUT @Dut;"SAVET TRA,";Value 1313 CASE "DUMP TRACE A" 1314 OUTPUT @Dut;"TDF P","TRA?" 1315 ENTER @Dut;Trace_data(*) 1316 CASE "DIGITAL AVERAGE" ! Rev D.01.00 Modified to use TDF B 1317 INTEGER Bin_data(1:601) 1318 REAL Real_data(1:601) 1319 Dut_addr=VAL(Conditions$(14,2)) 1320 ASSIGN @Dut_bin TO Dut_addr;FORMAT OFF 1321 Dut("READ SCALE",Scale) 1322 Dut("READ REF LEVEL",Ref_lvl) 1323 OUTPUT @Dut;"TDF B;CLRW TRA;" 1324 OUTPUT @Dut;"TS;DONE?" 1325 ENTER @Dut;Dummy 1326 OUTPUT @Dut;"TS;TRA?" 1327 ENTER @Dut_bin;Bin_data(*) 1328 MAT Real_data=Bin_data 1329 Io_value=SUM(Real_data)/SIZE(Real_data,1) ! Average value 1330 IF Scale<>0 THEN 1331 Io_value=Ref_lvl+Scale*(Io_value/60-10) 1332 ELSE 1333 Rl_volts=SQR(.05*10^(Ref_lvl/10)) 1334 Min_resoln=Rl_volts/600 1335 Io_value=Rl_volts*Io_value/600 1336 Io_value=10*LGT(MAX(Min_resoln,Io_value)^2/50)+30! Convert to dBm 1337 END IF 1338 CASE "DIGITAL AVERAGE D" TO "DIGITAL AVERAGE Dz" 1339 First_bucket=PROUND(VAL(Function$[POS(Function$,"DIV")+3,POS(Function$,"TO")])*60,0) 1340 Last_bucket=PROUND(VAL(Function$[POS(Function$,"TO")+2])*60,0) 1341 Dut("DUMP TRACE A") 1342 Io_value=0 1343 Num_buckets=Last_bucket-First_bucket+1 1344 FOR I=First_bucket TO Last_bucket 1345 Io_value=Io_value+Trace_data(I)/Num_buckets 1346 NEXT I 1347 CASE "DIGITAL PEAK","DIGITAL PEAK D" TO "DIGITAL PEAK Dz" 1348 IF POS(Function$,"TO") THEN 1349 First_bucket=PROUND(VAL(Function$[POS(Function$,"DIV")+3,POS(Function$,"TO")])*60,0) 1350 Last_bucket=PROUND(VAL(Function$[POS(Function$,"TO")+2])*60,0) 1351 ELSE 1352 First_bucket=0 1353 Last_bucket=600 1354 END IF 1355 Dut("DUMP TRACE A") 1356 Io_value=-999 1357 FOR I=First_bucket TO Last_bucket 1358 Io_value=MAX(Io_value,Trace_data(I)) 1359 NEXT I 1360 CASE "DIGITAL PEAK FREQUENCY" 1361 Dut("READ CENTER FREQUENCY",Center_freq) 1362 Dut("READ SPAN",Span) 1363 Dut("DUMP TRACE A") 1364 Max_value=-999 1365 Peak_index=-1 1366 FOR I=0 TO 600 1367 IF Trace_data(I)>Max_value THEN 1368 Max_value=Trace_data(I) 1369 Peak_index=I 1370 END IF 1371 NEXT I 1372 Io_value=Center_freq+Span*(Peak_index-300)/600 1373 CASE "PHASE NOISE AVERAGE" 1374 OUTPUT @Dut;"TDF P","TRA?" 1375 ENTER @Dut;Trace_data(*) 1376 Io_value=0 1377 FOR I=60 TO 180 !1-3 DIV !CHANGED FROM 0-120 1378 Io_value=Io_value+Trace_data(I)/242 1379 NEXT I 1380 FOR I=420 TO 540 !7-9 CHANGED FROM 6-8 DIV 1381 Io_value=Io_value+Trace_data(I)/242 1382 NEXT I 1383 CASE "SAMPLE DETECTOR" 1384 OUTPUT @Dut;"DET SMP" 1385 CASE "POSITIVE DETECTOR" 1386 OUTPUT @Dut;"DET POS" 1387 ! 1388 CASE "PEAK PRESELECTOR" 1389 OUTPUT @Dut;"PP" 1390 ! 1391 CASE ELSE 1392 Prompt_user("ERROR: Function "&Function$&" not found in DUT driver") 1393 END SELECT 1394 ! 1395 UNTIL Input$="" 1396 ! 1397 OUTPUT @Dut;"ERR?" !ADDED CONSTANT ERROR CHECKS 10/15 GAD 1398 ENTER @Dut;Entry$ 1399 IF (Entry$<>"0") THEN 1400 REPEAT 1401 Cur_err$=Entry$[1,3] 1402 IF NOT POS(Sum_errors$,Cur_err$) THEN 1403 IF LEN(Sum_errors$)>0 THEN Sum_errors$=Sum_errors$&"," 1404 Sum_errors$=Sum_errors$&Cur_err$ 1405 OUTPUT @Printer;"Instruction$ producing ERR ";Cur_err$;": ";Instruction$ ! debugging aid 1406 OUTPUT @Printer;"ERR ";Cur_err$;" generated." 1407 END IF 1408 IF LEN(Entry$)<=4 THEN Entry$="" 1409 IF LEN(Entry$)<>0 THEN Entry$=Entry$[5] 1410 UNTIL Entry$="" 1411 END IF 1412 ! 1413 Dut_end: SUBEND !Dut driver for analyzer 1414 ! 1415 ! 1416 Power_meter: SUB Power_meter(Input$,OPTIONAL Val1,Val2) ! Handles 436,438 & 8902 1417 ! Rev D.02.02 Fixed bug in USER CAL. The Present(*) indices should 1418 ! range from 13 to 16, but were 12 to 15. This change should have 1419 ! occured with Rev D.00.00, when HP 535x Counter was added. 1420 ! 1421 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 1422 COM /Sensor/Current_channel,Sensor(*),Cal_time(*),Cal_data(*) 1423 COM /Conditions/Conditions$(*) 1424 COM /Test_flags/Test_number,Sequence_type,Last_test 1425 COM /Equipment/Present(*),Power_mtr_avail,Counter_avail,Sensor_avail(*),Source_avail(*),Source2_avail(*),Enough_equip(*) 1426 COM /Menu/Menu$ 1427 DIM Function$[80],I$[160] 1428 ! 1429 IF Power_mtr_avail=438 THEN 1430 IF Current_channel=0 THEN Current_channel=1 1431 ELSE 1432 Current_channel=1 1433 END IF 1434 ! 1435 REPEAT 1436 Parse(Input$,Function$,Parse_value) 1437 SELECT Function$ 1438 CASE "INITIALIZE" !Preset=chan A, Osc off, Watt changed to 1439 SELECT Power_mtr_avail 1440 CASE 436 1441 CLEAR @Pwr_mtr 1442 OUTPUT @Pwr_mtr;"9D+V" 1443 CASE 438 1444 OUTPUT @Pwr_mtr;"PRLG" !dBm, 100% Cal, Auto filter and range 1445 IF Current_channel=2 THEN OUTPUT @Pwr_mtr;"BP" 1446 CASE 8902 1447 OUTPUT @Pwr_mtr;"IP M4 LG 10.0SP" 1448 END SELECT 1449 CASE "CHECK CAL" 1450 IF Power_mtr_avail=438 AND Sensor(Current_channel)<>Sensor_avail(Test_number) THEN 1451 IF Sensor(3-Current_channel)=Sensor_avail(Test_number) THEN 1452 Current_channel=3-Current_channel 1453 Load_cal_data(Sensor(Current_channel)) 1454 END IF 1455 END IF 1456 IF Sensor(Current_channel)<>Sensor_avail(Test_number) OR (TIMEDATE>(Cal_time(Current_channel)+7200) AND Sequence_type<>4) THEN 1457 Cal_sensor=Sensor_avail(Test_number) 1458 GOSUB Cal_power_meter 1459 END IF 1460 CASE "USER CAL" 1461 REPEAT 1462 I$=" " 1463 DISP "What sensor would you like to calibrate (8481,8482,8485, or 8487)?"; 1464 I$=VAL$(Cal_sensor) ! Rev C.00.00 1465 Input(I$) 1466 UNTIL I$=" " OR I$="8481" OR I$="8482" OR I$="8485" OR I$="8487" 1467 ! Rev D.02.02 Changed Present(*) indices from 12 - 15 to 13 - 16 1468 IF I$="8481" AND Present(13) OR I$="8482" AND Present(14) OR I$="8485" AND Present(15) OR I$="8487" AND Present(16) THEN 1469 Cal_sensor=VAL(I$) 1470 GOSUB Cal_power_meter 1471 ELSE 1472 IF I$<>" " THEN CALL Prompt_user("ERROR: The "&I$&"A sensor is not available.") 1473 END IF 1474 CASE "CONTINUOUS TRIGGER" 1475 SELECT Power_mtr_avail 1476 CASE 436 1477 OUTPUT @Pwr_mtr;"V" 1478 CASE 438 1479 OUTPUT @Pwr_mtr;"TR3" 1480 CASE 8902 1481 OUTPUT @Pwr_mtr;"T0" 1482 END SELECT 1483 CASE "READ","SETTLED READ" 1484 IF NPAR=3 THEN Frequency=Val2 1485 IF NPAR<3 THEN Frequency=5.0E+7 1486 Old_power=-999 1487 Time0=TIMEDATE 1488 LOOP 1489 ENTER @Pwr_mtr;Power 1490 EXIT IF ABS(Old_power-Power)<=.05 AND Power<100 1491 EXIT IF TIMEDATE-Time0>10 ! 10 second maximum wait 1492 Old_power=Power 1493 END LOOP 1494 IF Power>100 THEN Power=-999 ! Under range reading 1495 ALLOCATE A(1:2,1:SIZE(Cal_data,2)) 1496 MAT SORT Cal_data(1,*) 1497 MAT A=Cal_data<=(5.0E+7) ! Number of frequencies <= 50 MHz 1498 Cal_index=SUM(A)-SIZE(A,2) ! All cal factors <= 100 1499 IF Cal_data(1,SIZE(A,2))=5.E+7 THEN 1500 Ref_cal_factor=Cal_data(2,SIZE(A,2)) 1501 ELSE 1502 Ref_cal_factor=(5.0E+7-Cal_data(1,Cal_index))/(Cal_data(1,Cal_index+1)-Cal_data(1,Cal_index))*(Cal_data(2,Cal_index+1)-Cal_data(2,Cal_index)) 1503 Ref_cal_factor=Ref_cal_factor+Cal_data(2,Cal_index) 1504 END IF 1505 MAT A=Cal_data<=(Frequency) ! # cal points < test freq 1506 Test_index=SUM(A)-SIZE(A,2) 1507 IF Frequency=Cal_data(1,SIZE(A,2)) THEN 1508 Test_cal_factor=Cal_data(2,SIZE(A,2)) 1509 ELSE 1510 Test_cal_factor=(Frequency-Cal_data(1,Test_index))/(Cal_data(1,Test_index+1)-Cal_data(1,Test_index))*(Cal_data(2,Test_index+1)-Cal_data(2,Test_index)) 1511 Test_cal_factor=Test_cal_factor+Cal_data(2,Test_index) 1512 END IF 1513 Val1=Power+10*LGT(Ref_cal_factor/Test_cal_factor) 1514 DEALLOCATE A(*) 1515 CASE ELSE 1516 Prompt_user("ERROR: Function "&Function$&" not found in Power_meter driver.") 1517 END SELECT !Function$ 1518 UNTIL Input$="" 1519 ! 1520 SUBEXIT 1521 ! 1522 Cal_power_meter:! 1523 IF Power_mtr_avail=438 THEN 1524 REPEAT 1525 I$=" " 1526 DISP "What channel is the "&VAL$(Cal_sensor)&"A power sensor connected to? (A/B)?"; 1527 Input(I$) 1528 I$=UPC$(I$[1,1]) 1529 UNTIL I$="A" OR I$="B" 1530 IF I$="A" THEN 1531 Current_channel=1 1532 OUTPUT @Pwr_mtr;"AP" 1533 ELSE 1534 Current_channel=2 1535 OUTPUT @Pwr_mtr;"BP" 1536 END IF 1537 END IF 1538 Sensor(Current_channel)=Cal_sensor 1539 IF Sensor(3-Current_channel)=Cal_sensor THEN Sensor(3-Current_channel)=0 1540 Load_cal_data(Cal_sensor) 1541 Channel$="" 1542 IF Power_mtr_avail=438 THEN Channel$="(Channel "&CHR$(NUM("A")+Current_channel-1)&") " 1543 Quit_flag=2 1544 Prompt_user("Connect "&VAL$(Cal_sensor)&"A "&Channel$&"to "&VAL$(Power_mtr_avail)&"A Power Reference",Quit_flag) 1545 IF Quit_flag=3 THEN SUBEXIT 1546 DISP "Calibrating power sensor ..." 1547 SELECT Power_mtr_avail 1548 CASE 438 1549 OUTPUT @Pwr_mtr;"ZECL100EN" 1550 REPEAT 1551 OUTPUT @Pwr_mtr;"SM" 1552 ENTER @Pwr_mtr;Status$ 1553 IF LEN(Status$)<6 THEN Status$=" " 1554 DISP "438A status: ";Status$[5,6] 1555 UNTIL Status$[5,6]="00" OR Status$[5,6]="01" 1556 CASE 436 1557 Prompt_user("Make sure that the 436A power reference is turned off.") 1558 REPEAT !Zeroing loop 1559 OUTPUT @Pwr_mtr;"Z1T" !Send zero trigger program codes 1560 ENTER @Pwr_mtr USING "B,B,B,5D,B,5D";Status,Range,Mode,Power,Letter,Exponent !Read meter 1561 DISP "436A Power reading: ";Power 1562 UNTIL ABS(Power)<2 ! Corresponsds to 0000 +/- 0002 1563 REPEAT !Checking zero loop condition 1564 OUTPUT @Pwr_mtr;"9+AI" !Send normal measurement codes 1565 ENTER @Pwr_mtr USING "B,B,B,5D,B,5D";Status,Range,Mode,Power,Letter,Exponent !Read meter 1566 DISP "436A Status: ";Status 1567 UNTIL Status<84 !Zero loop disabled 1568 OUTPUT @Pwr_mtr;"9D+V" !Set meter to free run, allowing 1569 Prompt_user("Turn on the 436A power reference and calibrate the sensor.") 1570 CASE 8902 1571 Cal_level=1.E-3 !Level to be CALed to 1572 Test_res=3.E-4 !Resolution used for setup check 1573 Resolution=.1 !Resolution of adjustment 1574 REPEAT !Check setup and measure amplitude 1575 Ok=1 1576 OUTPUT @Pwr_mtr;"IP M4 C1" 1577 ENTER @Pwr_mtr;Amplitude 1578 IF ABS(Amplitude-Cal_level)>Test_res THEN ! Signal low or setup bad 1579 Ok=0 1580 Prompt_user("Prepare the 8902A to be calibrated") 1581 END IF 1582 UNTIL Ok 1583 DISP "Initializing calibration data ..." 1584 ! 1585 !Clear CAL factors out of 8902 and set to 100% 1586 !All cal factor correction is done in software 1587 ! 1588 OUTPUT @Pwr_mtr;"IP M4 37.0 SP 37.9 SP 37.3 SP 10 MZ 100 CF" 1589 OUTPUT @Pwr_mtr;"37.3 SP";26500;"MZ";100;"CF" 1590 DISP "Zeroing power sensor ..." 1591 OUTPUT @Pwr_mtr;"IP 37.0 SP 37.3 SP 100 CF M4 ZR" !Zero sensor 1592 ENTER @Pwr_mtr !Holds off the bus until zero is completed 1593 OUTPUT @Pwr_mtr;"C1" 1594 ENTER @Pwr_mtr 1595 OUTPUT @Pwr_mtr;"SC C0" 1596 END SELECT 1597 Cal_time(Current_channel)=TIMEDATE 1598 RETURN 1599 ! 1600 SUBEND ! Power_meter 1601 ! 1602 ! 1603 Driver_8663: SUB Driver_8663(Input$,OPTIONAL Io_value)! 8662/3 driver; 081490.GPB 1604 ! Rev C.00.00 Changed ASSIGN @Syn command 1605 COM /Conditions/Conditions$(0:44,1:2)[160] 1606 DIM Status$[100],Function$[80] 1607 ! 1608 ASSIGN @Syn2 TO VAL(Conditions$(20,2)[1,4]) ! Changed '19' to '20' Rev C.00.00 1609 ! 1610 REPEAT 1611 Parse(Input$,Function$,Parse_value) 1612 IF NPAR>=2 THEN Value=Io_value ! Default value 1613 IF Parse_value<>-999 THEN Value=Parse_value ! Value if passed in func$ 1614 SELECT Function$ 1615 CASE "INITIALIZE" 1616 OUTPUT @Syn2;"SP00" 1617 CASE "FREQUENCY" 1618 OUTPUT @Syn2 USING "K,10D.D,K";"FR";Value;"HZ" 1619 CASE "AMPLITUDE" 1620 OUTPUT @Syn2;"AP";Value;"DM" 1621 WAIT .2 1622 CASE "CHECK FREQ LOCK" 1623 OUTPUT @Syn2;"AP";0;"DM","MS" 1624 ENTER @Syn2;Status$ ! Clear any non-current errors 1625 OUTPUT @Syn2;"MS" 1626 ENTER @Syn2;Status$ 1627 Stat=VAL(Status$[1,2]) 1628 IF Stat=1 THEN CALL Prompt_user("ERROR: No 8662/63 Reference oscillator. Check INT-EXT switches.") 1629 IF Stat=12 THEN CALL Prompt_user("ERROR: 8662/63 Oven not yet warmed up.") 1630 IF Stat=13 THEN CALL Prompt_user("ERROR: 8662/63 Should be on INTernal reference.") 1631 IF Stat=14 THEN CALL Prompt_user("ERROR: 8662/63 Frequency reference out of tolerance.") 1632 IF Stat=32 THEN CALL Prompt_user("ERROR: 8662/63 Amplitude out of range.") 1633 IF Stat=33 THEN CALL Prompt_user("ERROR: 8662/63 Frequency out of range.") 1634 IF Stat=99 THEN CALL Prompt_user("ERROR: 8662/63 Malfunction. Origin unknown.") 1635 IF Stat<>0 AND Stat<>1 AND Stat<>12 AND Stat<>13 AND Stat<>14 AND Stat<>99 THEN CALL Prompt_user("ERROR: 8662/63 Error # "&VAL$(Stat)&".") 1636 IF Stat<>0 THEN Value=1 1637 CASE "UNLEVELLED?" 1638 ! Do nothing 1639 CASE ELSE 1640 Prompt_user("ERROR: Function "&Function$&"> in Driver_8663 not found") 1641 END SELECT 1642 UNTIL Input$="" 1643 ! 1644 SUBEND !Driver_8662 1645 ! 1646 ! 1647 Driver_8340: SUB Driver_8340(Instrument,Input$,OPTIONAL Io_value) 1648 ! 1649 COM /Conditions/Conditions$(*) 1650 DIM Function$[80] 1651 ! In following statement, changed '19' to '20' in Rev C.00.00 1652 ASSIGN @Swp TO VAL(Conditions$(20+Instrument,2)[1,4]) ! Rev C.00.00 1653 ! 1654 REPEAT 1655 Parse(Input$,Function$,Parse_value) 1656 IF NPAR=3 THEN Value=Io_value ! Default value 1657 IF Parse_value<>-999 THEN Value=Parse_value ! Value if passed in func$ 1658 SELECT Function$ 1659 CASE "LOCAL" ! Instrument is LOCALized at end of driver 1660 LOCAL @Swp 1661 CASE "INITIALIZE" 1662 OUTPUT @Swp;"IP" 1663 CASE "FREQUENCY" 1664 OUTPUT @Swp;"CW";Value;"HZ" !Send command 1665 CASE "AMPLITUDE" 1666 OUTPUT @Swp;"RF1","PL";Value;"DB" !RF ON 1667 CASE "ATN" 1668 OUTPUT @Swp;"AT";Value 1669 CASE "ALC" 1670 OUTPUT @Swp;"SHPS";Value;"DB" 1671 CASE "RF ON" 1672 OUTPUT @Swp;"RF1" 1673 CASE "RF OFF" 1674 OUTPUT @Swp;"RF0" 1675 CASE "PULSE MODULATION ON" 1676 OUTPUT @Swp;"PM1" 1677 CASE "PULSE MODULATION OFF" 1678 OUTPUT @Swp;"PM0" 1679 CASE "CENTER FREQ" 1680 OUTPUT @Swp;"CF";Value;"HZ" 1681 CASE "DELTA FREQUENCY","SPAN" 1682 OUTPUT @Swp;"DF";Value;"HZ" 1683 CASE "SWEEP TIME" 1684 OUTPUT @Swp;"ST";Value;"SC" 1685 CASE "SINGLE SWEEP","TRIGGER SWEEP" 1686 OUTPUT @Swp;"S2" 1687 CASE "PULSE MODULATION ENHANCEMENT ON" 1688 OUTPUT @Swp;"SHAM";1 1689 CASE "OVEN COLD?" 1690 Bit=2 1691 GOSUB Check_bit 1692 CASE "EXT FREQ REF?" 1693 Bit=3 1694 GOSUB Check_bit 1695 CASE "UNLOCKED?" 1696 Bit=4 1697 GOSUB Check_bit 1698 CASE "UNLEVELED?","UNLEVELLED?" 1699 CLEAR @Swp 1700 Bit=6 1701 GOSUB Check_bit 1702 CASE "AUTO TRACKING CALIBRATION" 1703 OUTPUT @Swp;"SHRP" 1704 CASE ELSE !Illegal Function$ 1705 Prompt_user("ERROR: Function "&Function$&"< in Driver_8340 not found") 1706 END SELECT 1707 UNTIL Input$="" 1708 SUBEXIT 1709 ! 1710 Check_bit: CLEAR @Swp 1711 OUTPUT @Swp;"OS" 1712 ENTER @Swp USING "B,B";First_byte,Second_byte 1713 Io_value=BIT(Second_byte,Bit) 1714 RETURN 1715 ! 1716 SUBEND !Driver_8340 1717 ! 1718 ! 1719 Set_sig_level: SUB Set_sig_level(Source_amp,Des_level,Des_max_err,OPTIONAL Min_acc_level) 1720 ! 1721 Desired_level=Des_level ! This disassociates Des_level from Source_amp 1722 ! if they were set by using the same variable 1723 ! in the calling context, eliminating problems 1724 ! related to passing parameters by reference, 1725 ! instead of by value. BDT 900821 1726 Min_level=Desired_level-Des_max_err 1727 IF NPAR=5 THEN Min_level=Min_acc_level 1728 ! 1729 Dut("MARKER OFF,MARKER ON,READ REF LEVEL",Ref_level) 1730 Dut("READ SCALE",Scale) 1731 IF Scale=10 THEN Over_range=1.6 1732 IF Scale=1 THEN Over_range=.16 1733 Dut("READ SPAN",Span) 1734 LOOP ! Adjusts for non-linear gain. 1735 Unlvl_flag=0 1736 Source("AMPLITUDE",Source_amp) 1737 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp) 1738 IF Marker_amp>Ref_level+Over_range AND Span>0 THEN CALL Dut("READ EXTRAPOLATED PEAK AMPLITUDE",Marker_amp) 1739 EXIT IF ABS(Marker_amp-Desired_level)<=Des_max_err 1740 Source_amp=Source_amp+Desired_level-Marker_amp 1741 IF Source_amp>30 THEN CALL Source("UNLEVELLED?",Unlvl_flag) 1742 IF ABS(Source_amp-Desired_level)>100 THEN Source_amp=Desired_level-1 ! RO 1743 EXIT IF Unlvl_flag 1744 END LOOP 1745 ! 1746 SUBEND 1747 ! 1748 ! 1749 Peak_in_0_span: SUB Peak_in_0_span(Start_freq,Start_del_freq,Stop_del_freq,OPTIONAL Peak_freq,Peak_amp) 1750 ! 1751 Dut("MARKER OFF,MARKER ON") ! Fl, Fm, Fr = Left, Middle & 1752 Fm=Start_freq ! right frequencies. 1753 Delta_f=Start_del_freq ! Al, Am, Ar = amplitudes. 1754 Get_freq_amp(Fm-Delta_f,Fl,Al) ! Get initial frequencies and 1755 Get_freq_amp(Fm+Delta_f,Fr,Ar) ! Amplitudes 1756 Get_freq_amp(Fm,Fm,Am) 1757 ! 1758 REPEAT ! The following decides which 1759 IF Al=Ar THEN ! points to call Get_freq_amp 1760 Get_freq_amp(Fm-Delta_f/2,Fl,Al) ! Al (Am) Ar 1761 Get_freq_amp(Fm+Delta_f/2,Fr,Ar) ! L M R 1762 Delta_f=Delta_f/2 1763 END IF 1764 IF Al>Ar THEN 1765 IF Am>=Al THEN ! Al (Am) 1766 Ar=Am ! Ar 1767 Fr=Fm ! L M R 1768 Get_freq_amp(Fm-Delta_f/2,Fm,Am) 1769 Delta_f=Delta_f/2 1770 ELSE 1771 Ar=Am 1772 Fr=Fm ! Al 1773 Am=Al ! (Am) Ar 1774 Fm=Fl ! L M R 1775 Get_freq_amp(Fl-Delta_f,Fl,Al) 1776 END IF 1777 END IF 1778 IF Ar>Al THEN 1779 IF Am>=Ar THEN ! (Am) Ar 1780 Al=Am ! Al 1781 Fl=Fm ! L M R 1782 Get_freq_amp(Fr-Delta_f/2,Fm,Am) 1783 Delta_f=Delta_f/2 1784 ELSE 1785 Al=Am ! Ar 1786 Fl=Fm ! Al (Am) 1787 Am=Ar ! L M R 1788 Fm=Fr 1789 Get_freq_amp(Fr+Delta_f,Fr,Ar) 1790 END IF 1791 END IF 1792 IF Loop_counter=100 THEN CALL Loop_error("Peak in zero span REPEAT loop.") 1793 UNTIL PROUND(Delta_f,0)<=Stop_del_freq 1794 ! 1795 IF NPAR>=4 THEN Peak_freq=Fm 1796 IF NPAR=5 THEN Peak_amp=Am 1797 ! 1798 SUBEND 1799 ! 1800 ! 1801 Set_source_pwr: SUB Set_source_pwr(Source_power,Des_pwr_rdg,Max_error,Test_freq,Meas_amp) 1802 ! 1803 Loop_counter=0 1804 LOOP 1805 Loop_counter=Loop_counter+1 1806 IF Loop_counter=100 THEN CALL Loop_error("Set_source_pwr amplitude setting LOOP.") 1807 EXIT IF Loop_counter=100 1808 Source("AMPLITUDE="&VAL$(Source_power)&",UNLEVELLED?",Unlevelled) 1809 Power_meter("READ",Meas_amp,Test_freq) 1810 IF Unlevelled AND Meas_ampMax_value THEN 1830 Prompt_user("ERROR: Test number must be between 0 and "&VAL$(Max_value)&".") 1831 ELSE 1832 IF LEN(Test_link$) THEN Test_link$=Test_link$&"," 1833 IF Value=0 THEN Test_link$=Test_link$&"*," ! Last test marker 1834 IF Value AND LEN(Test_link$)<=75 THEN Test_link$=Test_link$&VAL$(INT(Value)) 1835 IF LEN(Test_link$)>=78 THEN CALL Prompt_user("ERROR: No more tests may be linked; enter 0 at next prompt.") 1836 END IF 1837 UNTIL Value=0 1838 DISP ! Clear display line 1839 SUBEXIT 1840 ! 1841 End_of_link: I$="0" ! If non-numeric or null string, terminate entry 1842 RETURN 1843 ! 1844 SUBEND !Linker 1845 ! 1846 ! 1847 Do_test: SUB Do_test 1848 ! 1849 COM /Test_flags/Test_number,Sequence_type,Last_test 1850 COM /Tests/Tests$(*),Short_name$(*),Conn_check(*) 1851 COM /Equipment/Present(1:20),Power_mtr_avail,Counter_avail,Sensor_avail(1:20),Source_avail(1:20),Source2_avail(1:20),Enough_equip(1:20) 1852 COM /Sum_errors/Sum_errors$ 1853 ! 1854 IF Tests$(Test_number,2)="TEST NOT APPLICABLE" THEN 1855 IF Sequence_type=3 OR Sequence_type=5 THEN 1856 Prompt_user("This test does not apply to the current DUT") 1857 END IF 1858 SUBEXIT 1859 END IF 1860 ! 1861 IF NOT Enough_equip(Test_number) THEN 1862 IF Sequence_type=3 OR Sequence_type=5 THEN 1863 Prompt_user("ERROR: Insufficient equip. to do test "&VAL$(Test_number)&": "&TRIM$(Tests$(Test_number,1)[5])) 1864 END IF 1865 SUBEXIT 1866 END IF 1867 ! 1868 GOTO Skip_ptr 1869 PRINT TABXY(1,5); 1870 FOR Test=1 TO VAL(Tests$(0,1)) 1871 IF Test_number=Test THEN 1872 PRINT " =>" 1873 ELSE 1874 PRINT " " 1875 END IF 1876 NEXT Test 1877 Skip_ptr: ! 1878 ! 1879 IF Sequence_type<>5 THEN ON KEY 1 LABEL "Restart" RECOVER Restart 1880 STATUS KBD,9;Kbd_status 1881 IF BIT(Kbd_status,5) THEN ! HIL keyboard 1882 ON KEY 8 LABEL "ABORT TEST" RECOVER Exit_test 1883 ELSE 1884 ON KEY 8 LABEL "ABORT TEST" RECOVER Exit_test 1885 END IF 1886 ! 1887 DISP 1888 ! 1889 Restart: ! 1890 Sum_errors$="" ! Clear DUT error string 1891 ! 1892 ! Rev B.00.00 Test numbering changed to yield better flow during All Tests 1893 ! 1894 IF Test_number=1 THEN CALL Ten_mhz_ref_acc 1895 IF Test_number=2 THEN CALL Fadc_accy 1896 IF Test_number=3 THEN CALL Calibrator_amp 1897 IF Test_number=4 THEN CALL Rbw_switching 1898 IF Test_number=5 THEN CALL Rbw_accuracy 1899 IF Test_number=6 THEN CALL Input_atten_acc 1900 IF Test_number=7 THEN CALL If_gain_accurac 1901 IF Test_number=8 THEN CALL Scale_fidelity 1902 IF Test_number=9 THEN CALL Residual_fm 1903 IF Test_number=10 THEN CALL Noise_sidebands 1904 IF Test_number=11 THEN CALL Freq_readout_ac 1905 IF Test_number=12 THEN CALL Span_accuracy 1906 IF Test_number=13 THEN CALL Second_harm_dis 1907 IF Test_number=14 THEN CALL Frequency_resp 1908 IF Test_number=15 THEN CALL Imooboor 1909 IF Test_number=16 THEN CALL Lo_output 1910 IF Test_number=17 THEN CALL Danl 1911 ! 1912 Last_test=Test_number 1913 Exit_test: ! 1914 OFF KEY 1 1915 OFF KEY 8 1916 ! 1917 SUBEND ! Do_test 1918 ! 1919 ! 1920 Ck_connections: SUB Ck_connections(Connection$,Quit_flag) 1921 ! 1922 IF Quit_flag=3 THEN SUBEXIT 1923 ! 1924 COM /Test_flags/Test_number,Sequence_type,Last_test 1925 COM /Equipment/Present(*),Power_mtr_avail,Counter_avail,Sensor_avail(*),Source_avail(*),Source2_avail(*),Enough_equip(*) 1926 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 1927 ! 1928 Power_meter$=VAL$(Power_mtr_avail)&"A" 1929 Counter$=VAL$(Counter_avail)&"A" 1930 IF Test_number>0 THEN ! Test_number=0 for ref level cal 1931 Sensor$=VAL$(Sensor_avail(Test_number))&"A" 1932 Source$=VAL$(Source_avail(Test_number))&"A" 1933 IF Source_avail(Test_number)=83401 THEN Source$="8340A/B" 1934 IF Source_avail(Test_number)=83402 THEN Source$="83640A/650A" 1935 IF Source2_avail(Test_number)=83401 THEN Source2$="8340A/B" 1936 IF Source2_avail(Test_number)=83402 THEN Source2$="83640A/650A" 1937 IF Source2_avail(Test_number)=3335 THEN Source2$="3335A" 1938 END IF 1939 ! 1940 Quit_flag=2 1941 First_pass=1 1942 ! 1943 SELECT Connection$ 1944 ! 1945 CASE "CAL TO DUT" ! Rev B.00.00 Modified for finer REF LVL CAL 1946 ! resolution 1947 ! 1948 Dut("READ F/W REVISION",Rev) 1949 SELECT Rev 1950 CASE <=920528 1951 Max_dac=34 1952 CASE 921111 1953 Max_dac=-529 1954 CASE >921111 1955 Max_dac=529 1956 END SELECT 1957 ! 1958 DISP "Checking that calibrator is connected to DUT RF INPUT..." 1959 Dut("IP,CENTER FREQ=300E6,SPAN=20E6,SINGLE SWEEP") 1960 LOOP 1961 Dut("REF LEVEL CAL="&VAL$(Max_dac)&",TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp1) 1962 Dut("REF LEVEL CAL="&VAL$(-Max_dac)&",TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp2) 1963 Dut("REF LEVEL CAL=0") 1964 EXIT IF Marker_amp1>=-10 AND (Marker_amp1-Marker_amp2)>=5 1965 IF First_pass THEN 1966 First_pass=0 1967 Prompt_user("Connect the DUT CAL OUT to the DUT RF INPUT.",Quit_flag) 1968 ELSE 1969 IF Marker_amp1<-10 THEN 1970 Prompt_user("ERROR: Maximum cal amplitude < -10 dBm.",Quit_flag) 1971 ELSE 1972 Prompt_user("ERROR: Ref Level Cal adjustment range < 5 dB.",Quit_flag) 1973 END IF 1974 END IF 1975 EXIT IF Quit_flag=3 1976 END LOOP 1977 DISP 1978 ! 1979 CASE "REF TO COUNTER" 1980 Prompt_user("Connect DUT REF IN/OUT to "&Counter$&" 10 Hz - 500 MHz INPUT.",Quit_flag) 1981 ! 1982 CASE "CAL OUT TO COUNTER" 1983 Prompt_user("Connect DUT CAL OUTPUT to "&Counter$&" 10 Hz - 500 MHz INPUT.",Quit_flag) 1984 ! 1985 CASE "CAL TO SENSOR" 1986 Prompt_user("Connect the "&Sensor$&" to the DUT CAL OUTPUT.",Quit_flag) 1987 ! 1988 ! 1989 CASE "LO TO SENSOR" 1990 Prompt_user("Connect the "&Sensor$&" to the DUT 1ST LO OUTPUT.",Quit_flag) 1991 ! 1992 CASE "TERMINATE DUT" 1993 Prompt_user("Connect a 50 ohm termination to the DUT RF INPUT.",Quit_flag) 1994 ! 1995 ! 1996 CASE "TERMINATE LO OUT" 1997 Prompt_user("Re-connect 50 ohm termination to the DUT 1ST LO OUTPUT.",Quit_flag) 1998 ! 1999 CASE "SOURCE TO DUT" 2000 Dut("INITIALIZE,SINGLE SWEEP,ATTENUATOR=20,REF LEVEL=10,CENTER FREQ=50E6,SPAN=1E6") 2001 Source("INITIALIZE,FREQUENCY=50E6,AMPLITUDE=5") 2002 ! 2003 LOOP 2004 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp) 2005 EXIT IF ABS(Marker_amp-5)<=5 2006 IF First_pass THEN 2007 First_pass=2 2008 Out$=" RF" 2009 IF Source$="3335A" THEN Out$=" 50 ohm" 2010 Prompt_user("Connect the "&Source$&Out$&" OUTPUT to the DUT RF INPUT.",Quit_flag) 2011 ELSE 2012 CALL Prompt_user("ERROR: "&Source$&" signal not in +5 +/- 5 dBm range.",Quit_flag) 2013 END IF 2014 EXIT IF Quit_flag=3 2015 END LOOP 2016 ! 2017 CASE "SOURCE NOT LOCKED TO DUT" ! Only checks for 8663 or 8340A/B not locked to the DUT. 2018 IF Source$="8663A" THEN 2019 LOOP 2020 Locked_souce=0 2021 CALL Source("CHECK FREQ LOCK",Locked_source) 2022 EXIT IF NOT Locked_source 2023 Prompt_user("Lock the 8662/63A to its internal frequency reference.",Quit_flag) 2024 EXIT IF Quit_flag=3 2025 END LOOP 2026 END IF 2027 ! 2028 IF (Source_avail(Test_number)=83401) OR (Source_avail(Test_number)=83402) THEN 2029 LOOP 2030 Source("EXT FREQ REF?",Ext_freq_ref) 2031 EXIT IF NOT Ext_freq_ref 2032 IF Source_avail(Test_number)=83401 THEN CALL Prompt_user("Set the "&Source$&" FREQUENCY STANDARD switch to INT.",Quit_flag) 2033 IF Source_avail(Test_number)=83402 THEN CALL Prompt_user("Disconnect the 10 MHz reference from the "&Source$&".",Quit_flag) 2034 EXIT IF Quit_flag=3 2035 END LOOP 2036 END IF 2037 ! 2038 CASE "LOCK SOURCE TO DUT" ! Only applies to 8340s and 83640/650s 2039 Source("FREQUENCY="&VAL$(FNF_max)&",AMPLITUDE=3") 2040 LOOP ! This loops checks that source is locked, but not necessarily 2041 ! to the DUT. 2042 Source("EXT FREQ REF?",Ext_freq_ref) 2043 Source("UNLOCKED?",Unlocked) 2044 Source("OVEN COLD?",Oven_cold) 2045 Source("UNLEVELLED?",Unlevelled) 2046 EXIT IF Ext_freq_ref AND NOT Unlocked AND NOT Oven_cold AND NOT Unlevelled 2047 IF Unlocked THEN 2048 IF Source_avail(Test_number)=83401 THEN CALL Prompt_user("Connect DUT REF IN/OUT to the "&Source$&" EXT FREQ STD.",Quit_flag) 2049 IF Source_avail(Test_number)=83402 THEN CALL Prompt_user("Connect DUT REF IN/OUT to the "&Source$&" REF INPUT",Quit_flag) 2050 ELSE 2051 IF NOT Ext_freq_ref THEN 2052 IF Source_avail(Test_number)=83401 THEN CALL Prompt_user("Set the "&Source$&" FREQUENCY STANDARD switch to EXT.",Quit_flag) 2053 IF Source_avail(Test_number)=83402 THEN CALL Prompt_user("Connect DUT REF IN/OUT to the "&Source$&" REF INPUT",Quit_flag) 2054 ELSE 2055 IF Oven_cold THEN 2056 Prompt_user("ERROR: "&Source$&" has a cold oven.",Quit_flag) 2057 ELSE 2058 Prompt_user("ERROR: "&Source$&" is unlevelled.",Quit_flag) 2059 END IF 2060 END IF 2061 END IF 2062 EXIT IF Quit_flag=3 2063 END LOOP 2064 ! 2065 IF Source_avail(Test_number)=83401 THEN ! 8340A/B is being used 2066 LOOP ! This loop checks that source is indeed locked to DUT ! 2067 OUTPUT @Dut;"FREF EXT;" 2068 WAIT 1 2069 Source("UNLOCKED?",Trial_1) 2070 OUTPUT @Dut;"FREF INT;" 2071 WAIT 5 2072 Source("UNLOCKED?",Trial_2) 2073 EXIT IF Trial_1 AND NOT Trial_2 2074 Prompt_user("Connect DUT REF IN/OUT to the "&Source$&" EXT FREQ STD.",Quit_flag) 2075 EXIT IF Quit_flag 2076 END LOOP 2077 Dut("ADJUST ALL") 2078 END IF 2079 IF Source_avail(Test_number)=83402 THEN ! 83640/650 is being used 2080 LOOP ! This loop checks that source is indeed locked to DUT ! 2081 OUTPUT @Dut;"FREF EXT;" 2082 WAIT 1 2083 Source("EXT FREQ REF?",Trial_1) 2084 OUTPUT @Dut;"FREF INT;" 2085 WAIT 5 2086 Source("EXT FREQ REF?",Trial_2) 2087 EXIT IF NOT Trial_1 AND Trial_2 2088 Prompt_user("Connect DUT REF IN/OUT to the 83640A/650A REF INPUT.",Quit_flag) 2089 EXIT IF Quit_flag 2090 END LOOP 2091 Dut("ADJUST ALL") 2092 END IF 2093 ! 2094 CASE "LOCK SOURCE2 TO DUT" ! Only applies to 8340s and 85640/650s 2095 Source2("FREQUENCY=22E9,AMPLITUDE=3") 2096 LOOP ! This loop checks that source is locked, but not necessarily 2097 ! to the DUT. 2098 Source2("EXT FREQ REF?",Ext_freq_ref) 2099 Source2("UNLOCKED?",Unlocked) 2100 Source2("OVEN COLD?",Oven_cold) 2101 Source2("UNLEVELLED?",Unlevelled) 2102 EXIT IF Ext_freq_ref AND NOT Unlocked AND NOT Oven_cold AND NOT Unlevelled 2103 IF Unlocked THEN 2104 IF Source2_avail(Test_number)=83401 THEN CALL Prompt_user("Connect DUT REF IN/OUT to the "&Source2$&" EXT FREQ STD.",Quit_flag) 2105 IF Source2_avail(Test_number)=83402 THEN CALL Prompt_user("Connect DUT REF IN/OUT to the "&Source2$&" REF INPUT",Quit_flag) 2106 ELSE 2107 IF NOT Ext_freq_ref THEN 2108 IF Source2_avail(Test_number)=83401 THEN CALL Prompt_user("Set the "&Source2$&" FREQUENCY STANDARD switch to EXT.",Quit_flag) 2109 IF Source2_avail(Test_number)=83402 THEN CALL Prompt_user("Connect DUT REF IN/OUT to the "&Source2$&" REF INPUT",Quit_flag) 2110 ELSE 2111 IF Oven_cold THEN 2112 Prompt_user("ERROR: "&Source2$&" has a cold oven.",Quit_flag) 2113 ELSE 2114 Prompt_user("ERROR: "&Source2$&" is unlevelled.",Quit_flag) 2115 END IF 2116 END IF 2117 END IF 2118 EXIT IF Quit_flag=3 2119 END LOOP 2120 ! 2121 IF Source2_avail(Test_number)=83401 THEN ! 8340A/B is being used 2122 LOOP ! This loop checks that source is indeed locked to DUT ! 2123 OUTPUT @Dut;"FREF EXT;" 2124 WAIT 1 2125 Source2("UNLOCKED?",Trial_1) 2126 OUTPUT @Dut;"FREF INT;" 2127 WAIT 5 2128 Source2("UNLOCKED?",Trial_2) 2129 EXIT IF Trial_1 AND NOT Trial_2 2130 Prompt_user("Connect DUT REF IN/OUT to the "&Source2$&" EXT FREQ STD.",Quit_flag) 2131 EXIT IF Quit_flag 2132 END LOOP 2133 Dut("ADJUST ALL") 2134 END IF 2135 IF Source2_avail(Test_number)=83402 THEN ! 83640/650 is being used 2136 LOOP ! This loop checks that source is indeed locked to DUT ! 2137 OUTPUT @Dut;"FREF EXT;" 2138 WAIT 1 2139 Source2("EXT FREQ REF?",Trial_1) 2140 OUTPUT @Dut;"FREF INT;" 2141 WAIT 5 2142 Source2("EXT FREQ REF?",Trial_2) 2143 EXIT IF NOT Trial_1 AND Trial_2 2144 Prompt_user("Connect DUT REF IN/OUT to the "&Source2$&" REF INPUT.",Quit_flag) 2145 EXIT IF Quit_flag 2146 END LOOP 2147 Dut("ADJUST ALL") 2148 END IF 2149 ! 2150 CASE "SOURCE TO SPLITTER TO SENSOR/DUT" 2151 Dut("INITIALIZE,SINGLE SWEEP,ATTENUATOR=20,REF LEVEL=10,CENTER FREQ=1E9,SPAN=1E6") 2152 Source("RF ON,FREQUENCY=1E9") 2153 Source2("RF OFF") 2154 Power_meter("INITIALIZE,CONTINUOUS TRIGGER") 2155 ! 2156 LOOP 2157 Source("AMPLITUDE=5") 2158 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp) 2159 Power_meter("READ",Power,1.E+9) 2160 Setup_ok=0 2161 IF ABS(Marker_amp+1)<=4 AND ABS(Power+1)<=4 THEN 2162 Source("AMPLITUDE=-5") 2163 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp) 2164 Power_meter("READ",Power,1.E+9) 2165 IF ABS(Marker_amp+11)<=4 AND ABS(Power+11)<=4 THEN Setup_ok=1 2166 END IF 2167 EXIT IF Setup_ok 2168 IF First_pass THEN 2169 First_pass=0 2170 Prompt_user("Connect "&Source$&" RF OUTPUT to 11667 Splitter input.",Quit_flag) 2171 Prompt_user("Connect splitter outputs to the "&Sensor$&" and DUT RF INPUT.",Quit_flag) 2172 ELSE 2173 IF ABS(Marker_amp+1)>5 THEN 2174 Prompt_user("ERROR: "&Source$&" signal not in -1 +/- 5 dBm range.",Quit_flag) 2175 ELSE 2176 Prompt_user("ERROR: "&Power_meter$&" doesn't read signal to be in -1 +/- 5 dBm range.",Quit_flag) 2177 END IF 2178 END IF 2179 EXIT IF Quit_flag=3 2180 END LOOP 2181 ! 2182 CASE "SOURCE2 TO SPLITTER TO SENSOR/DUT" 2183 Dut("INITIALIZE,SINGLE SWEEP,ATTENUATOR=20,REF LEVEL=10,CENTER FREQ=1E9,SPAN=1E6") 2184 Source2("RF ON,FREQUENCY=1E9") 2185 Source("RF OFF") 2186 Power_meter("INITIALIZE,CONTINUOUS TRIGGER") 2187 ! 2188 LOOP 2189 Source2("AMPLITUDE=5") 2190 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp) 2191 Power_meter("READ",Power,1.E+9) 2192 Setup_ok=0 2193 IF ABS(Marker_amp+1)<=4 AND ABS(Power+1)<=4 THEN 2194 Source2("AMPLITUDE=-5") 2195 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp) 2196 Power_meter("READ",Power,1.E+9) 2197 IF ABS(Marker_amp+11)<=4 AND ABS(Power+11)<=4 THEN Setup_ok=1 2198 END IF 2199 EXIT IF Setup_ok 2200 IF First_pass THEN 2201 First_pass=0 2202 Prompt_user("Connect "&Source2$&" RF OUTPUT to 11667 Splitter input.",Quit_flag) 2203 Prompt_user("Connect splitter outputs to the "&Sensor$&" and DUT RF INPUT.",Quit_flag) 2204 ELSE 2205 IF ABS(Marker_amp+1)>5 THEN 2206 Prompt_user("ERROR: "&Source2$&" signal not in -1 +/- 5 dBm range.",Quit_flag) 2207 ELSE 2208 Prompt_user("ERROR: "&Power_meter$&" doesn't read signal to be in -1 +/- 5 dBm range.",Quit_flag) 2209 END IF 2210 END IF 2211 EXIT IF Quit_flag=3 2212 END LOOP 2213 ! 2214 CASE "SOURCE TO DUT VIA LPF1","SOURCE TO DUT VIA LPF2" 2215 IF POS(Connection$,"LPF1") THEN Frequency=4.0E+7 2216 IF POS(Connection$,"LPF1") THEN Freq$=" 40 MHz" 2217 IF POS(Connection$,"LPF1") THEN Rejection=50 2218 IF POS(Connection$,"LPF2") THEN Frequency=2.95E+9 2219 IF POS(Connection$,"LPF2") THEN Freq$=" 2.95 GHz" 2220 IF POS(Connection$,"LPF2") THEN Rejection=75 2221 Dut("INITIALIZE,SINGLE SWEEP,ATTENUATOR=30,REF LEVEL=15,SPAN=10E3,RBW=1000") 2222 Source("RF ON,AMPLITUDE=10") 2223 ! 2224 LOOP 2225 Dut("CENTER FREQ",Frequency) 2226 Source("FREQUENCY",Frequency) 2227 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp) 2228 ! 2229 Source("FREQUENCY",2*Frequency) 2230 Dut("CENTER FREQ",2*Frequency) 2231 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp2) 2232 EXIT IF ABS(Marker_amp-10)<=8 AND Marker_amp28 THEN 2244 Prompt_user("ERROR: "&Source$&" +10 dBm signal not in +10+/-8 dBm range.",Quit_flag) 2245 ELSE 2246 Prompt_user("ERROR: Low pass filter(s) don't have at least "&VAL$(Rejection)&" dB rejection.",Quit_flag) 2247 END IF 2248 END IF 2249 IF Quit_flag=3 THEN SUBEXIT 2250 END LOOP 2251 ! 2252 CASE "SOURCES TO SPLITTER TO DUT" 2253 Dut("INITIALIZE,SINGLE SWEEP,ATTENUATOR=20,REF LEVEL=10,CENTER FREQ=50.E6,SPAN=1E6") 2254 IF Source_avail(Test_number)=3335 THEN 2255 Out$="50 ohm" 2256 ELSE 2257 Out$="RF" 2258 END IF 2259 IF Source2_avail(Test_number)=3335 THEN 2260 Out2$=" 50 ohm" 2261 ELSE 2262 Out2$=" RF" 2263 END IF 2264 ! 2265 LOOP 2266 Source("RF ON,FREQUENCY=50.E6,AMPLITUDE=5") 2267 Source2("RF OFF") 2268 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp) 2269 Source2("RF ON,FREQUENCY=50.E6,AMPLITUDE=5") 2270 Source("RF OFF") 2271 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp2) 2272 EXIT IF ABS(Marker_amp+1)<=5 AND ABS(Marker_amp2+1)<=5 2273 IF First_pass THEN 2274 First_pass=0 2275 Prompt_user("Connect "&Source$&Out$&" OUTPUT to 11667 Splitter output.",Quit_flag) 2276 Prompt_user("Connect "&Source2$&Out2$&" OUTPUT to 11667 Splitter output.",Quit_flag) 2277 Prompt_user("Connect the 11667 Splitter input to the DUT RF INPUT.",Quit_flag) 2278 ELSE 2279 IF ABS(Marker_amp+1)>5 THEN 2280 Prompt_user("ERROR: "&Source$&" +5 dBm signal not in -1 +/- 5 dBm range.",Quit_flag) 2281 ELSE 2282 Prompt_user("ERROR: "&Source2$&" +5 dBm signal not in -1 +/- 5 dBm range.",Quit_flag) 2283 END IF 2284 END IF 2285 EXIT IF Quit_flag=3 2286 END LOOP 2287 ! 2288 CASE "SOURCE AND CAL TO SPLITTER TO DUT" 2289 Dut("INITIALIZE,SINGLE SWEEP,ATTENUATOR=20,REF LEVEL=10,CENTER FREQ=50.E6,SPAN=1E6") 2290 IF Source_avail(Test_number)=3335 THEN 2291 Out$="50 ohm" 2292 ELSE 2293 Out$="RF" 2294 END IF 2295 ! 2296 LOOP 2297 Source("RF ON,FREQUENCY=50.E6,AMPLITUDE=5") 2298 Dut("CENTER FREQ=50.E6,TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp) 2299 Dut("CENTER FREQ=300.E6") 2300 Source("RF OFF") 2301 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp2) 2302 EXIT IF ABS(Marker_amp+1)<=5 AND ABS(Marker_amp2+16)<=5 2303 IF First_pass THEN 2304 First_pass=0 2305 Prompt_user("Connect "&Source$&Out$&" OUTPUT to 11667 Splitter output.",Quit_flag) 2306 Prompt_user("Connect CAL OUTPUT to 11667 Splitter output.",Quit_flag) 2307 Prompt_user("Connect the 11667 Splitter input to the DUT RF INPUT.",Quit_flag) 2308 ELSE 2309 IF ABS(Marker_amp+1)>5 THEN 2310 Prompt_user("ERROR: "&Source$&" signal not in -1 +/- 5 dBm range.",Quit_flag) 2311 ELSE 2312 Prompt_user("ERROR: CAL OUT signal not in -16 +/- 5 dBm range.",Quit_flag) 2313 END IF 2314 END IF 2315 EXIT IF Quit_flag=3 2316 END LOOP 2317 ! 2318 CASE ELSE 2319 Prompt_user("ERROR: "&Connection$&" not found in Ck_connections.") 2320 END SELECT 2321 ! 2322 SUBEND 2323 ! 2324 ! 2325 Test_3: SUB Calibrator_amp ! Calibrator Output Accuracy 2326 Calibrator_amp: ! 2327 ! 2328 DIM Test_data(1:1) 2329 MAT Test_data=(-9999) 2330 ! 2331 Power_meter("CHECK CAL",Quit_flag) ! Make sure it's cal'd. 2332 Ck_connections("CAL TO SENSOR",Quit_flag) 2333 IF Quit_flag=3 THEN SUBEXIT 2334 Power_meter("INITIALIZE,CONTINUOUS TRIGGER,READ",Amplitude,3.E+8) 2335 IF ABS(Amplitude+10)>5 THEN ! More than 5 dB off 2336 Prompt_user("ERROR: Power meter reads "&VAL$(Amplitude)&" dBm.") 2337 Prompt_user("Check that power sensor is connected to CAL OUTPUT.") 2338 Power_meter("READ",Amplitude,3.E+8) 2339 END IF 2340 Test_data(1)=Amplitude-.015 ! Subtract .015 for harmonics +0-.03 dB 2341 ! 2342 Output(Test_data(*)) 2343 ! 2344 SUBEND ! Calibrator Output Accuracy 2345 ! 2346 ! 2347 Test_1: SUB Ten_mhz_ref_acc ! 10 MHz Reference Accuracy 2348 Ten_mhz_ref_acc: ! Rev B.00.00 Modified to measure the 300 MHz 2349 ! ! CAL OUTPUT, as is done in the manual performance 2350 DIM Test_data(1:1) ! test. This yields higher effective resolution. 2351 MAT Test_data=(-9999) 2352 ! 2353 Ck_connections("CAL OUT TO COUNTER",Quit_flag) 2354 IF Quit_flag=3 THEN SUBEXIT 2355 DISP "Running 10 MHz Reference Accuracy test." 2356 ! 2357 Dut("INITIALIZE") 2358 Counter("INITIALIZE") 2359 ! 2360 Counter("FREQUENCY",Check_freq) 2361 IF ABS(Check_freq-3.E+8)>6000 THEN 2362 Prompt_user("ERROR: Counter reads "&VAL$(Check_freq)&" Hz. Check counter setup.") 2363 Counter("FREQUENCY",Check_freq) 2364 END IF 2365 Counter("FREQUENCY",Test_data(1)) 2366 ! 2367 Output(Test_data(*)) 2368 ! 2369 SUBEND ! 10 MHz Reference Accuracy 2370 ! 2371 ! 2372 Test_5: SUB Rbw_accuracy ! 2373 Res_bandwith_ac: ! Alternate Slope 900502:1100.MLG 2374 ! Rev D.00.00 Modified to support Opt EMI, 6dB BW for 100kHz & 1 MHz 2375 ! 2376 COM /Equipment/Present(1:20),Power_mtr_avail,Counter_avail,Sensor_avail(1:20),Source_avail(1:20),Source2_avail(1:20),Enough_equip(1:20) 2377 COM /Test_flags/Test_number,Sequence_type,Last_test 2378 COM /Trace_data/Trace_data(*) 2379 DIM Test_data(1:14,1:2) 2380 MAT Test_data=(-9999) 2381 ! 2382 Max_buckets=600 2383 Middle_bucket=300 2384 Min_buckets=0 2385 Max_shark_rbw=100 2386 Max_vbw=1.0E+4 2387 Test_shark=0 2388 Fracn_max_span=2.E+6 ! 2 MHz maximum Fractional-N SPAN (fundamental mixing) 2389 ! 2390 CALL Avail_bws(Max_avail,Max_specd,Min_avail,Min_specd) 2391 Test_freq=4.0E+7 2392 Ck_connections("SOURCE TO DUT",Quit_flag) 2393 IF Quit_flag=3 THEN SUBEXIT 2394 DISP "Running RES BW Accuracy and Selectivity test." 2395 ! 2396 Dut("ADJUST ALL,INITIALIZE,SINGLE SWEEP,UNITS DBM,CENTER FREQ="&VAL$(Test_freq)&",SPAN=3E6,RBW=3E5,VBW=300") 2397 Source("INITIALIZE,FREQUENCY",Test_freq) 2398 Source_amp=-2 2399 Set_sig_level(Source_amp,-2,1) 2400 ! 2401 Main_loop:! 2402 FOR Test_num=Min_avail TO Max_avail 2403 Res_bw=MIN(2.E+6,(DROUND(10^(Test_num/2-.5),1))) ! Yields 1 Hz to 2 MHz RES BW 2404 ! 2405 Shark=0 2406 IF Res_bw<=Max_shark_rbw THEN Shark=1 2407 ! 2408 Dut("REF LEVEL=0,ATTENUATOR=10,SCALE=0") 2409 ! 2410 IF Shark AND NOT Test_shark THEN 2411 GOTO Next_rbw ! Don't test Shark RBW unless explicitly told to do so 2412 ELSE 2413 IF NOT FNEmi_bw(Res_bw) THEN ! Test 3 dB BW Rev D.00.00 2414 GOSUB Setup_3db 2415 GOSUB Get_3db_data 2416 ELSE ! Test 6 dB BW Rev D.00.00 2417 GOSUB Setup_6db 2418 GOSUB Get_6db_data 2419 END IF 2420 GOSUB Find_des_bw 2421 GOSUB Span_error 2422 GOSUB Calc_rbw_accy 2423 Test_data(Test_num,1)=Rbw 2424 GOSUB Setup_60db 2425 GOSUB Get_60db_data 2426 GOSUB Find_des_bw 2427 GOSUB Span_error 2428 GOSUB Calc_slctvty 2429 Test_data(Test_num,2)=Sixty_db_bw 2430 END IF 2431 Next_rbw: ! Skip to here 2432 NEXT Test_num 2433 ! 2434 Output(Test_data(*)) 2435 ! 2436 SUBEXIT 2437 ! 2438 Setup_3db: ! Subroutine to setup for 3 dB Frequency Domain Measurement 2439 Pct_of_bw=.5 2440 Rbw_span_ratio=.5 2441 Span=MAX(Res_bw/Rbw_span_ratio,Min_span) 2442 Vbw=MIN(Res_bw*.1,Max_vbw) 2443 Dut("SCALE",1) 2444 Dut("SPAN",Span) 2445 Dut("RBW",Res_bw) 2446 Dut("VBW",Vbw) 2447 Source("FREQUENCY",Test_freq) 2448 Source("AMPLITUDE",Source_amp) 2449 Dut("CENTER FREQ",Test_freq) 2450 Dut("TRIGGER SWEEP,PEAK SEARCH,MKR TO CENTER FREQ") 2451 RETURN ! from Setup_3db 2452 ! 2453 Setup_6db: ! Subroutine to setup for 6 dB Frequency Domain Measurement 2454 ! Rev D.00.00 Added to support Option EMI 2455 Pct_of_bw=.5 2456 Rbw_span_ratio=.5 2457 Span=MAX(Res_bw/Rbw_span_ratio,Min_span) 2458 Vbw=MIN(Res_bw*.1,Max_vbw) 2459 Dut("SCALE",1) 2460 Dut("SPAN",Span) 2461 Dut("RBW",Res_bw) 2462 Dut("VBW",Vbw) 2463 Source("FREQUENCY",Test_freq) 2464 Source("AMPLITUDE",Source_amp) 2465 Dut("CENTER FREQ",Test_freq) 2466 Dut("TRIGGER SWEEP,PEAK SEARCH,MKR TO CENTER FREQ") 2467 RETURN ! from Setup_6db 2468 ! 2469 Setup_60db: ! Subroutine to setup for 60 dB Frequency Domain Measurement 2470 Pct_of_bw=6 2471 Rbw_span_ratio=.05 2472 Min_vbw=1 2473 Span=MAX(Res_bw/Rbw_span_ratio,Min_span) 2474 Vbw=MIN(Res_bw*.01,Max_vbw) 2475 Vbw=MAX(Vbw,Min_vbw) 2476 Dut("SCALE",10) 2477 Dut("SPAN",Span) 2478 Dut("RBW",Res_bw) 2479 Dut("AUTO VBW") 2480 Source("FREQUENCY",Test_freq) 2481 Source("AMPLITUDE",Source_amp) 2482 Dut("CENTER FREQ",Test_freq) 2483 Dut("TRIGGER SWEEP,PEAK SEARCH,MKR TO CENTER FREQ,VBW",Vbw) 2484 RETURN ! from Setup_60db 2485 ! 2486 Span_error: ! Subroutine to calculate correction factor for SPAN Accuracy error 2487 IF Span<=Fracn_max_span THEN 2488 Span_corrctn=1 ! 1% Fractional-N Span accuracy is acceptable; do not correct 2489 ELSE 2490 Dut("AUTO RBW,READ RBW",Auto_rbw) 2491 IF Auto_rbw<=Max_shark_rbw AND Shark=0 THEN CALL Dut("RBW",300) ! Don't allow span correction to be made in a Shark RBW 2492 F_low=Test_freq-Pct_of_bw*Rbw !Begin calculating span error. 2493 F_high=Test_freq+Pct_of_bw*Rbw 2494 Source("AMPLITUDE",Source_amp) 2495 Source("FREQUENCY",F_low) 2496 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER FREQUENCY",F1) 2497 Source("FREQUENCY",F_high) 2498 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER FREQUENCY",F2) 2499 Span_corrctn=(F2-F1)/(F_high-F_low) 2500 END IF 2501 RETURN ! from Span_error 2502 ! 2503 Get_3db_data: ! Subroutine to get trace data and amplitude target for 3 dB bandwidth accy 2504 Amptd_incr=3 2505 Dut("TRIGGER SWEEP,DUMP TRACE A") ! ,Trace_data(*)) 2506 IF Shark THEN ! Just subtract 3 dB from peak of trace 2507 Dut("PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp) 2508 Target=Marker_amp-Amptd_incr 2509 ELSE 2510 Source("AMPLITUDE",Source_amp-Amptd_incr) 2511 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp) 2512 Target=Marker_amp 2513 END IF 2514 RETURN ! from Get_3db_data 2515 ! 2516 Get_6db_data: ! Subroutine to get trace data and amplitude target for 6 dB bandwidth accy 2517 ! Rev D.00.00 Added to support Option EMI 2518 Amptd_incr=6 2519 Dut("TRIGGER SWEEP,DUMP TRACE A") ! ,Trace_data(*)) 2520 IF Shark THEN ! Just subtract 3 dB from peak of trace 2521 Dut("PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp) 2522 Target=Marker_amp-Amptd_incr 2523 ELSE 2524 Source("AMPLITUDE",Source_amp-Amptd_incr) 2525 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp) 2526 Target=Marker_amp 2527 END IF 2528 RETURN ! from Get_6db_data 2529 ! 2530 Get_60db_data: ! Subroutine to get trace data and amplitude target for 60 dB bandwidth 2531 Amptd_incr=60 2532 Source("AMPLITUDE",Source_amp) 2533 Dut("TRIGGER SWEEP,DUMP TRACE A") ! Trace_data(*) 2534 IF Shark THEN ! Just subtract 60 dB from peak of trace 2535 Dut("PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp) 2536 Target=Marker_amp-Amptd_incr 2537 ELSE 2538 Source("AMPLITUDE",Source_amp-Amptd_incr) 2539 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp) 2540 Target=Marker_amp 2541 END IF 2542 Dut("AUTO VBW") ! Improves sweep time for span error measurement 2543 RETURN ! from Get_60db_data 2544 ! 2545 Calc_rbw_accy: ! Subroutine to calculate the 3 dB bandwidth accuracy 2546 Rbw=Uncorrd_rbw*Span_corrctn 2547 Rbw_accy=100*(Rbw-Res_bw)/Res_bw 2548 RETURN ! from Calc_rbw_accy 2549 ! 2550 Calc_slctvty: ! Subroutine to calculate -60dB/-3dB bandwidth ratio (shape factor) 2551 Sixty_db_bw=Uncorrd_rbw*Span_corrctn 2552 Selectivity=Sixty_db_bw/Rbw 2553 RETURN ! from Calc_slctvty 2554 ! 2555 Find_des_bw: !Subroutine to find the desired BW based on the value of Target. 2556 ! Rev D.00.00 Changed Prompt_user text to indicate what 2557 ! bandwidth (3, 6 or 60 dB) is being measured 2558 Bucket=Min_buckets 2559 REPEAT 2560 Bucket=Bucket+1 2561 UNTIL Trace_data(Bucket)>Target OR Bucket=Max_buckets 2562 IF Bucket=Max_buckets THEN ! Major Error !!!! 2563 CALL Prompt_user("Can't find "&VAL$(Amptd_incr)&" dB point on left side.",1) 2564 SUBEXIT 2565 END IF 2566 IF Trace_data(Bucket)=Trace_data(Bucket-1) THEN ! TRAP DIVIDE-BY-0 ERROR 2567 CALL Prompt_user("Signal unstable. Connect References together.",1) 2568 SUBEXIT 2569 END IF 2570 Left_target=Bucket-((Trace_data(Bucket)-Target)/(Trace_data(Bucket)-Trace_data(Bucket-1))) 2571 Bucket=Middle_bucket 2572 REPEAT 2573 Bucket=Bucket+1 2574 UNTIL Trace_data(Bucket)0 THEN 2617 Ref_source_amp=-5 2618 Set_sig_level(Ref_source_amp,-5,.5) 2619 ELSE 2620 Ref_source_amp=-6 2621 Set_sig_level(Ref_source_amp,-6,.5) 2622 END IF 2623 Dut("MARKER OFF,MARKER ON,TRIGGER SWEEP,READ MARKER AMPLITUDE",Ref_amp) 2624 FOR J=1 TO Num_points 2625 Dut("REF LEVEL",-J*Ref_lvl_step) 2626 Source("AMPLITUDE",Ref_source_amp-J*Ref_lvl_step) 2627 Dut("CENTER FREQ",1.01E+7) 2628 IF J*Ref_lvl_step>=70 THEN CALL Dut("DIGITAL AVERAGE",Meas_amp) 2629 IF J*Ref_lvl_step<70 THEN CALL Dut("TRIGGER SWEEP,READ MARKER AMPLITUDE",Meas_amp) 2630 Test_data(I,J)=-Ref_amp+Meas_amp+J*Ref_lvl_step 2631 NEXT J 2632 NEXT I 2633 ! 2634 Output(Test_data(*)) 2635 ! 2636 SUBEND ! IF Gain Accuracy 2637 ! 2638 ! 2639 Test_8: SUB Scale_fidelity ! Scale Fidelity Test 2640 Scale_fidelity: ! 2641 ! 2642 DIM Test_data(1:4,1:3,0:14) 2643 MAT Test_data=(-9999) 2644 Min_rbw=FNMin_rbw 2645 Min_analog_rbw=300 2646 Db_ptr=1 ! dB_down pointer 2647 Cum_ptr=2 ! Cumulative fidelity pointer 2648 Inc_ptr=3 ! Incremental fidelity pointer 2649 ! 2650 Ck_connections("SOURCE TO DUT",Quit_flag) 2651 IF Quit_flag=3 THEN SUBEXIT 2652 DISP "Running Scale Fidelity test." 2653 ! 2654 ! Must do 10 dB/div in non-Shark first in early 856xEs. Reason unknown. 2655 ! 2656 Scale_fid_data: ! RBW, VBW, ST, RL, Scale, Span, dB_down, dB_down, ..., Flag 2657 DATA 300,300,0.2,8,10,0,10,20,30,40,50,60,70,80,90,94,98,-1 ! 10 dB/Div, Analog RBW 2658 DATA 10,10,0,8,10,200,10,20,30,40,50,60,70,80,90,94,98,-1 ! 10 dB/Div, Shark RBW 2659 DATA 300,300,0.2,8,2,0,2,4,6,8,10,12,14,16,18,-1 ! 2 dB/Div, Analog RBW 2660 DATA 300,300,0.2,8,0,0,2,4,6,8,10,12,14,16,18,-1 ! Linear, Analog RBW 2661 DATA -1 2662 ! 2663 Dut("INITIALIZE,UNITS DBM,SAMPLE DETECTOR,ATTENUATOR=20,REF LEVEL=8,SCALE=10") 2664 Dut("SPAN=3000,RBW=300,VBW=300,SINGLE SWEEP,CENTER FREQ=1.01E7") 2665 Source("INITIALIZE,FREQUENCY",1.01E+7) 2666 Source_amp=+4 2667 Set_sig_level(Source_amp,+4,.4) 2668 Dut("SPAN=0,SCALE=2,SWEEP TIME=.2") 2669 Peak_in_0_span(1.01E+7,3*1028,3) 2670 ! 2671 IF Min_rbw<100 THEN 2672 Dut("TRIGGER SWEEP,DONE?") !Added to avoid 8560A timing problem. 2673 Dut("AUTO SWEEP TIME") !Added in D.01.04 for DC Logger firmware. 2674 Dut("SPAN=100,RBW=10,VBW=10,SCALE=10") 2675 END IF 2676 ! 2677 RESTORE Scale_fid_data 2678 Test_num=0 2679 LOOP 2680 READ Rbw 2681 EXIT IF Rbw<0 2682 READ Vbw,Swp_time,Ref_lvl,Amp_scale,Span 2683 Test_num=Test_num+1 2684 Test_data(Test_num,1,0)=Amp_scale 2685 Test_data(Test_num,2,0)=Rbw 2686 ! 2687 Dut("REF LEVEL="&VAL$(Ref_lvl)&",SCALE="&VAL$(Amp_scale)&",SPAN="&VAL$(Span)) 2688 Dut("RBW="&VAL$(Rbw)&",VBW="&VAL$(Vbw)) 2689 IF Swp_time>0 THEN CALL Dut("SWEEP TIME="&VAL$(Swp_time)) 2690 IF Swp_time=0 THEN CALL Dut("AUTO SWEEP TIME") 2691 Dut("TRIGGER SWEEP,ADJUST CURRENT STATE,SINGLE SWEEP") 2692 Source_amp=Ref_lvl 2693 Des_err=MAX(.02,Amp_scale/100) ! Set desired error to less than one bucket; 2694 ! limit to .02 dB for case of linear scale. 2695 Set_sig_level(Source_amp,Ref_lvl,Des_err) 2696 Ref_source_amp=Source_amp 2697 Dut("PEAK SEARCH,READ MARKER AMPLITUDE,MARKER OFF,MARKER ON",Ref_mkr_amp) 2698 Point=0 2699 Prev_db_down=0 2700 LOOP 2701 READ Db_down 2702 EXIT IF Db_down<0 2703 Point=Point+1 2704 Test_data(Test_num,Db_ptr,Point)=Db_down 2705 Averages=1 2706 IF Db_down>80 AND Rbw80 AND Rbw>=Min_analog_rbw THEN CALL Dut("SWEEP TIME=2,VBW=100") 2708 Source("AMPLITUDE",Ref_source_amp-Db_down) 2709 IF Db_down>60 AND Rbw>=Min_analog_rbw THEN 2710 Dut("DIGITAL AVERAGE",Meas_mkr_amp) 2711 ELSE 2712 IF Rbw50 AND Prev_db_down<=50 THEN 2734 Ref_source_amp=Ref_source_amp+10 2735 Source("AMPLITUDE",Ref_source_amp-Db_down) 2736 Dut("ATTENUATOR=30,REF LEVEL="&VAL$(Ref_lvl+10)) 2737 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Temp_amp) 2738 Ref_mkr_amp=Temp_amp-Meas_mkr_amp+Ref_mkr_amp 2739 END IF 2740 Prev_db_down=Db_down 2741 END LOOP 2742 !IF Rbw=300 AND Amp_scale=10 THEN PAUSE 2743 END LOOP 2744 ! 2745 GOTO Skip_to_end 2746 PRINTER IS 701 2747 FOR I=1 TO 4 2748 FOR J=0 TO 14 2749 PRINT Test_data(I,1,J),Test_data(I,2,J),Test_data(I,3,J) 2750 NEXT J 2751 NEXT I 2752 PRINTER IS CRT 2753 ! 2754 Skip_to_end: ! 2755 ! 2756 Output(Test_data(*)) 2757 ! 2758 SUBEND ! Scale Fidelity 2759 ! 2760 ! 2761 Test_4: SUB Rbw_switching ! Resolution Bandwidth Switching 2762 Rbw_switching: ! 2763 ! 2764 DIM Test_data(1:14) 2765 DIM Res_bw(1:14) 2766 MAT Test_data=(-9999) 2767 ! 2768 Rbw_data: DATA 1,3,10,30,100,300,1000,3000,10E3,30E3,100E3,300E3,1E6,2E6 2769 RESTORE Rbw_data 2770 FOR I=1 TO 14 2771 READ Res_bw(I) 2772 NEXT I 2773 ! 2774 Avail_bws(Max_avail,Max_specd,Min_avail,Min_specd) 2775 Ck_connections("SOURCE TO DUT",Quit_flag) 2776 IF Quit_flag=3 THEN SUBEXIT 2777 DISP "Running RBW Switching Uncertainty test." 2778 ! 2779 Dut("INITIALIZE,SCALE=1,CENTER FREQ=5E7,SPAN=3E6,RBW=3E5,VBW=300,SINGLE SWEEP,ADJUST ALL") 2780 Source("INITIALIZE,FREQUENCY=5E7") 2781 Source_amp=0 2782 Ref_lvl=0 2783 Set_sig_level(Source_amp,Ref_lvl,.02) 2784 Ref_source_pwr=Source_amp 2785 Dut("READ MARKER AMPLITUDE",Ref_mkr_amp) ! Reference switching data 2786 ! 2787 Pass=1 2788 FOR I=Min_avail TO Max_avail 2789 Rbw=Res_bw(I) 2790 Dut("SPAN="&VAL$(MAX(100,Rbw*10))&",RBW="&VAL$(Rbw)&",VBW="&VAL$(MIN(300,MAX(10,Rbw/100)))) 2791 Set_sig_level(Source_amp,Ref_lvl,.02) 2792 Source_pwr=Source_amp 2793 Dut("READ MARKER AMPLITUDE",Mkr_amp) 2794 Test_data(I)=Mkr_amp-Ref_mkr_amp-Source_pwr+Ref_source_pwr 2795 NEXT I 2796 ! 2797 Output(Test_data(*)) 2798 ! 2799 SUBEND ! Res BW Switching 2800 ! 2801 ! 2802 Test_6: SUB Input_atten_acc 2803 Input_atten_acc: ! 2804 ! Rev C.00.00 Modified to accommodate 60 dB attenuator in 8564E/65E 2805 ! Rev D.00.00 Modified to add support of 8562E 2806 ! 2807 DIM Test_data(1:7) 2808 DIM Model$[7] 2809 DIM Mdl$[40] 2810 MAT Test_data=(-9999) 2811 ! 2812 Ck_connections("SOURCE TO DUT",Quit_flag) 2813 IF Quit_flag=3 THEN SUBEXIT 2814 DISP "Running Input Attenuator Accuracy test." 2815 ! 2816 Dut("READ MODEL NUMBER",Dummy,Mdl$) 2817 Model$=Mdl$[1,7] 2818 SELECT Model$ 2819 CASE "HP8560E","HP8561E","HP8562E","HP8563E" ! Rev D.00.00 2820 Max_index=7 ! 70 dB Input Attenuator 2821 CASE "HP8564E","HP8565E" 2822 Max_index=6 ! 60 dB Input Attenuator 2823 END SELECT 2824 ! 2825 Test_freq=5.E+7 2826 Dut("INITIALIZE,AUTOCAL OFF,SCALE=1,SPAN=1E4,RBW=1000,SINGLE SWEEP") 2827 Dut("CENTER FREQ",Test_freq) 2828 Source("INITIALIZE,FREQUENCY",Test_freq) 2829 Ref_source_amp=-5 2830 Set_sig_level(Ref_source_amp,-5,.5) 2831 ! 2832 ! CALIBRATION MEASUREMENTS 2833 ! 2834 FOR Atten_index=1 TO Max_index 2835 Source("AMPLITUDE",Ref_source_amp+10-10*Atten_index) 2836 Ref_level=-10*Atten_index+10 2837 Dut("REF LEVEL",Ref_level) 2838 IF Atten_index=1 THEN 2839 Dut("CLEAR WRITE A,VBW=1000") 2840 END IF 2841 Vbw=MIN(1000,DROUND(10^(5-Atten_index/2),1)) 2842 Dut("VBW",Vbw) 2843 Dut("TRIGGER SWEEP,READ MARKER AMPLITUDE",If_gain_mkr(Atten_index)) 2844 NEXT Atten_index 2845 ! 2846 ! TEST MEASUREMENTS 2847 ! 2848 Source("AMPLITUDE",Ref_source_amp) 2849 FOR Atten_index=1 TO Max_index 2850 Dut("ATTENUATOR="&VAL$(Atten_index*10)&",REF LEVEL",0) 2851 IF Atten_index=1 THEN CALL Dut("CLEAR WRITE A,VBW=1000") 2852 Vbw=MIN(1000,DROUND(10^(5-Atten_index/2),1)) 2853 Dut("VBW",Vbw) 2854 Dut("TRIGGER SWEEP,READ MARKER AMPLITUDE",Meas_mkr_amp) 2855 IF Atten_index=1 THEN 2856 Ref_mkr_amp=Meas_mkr_amp 2857 ELSE 2858 Test_data(Atten_index)=10*Atten_index-10 2859 Test_data(Atten_index)=Test_data(Atten_index)+Ref_mkr_amp-Meas_mkr_amp 2860 Test_data(Atten_index)=Test_data(Atten_index)-If_gain_mkr(1)+If_gain_mkr(Atten_index) 2861 END IF 2862 NEXT Atten_index 2863 ! 2864 Dut("AUTOCAL ON") 2865 Output(Test_data(*)) 2866 ! 2867 SUBEND ! Input Attenuator Accuracy 2 - 20 GHz 2868 ! 2869 ! 2870 Test_11: SUB Freq_readout_ac 2871 Freq_readout_ac: ! 2872 ! Rev D.00.00 Added support for 8562E 2873 ! 2874 INTEGER X,Y,X_max 2875 ! 2876 SELECT FNF_max 2877 CASE <3.E+9 2878 X_max=1 2879 CASE <7.E+9 2880 X_max=2 2881 CASE <1.35E+10 ! Rev D.00.00 Added for 8562E 2882 X_max=3 2883 CASE <2.68E+10 2884 X_max=5 2885 CASE <=4.0E+10 2886 X_max=7 2887 CASE <=5.0E+10 2888 X_max=8 2889 CASE ELSE 2890 X_max=8 2891 END SELECT 2892 ! 2893 ALLOCATE Test_data(1:X_max,1:7,1:5) 2894 MAT Test_data=(-9999) 2895 ! 2896 Ck_connections("LOCK SOURCE TO DUT",Quit_flag) 2897 Ck_connections("SOURCE TO DUT",Quit_flag) 2898 IF Quit_flag=3 THEN SUBEXIT 2899 DISP "Running Frequency Readout/ Frequency Counter Accuracy test." 2900 ! 2901 Cf_data: DATA 1.5E9,4E9,9E9,16E9,21E9,29E9,35E9,45E9 2902 FOR X=1 TO X_max 2903 READ Test_data(X,1,1) 2904 FOR Y=2 TO 7 2905 Test_data(X,Y,1)=Test_data(X,1,1) 2906 NEXT Y 2907 NEXT X 2908 ! 2909 Span_data: DATA 1E6,2E6,10E6,20E6,50E6,100E6,1E9 2910 RESTORE Span_data 2911 FOR Y=1 TO 7 2912 READ Test_data(1,Y,2) 2913 FOR X=2 TO X_max 2914 Test_data(X,Y,2)=Test_data(1,Y,2) 2915 NEXT X 2916 NEXT Y 2917 ! 2918 Dut("INITIALIZE,SINGLE SWEEP,REF LEVEL=-10,MARKER FREQ COUNT RES=1") 2919 Source("INITIALIZE") 2920 ! 2921 FOR X=1 TO X_max 2922 Dut("CENTER FREQ",Test_data(X,1,1)) 2923 Dut("SPAN",Test_data(X,6,2)) 2924 Source("FREQUENCY",Test_data(X,1,1)) 2925 Set_sig_level(-20,-20,1) 2926 FOR Y=1 TO 7 2927 Dut("SPAN",Test_data(X,Y,2)) 2928 Dut("READ RBW",Test_data(X,Y,3)) 2929 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER FREQUENCY",Test_data(X,Y,4)) 2930 NEXT Y 2931 Dut("COUNT MARKER FREQUENCY",Test_data(X,1,5)) 2932 NEXT X 2933 ! 2934 Output(Test_data(*)) 2935 ! 2936 SUBEND ! Frequency Readout Accuracy 2937 ! 2938 ! 2939 Test_9: SUB Residual_fm 2940 Residual_fm: ! 2941 ! REVISED 900315:1715 MLG 2942 ! 2943 COM /Conditions/Conditions$(*) 2944 COM /Trace_data/Trace_data(*) 2945 REAL Test_data(1:16,1:2),Rbw_char_data(0:50,1:2) 2946 MAT Test_data=(-9999) 2947 ! 2948 Ck_connections("SOURCE TO DUT",Quit_flag) 2949 Ck_connections("SOURCE NOT LOCKED TO DUT",Quit_flag) 2950 IF Quit_flag=3 THEN SUBEXIT 2951 DISP "Running Residual FM test." 2952 ! 2953 Margin=0 2954 ! 2955 Rbw=300 2956 St=.3 2957 Scale=2 2958 Db_down=20 2959 Rl_offset=-Db_down+5*Scale 2960 Delta_minus_frq=500 2961 Slope=21 2962 Freq_range=800 2963 ! 2964 Num_char_points=SIZE(Rbw_char_data,1)-1 2965 ! Res_fm_data:DATA 500E6,2.8E9,6.4E9,12.9E9,19.6E9,21.9E9,26.4E9 ! Use with 8340A/B 2966 Res_fm_data: DATA 500E6,1.0E9 ! Use with 8662/63 2967 RESTORE Res_fm_data 2968 Num_test_points=2 2969 IF Conditions$(1,2)[3,6]="8560" THEN Num_test_points=2 2970 IF Conditions$(1,2)[3,6]="8561" THEN Num_test_points=2 2971 ! 2972 Dut("INITIALIZE,ATTENUATOR=0,SCALE="&VAL$(Scale)&",SINGLE SWEEP") 2973 Source("INITIALIZE") 2974 ! 2975 FOR Index=1 TO Num_test_points 2976 READ Test_data(Index,1) 2977 Source("INITIALIZE,AMPLITUDE=-20,FREQUENCY",Test_data(Index,1)) 2978 Dut("REF LEVEL=-20,SPAN=1E6,RBW=3E3,AUTO VBW,AUTO SWEEP TIME,CENTER FREQ",Test_data(Index,1)) 2979 IF (Use_pp AND Test_data(Index,1)>2.9E+9) THEN 2980 Dut("SCALE=10,TRIGGER SWEEP,PEAK SEARCH,PEAK PRESELECTOR,DONE?",Dummy_var) 2981 Dut("SCALE",Scale) 2982 END IF 2983 ! 2984 Set_sig_level(-24+12,-24,1,-60)! TEST LEVEL + LOSS, Des pwr,Err, Min_level 2985 Dut("PEAK SEARCH,MARKER TRACK ON,SPAN=10E3,TRIGGER SWEEP,MARKER TRACK OFF,RBW",Rbw) 2986 Dut("SPAN=5E4,RBW=3E3,TRIGGER SWEEP,PEAK SEARCH,MKR TO CENTER FREQ,SPAN=1E4,RBW=1E3,TRIGGER SWEEP,PEAK SEARCH,MKR TO CENTER FREQ") 2987 Dut("SPAN=2500,RBW="&VAL$(Rbw)&",TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE,MKR TO CENTER FREQ",Peak_amp) 2988 Dut("SPAN=0,SWEEP TIME",St) 2989 ! 2990 Peak_source_frq=Test_data(Index,1) 2991 IF Index=1 THEN 2992 Dut("VBW=3") 2993 Dut("REF LEVEL",Peak_amp+2) 2994 Peak_in_0_span(Test_data(Index,1),Rbw/100*64,Rbw/100,Peak_source_frq,Peak_amp) 2995 Ref_level=PROUND(Peak_amp+Rl_offset,-1) 2996 Dut("REF LEVEL",Ref_level) 2997 FOR Char_index=0 TO Num_char_points 2998 Delta_freq=Freq_range*Char_index/Num_char_points 2999 Source("FREQUENCY",Peak_source_frq+Delta_freq) 3000 Dut("TRIGGER SWEEP,READ MARKER AMPLITUDE",Marker_amp) 3001 IF Char_index=0 AND Rl_offset>=0 THEN Peak_amp=Marker_amp 3002 Rbw_char_data(Char_index,1)=Delta_freq 3003 Rbw_char_data(Char_index,2)=Marker_amp-Peak_amp 3004 IF Char_index>0 THEN 3005 IF Rbw_char_data(Char_index,2)>Rbw_char_data(Char_index-1,2) THEN Rbw_char_data(Char_index,2)=Rbw_char_data(Char_index-1,2)-.01 3006 END IF ! ABOVE PREVENTS POSSIBLE DIVIDE BY 0 ERROR LATER ON 3007 NEXT Char_index 3008 Rbw_char_data(Num_char_points,2)=-Scale*10.5!BELOW BOS 3009 Dut("VBW=1") 3010 ELSE 3011 Ref_level=Peak_amp+Rl_offset 3012 Dut("REF LEVEL",Ref_level) 3013 END IF 3014 ! 3015 Source("FREQUENCY",Peak_source_frq) 3016 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp) 3017 IF Marker_amp<=Ref_level-Scale*10 THEN 3018 Test_data(Index,2)=999.99!SHOULD SET PASS=0 3019 ELSE 3020 Minus_freq=Peak_source_frq+Delta_minus_frq 3021 Loop_counter=0 3022 Loop_limit=20 3023 LOOP 3024 Loop_counter=Loop_counter+1 3025 EXIT IF Loop_counter=Loop_limit 3026 Source("FREQUENCY",Minus_freq) 3027 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Max_amp) 3028 Dut("MIN SEARCH,READ MARKER AMPLITUDE",Min_amp) 3029 Err=(Max_amp+Min_amp)/2-Peak_amp+Db_down!SET TO Peak_amp-25) 3030 EXIT IF ABS(Err)<=Scale 3031 Minus_freq=INT(10*(Minus_freq+Slope*Err))/10 3032 END LOOP 3033 ! 3034 Dut("AUTO VBW,SWEEP TIME",St) 3035 Test_data(Index,2)=0 3036 Sum_x=0 3037 Sum_x2=0 3038 N=0 3039 Exit_loop=0 3040 Num_glitches=0 3041 REPEAT 3042 Glitched=0 3043 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Max_amp) 3044 Dut("MIN SEARCH,READ MARKER AMPLITUDE",Min_amp) 3045 ! 3046 Min_num=999 3047 Max_num=-999 3048 Bucket_sum=0 3049 Dut("TRIGGER SWEEP,DUMP TRACE A") 3050 FOR I=125 TO 224 3051 Bucket_sum=Bucket_sum+Trace_data(I)/100 3052 NEXT I 3053 FOR I=125 TO 164 3054 Bucket_sum=Bucket_sum+(Trace_data(I+100)-Trace_data(I))/100 3055 Max_num=MAX(Max_num,Bucket_sum) 3056 Min_num=MIN(Min_num,Bucket_sum) 3057 NEXT I 3058 ! 3059 Err=(Max_num+Min_num)/2-Peak_amp+Db_down! CONSTANTLY ADJUST FREQ 3060 Minus_freq=INT(10*(Minus_freq+Slope*Err))/10 ! -Db_down dB POINT 3061 Source("FREQUENCY",Minus_freq) 3062 IF Max_amp>=Ref_level OR Min_amp<=Ref_level-Scale*10 THEN Glitched=1 3063 IF Glitched THEN 3064 Num_glitches=Num_glitches+1 3065 IF Num_glitches>=5 AND Num_glitches>(N/5) THEN 3066 Exit_loop=1 3067 Flag=2 3068 CALL Prompt_user("Signal too unstable.",Flag) 3069 IF Flag=3 THEN SUBEXIT ! User wants to quit the test. 3070 END IF 3071 ELSE 3072 Dbc=Max_num-Peak_amp 3073 Data_index=0 3074 REPEAT 3075 Data_index=Data_index+1 3076 UNTIL Rbw_char_data(Data_index,2)1 THEN Std_dev=SQR((MAX(0,Sum_x2-Sum_x^2/N))/(N-1)) 3091 IF N>=5 THEN 3092 Unc=2.6*Std_dev/SQR(N-1) 3093 IF ABS(Sum_x/N+2*Std_dev-Test_spec)>Unc THEN Exit_loop=1 3094 END IF 3095 END IF 3096 UNTIL Exit_loop 3097 IF Std_dev<>0 THEN Test_data(Index,2)=Sum_x/N+2*Std_dev 3098 END IF 3099 ! 3100 NEXT Index 3101 Output(Test_data(*)) 3102 ! 3103 SUBEND ! Residual FM Test 3104 ! 3105 ! 3106 Test_12: SUB Span_accuracy 3107 Span_accuracy: ! 3108 COM /Conditions/Conditions$(*) 3109 COM /Test_flags/Test_number,Sequence_type,Last_test 3110 COM /Equipment/Present(*),Power_mtr_avail,Counter_avail,Sensor_avail(*),Source_avail(*),Source2_avail(*),Enough_equip(*) 3111 ! 3112 DIM Test_data(1:31,1:4) 3113 MAT Test_data=(-9999) 3114 ! 3115 Ck_connections("LOCK SOURCE TO DUT",Quit_flag) 3116 Ck_connections("SOURCE AND CAL TO SPLITTER TO DUT",Quit_flag) 3117 IF Quit_flag=3 THEN SUBEXIT 3118 ! 3119 DISP "Running Frequency Span Accuracy test." 3120 ! 3121 ! Center frequency,span 3122 Span_data_6xe: ! 3123 DATA 300.0004E6,1E3 3124 DATA 300.0008E6,2E3 3125 DATA 300.002E6,5E3 3126 DATA 300.004E6,10E3 3127 DATA 300.008E6,20E3 3128 DATA 300.02E6,50E3 3129 DATA 300.04E6,100E3 3130 DATA 300.08E6,200E3 3131 DATA 300.2E6,500E3 3132 DATA 300.4E6,1E6 3133 DATA 300.8E6,2E6 3134 DATA 300.8E6,2.01E6 3135 DATA 302.0E6,5E6 3136 DATA 304.0E6,10E6 3137 DATA 308.0E6,20E6 3138 DATA 320.0E6,50E6 3139 DATA 340.0E6,100E6 3140 DATA 380.0E6,200E6 3141 DATA 500.0E6,500E6 3142 DATA 700.0E6,1E9 3143 DATA 1100.0E6,2E9 3144 DATA -1,-1 3145 ! 3146 RESTORE Span_data_6xe 3147 Dut("INITIALIZE,SINGLE SWEEP,REF LEVEL=-10") 3148 Source("INITIALIZE") 3149 Source2("INITIALIZE") 3150 Index=0 3151 LOOP 3152 READ Center_freq,Span 3153 EXIT IF Center_freq<0 3154 Index=Index+1 3155 Test_data(Index,1)=Center_freq 3156 Test_data(Index,2)=Span 3157 Test_data(Index,3)=Span*.8 3158 Dut("CENTER FREQ",Center_freq) 3159 Dut("SPAN",Span) 3160 Source("AMPLITUDE=-10,FREQUENCY",Center_freq+Span*.4) 3161 IF Span=2.01E+6 THEN CALL Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER FREQ",Freq1)! Anti EYO hysterisis band-aid 3162 IF Span=2.01E+6 THEN CALL Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER FREQ",Freq1)! Anti EYO hysterisis band-aid 3163 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER FREQ",Freq1) 3164 Dut("NEXT PEAK,READ MARKER FREQ",Freq2) 3165 Test_data(Index,4)=(ABS(Freq2-Freq1)) 3166 END LOOP 3167 ! 3168 Output(Test_data(*)) 3169 ! 3170 SUBEND ! Span Accuracy 3171 ! 3172 ! 3173 Test_14: SUB Frequency_resp 3174 Frequency_resp: ! 3175 ! Rev C.00.00 Added support for 8564E/8565E. Required increasing size 3176 ! of Test_data(*),Out_data(*), and Summary_data(*) 3177 ! Rev D.00.00 Added support for 8562E. 3178 ! Rev D.02.00 Added call to sub to check flatness over narrow portion 3179 ! of Band 0. 3180 ! This version is for the 856xE analyzers ONLY 920604.0755: BDT 3181 COM /Conditions/Conditions$(*) 3182 COM /Equipment/Present(1:20),Power_mtr_avail,Counter_avail,Sensor_avail(1:20),Source_avail(1:20),Source2_avail(1:20),Enough_equip(1:20) 3183 COM /Test_flags/Test_number,Sequence_type,Last_test 3184 COM /Coupling/ INTEGER Ac_dc 3185 DIM Test_data(1:564,1:2,1:2),Summary_data(1:44),Out_data(1:564,1:2) 3186 DIM Title$[60] 3187 MAT Test_data=(-9999) ! This value referred to in Test_Band0 3188 INTEGER I,J,Max_ac_dc 3189 ! 3190 Max_freq=FNF_max 3191 Min_freq=FNF_min 3192 Min_inst_span=FNMin_span 3193 Max_ac_dc=FNAc_dc_paths 3194 ! 3195 FOR Ac_dc=1 TO Max_ac_dc ! DO 2 PASSES FOR DC AND AC COUPLING 3196 IF Source_avail(Test_number) THEN CALL Ck_connections("SOURCE TO DUT",Quit_flag) 3197 ! 3198 IF Source_avail(Test_number) AND Quit_flag<>3 THEN ! 3335A available 3199 ! do low frequency portion of test 3200 Low_band: DATA 50E6,45E6,40E6,35E6,30E6,25E6,20E6,15E6,10E6,5E6,3E6,1E6,300E3,100E3,30E3,9E3,3E3,1E3,500,200 3201 ! 10 kHz changed to 9 kHz so it picks up low end of 8563E 3202 ! 3203 DISP "Running Frequency Response test." 3204 Dut("INITIALIZE,SCALE=1,CENTER FREQ=5E7,SPAN=500,RBW=100,VBW=100,SINGLE SWEEP") ! Rev D.00.00 Changed span to 500 Hz 3205 Max_span=500 ! Rev D.00.00 Changed to 500 Hz from 10 kHz 3206 Max_rbw=100 ! Rev C.00.00 Changed to 100 Hz from 300 Hz 3207 IF Max_ac_dc>1 THEN 3208 IF Ac_dc=1 THEN 3209 CALL Dut("COUPLE DC") !FIRST PASS DC COUPLED 3210 ELSE 3211 Dut("COUPLE AC") !SECOND PASS AC COUPLED 3212 END IF 3213 END IF 3214 Source("INITIALIZE,FREQUENCY=5E7,AMPLITUDE=-5") 3215 Set_sig_level(-5,-5,.05) 3216 Dut("READ MARKER AMPLITUDE",Ref_amp_50mhz) 3217 ! 3218 RESTORE Low_band 3219 FOR Data_point=20 TO 1 STEP -1 3220 READ Test_data(Data_point,1,Ac_dc) ! Frequency 3221 Take_meas=1 3222 IF Ac_dc=2 AND Test_data(Data_point,1,Ac_dc)<1.00E+5 THEN 3223 Test_data(Data_point,1,Ac_dc)=Test_data(Data_point+1,1,Ac_dc) 3224 Test_data(Data_point,2,Ac_dc)=Test_data(Data_point+1,2,Ac_dc) 3225 Take_meas=0 3226 END IF 3227 IF Test_data(Data_point,1,Ac_dc)1 THEN 3270 IF Ac_dc=1 THEN 3271 CALL Dut("COUPLE DC") !FIRST PASS DC COUPLED 3272 ELSE 3273 Dut("COUPLE AC") !SECOND PASS AC COUPLED 3274 END IF 3275 END IF 3276 ! 3277 Title$="Frequency Response " 3278 IF Max_ac_dc=2 THEN ! Only add (AC) or (DC) if coupling is selectable 3279 IF Ac_dc=1 THEN 3280 Title$=Title$&"(DC) " 3281 ELSE 3282 Title$=Title$&"(AC) " 3283 END IF 3284 END IF 3285 ! 3286 Freq=MAX(Min_freq,Test_data(1,1,Ac_dc)) 3287 SELECT Freq 3288 CASE <1.E+3 3289 Title$=Title$&VAL$(Freq)&" Hz - " 3290 CASE <1.E+6 3291 Title$=Title$&VAL$(Freq/1.E+3)&" kHz - " 3292 END SELECT 3293 ! 3294 SELECT Max_freq 3295 CASE <4.E+9 3296 Top_freq=3 3297 Xdiv=1 3298 Title$=Title$&"2.9 GHz" 3299 CASE <7.E+9 3300 Top_freq=6.7 3301 Xdiv=1 3302 Title$=Title$&"6.5 GHz" 3303 CASE <1.35E+10 ! Rev D.00.00 3304 Top_freq=13.4 3305 Xdiv=2 3306 Title$=Title$&"13.2 GHz" 3307 CASE <2.3E+10 3308 Top_freq=22.2 3309 Xdiv=2 3310 Title$=Title$&"22 GHz" 3311 CASE <2.7E+10 3312 Top_freq=26.7 3313 Xdiv=2 3314 Title$=Title$&"26.5 GHz" 3315 CASE <4.1E+10 ! Rev C.00.00 3316 Top_freq=40.2 3317 Xdiv=4 3318 Title$=Title$&"40 GHz" 3319 CASE <5.1E+10 ! Rev C.00.00 3320 Xdiv=4 3321 Top_freq=50.2 3322 Title$=Title$&"50 GHz" 3323 END SELECT 3324 Setup_graph(1.E+9,-.2,Top_freq,Xdiv,"Frequency (GHz)",1,-6,6,2,"Amplitude (dB)",Title$) 3325 ! 3326 Source_amp=-3 3327 Set_sig2_level(Source_amp,-10,.1) ! Find 300 MHz correction value 3328 Dut("READ MARKER AMPLITUDE",Marker_amp) 3329 Power_meter("READ",Meas_power,3.E+8) 3330 Corr_300mhz=Marker_amp-Meas_power 3331 ! 3332 Dut("CENTER FREQ",5.0E+7) ! Find 50 MHz correction value 3333 Source2("FREQUENCY",5.0E+7) 3334 Set_sig2_level(Source_amp,-10,2,-30) 3335 Dut("READ MARKER AMPLITUDE",Marker_amp) 3336 Power_meter("READ",Meas_power,5.E+7) 3337 Corr_50mhz=Marker_amp-Meas_power 3338 ! 3339 MOVE 0,0 3340 FOR Point=1 TO 20 ! Adjust low freq data 3341 Test_data(Point,2,Ac_dc)=Test_data(Point,2,Ac_dc)-Corr_300mhz+Corr_50mhz 3342 PLOT Test_data(Point,1,Ac_dc)/1.E+9,Test_data(Point,2,Ac_dc),1 3343 NEXT Point 3344 ! 3345 Data_point=20 3346 FOR Test_freq=9.0E+7 TO Max_freq STEP 1.E+8 ! Starting at 90 MHz and going in 100 MHz 3347 Data_point=Data_point+1 ! increments avoids most of the flatness 3348 Source2("FREQUENCY",Test_freq) ! correction data points. 920605 BDT 3349 Dut("CENTER FREQ",Test_freq) 3350 Set_sig2_level(Source_amp,-10,2,-15) 3351 Dut("READ MARKER AMPLITUDE",Marker_amp) 3352 Power_meter("READ",Meas_power,Test_freq) 3353 Test_data(Data_point,1,Ac_dc)=Test_freq 3354 Test_data(Data_point,2,Ac_dc)=Marker_amp-Meas_power-Corr_300mhz 3355 Plot_type=1 3356 !7/89 IF FNBand(Test_data(Data_point,1,Ac_dc))<>FNBand(Test_data(Data_point-1,1,Ac_dc)) THEN Plot_type=-2 !Changing bands on graph 3357 PLOT Test_data(Data_point,1,Ac_dc)/1.E+9,Test_data(Data_point,2,Ac_dc),Plot_type 3358 NEXT Test_freq 3359 ! 3360 GRAPHICS OFF 3361 ! 3362 FOR I=1 TO 564 ! Rev C.00.00 Changed from 315 to 564 3363 FOR J=1 TO 2 3364 Out_data(I,J)=Test_data(I,J,Ac_dc) 3365 NEXT J 3366 NEXT I 3367 ! 3368 CALL Calc_print_flat(Out_data(*),Pass,Summary_data(*)) 3369 FOR I=1 TO 44 ! Rev C.00.00 Changed from 28 to 44 3370 Out_data(520+I,1)=Summary_data(I) ! Rev C.00.00 Changed from 285 to 520 3371 NEXT I 3372 Output(Out_data(*)) 3373 ! 3374 IF Ac_dc=1 THEN CALL Test_band0(Out_data(*)) 3375 ! 3376 NEXT Ac_dc 3377 ! 3378 ! Flatness 1 kHz to 26.5 GHz (8563E) 3379 ! or (8560: to 2.9GHz) or (8561: to 6.5GHz) or (8562E: to 13.2 GHz) 3380 ! or (8564E: to 40 GHz) or (8565E: to 50 GHz) 3381 End_freq_resp: SUBEND 3382 ! 3383 ! 3384 Calc_print_flat: SUB Calc_print_flat(Test_data(*),Pass,Output_data(*)) ! 891006:1110.MLG 3385 ! Rev D.00.00 Fixed bug related to SELECT/CASE statements for 8564E/ 3386 ! 8565E. The CASE statements specified limits of 410 GHz 3387 ! and 510 GHz, when they should be 41 GHz and 51 GHz. 3388 ! Added support for 8562E 3389 ! Rev C.00.00 Revised to add support for 8564E/8565E. Required redimensioning 3390 ! Band_min(*),Band_max(*),Btob_max_to_min(*) and adding data for 3391 ! Bands 5 and 6. 3392 ! Although this test will handle SAs with up to 5 bands, only bands 0 to 3 will be used 3393 ! with 8563E. 920604:0750.BDT 3394 ! Frequency response relative to calibrator frequency: 3395 ! Abs_min - Minimum response, all frequencies 3396 ! Abs_max - Maximum response, all frequencies 3397 ! 3398 ! Flatness from band x to band y, x & y from 0-6: 3399 ! Band_min(0:6) - Minimum amplitude in band x 3400 ! Band_max(0:6) - Maximum amplitude in band x 3401 ! Btob_max_to_min(0:6,0:6)- Band x max minus Band y min 3402 ! 3403 ! Test_data(Data point - 1 to Num_Points, 1: frequency, 2: amplitude) 3404 ! 3405 ! 3406 !-------------------------------------------------------------------- 3407 ! 3408 DIM Band_min(0:6),Band_max(0:6) 3409 DIM Btob_max_to_min(0:6,0:6) 3410 DIM Bnd_ptr(0:6) 3411 MAT Band_min=(999) 3412 MAT Band_max=(-999) 3413 MAT Output_data=(999) 3414 Abs_min=999 3415 Abs_max=-999 3416 ! 3417 Bnd_to_bnd_ptr: DATA 17,24,30,35,39,42,44 3418 RESTORE Bnd_to_bnd_ptr 3419 READ Bnd_ptr(*) 3420 ! 3421 ! DISP "Calculating band-to-band flatness" ! Commented out because it was getting 3422 ! ! in the way of the graphics 3423 F_max=FNF_max 3424 SELECT F_max 3425 CASE <3.E+9 !BAND 0 3426 Hi_band=0 3427 Max_index=49 3428 CASE <6.6E+9 !BAND 1 3429 Hi_band=1 3430 Max_index=85 3431 CASE <1.33E+10 !BAND 2 Added for D.00.00 3432 Hi_band=2 3433 Max_index=152 3434 CASE <2.7E+10 !BAND 3 3435 Hi_band=4 ! For 8563E, Band 3 has two sub-bands, 13.2 GHz - 22 GHz 3436 Max_index=285 ! and 22 GHz to 26.5 GHz 3437 CASE <4.1E+10 ! Rev D.00.00 Was 4.1E+11 (410 GHz) 3438 Hi_band=6 !BAND 6 for 8564E Rev C.00.00 3439 Max_index=420 3440 CASE <5.1E+10 ! Rev D.00.00 Was 5.1E+11 (510 GHz) 3441 Hi_band=6 !BAND 6 for 8565E Rev C.00.00 3442 Max_index=520 3443 END SELECT 3444 ! 3445 FOR Index=1 TO Max_index 3446 Band=FNBand(Test_data(Index,1),0,Test_data(Index,1),14) !Find band of the test freq 3447 ! Rev C.00.00 Changed 13 to 14 in call to FNBand; Frequency Response test 3448 ! is now test 14 instead of 13. 3449 Band_min(Band)=MIN(Band_min(Band),Test_data(Index,2)) 3450 Band_max(Band)=MAX(Band_max(Band),Test_data(Index,2)) 3451 Abs_min=MIN(Abs_min,Band_min(Band)) 3452 Abs_max=MAX(Abs_max,Band_max(Band)) 3453 NEXT Index 3454 ! 3455 Output_data(1)=Abs_min ! 3456 Output_data(2)=Abs_max ! 3457 ! 3458 FOR Band=0 TO Hi_band !save min and max value for ea band 3459 Output_data(Band*2+3)=Band_min(Band) 3460 Output_data(Band*2+4)=Band_max(Band) 3461 NEXT Band 3462 ! 3463 FOR Band1=0 TO Hi_band 3464 FOR Band2=0 TO Hi_band 3465 Btob_max_to_min(Band1,Band2)=Band_max(Band1)-Band_min(Band2) 3466 NEXT Band2 3467 NEXT Band1 3468 ! 3469 Count=17 !pointer in the data array 3470 FOR Band1=0 TO Hi_band 3471 FOR Band2=Band1 TO Hi_band 3472 IF Band1=Band2 THEN Count=Bnd_ptr(Band1) 3473 Meas=MAX(Btob_max_to_min(Band1,Band2),Btob_max_to_min(Band2,Band1)) 3474 Output_data(Count)=Meas 3475 Count=Count+1 3476 NEXT Band2 3477 NEXT Band1 3478 ! 3479 ! DISP 3480 ! 3481 SUBEND ! Calc_print_flat 3482 ! 3483 ! 3484 Test_13: SUB Second_harm_dis ! 2nd Harm Distortion 3485 Second_harm_dis: ! Rev B.01.00 Changed value in call to Set_sig_level 3486 ! Rev C.00.00 Added support of 8564E/65E 3487 ! Rev D.00.00 Added support of 8562E 3488 ! 3489 COM /Conditions/Conditions$(0:44,1:2)[160] 3490 COM /Equipment/Present(1:20),Power_mtr_avail,Counter_avail,Sensor_avail(1:20),Source_avail(1:20),Source2_avail(1:20),Enough_equip(1:20) 3491 COM /Test_flags/Test_number,Sequence_type,Last_test 3492 DIM Test_data(1:3) 3493 MAT Test_data=(-9999) 3494 ! 3495 IF (Source_avail(Test_number)<>3335) THEN CALL Ck_connections("LOCK SOURCE TO DUT",Quit_flag) 3496 Ck_connections("SOURCE TO DUT VIA LPF1",Quit_flag) 3497 DISP "Running Second Harmonic Distortion test." 3498 ! 3499 Source("INITIALIZE,FREQUENCY=39.E6,AMPLITUDE=-30") 3500 ! Rev D.00.00 Changed test freq to 39 MHz/78 MHz 3501 Dut("INITIALIZE,CENTER FREQ=39E6,SPAN=10E3,REF LEVEL=-30,SINGLE SWEEP") 3502 Dut("SAVE STATE=9") 3503 ! 3504 IF Quit_flag<>3 THEN 3505 Set_sig_level(-30,-30,.2) ! Rev B.01.00 Was (-30,-30,.1) 3506 Dut("READ MARKER AMPLITUDE",Marker_amp1) 3507 Dut("CENTER FREQ=78E6,REF LEVEL=-50,VBW AVERAGE=10,TRIGGER SWEEP") ! Rev D.00.00 Changed CF to 78 MHz, RL to -50 dBm, added VAVG 10 3508 Dut("PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp2) 3509 Test_data(1)=Marker_amp1-Marker_amp2 3510 END IF 3511 ! 3512 IF Source_avail(Test_number)=3335 THEN GOTO Print_it ! Don't do high high band test if 3335 is the source 3513 IF FNF_max<3.E+9 THEN GOTO Print_it !Don't do high band on 8560. 3514 Quit_flag=2 3515 Prompt_user("Press any key to test high band, or 'Q' to quit",Quit_flag) 3516 IF Quit_flag=3 THEN GOTO Print_it ! Don't do high band test if user doesn't want to 3517 ! 3518 Quit_flag=2 3519 Power_meter("CHECK CAL",Quit_flag) 3520 Ck_connections("LOCK SOURCE TO DUT",Quit_flag) 3521 Ck_connections("SOURCE TO SPLITTER TO SENSOR/DUT",Quit_flag) 3522 IF Quit_flag=3 THEN SUBEXIT 3523 DISP "Running Second Harmonic Distortion test." 3524 ! 3525 Dut("RECALL STATE=9") 3526 Dut("CENTER FREQ=2.95E9,REF LEVEL=0,RBW=1000,SPAN=100E3") 3527 Source("FREQUENCY=2.95E9,AMPLITUDE=0") 3528 IF Conditions$(1,2)[1,6]="HP8561" THEN CALL Dut("TRIGGER SWEEP,PEAK SEARCH,PEAK PRESELECTOR") 3529 IF Conditions$(1,2)[1,6]="HP8562" THEN CALL Dut("TRIGGER SWEEP,PEAK SEARCH,PEAK PRESELECTOR") ! Rev D.00.00 3530 IF Conditions$(1,2)[1,6]="HP8563" THEN CALL Dut("TRIGGER SWEEP,PEAK SEARCH,PEAK PRESELECTOR") 3531 IF Conditions$(1,2)[1,6]="HP8564" THEN CALL Dut("TRIGGER SWEEP,PEAK SEARCH,PEAK PRESELECTOR") 3532 IF Conditions$(1,2)[1,6]="HP8565" THEN CALL Dut("TRIGGER SWEEP,PEAK SEARCH,PEAK PRESELECTOR") 3533 Set_sig_level(0,-5,.1) 3534 Power_meter("READ",Fund_power,2.95E+9) 3535 Dut("CENTER FREQ=5.9E9") 3536 Source("FREQUENCY=5.9E9") 3537 IF Conditions$(1,2)[1,6]="HP8561" THEN CALL Dut("TRIGGER SWEEP,PEAK SEARCH,PEAK PRESELECTOR") 3538 IF Conditions$(1,2)[1,6]="HP8562" THEN CALL Dut("TRIGGER SWEEP,PEAK SEARCH,PEAK PRESELECTOR") ! Rev D.00.00 3539 IF Conditions$(1,2)[1,6]="HP8563" THEN CALL Dut("TRIGGER SWEEP,PEAK SEARCH,PEAK PRESELECTOR") 3540 IF Conditions$(1,2)[1,6]="HP8564" THEN CALL Dut("TRIGGER SWEEP,PEAK SEARCH,PEAK PRESELECTOR") 3541 IF Conditions$(1,2)[1,6]="HP8565" THEN CALL Dut("TRIGGER SWEEP,PEAK SEARCH,PEAK PRESELECTOR") 3542 Set_sig_level(0,-5,.1) 3543 Power_meter("READ",Harm_power,2.95E+9) 3544 ! 3545 Dut("SAVE STATE=9") 3546 ! 3547 Ck_connections("SOURCE TO DUT VIA LPF2",Quit_flag) 3548 IF Quit_flag=3 THEN SUBEXIT 3549 DISP "Running Second Harmonic Distortion test." 3550 ! 3551 Dut("RECALL STATE=9") 3552 IF Conditions$(1,2)[1,6]="HP8562" THEN CALL Source("FREQUENCY=2.95E9,AMPLITUDE=-5") ! Rev D.00.00 3553 IF Conditions$(1,2)[1,6]="HP8563" THEN CALL Source("FREQUENCY=2.95E9,AMPLITUDE=-5") 3554 IF Conditions$(1,2)[1,6]="HP8564" THEN CALL Source("FREQUENCY=2.95E9,AMPLITUDE=-5") 3555 IF Conditions$(1,2)[1,6]="HP8565" THEN CALL Source("FREQUENCY=2.95E9,AMPLITUDE=-5") 3556 IF Conditions$(1,2)[1,6]="HP8561" THEN CALL Source("FREQUENCY=2.95E9,AMPLITUDE=-15") 3557 Dut("CENTER FREQ=2.95E9,SPAN=10E3") 3558 IF Conditions$(1,2)[1,6]="HP8561" THEN CALL Dut("REF LEVEL=-10,ATTENUATOR=10") 3559 IF Conditions$(1,2)[1,6]="HP8562" THEN CALL Dut("TRIGGER SWEEP,PEAK SEARCH,PEAK PRESELECTOR") ! Rev D.00.00 3560 IF Conditions$(1,2)[1,6]="HP8563" THEN CALL Dut("TRIGGER SWEEP,PEAK SEARCH,PEAK PRESELECTOR") 3561 IF Conditions$(1,2)[1,6]="HP8564" THEN CALL Dut("TRIGGER SWEEP,PEAK SEARCH,PEAK PRESELECTOR") 3562 IF Conditions$(1,2)[1,6]="HP8565" THEN CALL Dut("TRIGGER SWEEP,PEAK SEARCH,PEAK PRESELECTOR") 3563 IF Conditions$(1,2)[1,6]="HP8561" THEN CALL Dut("TRIGGER SWEEP,PEAK SEARCH,PEAK PRESELECTOR") 3564 IF Conditions$(1,2)[1,6]="HP8562" THEN CALL Set_sig_level(0,0,.1) 3565 IF Conditions$(1,2)[1,6]="HP8563" THEN CALL Set_sig_level(0,0,.1) 3566 IF Conditions$(1,2)[1,6]="HP8564" THEN CALL Set_sig_level(0,0,.1) 3567 IF Conditions$(1,2)[1,6]="HP8565" THEN CALL Set_sig_level(0,0,.1) 3568 IF Conditions$(1,2)[1,6]="HP8561" THEN CALL Set_sig_level(-10,-10,.1) 3569 Dut("RBW=100,VBW=10,TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp1) 3570 Dut("CENTER FREQ=5.9E9") 3571 IF Conditions$(1,2)[1,6]="HP8562" THEN CALL Dut("REF LEVEL=-30,ATTENUATOR=10") ! Rev D.00.00 3572 IF Conditions$(1,2)[1,6]="HP8563" THEN CALL Dut("REF LEVEL=-30,ATTENUATOR=10") 3573 IF Conditions$(1,2)[1,6]="HP8564" THEN CALL Dut("REF LEVEL=-30,ATTENUATOR=10") 3574 IF Conditions$(1,2)[1,6]="HP8565" THEN CALL Dut("REF LEVEL=-30,ATTENUATOR=10") 3575 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp2) 3576 IF Conditions$(1,2)[1,6]="HP8561" THEN 3577 Test_data(2)=Marker_amp1-Marker_amp2+Fund_power-Harm_power 3578 ELSE 3579 Test_data(3)=Marker_amp1-Marker_amp2+Fund_power-Harm_power 3580 END IF 3581 ! 3582 Print_it: ! 3583 Output(Test_data(*)) 3584 ! 3585 SUBEND ! Test_shd 3586 ! 3587 ! 3588 Ref_level_cal: SUB Ref_level_cal(Fail) ! Rev B.00.00 3589 ! 3590 Ck_connections("CAL TO DUT",Quit_flag) 3591 DISP "Performing reference level calibration..." 3592 ! 3593 Dut("READ F/W REVISION",Rev) 3594 SELECT Rev 3595 CASE <=920528 3596 Max_dac=34 3597 Dac_sens=.16 ! dB/DAC step 3598 CASE 921111 3599 Max_dac=529 3600 Dac_sens=-.01 3601 CASE >921111 3602 Max_dac=529 3603 Dac_sens=.01 3604 END SELECT 3605 ! 3606 IF Quit_flag=3 THEN 3607 Fail=1 3608 ELSE 3609 Dut("IP,CENTER FREQ=300E6,SPAN=20E6,SINGLE SWEEP,TRIGGER SWEEP") 3610 Dut("READ REF LEVEL CAL",Rlcal) ! Rev B.00.00 added coarse 3611 Dut("PEAK SEARCH") ! Rev C.00.00 3612 Dut("READ MARKER AMPLITUDE",Marker_amp) ! adjust routine since new 3613 Mkr_err=-10-Marker_amp ! firmware has much finer 3614 Rlcal=Rlcal+PROUND(Mkr_err/Dac_sens,0) ! resolution than older 3615 Dut("REF LEVEL CAL",Rlcal) ! firmware. 3616 LOOP 3617 Dut("READ REF LEVEL CAL",Rlcal) 3618 Dut("TRIGGER SWEEP,DONE?,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp) 3619 EXIT IF Marker_amp=-10 OR Marker_amp=-10.17 3620 EXIT IF Rlcal=-Max_dac OR Rlcal=Max_dac 3621 IF Marker_amp<-10 THEN 3622 Rlcal=Rlcal+1*SGN(Dac_sens) 3623 ELSE 3624 Rlcal=Rlcal-1*SGN(Dac_sens) 3625 END IF 3626 Dut("REF LEVEL CAL",Rlcal) 3627 END LOOP 3628 ! 3629 IF Rlcal=Max_dac OR Rlcal=-Max_dac THEN 3630 Prompt_user("ERROR: Could not set calibrator signal to -10 or -10.17 dBm.",Fail) 3631 END IF 3632 ! 3633 END IF 3634 DISP 3635 ! 3636 SUBEND 3637 ! 3638 ! 3639 Print_test_list: SUB Print_test_list ! Print test list 3640 ! 3641 COM /Conditions/Conditions$(*) 3642 COM /Tests/Tests$(*),Short_name$(*),Conn_check(*) 3643 ! 3644 FOR I=1 TO SIZE(Tests$,1) 3645 OUTPUT 701 USING "DD,5X,K,5X,K";I,Tests$(I,1) 3646 NEXT I 3647 ! 3648 SUBEND ! Print test list 3649 ! 3650 ! 3651 File: DEF FNFile$(File$,Msi$) 3652 ! 3653 DIM Path$[80] 3654 Path$="" 3655 ! Remote_pos=POS(Msi$,":REMOTE") 3656 ! IF Remote_pos OR POS(Msi$&File$,"/") THEN 3657 ! IF Remote_pos THEN 3658 ! RETURN Msi$[1,Remote_pos-1]&"/"&File$&Msi$[Remote_pos] 3659 ! ELSE 3660 ! RETURN Msi$&"/"&File$ 3661 ! END IF 3662 ! ELSE 3663 ! RETURN File$&Msi$ 3664 ! END IF 3665 Colon_pos=POS(Msi$,":") 3666 SELECT Colon_pos 3667 CASE 0 ! Only path specified, no msus; use default msus 3668 RETURN Msi$&"/"&File$ 3669 CASE 1 ! No path specified; append Msi$ to File$ 3670 RETURN File$&Msi$ 3671 CASE >1 ! Path and msus specified; put File$ in between 3672 Path$=Msi$[1,Colon_pos-1] 3673 IF Path$[Colon_pos-1;1]="/" THEN ! Don't need to add another "/" 3674 RETURN Path$&File$&Msi$[Colon_pos] 3675 ELSE ! Add additional "/" 3676 RETURN Path$&"/"&File$&Msi$[Colon_pos] 3677 END IF 3678 END SELECT 3679 ! 3680 FNEND 3681 ! 3682 ! 3683 Check_addresses: SUB Check_addresses(Message$,OPTIONAL Error_flag) 3684 ! 3685 COM /Conditions/Conditions$(*) 3686 DIM Address(13:24) 3687 ! 3688 Address(13)=0 3689 FOR I=14 TO 24 3690 IF POS(Conditions$(I,2),"NA") THEN 3691 Address(I)=0 3692 ELSE 3693 Address(I)=VAL(Conditions$(I,2)) 3694 END IF 3695 NEXT I 3696 MAT SORT Address 3697 Current_address=0 3698 Current_count=0 3699 FOR I=14 TO 24 3700 IF Address(I)=Address(I-1) THEN 3701 Current_count=Current_count+1 3702 ELSE 3703 IF Current_address<>0 AND Current_count>1 THEN 3704 Prompt_user(Message$&" "&VAL$(Current_count)&" instruments have GPIB addresses of "&VAL$(Current_address)&".") 3705 IF NPAR=2 THEN Error_flag=1 3706 END IF 3707 Current_address=Address(I) 3708 Current_count=1 3709 END IF 3710 NEXT I 3711 IF Current_address<>0 AND Current_count>1 THEN 3712 Prompt_user("ERROR: "&Message$&" "&VAL$(Current_count)&" instruments have GPIB addresses of "&VAL$(Current_address)&".") 3713 END IF 3714 ! 3715 SUBEND 3716 ! 3717 ! 3718 Sensorutilities: SUB Sensorutilities 3719 ! 3720 COM /Conditions/Conditions$(*) 3721 COM /Menu/Menu$ 3722 DIM File$[160],I$[160],Catalog$(1:1000)[80],Cal_data(1:2,1:65) 3723 ! 3724 Menu$="Sensor Utilities Menu" 3725 Draw_alpha_hdr("Sensor Utilities Menu") 3726 ! 3727 STATUS KBD,9;Kbd_status 3728 IF BIT(Kbd_status,5) THEN 3729 Ul$=CHR$(132) 3730 Clr$=CHR$(128) 3731 ELSE 3732 Ul$=CHR$(132) 3733 Clr$=CHR$(128) 3734 END IF 3735 ! 3736 GOSUB List_files 3737 ! 3738 IF BIT(Kbd_status,5) THEN ! HIL keyboard 3739 ON KEY 1 LABEL "View/ Edit" GOSUB View_edit 3740 ON KEY 2 LABEL "Add File" GOSUB Add_file 3741 ON KEY 4 LABEL "Delete File" GOSUB Delete_file 3742 ON KEY 5 LABEL "List Files" GOSUB List_files 3743 ON KEY 6 LABEL "System File" GOSUB Change_sys_file 3744 ON KEY 8 LABEL "Cond Menu" GOTO Exit 3745 ELSE 3746 ON KEY 1 LABEL "View/Edit" GOSUB View_edit 3747 ON KEY 2 LABEL "Add File" GOSUB Add_file 3748 ON KEY 4 LABEL "Delete File" GOSUB Delete_file 3749 ON KEY 5 LABEL "List Files" GOSUB List_files 3750 ON KEY 6 LABEL "System File" GOSUB Change_sys_file 3751 ON KEY 8 LABEL "Cond Menu " GOTO Exit 3752 END IF 3753 ! 3754 SYSTEM PRIORITY 2 3755 PRINT TABXY(61,4); 3756 OUTPUT CRT;Ul$&"Select fnction mode";Clr$ 3757 SYSTEM PRIORITY 0 3758 DISP "Select a special function key." 3759 GOTO 3754 3760 ! 3761 View_edit: ! 3762 PRINT TABXY(61,4); 3763 OUTPUT CRT;Ul$&"View/Edit mode ";Clr$ 3764 File$="" 3765 DISP "Enter the sensor file you wish to view/edit (e.g. ""SEN8501234"")"; 3766 Input(File$) 3767 File$=File$[1,37] 3768 View_add_entry: ! This is where you go to when coming from Add_entry 3769 PRINT TABXY(61,4); 3770 OUTPUT CRT;Ul$&"View/Edit mode ";Clr$ 3771 ON ERROR GOTO No_file 3772 ASSIGN @File TO FNFile$(File$,Conditions$(7,2)) 3773 OFF ERROR 3774 GOSUB Clear_screen 3775 PRINT TABXY(1,5);RPT$("|FREQ CAL",6)&"|" 3776 PRINT TABXY(1,6);RPT$("|(MHz) (%)",6)&"|" 3777 PRINT TABXY(1,7);RPT$("-",73) 3778 FOR I=8 TO 16 3779 PRINT TABXY(1,I);RPT$("| ",6)&"|" 3780 NEXT I 3781 FOR I=17 TO 18 3782 PRINT TABXY(1,I);RPT$("| ",5)&"|" 3783 NEXT I 3784 ENTER @File;Cal_data(*) 3785 GOSUB Sort_cal_data 3786 GOSUB Disp_cal_data 3787 Data_changed=0 3788 LOOP 3789 LOOP 3790 I$="" 3791 DISP 3792 DISP File$;": Enter freq to add/edit/del, 'S' to store data, or to exit"; 3793 Input(I$) 3794 EXIT IF UPC$(I$[1,1])="S" OR LEN(I$)=0 3795 ON ERROR GOTO Bad_data 3796 Frequency=DROUND(PROUND(VAL(I$),-2),3) 3797 IF Frequency>99900 THEN Frequency=99900 3798 OFF ERROR 3799 EXIT IF Frequency>0 3800 Bad_data: OFF ERROR 3801 Prompt_user("ERROR: Non-numeric entry other than 'S' entered, or frequency <=0.") 3802 END LOOP 3803 EXIT IF LEN(I$)=0 3804 IF UPC$(I$[1,1])="S" THEN 3805 ASSIGN @File TO FNFile$(File$,Conditions$(7,2)) 3806 OUTPUT @File;Cal_data(*) 3807 Data_changed=0 3808 ELSE 3809 Cal_factor=-1 3810 DISP 3811 I$="" 3812 DISP "Enter cal factor up to 150% (0 to delete frequency/ Cal Factor pair)"; 3813 Input(I$) 3814 ON ERROR GOSUB Chk_entry 3815 Cal_factor=VAL(I$) 3816 OFF ERROR 3817 IF Cal_factor>=0 AND Cal_factor<=150 THEN 3818 Cal_factor=PROUND(Cal_factor,-1) 3819 Freq_index=0 3820 REPEAT 3821 Freq_index=Freq_index+1 3822 UNTIL DROUND(Cal_data(1,Freq_index)/1.E+6,5)=Frequency OR Freq_index=SIZE(Cal_data,2) 3823 IF Cal_factor=0 THEN 3824 Cal_data(1,Freq_index)=0 3825 Cal_data(2,Freq_index)=0 3826 ELSE 3827 Cal_data(1,Freq_index)=Frequency*1.E+6 3828 Cal_data(2,Freq_index)=Cal_factor/100 3829 END IF 3830 GOSUB Sort_cal_data 3831 GOSUB Disp_cal_data 3832 Data_changed=1 3833 ELSE 3834 IF Cal_factor<>-1 THEN CALL Prompt_user("ERROR: Cal Factor outside of 0 to 150% range entered.") 3835 END IF 3836 END IF 3837 END LOOP 3838 ! 3839 IF Data_changed THEN 3840 I$="N" 3841 DISP "Data changed. Do you wish to store it? (Y/N)"; 3842 Input(I$) 3843 IF UPC$(I$[1,1])="Y" THEN 3844 ASSIGN @File TO FNFile$(File$,Conditions$(7,2)) 3845 OUTPUT @File;Cal_data(*) 3846 END IF 3847 END IF 3848 ! 3849 GOSUB List_files 3850 RETURN 3851 ! 3852 Chk_entry: OFF ERROR 3853 I$="0" 3854 RETURN 3855 ! 3856 No_file: OFF ERROR 3857 Prompt_user("ERROR: File "&FNFile$(File$,Conditions$(7,2))&" not found.") 3858 RETURN 3859 ! 3860 Disp_cal_data: ! 3861 FOR I=1 TO SIZE(Cal_data,2) 3862 Xpos=INT((I-1)/11)*12+2 3863 Ypos=(I-1) MOD 11+8 3864 PRINT TABXY(Xpos,Ypos); 3865 Freq_format$="2D.2D" 3866 IF Cal_data(1,I)>=1.00E+8 THEN Freq_format$="3D.D" 3867 IF Cal_data(1,I)>=1.E+9 THEN Freq_format$="5D" 3868 Cal_format$="3D.D" 3869 IF Cal_data(1,I)<>0 THEN 3870 PRINT USING Freq_format$&",X,"&Cal_format$;Cal_data(1,I)/1.E+6,Cal_data(2,I)*100 3871 ELSE 3872 PRINT " " 3873 END IF 3874 NEXT I 3875 RETURN 3876 ! 3877 Sort_cal_data: ! 3878 FOR I=1 TO SIZE(Cal_data,2) 3879 IF Cal_data(1,I)=0 THEN Cal_data(1,I)=1.E+12 3880 NEXT I 3881 MAT SORT Cal_data(1,*) 3882 FOR I=1 TO SIZE(Cal_data,2) 3883 IF Cal_data(1,I)=1.E+12 THEN Cal_data(1,I)=0 3884 NEXT I 3885 RETURN 3886 ! 3887 Add_file:! 3888 PRINT TABXY(61,4); 3889 OUTPUT CRT;Ul$&"Add file mode ";Clr$ 3890 ON ERROR GOTO Add_no_dir 3891 REDIM Catalog$(1:1000) 3892 CAT Conditions$(7,2) TO Catalog$(*) 3893 OFF ERROR 3894 REPEAT 3895 I$="0" 3896 DISP "Enter the sensor type (8481,8482,8485 or 8487) or to exit."; 3897 Input(I$) 3898 GOSUB Chk_model 3899 ON ERROR GOTO Nonnumericentry 3900 Sensor_type=VAL(I$) 3901 OFF ERROR 3902 UNTIL Sensor_type=0 OR Sensor_type=8481 OR Sensor_type=8482 OR Sensor_type=8485 OR Sensor_type=8487 3903 IF Sensor_type=0 THEN RETURN 3904 REPEAT 3905 I$="0" 3906 DISP 3907 DISP "Enter last 5 digits of the sensor S/N (1 to 99999) or to exit."; 3908 Input(I$) 3909 GOSUB Chk_model 3910 ON ERROR GOTO Nonnumericentry 3911 Sensor_sn=VAL(I$) 3912 OFF ERROR 3913 UNTIL Sensor_sn>=0 AND Sensor_sn<=99999 3914 IF Sensor_sn=0 THEN RETURN 3915 OUTPUT File$ USING "#,K,2D,5Z";"SEN",Sensor_type MOD 100,Sensor_sn 3916 CREATE BDAT FNFile$(File$,Conditions$(7,2)),5,256 3917 ASSIGN @File TO FNFile$(File$,Conditions$(7,2)) 3918 MAT Cal_data=(0) 3919 OUTPUT @File;Cal_data(*) 3920 GOTO View_add_entry 3921 ! 3922 Add_no_dir: OFF ERROR 3923 Prompt_user("ERROR: System mass storage file location catalog cannot be read.") 3924 RETURN 3925 ! 3926 Chk_model: ! 3927 ON ERROR GOTO No_sensor 3928 Temp=VAL(I$) 3929 OFF ERROR 3930 GOTO Leave 3931 No_sensor: OFF ERROR 3932 I$="0" 3933 Leave: RETURN 3934 ! 3935 Nonnumericentry: OFF ERROR 3936 Prompt_user("ERROR: "&I$&" is a non-numeric entry.") 3937 RETURN 3938 ! 3939 Delete_file:! 3940 PRINT TABXY(61,4); 3941 OUTPUT CRT;Ul$&"Delete file mode ";Clr$ 3942 File$="" 3943 DISP "Enter the sensor file you wish to delete (e.g. ""SEN8501234"")"; 3944 Input(File$) 3945 File$=File$[1,37] 3946 ON ERROR GOTO No_file 3947 ASSIGN @File TO FNFile$(File$,Conditions$(7,2)) 3948 ASSIGN @File TO * 3949 OFF ERROR 3950 I$="" 3951 DISP "Do you really want to delete ";FNFile$(File$,Conditions$(7,2));" (Y/N)?"; 3952 Input(I$) 3953 IF UPC$(I$[1,1])="Y" THEN 3954 PURGE FNFile$(File$,Conditions$(7,2)) 3955 GOSUB List_files 3956 END IF 3957 RETURN 3958 ! 3959 List_files: ! 3960 PRINT TABXY(61,4); 3961 OUTPUT CRT;Ul$&"List files mode ";Clr$ 3962 GOSUB Clear_screen 3963 PRINT TABXY(1,5);"Sensor files available on "&TRIM$(Conditions$(7,2))&":" 3964 ON ERROR GOTO No_files_avail 3965 REDIM Catalog$(1:1000) 3966 CAT Conditions$(7,2) TO Catalog$(*);NO HEADER,COUNT Num_entries 3967 REDIM Catalog$(1:Num_entries) 3968 MAT SORT Catalog$(*) 3969 Files_avail=0 3970 FOR Entry=1 TO Num_entries 3971 IF Catalog$(Entry)[1,4]="SEN8" THEN 3972 Files_avail=Files_avail+1 3973 Xpos=INT((Files_avail-1)/12)*11+1 3974 Ypos=(Files_avail-1) MOD 12+6 3975 PRINT TABXY(Xpos,Ypos);Catalog$(Entry)[1,10] 3976 END IF 3977 NEXT Entry 3978 IF Files_avail=0 THEN PRINT TABXY(1,7);"No sensor files found. Check System mass storage file location." 3979 OFF ERROR 3980 RETURN 3981 ! 3982 No_files_avail: OFF ERROR 3983 PRINT TABXY(1,7);"ERROR: System mass storage file location catalog can not be read." 3984 RETURN 3985 ! 3986 Change_sys_file:! 3987 PRINT TABXY(61,4); 3988 OUTPUT CRT;Ul$&"Change sysfile mode";Clr$ 3989 DISP "Enter mass storage file location"; 3990 File$=Conditions$(7,2) 3991 Input(File$) 3992 File$=File$[1,37] 3993 IF File$<>"" THEN 3994 ON ERROR GOTO Bad_file 3995 CAT File$ TO Catalog$(*) 3996 Conditions$(7,2)=File$ 3997 GOSUB List_files 3998 END IF 3999 RETURN 4000 Bad_file: Prompt_user("ERROR: Unable to obtain catalog from """&File$&""".") 4001 RETURN 4002 ! 4003 Clear_screen: ! 4004 FOR I=5 TO 18 4005 PRINT TABXY(1,I);RPT$(" ",80) 4006 NEXT I 4007 RETURN 4008 ! 4009 Exit: ! 4010 ! 4011 SUBEND 4012 ! 4013 ! 4014 Check_equipment: SUB Check_equipment(Option) 4015 ! 4016 ! Option: 1 - Check if sufficient equipment for each test 4017 ! 2 - Print equipment list given test number 4018 ! 4019 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 4020 COM /Test_flags/Test_number,Sequence_type,Last_test 4021 COM /Equipment/Present(*),Power_mtr_avail,Counter_avail,Sensor_avail(*),Source_avail(*),Source2_avail(*),Enough_equip(*) 4022 COM /Tests/Tests$(*),Short_name$(*),Conn_check(*) 4023 COM /Conditions/Conditions$(0:44,1:2)[160] 4024 DIM Equip$[80],Mdl$[20],Choice$[10] 4025 ! Rev C.00.00 Added 8487 Power Sensor and 8360 Sweeper for 8564/65 support. 4026 ! 83402 actually refers to the 83640A/83650A. 4027 ! 4028 ! Rev B.00.00 Following data reorganized to reflect test reordering 4029 ! Reordering done to improve test flow during All Tests 4030 ! 4031 Sensor_req_62: ! Also for 8563A/E 4032 DATA 3,8482,8481,-1 ! -1, means the last choice for this test. 4033 DATA 13,8485,8481,-1 4034 DATA 14,8485,-1 4035 DATA 15,8485,-1 4036 DATA 16,8485,8481,-2 ! -2 means we've reached the end of the list 4037 ! 4038 Sensor_req_61: ! lower freq sensors can be used with the 8561. 4039 DATA 3,8481,8482,-1 4040 DATA 13,8481,8485,-1 4041 DATA 14,8481,8485,-1 4042 DATA 15,8481,8485,-1 4043 DATA 16,8481,8485,-2 4044 ! 4045 Sensor_req_60: ! low freq sensors can be used with the 8560. 4046 DATA 3,8481,8482,-1 4047 DATA 14,8481,8482,8485,-1 4048 DATA 15,8481,8485,-1 4049 DATA 16,8481,8485,-2 4050 ! 4051 Sensor_req_65: ! Millimeter sensors for use with 8564/65 4052 DATA 3,8482,8481,-1 4053 DATA 13,8487,8485,8481,-1 4054 DATA 14,8487,-1 4055 DATA 15,8487,-1 4056 DATA 16,8485,8481,-2 4057 ! 4058 Power_meter_req: ! 4059 DATA 3,436,438,8902,-1 4060 DATA 13,436,438,8902,-1 4061 DATA 14,436,438,8902,-1 4062 DATA 15,436,438,8902,-1 4063 DATA 16,436,438,8902,-2 4064 ! 4065 Pwr_mtr_req_60: ! 4066 DATA 3,436,438,8902,-1 4067 DATA 14,436,438,8902,-1 4068 DATA 15,436,438,8902,-1 4069 DATA 16,436,438,8902,-2 4070 ! 4071 Counter_req: ! 4072 DATA 1,5342,5343,5350,-1 ! Rev D.00.00 Added 5350 counter 4073 DATA 2,5342,5343,5350,-2 4074 ! 4075 Source_req: ! 4076 DATA 4,3335,-1 4077 DATA 5,3335,-1 4078 DATA 6,3335,-1 4079 DATA 7,3335,-1 4080 DATA 8,3335,-1 4081 DATA 9,8663,83401,83402,-1 4082 DATA 10,98663,-1 4083 DATA 11,83401,83402,-1 4084 DATA 12,83401,83402,-1 4085 DATA 13,83401,83402,3335,-1 4086 DATA 14,93335,-1 4087 DATA 15,83401,83402,-2 4088 ! 4089 Source_req_65: ! 4090 DATA 4,3335,-1 4091 DATA 5,3335,-1 4092 DATA 6,3335,-1 4093 DATA 7,3335,-1 4094 DATA 8,3335,-1 4095 DATA 9,8663,83401,83402,-1 4096 DATA 10,98663,-1 4097 DATA 11,83402,-1 4098 DATA 12,83401,83402,-1 4099 DATA 13,83401,83402,3335,-1 4100 DATA 14,93335,-1 4101 DATA 15,83402,-2 4102 ! 4103 Source2_req: ! 4104 DATA 14,83401,83402,-2 4105 ! 4106 Source2_req_65:! 4107 DATA 14,83402,-2 4108 ! 4109 Adtl_equip_62:! Also for 8563A/E 4110 DATA 17,"Type N 50 ohm termination",-1 4111 DATA 12,"11667B Splitter",-1 4112 DATA 13,"11667B Splitter, HP P/N 0955-0306 50 MHz LPF, 2 11689A 4 GHz LPFs",-1 4113 DATA 14,"11667B Splitter",-1 4114 DATA 15,"11667B Splitter",-2 4115 ! 4116 Adtl_equip_61:! 4117 DATA 17,"Type N 50 ohm termination",-1 4118 DATA 12,"11667A/B Splitter",-1 4119 DATA 13,"11667A/B Splitter, HP P/N 0955-0306 50 MHz LPF, 2 11689A 4 GHz LPFs",-1 4120 DATA 14,"11667A/B Splitter",-1 4121 DATA 15,"11667A/B Splitter",-2 4122 ! 4123 Adtl_equip_60:! 4124 DATA 17,"Type N 50 ohm termination",-1 4125 DATA 12,"11667A/B Splitter",-1 4126 DATA 13,"HP P/N 0955-0306 50 MHz LPF",-1 4127 DATA 14,"11667A/B Splitter",-1 4128 DATA 15,"11667A/B Splitter",-2 4129 ! 4130 Adtl_equip_65: ! 4131 DATA 17,"2.4 mm 50 ohm termination",-1 4132 DATA 12,"11667C Splitter",-1 4133 DATA 13,"11667C Splitter, HP P/N 0955-0306 50 MHz LPF, 2 11689A 4 GHz LPFs",-1 4134 DATA 14,"11667C Splitter",-1 4135 DATA 15,"11667C Splitter",-2 4136 ! 4137 IF Option=1 THEN ! Check equipment sufficiency 4138 MAT Enough_equip=(1) 4139 ! 4140 ASSIGN @Dut TO VAL(Conditions$(14,2)[1,4]) 4141 IF Present(2) THEN ASSIGN @Printer TO VAL(Conditions$(15,2)[1,4]) 4142 ! 4143 RESTORE Sensor_req_62 4144 IF Conditions$(1,2)[3,6]="8561" THEN RESTORE Sensor_req_61 4145 IF Conditions$(1,2)[3,6]="8560" THEN RESTORE Sensor_req_60 4146 IF Conditions$(1,2)[3,6]="8564" THEN RESTORE Sensor_req_65 4147 IF Conditions$(1,2)[3,6]="8565" THEN RESTORE Sensor_req_65 4148 MAT Sensor_avail=(0) 4149 REPEAT 4150 READ Test_list 4151 Found_inst=0 4152 LOOP 4153 READ Inst 4154 EXIT IF Inst<0 ! Rev D.00.00 Changed range of Present indices from 4155 ! 12 to 15 to 13 to 16 to accommodate 4156 ! 5350 counter being added as 12 4157 IF Inst=8481 AND Present(13) AND NOT Found_inst THEN Sensor_avail(Test_list)=8481 4158 IF Inst=8481 AND Present(13) THEN Found_inst=1 4159 IF Inst=8482 AND Present(14) AND NOT Found_inst THEN Sensor_avail(Test_list)=8482 4160 IF Inst=8482 AND Present(14) THEN Found_inst=1 4161 IF Inst=8485 AND Present(15) AND NOT Found_inst THEN Sensor_avail(Test_list)=8485 4162 IF Inst=8485 AND Present(15) THEN Found_inst=1 4163 IF Inst=8487 AND Present(16) AND NOT Found_inst THEN Sensor_avail(Test_list)=8487 4164 IF Inst=8487 AND Present(16) THEN Found_inst=1 4165 END LOOP 4166 IF NOT Found_inst THEN Enough_equip(Test_list)=0 4167 UNTIL Inst=-2 4168 ! 4169 RESTORE Power_meter_req 4170 IF Conditions$(1,2)[3,6]="8560" THEN RESTORE Pwr_mtr_req_60 4171 REPEAT 4172 READ Test_list 4173 Found_inst=0 4174 LOOP 4175 READ Inst 4176 EXIT IF Inst<0 4177 IF Inst=436 AND Present(3) THEN Found_inst=1 4178 IF Inst=436 AND Present(3) THEN ASSIGN @Pwr_mtr TO VAL(Conditions$(16,2)[1,4]) 4179 IF Inst=438 AND Present(4) THEN Found_inst=1 4180 IF Inst=438 AND Present(4) THEN ASSIGN @Pwr_mtr TO VAL(Conditions$(17,2)[1,4]) 4181 IF Inst=8902 AND Present(5) THEN Found_inst=1 4182 IF Inst=8902 AND Present(5) THEN ASSIGN @Pwr_mtr TO VAL(Conditions$(18,2)[1,4]) 4183 END LOOP 4184 IF NOT Found_inst THEN Enough_equip(Test_list)=0 4185 UNTIL Inst=-2 4186 IF (Present(3)+Present(4)+Present(5))>1 THEN GOSUB Pick_pwr_meter 4187 ! 4188 RESTORE Counter_req 4189 REPEAT 4190 READ Test_list 4191 Found_inst=0 4192 LOOP 4193 READ Inst 4194 EXIT IF Inst<0 4195 IF Inst=5342 AND Present(10) THEN Found_inst=1 4196 IF Inst=5342 AND Present(10) THEN ASSIGN @Counter TO VAL(Conditions$(23,2)[1,4]) 4197 IF Inst=5343 AND Present(11) THEN Found_inst=1 4198 IF Inst=5343 AND Present(11) THEN ASSIGN @Counter TO VAL(Conditions$(24,2)[1,4]) 4199 IF Inst=5350 AND Present(12) THEN Found_inst=1 ! Rev D.00.00 4200 IF Inst=5350 AND Present(12) THEN ASSIGN @Counter TO VAL(Conditions$(25,2)[1,4]) 4201 END LOOP 4202 IF NOT Found_inst THEN Enough_equip(Test_list)=0 4203 UNTIL Inst=-2 4204 IF (Present(10)+Present(11)+Present(12))>1 THEN GOSUB Pick_counter 4205 ! 4206 RESTORE Source_req 4207 IF Conditions$(1,2)[3,6]="8564" THEN RESTORE Source_req_65 4208 IF Conditions$(1,2)[3,6]="8565" THEN RESTORE Source_req_65 4209 MAT Source_avail=(0) 4210 REPEAT 4211 READ Test_list 4212 Found_inst=0 4213 LOOP 4214 READ Inst 4215 EXIT IF Inst<0 4216 IF (Inst=3335 OR Inst=93335) AND Present(6) AND NOT Found_inst THEN Source_avail(Test_list)=3335 ! 93335=OPTIONAL 3335 4217 IF Inst=3335 AND Present(6) THEN Found_inst=1 4218 IF Inst=93335 THEN Found_inst=1 ! If 3335 is optional, indicate sufficient equipment, even if 3335 is not present. 4219 ! Note that 93335 can be the only source listed for a given test given the progam flow. You can't list a second optional source with it. 4220 IF (Inst=8663 OR Inst=98663) AND Present(7) AND NOT Found_inst THEN Source_avail(Test_list)=8663 4221 IF Inst=8663 AND Present(7) THEN Found_inst=1 4222 IF Inst=98663 THEN Found_inst=1 ! If 8663 is optional, indicate sufficient equipment, even if 8663 is not present. 4223 IF Inst=83401 AND Present(8) AND NOT Found_inst THEN Source_avail(Test_list)=Inst 4224 IF Inst=83401 AND Present(8) THEN Found_inst=1 4225 IF Inst=83402 AND Present(9) AND NOT Found_inst THEN Source_avail(Test_list)=Inst 4226 IF Inst=83402 AND Present(9) THEN Found_inst=1 4227 END LOOP 4228 IF NOT Found_inst THEN Enough_equip(Test_list)=0 4229 UNTIL Inst=-2 4230 ! 4231 RESTORE Source2_req 4232 IF Conditions$(1,2)[3,6]="8564" THEN RESTORE Source2_req_65 4233 IF Conditions$(1,2)[3,6]="8565" THEN RESTORE Source2_req_65 4234 MAT Source2_avail=(0) 4235 REPEAT 4236 READ Test_list 4237 Found_inst=0 4238 LOOP 4239 READ Inst 4240 EXIT IF Inst<0 4241 IF Inst=83401 AND Present(8) AND NOT Found_inst THEN Source2_avail(Test_list)=Inst 4242 IF Inst=83401 AND Present(8) THEN Found_inst=1 4243 IF Inst=83402 AND Present(9) AND NOT Found_inst THEN Source2_avail(Test_list)=Inst 4244 IF Inst=83402 AND Present(9) THEN Found_inst=1 4245 IF Inst=3335 AND Present(6) AND NOT Found_inst THEN Source2_avail(Test_list)=Inst 4246 IF Inst=3335 AND Present(6) THEN Found_inst=1 4247 END LOOP 4248 IF NOT Found_inst THEN Enough_equip(Test_list)=0 4249 UNTIL Inst=-2 4250 ! 4251 FOR Test=1 TO VAL(Tests$(0,1)) 4252 IF Enough_equip(Test) THEN 4253 Tests$(Test,2)="" 4254 ELSE 4255 Tests$(Test,2)="MISSING ETE" 4256 END IF 4257 NEXT Test 4258 ! 4259 ELSE ! Print equipment list 4260 ! 4261 FOR I=5 TO 18 4262 PRINT TABXY(1,I);RPT$(" ",80) 4263 NEXT I 4264 PRINT TABXY(1,5);"EQUIPMENT REQUIRED FOR TEST # ";VAL$(Test_number);", ";Tests$(Test_number,1)[5] 4265 PRINT 4266 ! 4267 Num_inst=0 4268 RESTORE Source_req 4269 REPEAT 4270 READ Test_list 4271 LOOP 4272 READ Inst 4273 EXIT IF Inst<0 4274 IF Test_list=Test_number THEN 4275 Num_inst=Num_inst+1 4276 IF Num_inst=1 THEN PRINT "Source: "; 4277 IF Num_inst>1 THEN PRINT " or "; 4278 IF Inst=3335 THEN PRINT "3335A" 4279 IF Inst=93335 THEN PRINT "3335A (optional)" 4280 IF Inst=8663 THEN PRINT "8662/63A" 4281 IF Inst=98663 THEN PRINT "8662/63A (preferred)" 4282 IF Inst=83401 THEN PRINT "8340A/B" 4283 IF Inst=83402 THEN PRINT "83640A/650A" 4284 END IF 4285 END LOOP 4286 UNTIL Inst=-2 4287 IF Num_inst>0 THEN PRINT 4288 ! 4289 Num_inst=0 4290 RESTORE Source2_req 4291 REPEAT 4292 READ Test_list 4293 LOOP 4294 READ Inst 4295 EXIT IF Inst<0 4296 IF Test_list=Test_number THEN 4297 Num_inst=Num_inst+1 4298 IF Num_inst=1 THEN PRINT "Source #2: "; 4299 IF Num_inst>1 THEN PRINT " or "; 4300 IF Inst=3335 THEN PRINT "3335A" 4301 IF Inst=8663 THEN PRINT "8662/63A" 4302 IF Inst=83401 THEN PRINT "8340A/B" 4303 IF Inst=83402 THEN PRINT "83640A/650A" 4304 END IF 4305 END LOOP 4306 UNTIL Inst=-2 4307 IF Num_inst>0 THEN PRINT 4308 ! 4309 Num_inst=0 4310 RESTORE Power_meter_req 4311 REPEAT 4312 READ Test_list 4313 LOOP 4314 READ Inst 4315 EXIT IF Inst<0 4316 IF Test_list=Test_number THEN 4317 Num_inst=Num_inst+1 4318 IF Num_inst=1 THEN PRINT "Power meter: "; 4319 IF Num_inst>1 THEN PRINT " or "; 4320 IF Inst=436 THEN PRINT " 436A" 4321 IF Inst=438 THEN PRINT " 438A" 4322 IF Inst=8902 THEN PRINT "8902A" 4323 END IF 4324 END LOOP 4325 UNTIL Inst=-2 4326 IF Num_inst>0 THEN PRINT 4327 ! 4328 Num_inst=0 4329 RESTORE Sensor_req_62 4330 IF Conditions$(1,2)[3,6]="8560" THEN RESTORE Sensor_req_60 4331 IF Conditions$(1,2)[3,6]="8561" THEN RESTORE Sensor_req_61 4332 IF Conditions$(1,2)[3,6]="8564" THEN RESTORE Sensor_req_65 4333 IF Conditions$(1,2)[3,6]="8565" THEN RESTORE Sensor_req_65 4334 REPEAT 4335 READ Test_list 4336 LOOP 4337 READ Inst 4338 EXIT IF Inst<0 4339 IF Test_list=Test_number THEN 4340 Num_inst=Num_inst+1 4341 IF Num_inst=1 THEN PRINT "Sensor: "; 4342 IF Num_inst>1 THEN PRINT " or "; 4343 IF Inst=8481 THEN PRINT "8481A" 4344 IF Inst=8482 THEN PRINT "8482A" 4345 IF Inst=8485 THEN PRINT "8485A" 4346 IF Inst=8487 THEN PRINT "8487A" 4347 END IF 4348 END LOOP 4349 UNTIL Inst=-2 4350 IF Num_inst>0 THEN PRINT 4351 ! 4352 Num_inst=0 4353 RESTORE Counter_req 4354 REPEAT 4355 READ Test_list 4356 LOOP 4357 READ Inst 4358 EXIT IF Inst<0 4359 IF Test_list=Test_number THEN 4360 Num_inst=Num_inst+1 4361 IF Num_inst=1 THEN PRINT "Counter: "; 4362 IF Num_inst>1 THEN PRINT " or "; 4363 IF Inst=5342 THEN PRINT "5342A" 4364 IF Inst=5343 THEN PRINT "5343A" 4365 END IF 4366 END LOOP 4367 UNTIL Inst=-2 4368 IF Num_inst>0 THEN PRINT 4369 ! 4370 Num_inst=0 4371 RESTORE Adtl_equip_62 4372 IF Conditions$(1,2)[3,6]="8561" THEN RESTORE Adtl_equip_61 4373 IF Conditions$(1,2)[3,6]="8560" THEN RESTORE Adtl_equip_60 4374 IF Conditions$(1,2)[3,6]="8564" THEN RESTORE Adtl_equip_65 4375 IF Conditions$(1,2)[3,6]="8565" THEN RESTORE Adtl_equip_65 4376 REPEAT 4377 READ Test_list 4378 LOOP 4379 READ Equip$ 4380 EXIT IF Equip$="-1" OR Equip$="-2" 4381 IF Test_list=Test_number THEN 4382 Num_inst=Num_inst+1 4383 IF Num_inst=1 THEN PRINT "Misc equip: "; 4384 IF Num_inst>1 THEN PRINT " or "; 4385 PRINT Equip$ 4386 END IF 4387 END LOOP 4388 UNTIL Equip$="-2" 4389 ! 4390 END IF 4391 ! 4392 SUBEXIT 4393 ! 4394 Pick_pwr_meter: ! Subroutine to pick the power meter of choice 4395 IF Present(3) AND Present(4) AND NOT Present(5) THEN Mdl$="436 or 438" 4396 IF Present(3) AND Present(5) AND NOT Present(4) THEN Mdl$="436 or 8902" 4397 IF Present(4) AND Present(5) AND NOT Present(3) THEN Mdl$="438 or 8902" 4398 IF Present(3) AND Present(4) AND Present(5) THEN Mdl$="436, 438, or 8902 " 4399 Pick_again: ! 4400 REPEAT 4401 Choice$=" " 4402 DISP "Would you like to use the "&Mdl$&" as the power meter"; 4403 Input(Choice$) 4404 UNTIL Choice$=" " OR Choice$="436" OR Choice$="438" OR Choice$="8902" 4405 ! 4406 SELECT Choice$ 4407 CASE "436" 4408 ASSIGN @Pwr_mtr TO VAL(Conditions$(16,2)[1,4]) ! Rev C.00.00 Changed 15 to 16 4409 Power_mtr_avail=436 4410 CASE "438" 4411 ASSIGN @Pwr_mtr TO VAL(Conditions$(17,2)[1,4]) ! Rev C.00.00 Changed 16 to 17 4412 Power_mtr_avail=438 4413 CASE "8902" 4414 ASSIGN @Pwr_mtr TO VAL(Conditions$(18,2)[1,4]) ! Rev C.00.00 Changed 17 to 18 4415 Power_mtr_avail=8902 4416 CASE ELSE 4417 GOTO Pick_again 4418 END SELECT 4419 ! 4420 RETURN 4421 ! 4422 Pick_counter: ! Subroutine to pick frequency counter of choice 4423 ! Rev D.00.00 Added 5350 to list of counter choices 4424 IF Present(10) AND Present(11) AND NOT Present(12) THEN Mdl$="5342 or 5343" 4425 IF Present(10) AND Present(12) AND NOT Present(11) THEN Mdl$="5342 or 5350" 4426 IF Present(11) AND Present(12) AND NOT Present(10) THEN Mdl$="5343 or 5350" 4427 IF Present(10) AND Present(11) AND Present(12) THEN Mdl$="5342, 5343, or 5350" 4428 REPEAT 4429 Choice$=" " 4430 DISP " Would you like to use the "&Mdlr$&" frequency counter?"; 4431 Input(Choice$) 4432 UNTIL Choice$=" " OR Choice$="5342" OR Choice$="5343" OR Choice$="5350" 4433 ! 4434 SELECT Choice$ 4435 CASE "5342" 4436 ASSIGN @Counter TO VAL(Conditions$(23,2)[1,4]) ! Rev C.00.00 Changed 22 to 23 4437 Counter_avail=5342 4438 CASE "5343" 4439 ASSIGN @Counter TO VAL(Conditions$(24,2)[1,4]) ! Rev C.00.00 Changed 23 to 24 4440 Counter_avail=5343 4441 CASE "5350" ! Rev D.00.00 Added 5350 4442 ASSIGN @Counter TO VAL(Conditions$(25,2)[1,4]) 4443 Counter_avail=5350 4444 CASE ELSE 4445 GOTO Pick_counter 4446 END SELECT 4447 RETURN 4448 ! 4449 SUBEND 4450 ! 4451 ! 4452 Driver_3335: SUB Driver_3335(Input$,OPTIONAL Io_value) !3335 driver 4453 ! Rev C.00.00 Changed ASSIGN statement for 64E/65E Compatibility 4454 COM /Conditions/Conditions$(0:44,1:2)[160] 4455 REAL Lo_freq_limit,Upper_freq,Freq_settling,Min_ampltd,Max_ampltd 4456 REAL Min_amp_step,Max_amp_step,Min_freq_step,Max_freq_step 4457 REAL Ampltd_settling 4458 ! 4459 ASSIGN @Syn TO VAL(Conditions$(19,2)[1,4]) ! Changed '18' to '19' Rev C.00.00 4460 ! 4461 Min_freq=200 4462 Max_freq=8.0E+7 4463 Freq_settling=.10 4464 Min_ampltd=-86.98 4465 Max_ampltd=13 4466 Min_amp_step=.01 4467 Max_amp_step=99 4468 Min_freq_step=1 4469 Max_freq_step=1.0E+7 4470 Ampltd_settling=1 4471 ! 4472 ! *** Select the action to be taken by the driver *** 4473 ! 4474 REPEAT 4475 Parse(Input$,Function$,Parse_value) 4476 IF NPAR=2 THEN Value=Io_value ! Default value 4477 IF Parse_value<>-999 THEN Value=Parse_value! Value if passed in func$ 4478 SELECT Function$ 4479 CASE "INITIALIZE" !Prepare for setup 4480 OUTPUT @Syn;"C" 4481 CASE "FREQUENCY","FREQUENCY MASK ERROR" !Set the frequency 4482 Freq=Value !Buffer Value 4483 IF Freq>Max_freq THEN Freq=Max_freq !Check and correct 4484 IF FreqMax_ampltd THEN Ampltd=Max_ampltd !follow the same basic 4491 IF AmpltdMax_freq_step THEN Freq_step=Max_freq_step 4499 OUTPUT @Syn USING "K,8D.10D,K";"FI",Freq_step,"M F" 4500 WAIT Freq_settling 4501 CASE "AMPLITUDE STEP" 4502 Ampltd_step=ABS(Value) 4503 IF Ampltd_stepMax_amp_step THEN Ampltd_step=Max_amp_step 4505 OUTPUT @Syn USING "K,8D.10D,K";"AI",Ampltd_step,"M A" 4506 WAIT Amp_settling 4507 ! 4508 CASE "UP" !Step active function 4509 OUTPUT @Syn;"U" 4510 WAIT Amp_settling !Wait the maximum time 4511 CASE "DOWN" 4512 OUTPUT @Syn;"D" 4513 WAIT Amp_settling 4514 CASE "RF OFF","RF ON" 4515 OUTPUT @Syn USING "K,8D.10D,K";"A",Min_ampltd,"K" 4516 CASE "UNLEVELED?","UNLEVELLED?" 4517 Value=0 4518 CASE ELSE !Function$ not found 4519 Prompt_user("Function "&Function$&" in Driver_3335 not found") 4520 END SELECT 4521 UNTIL Input$="" 4522 SUBEXIT 4523 SUBEND !Driver_3335 4524 ! 4525 ! 4526 Driver_5343: SUB Driver_5343(Function$,OPTIONAL Value) !5343 driver 4527 ! 4528 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 4529 ! 4530 SELECT Function$ 4531 CASE "INITIALIZE" 4532 OUTPUT @Counter;"PSR3T3ST2L" 4533 CASE "FREQUENCY" 4534 TRIGGER @Counter 4535 ENTER @Counter;Value 4536 CASE ELSE 4537 Prompt_user("Function in Driver_5343 not found") 4538 END SELECT 4539 ! 4540 SUBEND !Driver_5343 4541 ! 4542 ! 4543 Driver_5342: SUB Driver_5342(Function$,OPTIONAL Value) !5342 driver 4544 ! 4545 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 4546 ! 4547 SELECT Function$ 4548 CASE "INITIALIZE" 4549 OUTPUT @Counter;"AUOM0SR3T3ST2L" 4550 CASE "FREQUENCY" 4551 TRIGGER @Counter 4552 ENTER @Counter;Value 4553 CASE ELSE 4554 Prompt_user("Function$ in Driver_5342 not found") 4555 END SELECT 4556 ! 4557 SUBEND !Driver_5342 4558 ! 4559 Counter: SUB Counter(Input$,OPTIONAL Value) 4560 ! Rev D.00.00 Added support for 5350 counter 4561 COM /Equipment/Present(1:20),Power_mtr_avail,Counter_avail,Sensor_avail(1:20),Source_avail(1:20),Source2_avail(1:20),Enough_equip(1:20) 4562 ! 4563 SELECT Counter_avail 4564 CASE 5342 4565 IF NPAR=1 THEN CALL Driver_5342(Input$) 4566 IF NPAR=2 THEN CALL Driver_5342(Input$,Value) 4567 CASE 5343 4568 IF NPAR=1 THEN CALL Driver_5343(Input$) 4569 IF NPAR=2 THEN CALL Driver_5343(Input$,Value) 4570 CASE 5350 ! Rev D.00.00 Added support for 5350 4571 IF NPAR=1 THEN CALL Driver_5350(Input$) 4572 IF NPAR=2 THEN CALL Driver_5350(Input$,Value) 4573 END SELECT 4574 ! 4575 SUBEND 4576 ! 4577 ! 4578 Source: SUB Source(Input$,OPTIONAL Value) 4579 ! 4580 COM /Equipment/Present(1:20),Power_mtr_avail,Counter_avail,Sensor_avail(1:20),Source_avail(1:20),Source2_avail(1:20),Enough_equip(1:20) 4581 COM /Test_flags/Test_number,Sequence_type,Last_test 4582 ! 4583 SELECT Source_avail(Test_number) 4584 CASE 3335 4585 IF NPAR=1 THEN CALL Driver_3335(Input$) 4586 IF NPAR=2 THEN CALL Driver_3335(Input$,Value) 4587 CASE 8663 4588 IF NPAR=1 THEN CALL Driver_8663(Input$) 4589 IF NPAR=2 THEN CALL Driver_8663(Input$,Value) 4590 CASE 83401 4591 IF NPAR=1 THEN CALL Driver_8340(1,Input$) 4592 IF NPAR=2 THEN CALL Driver_8340(1,Input$,Value) 4593 CASE 83402 4594 IF NPAR=1 THEN CALL Driver_8340(2,Input$) 4595 IF NPAR=2 THEN CALL Driver_8340(2,Input$,Value) 4596 END SELECT 4597 ! 4598 SUBEND 4599 ! 4600 ! 4601 Source2: SUB Source2(Input$,OPTIONAL Value) 4602 ! 4603 COM /Equipment/Present(1:20),Power_mtr_avail,Counter_avail,Sensor_avail(1:20),Source_avail(1:20),Source2_avail(1:20),Enough_equip(1:20) 4604 COM /Test_flags/Test_number,Sequence_type,Last_test 4605 ! 4606 SELECT Source2_avail(Test_number) 4607 CASE 83401 4608 IF NPAR=1 THEN CALL Driver_8340(1,Input$) 4609 IF NPAR=2 THEN CALL Driver_8340(1,Input$,Value) 4610 CASE 83402 4611 IF NPAR=1 THEN CALL Driver_8340(2,Input$) 4612 IF NPAR=2 THEN CALL Driver_8340(2,Input$,Value) 4613 CASE 3335 4614 IF NPAR=1 THEN CALL Driver_3335(Input$) 4615 IF NPAR=2 THEN CALL Driver_3335(Input$,Value) 4616 END SELECT 4617 ! 4618 SUBEND 4619 ! 4620 ! 4621 Load_cal_data: SUB Load_cal_data(Cal_sensor) 4622 ! 4623 COM /Sensor/Current_channel,Sensor(*),Cal_time(*),Cal_data(*) 4624 COM /Conditions/Conditions$(0:44,1:2)[160] 4625 DIM File$[80] 4626 ! 4627 SELECT Cal_sensor 4628 CASE 8481 4629 OUTPUT File$ USING "#,K,5Z";"SEN81",VAL(Conditions$(9,2)) 4630 CASE 8482 4631 OUTPUT File$ USING "#,K,5Z";"SEN82",VAL(Conditions$(10,2)) 4632 CASE 8485 4633 OUTPUT File$ USING "#,K,5Z";"SEN85",VAL(Conditions$(11,2)) 4634 CASE 8487 4635 OUTPUT File$ USING "#,K,5Z";"SEN87",VAL(Conditions$(12,2)) 4636 END SELECT 4637 ! 4638 ASSIGN @File TO FNFile$(File$,Conditions$(7,2)) 4639 ENTER @File;Cal_data(*) 4640 ASSIGN @File TO * 4641 ! 4642 SUBEND 4643 ! 4644 ! 4645 Print_cond: SUB Print_cond ! Print test conditions 4646 ! 4647 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 4648 COM /Conditions/Conditions$(*) 4649 ! 4650 IF Conditions$(14,2)[6,6]="*" THEN 4651 ASSIGN @Printer TO VAL(Conditions$(15,2)[1,4]) 4652 OUTPUT @Printer;CHR$(12);RPT$("*",40)! Print header 4653 IF POS(Conditions$(1,2),"856") THEN 4654 Stop=POS(Conditions$(1,2),",")-1 4655 IF Stop<0 THEN Stop=999 4656 OUTPUT @Printer;"| "&Conditions$(1,2)[1,MIN(POS(Conditions$(1,2)," ")-1,Stop)]&" OPERATION VERIFICATION"&" |" 4657 ELSE 4658 OUTPUT @Printer;"| 8560/1/2/3 OPERATION VERIFICATION |" 4659 END IF 4660 OUTPUT @Printer;RPT$("*",40) 4661 FOR I=1 TO 6 ! Print conditions$ 4662 OUTPUT @Printer USING "K,K,K";Conditions$(I,1);" ";Conditions$(I,2) 4663 NEXT I 4664 END IF 4665 ! 4666 SUBEND !Print_cond 4667 ! 4668 ! 4669 Get_freq_amp: SUB Get_freq_amp(Test_frequency,Freq_var,Amp_var) 4670 ! 4671 Freq_var=Test_frequency 4672 Source("FREQUENCY",Test_frequency) 4673 Dut("TRIGGER SWEEP,READ MARKER AMPLITUDE",Amp_var) 4674 ! 4675 SUBEND 4676 ! 4677 ! 4678 Fnband: DEF FNBand(Center_freq,OPTIONAL Opt_span,Source_freq,Test_number) 4679 ! Rev C.00.00 Changed to add Bands 4 & 5 for 8564E/65E 4680 ! Changed test number for frequency response from 13 to 14. 4681 ! This version for 856xE analyzers ONLY !!!! 4682 ! Returns band # of source_freq position given DUT center freq & span, and 4683 ! source freq. Default span is 0, default source freq is center screen. 4684 ! If Test_number = 14 (Freq Resp), Band 3 goes up to 22 GHz and Band 4 is added to go 4685 ! up to 26.5 GHz. 4686 ! 4687 IF NPAR=4 THEN 4688 IF Test_number=14 THEN ! Account for sub-bands in Band 3 4689 REDIM Lower_band_lim(0:6),Upper_band_lim(0:6) 4690 Seven_band_data: ! 4691 DATA -100E6,2.75E9,5.6893E9,12.36E9,22.E9,26.4E9,31.E9 ! Lower band limits 4692 DATA 2.9E9,6.46E9,13.2E9,22.0E9,26.8E9,31.15E9,50.E9 ! Upper band limits 4693 ! Rev C.00.00 Changed 13.0307E9 to 13.2E9 in DATA statement above 4694 RESTORE Seven_band_data 4695 READ Lower_band_lim(*),Upper_band_lim(*) 4696 Hi_band=6 4697 END IF 4698 ELSE ! Use standard bands 0 to 5 4699 REDIM Lower_band_lim(0:5),Upper_band_lim(0:5) 4700 Six_band_data: ! 4701 DATA -100E6,2.75E9,5.6893E9,12.36E9,26.4E9,31.E9 ! Lower band limits 4702 DATA 2.9E9,6.46E9,13.2E9,26.8E9,31.15E9,50.E9 ! Upper band limits 4703 ! Rev C.00.00 Changed 13.0307E9 to 13.2E9 in DATA statement above 4704 RESTORE Six_band_data 4705 READ Lower_band_lim(*),Upper_band_lim(*) 4706 Hi_band=5 4707 END IF 4708 ! 4709 IF FNF_max=6.5E+9 THEN Upper_band_lim(1)=6.5E+9 ! Rev C.00.00 Required for 8561E 4710 ! 4711 Span=0 ! Default span = 0 4712 IF NPAR>=2 THEN Span=Opt_span 4713 Start_freq=Center_freq-Span/2 4714 Stop_freq=Center_freq+Span/2 4715 Test_freq=Center_freq ! Default source freq = Center freq 4716 IF NPAR>=3 THEN Test_freq=Source_freq 4717 ! 4718 FOR Band=0 TO Hi_band ! Single band ranges 4719 IF Start_freq>=Lower_band_lim(Band) AND Stop_freq<=Upper_band_lim(Band) THEN RETURN Band ! Return band if in single band 4720 NEXT Band 4721 ! 4722 FOR Band=1 TO Hi_band ! Multi-band ranges 4723 IF Test_freqRef_level AND Span>0 THEN CALL Dut("READ EXTRAPOLATED PEAK AMPLITUDE",Marker_amp) 4742 EXIT IF ABS(Marker_amp-Desired_level)<=Des_max_err 4743 Source_amp=Source_amp+Desired_level-Marker_amp 4744 IF Source_amp>30 THEN CALL Source2("UNLEVELLED?",Unlvl_flag) 4745 EXIT IF Unlvl_flag 4746 END LOOP 4747 ! 4748 SUBEND 4749 ! 4750 ! 4751 Check_cal_data: SUB Check_cal_data(File$,Error_flag) 4752 ! Rev C.00.00 Added support for 8487A Power Sensor 4753 ! 4754 COM /Sensor/Current_channel,Sensor(*),Cal_time(*),Cal_data(*) 4755 ! 4756 Min_freq=1.E+99 4757 Max_freq=0 4758 FOR I=1 TO SIZE(Cal_data,2) 4759 IF Cal_data(2,I)<>0 THEN 4760 Min_freq=MIN(Min_freq,Cal_data(1,I)) 4761 Max_freq=MAX(Max_freq,Cal_data(1,I)) 4762 END IF 4763 NEXT I 4764 SELECT File$[1,5] 4765 CASE "SEN81" 4766 IF Min_freq>5.E+7 THEN CALL Prompt_user("ERROR: 8481A Sensor cal data minimum frequency not <= 50 MHz.",Error_flag) 4767 IF Max_freq<3.E+8 THEN CALL Prompt_user("ERROR: 8481A Sensor cal data maximum frequency not >= 300 MHz.",Error_flag) 4768 CASE "SEN82" 4769 IF Min_freq>5.E+7 THEN CALL Prompt_user("ERROR: 8482A Sensor cal data minimum frequency not <= 50 MHz.",Error_flag) 4770 IF Max_freq<3.E+8 THEN CALL Prompt_user("ERROR: 8482A Sensor cal data maximum frequency not >= 300 MHz.",Error_flag) 4771 CASE "SEN85" 4772 IF Min_freq>5.E+7 THEN CALL Prompt_user("ERROR: 8485A Sensor cal data minimum frequency not <= 50 MHz.",Error_flag) 4773 IF Max_freq<2.65E+10 THEN CALL Prompt_user("ERROR: 8485A Sensor cal data maximum frequency not >= 26.5 GHz.",Error_flag) 4774 CASE "SEN87" 4775 IF Min_freq>5.E+7 THEN CALL Prompt_user("ERROR: 8487A Sensor cal data minimum frequency not <= 50 MHz.",Error_flag) 4776 IF Max_freq<5.00E+10 THEN CALL Prompt_user("ERROR: 8487A Sensor cal data maximum frequency not >= 50 GHz.",Error_flag) 4777 END SELECT 4778 ! 4779 SUBEND 4780 ! 4781 ! 4782 Output: SUB Output(Test_data(*)) 4783 COM /Test_flags/Test_number,Sequence_type,Last_test 4784 COM /Bandwidths/Bw(*),Bw$(*) 4785 COM /Conditions/Conditions$(0:44,1:2)[160] 4786 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 4787 COM /Equipment/Present(1:20),Power_mtr_avail,Counter_avail,Sensor_avail(1:20),Source_avail(1:20),Source2_avail(1:20),Enough_equip(1:20) 4788 ! 4789 ASSIGN @Printer TO VAL(Conditions$(15,2)) 4790 ! 4791 Bw(1)=1 4792 Bw(2)=3 4793 Bw(3)=10 ! Modify subprogram Avail_bws if any of the 4794 Bw(4)=30 ! following data is modified. 4795 Bw(5)=100 4796 Bw(6)=300 4797 Bw(7)=1000 4798 Bw(8)=3000 4799 Bw(9)=1.0E+4 4800 Bw(10)=3.0E+4 4801 Bw(11)=1.00E+5 4802 Bw(12)=3.00E+5 4803 Bw(13)=1.E+6 4804 Bw(14)=2.E+6 4805 Bw$(1)=" 1 Hz " 4806 Bw$(2)=" 3 Hz " 4807 Bw$(3)=" 10 Hz " 4808 Bw$(4)=" 30 Hz " 4809 Bw$(5)="100 Hz " 4810 Bw$(6)="300 Hz " 4811 Bw$(7)=" 1 kHz" 4812 Bw$(8)=" 3 kHz" 4813 Bw$(9)=" 10 kHz" 4814 Bw$(10)=" 30 kHz" 4815 Bw$(11)="100 kHz" 4816 Bw$(12)="300 kHz" 4817 Bw$(13)=" 1 MHz" 4818 Bw$(14)=" 2 MHz" 4819 ! 4820 SELECT Test_number 4821 CASE 0 4822 Header_prnt 4823 CASE 1 4824 Freqref_prnt(Test_data(*)) 4825 CASE 2 4826 Fadcaccy_prnt(Test_data(*)) 4827 CASE 3 4828 Calout_prnt(Test_data(*)) 4829 CASE 4 4830 Rbwsw_prnt(Test_data(*)) 4831 CASE 5 4832 Rbaccyprnt(Test_data(*)) 4833 CASE 6 4834 Atten_prnt(Test_data(*)) 4835 CASE 7 4836 Ifgain_prnt(Test_data(*)) 4837 CASE 8 4838 Scalfid_prnt(Test_data(*)) 4839 CASE 9 4840 Resfm_prnt(Test_data(*)) 4841 CASE 10 4842 Noisesb_prnt(Test_data(*)) 4843 CASE 11 4844 Cfaccy_prnt(Test_data(*)) 4845 CASE 12 4846 Span_prnt(Test_data(*)) 4847 CASE 13 4848 Shd_prnt(Test_data(*)) 4849 CASE 14 4850 Freqresp_prnt(Test_data(*)) 4851 CASE 15 4852 Imooboor_prnt(Test_data(*)) 4853 CASE 16 4854 Lo_out_prnt(Test_data(*)) 4855 CASE 17 4856 Danl_prnt(Test_data(*)) 4857 END SELECT 4858 PRINTER IS CRT 4859 SUBEND 4860 ! 4861 Calout_prnt: SUB Calout_prnt(Test_data(*)) ! SUBPROGRAM FOR CAL OUT AMPLITUDE ACCY 4862 OPTION BASE 1 4863 COM /Test_flags/Test_number,Sequence_type,Last_test 4864 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 4865 ! 4866 Fail=0 ! INNOCENT UNTIL PROVEN GUILTY 4867 R$=" " ! INNOCENT UNTIL PROVEN GUILTY 4868 Flag=99.99 ! LIMIT OF WHAT CAN BE PRINTED OUT 4869 Nom=-10 ! NOMINALLY -10 DBM 4870 Spec=.3 ! SPEC IS +/- 0.3 DB 4871 IF ABS(Test_data(1))>Flag THEN Test_data(1)=Flag 4872 IF ABS(Test_data(1)-Nom)>Spec THEN 4873 Fail=1 4874 R$="<<<<" 4875 END IF 4876 OUTPUT @Printer;"************************ CALIBRATOR AMPLITUDE ACCURACY *************************" 4877 OUTPUT @Printer;" Specification: -10 dBm +/- 0.3 dB" 4878 OUTPUT @Printer 4879 OUTPUT @Printer USING "23X,23A,SDD.DD,4A,4A";"CALIBRATOR AMPLITUDE = ",Test_data(1)," dBm",R$ 4880 Pass_fail(Fail) ! PASS JUDGEMENT 4881 SUBEND ! FROM CALOUT_PRNT 4882 ! 4883 Freqref_prnt: SUB Freqref_prnt(Test_data(*)) ! SUBPROGRAM FOR 10 MHZ FREQ REF ACCY 4884 OPTION BASE 1 4885 COM /Test_flags/Test_number,Sequence_type,Last_test 4886 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 4887 COM /Conditions/Conditions$(0:44,1:2)[160] 4888 ! 4889 Fail=0 ! INNOCENT UNTIL PROVEN GUILTY 4890 R$=" " ! INNOCENT UNTIL PROVEN GUILTY 4891 Flag=9.999999999E+8 ! LIMIT OF WHAT CAN BE PRINTED Rev B.00.00 Modified to 4892 Nom=3.0E+8 ! NOMINALLY 300 MHz reflect measuring CAL OUT 4893 Spec=1200 ! SPEC IS +/- 1200 HZ (4 PPM AT 300 MHZ) as opposed to 10 MHz REF 4894 IF ABS(Test_data(1))>Flag THEN Test_data(1)=Flag ! directly 4895 IF ABS(Test_data(1)-Nom)>Spec THEN 4896 Fail=1 4897 R$="<<<<" 4898 END IF 4899 ! 4900 Ocxo=0 4901 IF FNOption_present("003") THEN Ocxo=1 4902 IF (Conditions$(1,2)[1,7]="HP8563A") AND NOT FNOption_present("103") THEN Ocxo=1 4903 IF (Conditions$(1,2)[7;1]="E") AND NOT FNOption_present("103") THEN Ocxo=1 4904 IF NOT Fail AND Ocxo THEN Fail=-1 4905 ! 4906 OUTPUT @Printer;"*********************** 10 MHz REFERENCE OUTPUT ACCURACY ***********************" 4907 OUTPUT @Printer;" Specification: <+/- 1200 Hz/Year (<+/- 4ppm/year)" 4908 OUTPUT @Printer 4909 OUTPUT @Printer USING "19X,30A,DDD.6D,4A,4A";"CAL OUTPUT OUTPUT FREQUENCY = ",Test_data(1)/1.E+6," MHz",R$ 4910 IF Ocxo AND (Fail=-1) THEN 4911 OUTPUT @Printer 4912 OUTPUT @Printer 4913 OUTPUT @Printer;" NOTE: This analyzer meets specification for the TCXO reference, but is" 4914 OUTPUT @Printer;" equipped with a precision frequency reference (OCXO). Perform the" 4915 OUTPUT @Printer;" appropriate manual performance test." 4916 END IF 4917 IF Ocxo AND (Fail=1) THEN 4918 OUTPUT @Printer 4919 OUTPUT @Printer 4920 OUTPUT @Printer;" NOTE: This test is not applicable to this analyzer. This test is for" 4921 OUTPUT @Printer;" analyzers equipped with a TCXO frequency reference, not the " 4922 OUTPUT @Printer;" precision frequency reference (OCXO). Perform the appropriate" 4923 OUTPUT @Printer;" manual performance test." 4924 END IF 4925 Pass_fail(Fail) ! PASS JUDGEMENT 4926 SUBEND ! FROM FREQREF_PRNT 4927 ! 4928 Danl_prnt: SUB Danl_prnt(Test_data(*)) ! SUBPROGRAM FOR DISPLAYED AVG NOISE LEVEL 4929 ! Rev D.02.00 Changed serial prefixes for spec improvements 4930 ! Rev D.01.00 Changed serial prefixes for spec improvements 4931 ! Rev D.00.00 Fixed bug in F$ DIM statement. 4932 ! Added support for 8562E 4933 OPTION BASE 1 4934 COM /Conditions/Conditions$(*) 4935 COM /Test_flags/Test_number,Sequence_type,Last_test 4936 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 4937 DIM F$(13)[14] ! Rev D.00.00 Was F$(11)[14]; too short for Opt 006 4938 DIM Ser_num$[10] 4939 DIM Start(8),Stop(8),Spec(13),Danl(13) 4940 INTEGER I,J,Band_index 4941 ! 4942 F_min=FNF_min 4943 F_max=FNF_max 4944 Min_rbw=FNMin_rbw 4945 ! 4946 Fail=0 ! INNOCENT UNTIL PROVEN GUILTY 4947 R$=" " ! INNOCENT UNTIL PROVEN GUILTY 4948 Flag=999.9 ! LIMIT OF WHAT CAN BE PRINTED 4949 ! 4950 Dut("READ SERIAL NUMBER",Dummy,Ser_num$) 4951 ! 4952 SELECT Conditions$(1,2)[1,7] 4953 CASE "HP8560E" 4954 SELECT VAL(Ser_num$)! Tighter Band 0 spec if >=3632 or Option H13 4955 CASE <3632 4956 RESTORE Hp8560e_specs 4957 IF FNOption_present("H13") THEN RESTORE Hp8560e_new 4958 IF FNOption_present("103") THEN RESTORE Hp8560e_103 4959 IF FNOption_present("103") AND FNOption_present("H13") THEN RESTORE Hp8560e_new103 4960 CASE >=3632 4961 RESTORE Hp8560e_new 4962 IF FNOption_present("103") THEN RESTORE Hp8560e_new103 4963 END SELECT 4964 CASE "HP8561E" 4965 RESTORE Hp8561e_specs 4966 IF FNOption_present("103") THEN RESTORE Hp8561e_103 4967 CASE "HP8562E" 4968 RESTORE Hp8562e_specs 4969 IF FNOption_present("103") THEN RESTORE Hp8562e_103 4970 CASE "HP8563E" 4971 SELECT VAL(Ser_num$) ! Added in A.01.00. Newer 8563Es have 1 dB 4972 ! looser spec in Band 0 for prefixes >=3246 4973 ! except for analyzers with Opt H13 4974 CASE >=3645 4975 RESTORE Hp8563e_imp ! Improved, tighter specs 4976 IF FNOption_present("006") THEN RESTORE Hp8563e_imp006 4977 IF FNOption_present("103") THEN RESTORE Hp8563e_imp103 4978 IF FNOption_present("103") AND FNOption_present("006") THEN RESTORE Hp8563e_imp603 4979 CASE >=3246 4980 RESTORE Hp8563e_new ! New, looser specs, except if Option H13 4981 IF FNOption_present("H13") THEN RESTORE Hp8563e_imp 4982 IF FNOption_present("006") THEN RESTORE Hp8563e_new006 4983 IF FNOption_present("006") AND FNOption_present("H13") THEN RESTORE Hp8563e_imp006 4984 IF FNOption_present("103") THEN RESTORE Hp8563e_new103 4985 IF FNOption_present("103") AND FNOption_present("H13") THEN RESTORE Hp8563e_imp103 4986 IF FNOption_present("103") AND FNOption_present("006") THEN RESTORE Hp8563e_new603 4987 IF FNOption_present("103") AND FNOption_present("006") AND FNOption_present("H13") THEN RESTORE Hp8563e_imp603 4988 CASE <3246 ! looser spec in Band 0 for prefixes >=3246 4989 ! except if Option H13 4990 RESTORE Hp8563e_specs 4991 IF FNOption_present("H13") THEN RESTORE Hp8563e_imp 4992 IF FNOption_present("006") THEN RESTORE Hp8563e_006 4993 IF FNOption_present("006") AND FNOption_present("H13") THEN RESTORE Hp8563e_imp006 4994 IF FNOption_present("103") THEN RESTORE Hp8563e_103 4995 IF FNOption_present("103") AND FNOption_present("H13") THEN RESTORE Hp8563e_imp103 4996 IF FNOption_present("103") AND FNOption_present("006") THEN RESTORE Hp8563e_603 4997 IF FNOption_present("103") AND FNOption_present("006") AND FNOption_present("H13") THEN RESTORE Hp8563e_imp603 4998 END SELECT 4999 CASE "HP8564E" 5000 SELECT VAL(Ser_num$) 5001 CASE <3641 ! Looser spec in Band 0 unless Opt H13 5002 RESTORE Hp8564e_specs 5003 IF FNOption_present("H13") THEN RESTORE Hp8564e_imp 5004 IF FNOption_present("006") THEN RESTORE Hp8564e_006 5005 IF FNOption_present("006") AND FNOption_present("H13") THEN RESTORE Hp8564e_imp006 5006 IF FNOption_present("103") THEN RESTORE Hp8564e_103 5007 IF FNOption_present("103") AND FNOption_present("H13") THEN RESTORE Hp8564e_imp103 5008 IF FNOption_present("006") AND FNOption_present("103") THEN RESTORE Hp8564e_603 5009 IF FNOption_present("006") AND FNOption_present("103") AND FNOption_present("H13") THEN RESTORE Hp8564e_imp603 5010 CASE >=3641 ! Rev D.01.00 Improved, tighter Band 0 specs 5011 RESTORE Hp8564e_imp 5012 IF FNOption_present("006") THEN RESTORE Hp8564e_imp006 5013 IF FNOption_present("103") THEN RESTORE Hp8564e_imp103 5014 IF FNOption_present("006") AND FNOption_present("103") THEN RESTORE Hp8564e_imp603 5015 END SELECT 5016 CASE "HP8565E" 5017 SELECT VAL(Ser_num$) 5018 CASE <3641 ! Looser spec in Band 0 unless Opt H13 5019 RESTORE Hp8565e_specs 5020 IF FNOption_present("H13") THEN RESTORE Hp8565e_imp 5021 IF FNOption_present("006") THEN RESTORE Hp8565e_006 5022 IF FNOption_present("006") AND FNOption_present("H13") THEN RESTORE Hp8565e_imp006 5023 IF FNOption_present("103") THEN RESTORE Hp8565e_103 5024 IF FNOption_present("103") AND FNOption_present("H13") THEN RESTORE Hp8565e_imp103 5025 IF FNOption_present("006") AND FNOption_present("103") THEN RESTORE Hp8565e_603 5026 IF FNOption_present("006") AND FNOption_present("103") AND FNOption_present("H13") THEN RESTORE Hp8565e_imp603 5027 CASE >=3641 5028 RESTORE Hp8565e_imp 5029 IF FNOption_present("006") THEN RESTORE Hp8565e_imp006 5030 IF FNOption_present("103") THEN RESTORE Hp8565e_imp103 5031 IF FNOption_present("006") AND FNOption_present("103") THEN RESTORE Hp8565e_imp603 5032 END SELECT 5033 CASE ELSE 5034 RESTORE Hp8563e_specs 5035 END SELECT 5036 ! 5037 Hp8560e_specs: ! 5038 DATA 7,6,-90,-90,-105,-120,-120,-140,-145 5039 Hp8560e_103: ! 5040 DATA 7,6,-80,-80,-95,-110,-110,-130,-135 5041 Hp8560e_new: ! Rev D.00.00 Prefix >=3624A 5042 DATA 7,6,-90,-90,-105,-120,-120,-140,-151 5043 Hp8560e_new103: ! Rev D.00.00 Prefix >=3624A 5044 DATA 7,6,-80,-80,-95,-110,-110,-130,-141 5045 Hp8561e_specs: ! Rev C.00.00 Changed spec for Band 1 from -144/-134 to 5046 DATA 8,6,-90,-90,-105,-120,-120,-140,-145,-145 ! -145/-135, to agree 5047 Hp8561e_103: ! ! with published specs 5048 DATA 7,6,-80,-80,-95,-110,-110,-130,-135,-135 5049 Hp8562e_specs: ! Rev D.00.00 5050 DATA 8,5, -90,-105,-120,-120,-140,-151,-148,-145 5051 Hp8562e_103: ! Rev D.00.00 5052 DATA 8,5, -80,-95,-110,-110,-130,-141,-138,-135 5053 Hp8563e_specs: ! Older Standard 8563E 5054 DATA 8,3,-120,-120,-140,-145,-148,-145,-140,-139 5055 Hp8563e_006: ! Older Option 006 8563E 5056 DATA 10,5,-90,-105,-120,-120,-140,-145,-148,-145,-140,-139 5057 Hp8563e_603: ! Older Opt 006,103 8563E 5058 DATA 10,5,-80,-95,-110,-110,-130,-135,-138,-135,-130,-129 5059 Hp8563e_103: ! Older Option 103 8563E 5060 DATA 8,3,-110,-110,-130,-135,-138,-135,-130,-129 5061 Hp8563e_new: ! B.00.00 Newer Standard 8563E 5062 DATA 8,3,-120,-120,-140,-144,-148,-145,-140,-139 5063 Hp8563e_new006: ! B.00.00 Newer Option 006 8563E 5064 DATA 10,5,-90,-105,-120,-120,-140,-144,-148,-145,-140,-139 5065 Hp8563e_new603: ! B.00.00 Newer Option 006,103 8563E 5066 DATA 10,5,-80,-95,-110,-110,-130,-134,-138,-135,-130,-129 5067 Hp8563e_new103: ! B.00.00 Newer Option 103 8563E 5068 DATA 8,3,-110,-110,-130,-134,-138,-135,-130,-129 5069 Hp8563e_imp: ! D.01.00 Improved Standard 8563E 5070 DATA 8,3,-120,-120,-140,-149,-148,-145,-140,-139 5071 Hp8563e_imp006: ! D.01.00 Improved Option 006 8563E 5072 DATA 10,5,-90,-105,-120,-120,-140,-149,-148,-145,-140,-139 5073 Hp8563e_imp603: ! D.01.00 Improved Option 006,103 8563E 5074 DATA 10,5,-80,-95,-110,-110,-130,-139,-138,-135,-130,-129 5075 Hp8563e_imp103: ! D.01.00 Improved Option 103 8563E 5076 DATA 8,3,-110,-110,-130,-139,-138,-135,-130,-129 5077 Hp8564e_specs: ! Non-Option 103, Non-Option 006 5078 DATA 10,3,-120,-120,-140,-140,-147,-143,-140,-136,-139,-130 5079 Hp8564e_006: ! Option 006 5080 DATA 12,5,-90,-105,-120,-120,-140,-140,-147,-143,-140,-136,-139,-130 5081 Hp8564e_603: ! Option 006 and Option 103 5082 DATA 12,5,-80,-95,-110,-110,-130,-130,-137,-133,-130,-126,-129,-120 5083 Hp8564e_103: ! Option 103 and Non-Option 006 5084 DATA 10,3,-110,-110,-130,-130,-137,-133,-130,-126,-129,-120 5085 Hp8564e_imp: ! Rev D.01.00 Improved Non-Option 103, Non-Option 006 5086 DATA 10,3,-120,-120,-140,-145,-147,-143,-140,-136,-139,-130 5087 Hp8564e_imp006: ! Rev D.01.00 Improved Option 006 5088 DATA 12,5,-90,-105,-120,-120,-140,-145,-147,-143,-140,-136,-139,-130 5089 Hp8564e_imp603: ! Rev D.01.00 Improved Option 006 and Option 103 5090 DATA 12,5,-80,-95,-110,-110,-130,-135,-137,-133,-130,-126,-129,-120 5091 Hp8564e_new103: ! Rev D.01.00 Improved Option 103 and Non-Option 006 5092 DATA 10,3,-110,-110,-130,-135,-137,-133,-130,-126,-129,-120 5093 Hp8565e_specs: ! Non-Option 103, Non-Option 006 5094 DATA 11,3,-120,-120,-140,-140,-147,-143,-140,-136,-139,-130,-127 5095 Hp8565e_006: ! Option 006 5096 DATA 13,5,-90,-105,-120,-120,-140,-140,-147,-143,-140,-136,-139,-130,-127 5097 Hp8565e_603: ! Option 006 and Option 103 5098 DATA 13,5,-80,-95,-110,-110,-130,-130,-137,-133,-130,-126,-129,-120,-117 5099 Hp8565e_103: ! Option 103 and Non-Option 006 5100 DATA 11,3,-110,-110,-130,-130,-137,-133,-130,-126,-129,-120,-117 5101 Hp8565e_imp: ! Rev D.01.00 Improved Non-Option 103, Non-Option 006 5102 DATA 11,3,-120,-120,-140,-145,-147,-143,-140,-136,-139,-130,-127 5103 Hp8565e_imp006: ! Rev D.01.00 Improved Option 006 5104 DATA 13,5,-90,-105,-120,-120,-140,-145,-147,-143,-140,-136,-139,-130,-127 5105 Hp8565e_imp603: ! Rev D.01.00 Improved Option 006 and Option 103 5106 DATA 13,5,-80,-95,-110,-110,-130,-135,-137,-133,-130,-126,-129,-120,-117 5107 Hp8565e_imp103: ! Rev D.01.00 Improved Option 103 and Non-Option 006 5108 DATA 11,3,-110,-110,-130,-135,-137,-133,-130,-126,-129,-120,-117 5109 ! 5110 READ Num_specs 5111 READ Num_sgl_freqs 5112 FOR I=1 TO Num_specs 5113 READ Spec(I) 5114 NEXT I 5115 ! 5116 SELECT Conditions$(1,2)[1,7] 5117 CASE "HP8560E" 5118 RESTORE Hp8560e_freqs 5119 CASE "HP8561E" 5120 RESTORE Hp8561e_freqs 5121 CASE "HP8562E" 5122 RESTORE Hp8562e_freqs 5123 CASE "HP8563E" 5124 RESTORE Hp8563e_freqs 5125 IF FNOption_present("006") THEN RESTORE Opt_006_freqs 5126 CASE "HP8564E" 5127 RESTORE Hp8564e_freqs 5128 IF FNOption_present("006") THEN RESTORE Hp64e_006_freqs 5129 CASE "HP8565E" 5130 RESTORE Hp8565e_freqs 5131 IF FNOption_present("006") THEN RESTORE Hp65e_006_freqs 5132 CASE ELSE 5133 RESTORE Hp8563e_freqs 5134 END SELECT 5135 ! 5136 FOR I=1 TO Num_specs 5137 READ F$(I) 5138 NEXT I 5139 ! 5140 Hp8560e_freqs: ! 5141 DATA " 30 Hz " 5142 DATA " 100 Hz " 5143 DATA " 1 kHz " 5144 DATA " 10 kHz " 5145 DATA " 100 kHz " 5146 DATA "1 MHz-10 MHz" 5147 DATA "10MHz-2.9GHz" 5148 Hp8561e_freqs: ! 5149 DATA " 30 Hz " 5150 DATA " 100 Hz " 5151 DATA " 1 kHz " 5152 DATA " 10 kHz " 5153 DATA " 100 kHz " 5154 DATA "1 MHz-10 MHz" 5155 DATA "10MHz-2.9GHz" 5156 DATA " 2.9-6.5 GHz" 5157 Hp8562e_freqs: ! 5158 DATA " 30 Hz " 5159 DATA " 1 kHz " 5160 DATA " 10 kHz " 5161 DATA " 100 kHz " 5162 DATA "1 MHz-10 MHz" 5163 DATA "10MHz-2.9GHz" 5164 DATA "2.9-6.46 GHz" 5165 DATA "6.46-13.2GHz" 5166 Hp8563e_freqs: ! 5167 DATA " 10 kHz " 5168 DATA " 100 kHz " 5169 DATA "1 MHz-10 MHz" 5170 DATA "10MHz-2.9GHz" 5171 DATA "2.9-6.46 GHz" 5172 DATA "6.46-13.2GHz" 5173 DATA "13.2-22.0GHz" 5174 DATA " 22-26.5 GHz" 5175 Opt_006_freqs: ! 5176 DATA " 30 Hz " 5177 DATA " 1 kHz " 5178 DATA " 10 kHz " 5179 DATA " 100 kHz " 5180 DATA "1 MHz-10 MHz" 5181 DATA "10MHz-2.9GHz" 5182 DATA "2.9-6.46 GHz" 5183 DATA "6.46-13.2GHz" 5184 DATA "13.2-22.0GHz" 5185 DATA " 22-26.5 GHz" 5186 Hp8564e_freqs: ! 5187 DATA " 10 kHz " 5188 DATA " 100 kHz " 5189 DATA "1 MHz-10 MHz" 5190 DATA "10MHz-2.9GHz" 5191 DATA "2.9-6.46 GHz" 5192 DATA "6.46-13.2GHz" 5193 DATA "13.2-22.0GHz" 5194 DATA " 22-26.8 GHz" 5195 DATA "26.8-31.15GHz" 5196 DATA "31.15-40 GHz" 5197 Hp64e_006_freqs: ! 5198 DATA " 30 Hz " 5199 DATA " 1 kHz " 5200 DATA " 10 kHz " 5201 DATA " 100 kHz " 5202 DATA "1 MHz-10 MHz" 5203 DATA "10MHz-2.9GHz" 5204 DATA "2.9-6.46 GHz" 5205 DATA "6.46-13.2GHz" 5206 DATA "13.2-22.0GHz" 5207 DATA " 22-26.8 GHz" 5208 DATA "26.8-31.15GHz" 5209 DATA "31.15-40 GHz" 5210 Hp8565e_freqs: ! 5211 DATA " 10 kHz " 5212 DATA " 100 kHz " 5213 DATA "1 MHz-10 MHz" 5214 DATA "10MHz-2.9GHz" 5215 DATA "2.9-6.46 GHz" 5216 DATA "6.46-13.2GHz" 5217 DATA "13.2-22.0GHz" 5218 DATA " 22-26.8 GHz" 5219 DATA "26.8-31.15GHz" 5220 DATA "31.15-40 GHz" 5221 DATA "40 - 50 GHz" 5222 Hp65e_006_freqs: ! 5223 DATA " 30 Hz " 5224 DATA " 1 kHz " 5225 DATA " 10 kHz " 5226 DATA " 100 kHz " 5227 DATA "1 MHz-10 MHz" 5228 DATA "10MHz-2.9GHz" 5229 DATA "2.9-6.46 GHz" 5230 DATA "6.46-13.2GHz" 5231 DATA "13.2-22.0GHz" 5232 DATA " 22-26.8 GHz" 5233 DATA "26.8-31.15GHz" 5234 DATA "31.15-40 GHz" 5235 DATA "40 - 50 GHz" 5236 ! 5237 Danl_ptr=2 ! WHERE DANL DATA IS IN TEST_DATA(*) 5238 ! 5239 ! 5240 OUTPUT @Printer;"************************ DISPLAYED AVERAGE NOISE LEVEL *************************" 5241 OUTPUT @Printer 5242 OUTPUT @Printer;" Measured with no signal at input, "&VAL$(Min_rbw)&" Hz RES BW," 5243 OUTPUT @Printer;" 1 Hz VIDEO BW, and 0 dB ATTEN:" 5244 OUTPUT @Printer 5245 OUTPUT @Printer USING "16X,K";"FREQUENCY MEASURED SPECIFICATION" 5246 OUTPUT @Printer USING "31X,K";"(dBm) (dBm)" 5247 OUTPUT @Printer USING "14X,K";"__________________________________________" 5248 FOR I=1 TO Num_specs !Only compare bands tested to spec 5249 IF ABS(Test_data(I,Danl_ptr))>Flag THEN Test_data(I,Danl_ptr)=Flag 5250 IF Test_data(I,Danl_ptr)>Spec(I) THEN 5251 Fail=1 5252 R$="<<<<" 5253 END IF 5254 OUTPUT @Printer USING "14X,14A,2X,S3D.D,8X,S3D.D,4A";F$(I),Test_data(I,Danl_ptr),Spec(I),R$ 5255 R$=" " 5256 NEXT I 5257 ! 5258 Pass_fail(Fail) ! PASS JUDGEMENT 5259 End_danl_prnt: SUBEND ! DANL_PRNT 5260 ! 5261 Pass_fail: SUB Pass_fail(Result,OPTIONAL INTEGER Run_thru) 5262 ! SUBPROGRAM TO PRINT OUT EITHER PASS OR FAIL. IT MAY COME TO PASS 5263 ! THAT WE PRINT SOMETHING ELSE INSTEAD OF "FAIL", SUCH AS "REFER TO 5264 ! MANUAL PERFORMANCE TESTS". 5265 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 5266 COM /Tests/Tests$(*),Short_name$(*),Conn_check(*) 5267 COM /Test_flags/Test_number,Sequence_type,Last_test 5268 INTEGER Looping 5269 DIM Flag$[80],Temp$[80] 5270 ! 5271 Looping=1 5272 IF NPAR>1 THEN Looping=Run_thru 5273 Temp$=Tests$(Test_number,2) 5274 ! 5275 OUTPUT @Printer 5276 SELECT Result 5277 CASE 0 5278 OUTPUT @Printer USING "35X,10A";"** PASS **" 5279 Flag$="PASS" 5280 CASE 1 5281 OUTPUT @Printer USING "21X,37A";"** MEASUREMENT IS OUT OF TOLERANCE **" 5282 OUTPUT @Printer USING "18X,43A";"REFER TO ASSOCIATED MANUAL PERFORMANCE TEST" 5283 Flag$="MEASUREMENT OUT-OF-TOLERANCE" 5284 CASE -1 5285 OUTPUT @Printer USING "32X,K";"** SHORT PASS **" 5286 Flag$="SHORT PASS" 5287 END SELECT 5288 GOSUB Check_flag 5289 ! 5290 OUTPUT @Printer 5291 FOR I=1 TO 80 5292 OUTPUT @Printer;"*"; 5293 NEXT I 5294 OUTPUT @Printer 5295 OUTPUT @Printer 5296 SUBEXIT 5297 ! 5298 Check_flag: ! 5299 IF Looping=1 THEN 5300 Tests$(Test_number,2)=Flag$ 5301 ELSE 5302 SELECT Temp$ 5303 CASE "PASS" 5304 Tests$(Test_number,2)=Flag$ 5305 CASE "SHORT PASS" 5306 IF Result=1 THEN Tests$(Test_number,2)=Flag$ 5307 END SELECT 5308 END IF 5309 RETURN 5310 ! 5311 SUBEND ! PASS_FAIL 5312 ! 5313 Rbwsw_prnt: SUB Rbwsw_prnt(Test_data(*)) ! SUBPROGRAM FOR RBW SWITCHING UNCERTAINTY 5314 ! AND IF ALIGNMENT UNCERTAINTY 5315 OPTION BASE 1 5316 COM /Test_flags/Test_number,Sequence_type,Last_test 5317 COM /Bandwidths/Bw(*),Bw$(*) 5318 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 5319 DIM Spec(14) 5320 MAT Spec=(.5) 5321 ! 5322 Avail_bws(Max_avail,Max_specd,Min_avail,Min_specd) 5323 ! 5324 IF Min_specd=5 THEN Spec(5)=2.5 ! 100 Hz Spec (not for Shark) 5325 Spec(6)=1.0 ! 300 Hz Spec 5326 Fail=0 ! INNOCENT UNTIL PROVEN GUILTY 5327 R$=" " ! INNOCENT UNTIL PROVEN GUILTY 5328 Flag=9.99 ! LIMIT OF WHAT CAN BE PRINTED 5329 ! 5330 ! 5331 OUTPUT @Printer;"************************ RESOLUTION BANDWIDTH SWITCHING ************************" 5332 OUTPUT @Printer;" AND IF ALIGNMENT UNCERTAINTY" 5333 OUTPUT @Printer;" Specification:" 5334 OUTPUT @Printer;" Resolution Bandwidth Switching Uncertainty:" 5335 OUTPUT @Printer;" (referenced to 300 kHz RES BW)" 5336 IF Min_specd=1 THEN OUTPUT @Printer;" 1 Hz to 2 MHz RES BW: <+/- 0.5 dB" 5337 IF Min_specd=3 THEN OUTPUT @Printer;" 10 Hz to 2 MHz RES BW: <+/- 0.5 dB" 5338 IF Max_specd=13 THEN OUTPUT @Printer;" 100 Hz to 1 MHz RES BW: <+/- 0.5 dB" 5339 IF Min_specd=5 AND Max_specd=14 THEN OUTPUT @Printer;" 100 Hz to 2 MHz RES BW: <+/- 0.5 dB" 5340 OUTPUT @Printer 5341 OUTPUT @Printer;" IF Alignment Uncertainty:" 5342 OUTPUT @Printer;" (additional uncertainty when using narrow bandwidths)" 5343 OUTPUT @Printer;" 300 Hz RES BW: <+/- 0.5 dB" 5344 IF Min_specd=5 THEN OUTPUT @Printer;" 100 Hz RES BW: <+/- 2.0 dB" 5345 OUTPUT @Printer 5346 OUTPUT @Printer USING "14X,7A,5X,8A,5X,13A";"RES BW","MEASURED","SPECIFICATION" 5347 OUTPUT @Printer USING "28X,4A,11X,4A";"(dB)","(dB)" 5348 OUTPUT @Printer USING "13X,54A";"________________________________________" 5349 Data_image: IMAGE 13X,7A,8X,SZ.DD,9X,"+/- ",Z.D,4A 5350 Char_image: IMAGE 13X,7A,8X,SZ.DD,9X,7A 5351 OUTPUT @Printer USING "13X,K,7X,K";Bw$(12),"0 (Ref) 0 (Ref)" 5352 FOR I=Max_avail TO Min_avail STEP -1 5353 IF ABS(Test_data(I))>Flag THEN Test_data(I)=Flag 5354 IF ABS(Test_data(I))>Spec(I) AND I<=Max_specd THEN 5355 R$="<<<<" 5356 Fail=1 5357 END IF 5358 IF I<=Max_specd AND I>=Min_specd THEN 5359 OUTPUT @Printer USING Data_image;Bw$(I),Test_data(I),Spec(I),R$ 5360 ELSE 5361 OUTPUT @Printer USING Char_image;Bw$(I),Test_data(I),"*******" 5362 END IF 5363 R$=" " 5364 NEXT I 5365 ! 5366 IF (Max_avail=14) AND (Max_specd=13) THEN 5367 OUTPUT @Printer 5368 OUTPUT @Printer;" Note: The performance of the 2 MHz RES BW is not specified for" 5369 OUTPUT @Printer;" analyzers with Serial Prefixes of 2750A and below." 5370 END IF 5371 ! 5372 Pass_fail(Fail) ! PASS JUDGEMENT 5373 SUBEND ! RBWSW_PRNT 5374 ! 5375 Rbaccyprnt: SUB Rbaccyprnt(Test_data(*)) ! Subprogram for RBW Accy and Selectivity 5376 ! Rev D.00.00 Added support for Option EMI 5377 ! Rev E.00.00 Changed "Typical" to "Characteristic" for Option EMI 5378 OPTION BASE 1 5379 COM /Equipment/Present(1:20),Power_mtr_avail,Counter_avail,Sensor_avail(1:20),Source_avail(1:20),Source2_avail(1:20),Enough_equip(1:20) 5380 COM /Test_flags/Test_number,Sequence_type,Last_test 5381 COM /Bandwidths/Bw(*),Bw$(*) 5382 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 5383 DIM Bw_data$[8] 5384 DIM Spec(14) 5385 ! 5386 CALL Avail_bws(Max_avail,Max_specd,Min_avail,Min_specd) 5387 ! 5388 Max_shark_bw=100 ! Don't print data for shark RES BWs 5389 Fail=0 ! INNOCENT UNTIL PROVEN GUILTY 5390 R$=" " ! INNOCENT UNTIL PROVEN GUILTY 5391 Flag=99.9 ! MAXIMUM VALUE THAT CAN BE PRINTED 5392 MAT Spec=(10) ! SET ALL SPECS TO 10% 5393 Spec(13)=25 ! SET 1 MHZ SPEC TO 25% 5394 Spec(14)=50 ! SET 2 MHZ SPEC TO +50%/-25% 5395 IF FNOption_present("EMI") THEN ! Typical for 100kHz & 1 MHz RBW 5396 Spec(11)=999 ! Set spec for 100 kHz RBW very large 5397 Spec(13)=999 ! Set spec for 1 MHz RBW very large 5398 END IF 5399 Shape_spec=15 ! SHAPE FACTOR SPEC OF 15:1 5400 Accy_ptr=1 ! WHERE 3 DB BW DATA IS FOUND 5401 Sel_ptr=2 ! WHERE 60 DB BW DATA IS FOUND 5402 ! 5403 OUTPUT @Printer;"***************** RESOLUTION BANDWIDTH ACCURACY & SELECTIVITY ******************" 5404 OUTPUT @Printer;" Specification:" 5405 OUTPUT @Printer;" Accuracy:" 5406 IF NOT FNOption_present("EMI") THEN 5407 IF Min_specd=1 THEN OUTPUT @Printer;" 1 Hz to 300 kHz RES BW: <+/- 10%" 5408 IF Min_specd=3 THEN OUTPUT @Printer;" 10 Hz to 300 kHz RES BW: <+/- 10%" 5409 OUTPUT @Printer;" 1 MHz RES BW: <+/- 25%" 5410 OUTPUT @Printer;" 2 MHz RES BW: <+50% / -25%" 5411 ELSE ! Option EMI present, 100 kHz & 1 MHz performance typical 5412 IF Min_specd=1 THEN OUTPUT @Printer;" 1 Hz to 30 kHz RES BW: <+/- 10% (3 dB BW)" 5413 IF Min_specd=3 THEN OUTPUT @Printer;" 10 Hz to 30 kHz RES BW: <+/- 10% (3 dB BW)" 5414 OUTPUT @Printer;" 100 kHz RES BW: <+/-10% (6 dB BW, Characteristic)" 5415 OUTPUT @Printer;" 300 kHz RES BW: <+/-10% (3 dB BW)" 5416 OUTPUT @Printer;" 1 MHz RES BW: <+/- 25% (6 dB BW, Characteristic)" 5417 OUTPUT @Printer;" 2 MHz RES BW: <+50% / -25% (3 dB BW)" 5418 END IF 5419 OUTPUT @Printer 5420 OUTPUT @Printer;" Selectivity:" 5421 OUTPUT @Printer;" Shape Factor (60 dB BW/ 3 dB BW) -" 5422 IF NOT FNOption_present("EMI") THEN 5423 IF Min_specd=1 THEN OUTPUT @Printer;" 1 Hz to 100 Hz RES BW: < 5:1 " 5424 IF Min_specd=3 THEN OUTPUT @Printer;" 10 Hz to 100 Hz RES BW: < 5:1 " 5425 OUTPUT @Printer;" 300 Hz to 2 MHz RES BW: <15:1 " 5426 ELSE ! Option EMI present, 100 kHz, 1 MHz performance typical 5427 IF FNOption_present("EMI") THEN OUTPUT @Printer;" (60 dB/ 6 dB BW for 100 kHz and 1 MHz RES BW)" 5428 IF Min_specd=1 THEN OUTPUT @Printer;" 1 Hz to 100 Hz RES BW: < 5:1 " 5429 IF Min_specd=3 THEN OUTPUT @Printer;" 10 Hz to 100 Hz RES BW: < 5:1 " 5430 OUTPUT @Printer;" 300 Hz to 30 kHz RES BW: <15:1 " 5431 OUTPUT @Printer;" 100 kHz and 1 MHz RES BW: <15:1 (Characteristic)" 5432 OUTPUT @Printer;" 300 kHz and 2 MHz RES BW: <15:1 " 5433 END IF 5434 OUTPUT @Printer 5435 OUTPUT @Printer;" ACCURACY - " 5436 OUTPUT @Printer 5437 IF NOT FNOption_present("EMI") THEN 5438 OUTPUT @Printer USING "13X,6A,5X,7A,5X,7A,5X,13A";"RES BW","3 dB BW","BW ACCY","SPECIFICATION" 5439 ELSE 5440 OUTPUT @Printer USING "13X,6A,5X,9A,3X,7A,5X,13A";"RES BW","3 dB BW *","BW ACCY","SPECIFICATION" 5441 END IF 5442 OUTPUT @Printer USING "38X,3A,12X,3A";"(%)","(%)" 5443 OUTPUT @Printer USING "12X,K";"__________________________________________________" 5444 ! 5445 FOR I=Max_avail TO Min_avail STEP -1 5446 IF Bw(I)<=Max_shark_bw THEN Skip_bw 5447 Cnvrt_to_str(Test_data(I,Accy_ptr),3,Bw_data$) 5448 Accy=100*((Test_data(I,Accy_ptr)-Bw(I))/Bw(I)) 5449 IF ABS(Accy)>Flag THEN Accy=Flag 5450 IF (ABS(Accy)>Spec(I)) AND (I<=Max_specd) THEN !Check for out-of-spec 5451 Fail=1 5452 R$="<<<<" 5453 END IF 5454 IF I=14 AND Accy<-25 THEN !Check for out-of-spec of 2 MHz RBW 5455 Fail=1 5456 R$="<<<<" 5457 END IF 5458 Data_image: IMAGE 12X,7A,4X,8A,6X,SZZ.D,12X,DD,A,4A 5459 Emi_image: IMAGE 12X,7A,4X,8A,6X,SZZ.D,12X,3A 5460 Alt_image: IMAGE 12X,7A,4X,8A,6X,SZZ.D,8X,K,4A ! For assymetrical spec on 2 MHz RBW 5461 IF I<>Max_avail THEN 5462 IF NOT FNEmi_bw(Bw(I)) THEN 5463 OUTPUT @Printer USING Data_image;Bw$(I),Bw_data$,Accy,Spec(I),"%",R$ 5464 ELSE ! This is a 6dB BW; performance is typical 5465 OUTPUT @Printer USING Emi_image;Bw$(I),Bw_data$,Accy,"N/A" 5466 END IF 5467 ELSE 5468 OUTPUT @Printer USING Alt_image;Bw$(I),Bw_data$,Accy,"+50%/-25%",R$ 5469 END IF 5470 R$=" " 5471 Skip_bw: ! 5472 NEXT I 5473 ! 5474 IF FNOption_present("EMI") THEN 5475 OUTPUT @Printer 5476 OUTPUT @Printer USING "13X,K";" * 6 dB BW for the 1 MHz and 100 kHz RES BWs" 5477 END IF 5478 OUTPUT @Printer ! Now for selectivity (Shape factor) 5479 OUTPUT @Printer 5480 OUTPUT @Printer;" SELECTIVITY -" 5481 OUTPUT @Printer 5482 OUTPUT @Printer USING "21X,6A,5X,12A";"RES BW","SHAPE FACTOR" 5483 OUTPUT @Printer USING "20X,K";"_________________________" 5484 ! 5485 FOR I=Max_avail TO Min_avail STEP -1 5486 Shape_spec=15 5487 IF FNEmi_bw(Bw(I)) THEN Shape_spec=999 ! Set large for 6dB RES BWs 5488 IF Bw(I)<=Max_shark_bw THEN Skip_the_shape 5489 Shape_factor=Test_data(I,Sel_ptr)/Test_data(I,Accy_ptr) 5490 IF Shape_factor>Flag THEN Shape_factor=Flag 5491 IF (Shape_factor>Shape_spec) AND (I<=Max_specd) THEN ! Check for out-of-spec 5492 Fail=1 5493 R$="<<<<" 5494 END IF 5495 OUTPUT @Printer USING "20X,7A,8X,DD.D,2A,4A";Bw$(I),Shape_factor,":1",R$ 5496 R$=" " 5497 Skip_the_shape: ! 5498 NEXT I 5499 ! 5500 OUTPUT @Printer 5501 OUTPUT @Printer;" Note: Resolution Bandwidths of 100 Hz and less are not tested." 5502 OUTPUT @Printer;" These bandwidths are digitally-derived and their 3 dB" 5503 OUTPUT @Printer;" bandwidth and shape factor are guaranteed by design." 5504 ! 5505 IF FNOption_present("EMI") THEN 5506 OUTPUT @Printer 5507 OUTPUT @Printer;" Note: Performance of the 100 kHz and 1 MHz resolution" 5508 OUTPUT @Printer;" bandwidths is a characteristic, not specified." 5509 END IF 5510 Pass_fail(Fail) ! Pass judgement 5511 SUBEND ! Rbaccyprnt 5512 ! 5513 Atten_prnt: SUB Atten_prnt(Test_data(*)) ! SUBPROGRAM FOR INPUT ATTEN ACCY TEST 5514 ! Rev C.00.00 Modified to accommodate 60 dB Attenuator in 8564E/65E 5515 ! Rev D.00.00 Modified to accommodate 8562E 5516 OPTION BASE 1 5517 COM /Test_flags/Test_number,Sequence_type,Last_test 5518 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 5519 DIM Mdl$[40] 5520 DIM Model$[7] 5521 ! 5522 Fail=0 ! INNOCENT UNTIL PROVEN GUILTY 5523 R$=" " ! INNOCENT UNTIL PROVEN GUILTY 5524 Max_val=9.99 ! MAXIMUM VALUE THAT CAN BE PRINTED 5525 Cum_spec=1.2 ! MAXIMUM CUMULATIVE SPEC, RELATIVE TO 10 DB STEP 5526 Step_spec=.6 ! STEP-TO-STEP (ADJACENT STEPS) SPEC 5527 Atten_step=10 ! 10 DB STEPS 5528 ! 5529 Dut("READ MODEL NUMBER",Dummy,Mdl$) 5530 Model$=Mdl$[1,7] 5531 SELECT Model$ 5532 CASE "HP8560E","HP8561E","HP8562E","HP8563E" ! D.00.00 5533 Max_index=7 ! 70 dB Input Attenuator 5534 CASE "HP8564E","HP8565E" 5535 Max_index=6 ! 60 dB Input Attenuator 5536 END SELECT 5537 ! 5538 OUTPUT @Printer;"************************** INPUT ATTENUATOR ACCURACY ***************************" 5539 OUTPUT @Printer;" Specification:" 5540 IF Max_index=7 THEN ! 70 dB Attenuator 5541 OUTPUT @Printer;" 20 to 70 dB settings," 5542 ELSE ! 60 dB Attenuator 5543 OUTPUT @Printer;" 20 to 60 dB settings," 5544 END IF 5545 OUTPUT @Printer;" referenced to 10 dB setting." 5546 OUTPUT @Printer;" <2.9 GHz: <+/- 0.6 dB/ 10 dB step, +/- 1.8 dB max" 5547 OUTPUT @Printer 5548 OUTPUT @Printer USING "21X,5A,5X,10A,5X,12A";"ATTEN","CUMULATIVE","STEP-TO-STEP" 5549 OUTPUT @Printer USING "20X,7A,5X,8A,8X,8A";"SETTING","ACCURACY","ACCURACY" 5550 OUTPUT @Printer USING "22X,4A,8X,4A,12X,4A";"(dB)","(dB)","(dB)" 5551 OUTPUT @Printer USING "19X,K";"________________________________________" 5552 ! 5553 FOR I=1 TO Max_index 5554 Atten=I*Atten_step 5555 IF I=1 THEN 5556 OUTPUT @Printer USING "23X,2D,8X,6A,,10X,6A";Atten,"0(Ref)","0(Ref)" 5557 ELSE 5558 Curr=Test_data(I) 5559 IF I=2 THEN Prev=0 5560 IF I>2 THEN Prev=Test_data(I-1) 5561 Step_accy=Curr-Prev ! CALCULATE STEP-TO-STEP ACCURACY 5562 IF ABS(Step_accy)>Step_spec THEN ! CHECK STEP ACCY SPEC 5563 Fail=1 5564 R$="<<<<" 5565 END IF 5566 IF ABS(Curr)>Cum_spec THEN ! CHECK CUM ACCY SPEC 5567 Fail=1 5568 R$="<<<<" 5569 END IF 5570 IF ABS(Step_accy)>Max_val THEN Step_accy=Max_val 5571 IF ABS(Curr)>Max_val THEN Curr=Max_val 5572 OUTPUT @Printer USING "23X,2D,8X,SZ.DD,11X,SZ.DD,4A";Atten,Curr,Step_accy,R$ 5573 END IF 5574 R$=" " 5575 NEXT I 5576 ! 5577 Pass_fail(Fail) ! PASS JUDGEMENT 5578 SUBEND ! ATTEN_PRNT 5579 ! 5580 Ifgain_prnt: SUB Ifgain_prnt(Test_data(*)) ! SUBPROGRAM TO IF GAIN UNCERTAINTY TEST 5581 OPTION BASE 1 5582 COM /Test_flags/Test_number,Sequence_type,Last_test 5583 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 5584 ! 5585 Fail=0 ! INNOCENT UNTIL PROVEN GUILTY 5586 R$=" " ! INNOCENT UNTIL PROVEN GUILTY 5587 Max_val=9.99 ! MAXIMUM VALUE THAT CAN BE PRINTED 5588 Spec=1.0 ! 1 DB FOR REF LEVELS OF 0 TO -80 DBM WITH 10 DB INPUT ATTEN 5589 OUTPUT @Printer;"***************************** IF GAIN UNCERTAINTY ******************************" 5590 OUTPUT @Printer;" Specification:" 5591 OUTPUT @Printer;" Reference Levels 0 to -80 dBm" 5592 OUTPUT @Printer;" with 10 dB Input attenuation" 5593 OUTPUT @Printer;" <+/- 1.0 dB" 5594 OUTPUT @Printer 5595 OUTPUT @Printer;" LOG IF Gain Uncertainty (10 dB Steps) " 5596 GOSUB Table_header ! PRINT TABLE HEADER 5597 Gain_step=10 5598 Num_steps=8 5599 X=1 5600 GOSUB Prnt_data ! PRINT IF GAIN DATA FOR 10 DB STEPS 5601 OUTPUT @Printer 5602 OUTPUT @Printer 5603 OUTPUT @Printer;" LOG IF Gain Uncertainty (1 dB Steps)" 5604 GOSUB Table_header ! PRINT TABLE HEADER 5605 Gain_step=1 5606 Num_steps=12 5607 X=2 5608 GOSUB Prnt_data ! PRINT IF GAIN DATA FOR 1 DB STEPS 5609 OUTPUT @Printer 5610 OUTPUT @Printer 5611 OUTPUT @Printer;" LINEAR IF Gain Uncertainty (10 dB Steps)" 5612 GOSUB Table_header ! PRINT TABLE HEADER 5613 Gain_step=10 5614 Num_steps=8 5615 X=3 5616 GOSUB Prnt_data ! PRINT IF GAIN DATA FOR LINEAR 10 DB STEPS 5617 Pass_fail(Fail) ! PASS JUDGEMENT 5618 SUBEXIT ! GET OUT OF HERE BEFORE WE HIT THE SUBROUTINES 5619 Table_header: ! SUBROUTINE TO PRINT IF GAIN UNCERTAINTY TABLE 5620 OUTPUT @Printer 5621 OUTPUT @Printer USING "29X,7A,7X,7A";"REF LVL","IF GAIN" 5622 OUTPUT @Printer USING "41X,11A";"UNCERTAINTY" 5623 OUTPUT @Printer USING "30X,5A,9X,4A";"(dBm)","(dB)" 5624 OUTPUT @Printer USING "28X,K";"_________________________" 5625 OUTPUT @Printer USING "29X,6A,8X,6A";"0(Ref)","0(Ref)" 5626 RETURN ! FROM TABLE_HEADER 5627 ! 5628 Prnt_data: ! SUBROUTINE TO PRINT IF GAIN UNCERTAINTY DATA 5629 FOR I=1 TO Num_steps 5630 Ref_lvl=-I*Gain_step 5631 IF ABS(Test_data(X,I))>Spec THEN 5632 Fail=1 5633 R$="<<<<" 5634 END IF 5635 IF ABS(Test_data(X,I))>Max_val THEN Test_data(X,I)=Max_val 5636 OUTPUT @Printer USING "31X,SDD,9X,SD.DD,4A";Ref_lvl,Test_data(X,I),R$ 5637 R$=" " 5638 NEXT I 5639 RETURN ! FROM PRNT_DATA 5640 SUBEND ! IFGAIN_PRNT 5641 ! 5642 Scalfid_prnt: SUB Scalfid_prnt(Test_data(*)) ! Subprogram for Scale Fidelity Test 5643 ! Rev C.01.00 Made spec change for RBW >=300 Hz retroactive 5644 ! Rev C.00.00 Added support for 8564E/65E ("Orca") 5645 ! Rev B.00.00 Added spec change for RBW >= 300 Hz 5646 OPTION BASE 0 5647 COM /Test_flags/Test_number,Sequence_type,Last_test 5648 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 5649 DIM Ser_num$[10] 5650 DIM Model_num$[80] 5651 ! 5652 Dut("READ SERIAL NUMBER",Dummy,Ser_num$) 5653 Dut("READ MODEL NUMBER",Dummy,Model_num$) 5654 Orca=0 5655 IF Model_num$[1,7]="HP8564E" OR Model_num$[1,7]="HP8565E" THEN Orca=1 5656 ! 5657 Fail=0 ! Innocent until proven guilty 5658 R$=" " ! Innocent until proven guilty 5659 Max_val=9.99 5660 Min_analog_rbw=300 5661 ! 5662 Logcum_top=.85 ! Maximum cumulative log fidelity spec, top 90 dB 5663 Logcum_top20=.85 ! Maximum cumulative log fidelity spec, top 20 dB 5664 Logcum_wide=100 ! Maximum cumulative log fidelity spec, bottom 10 dB, RBW >= 300 Hz, set VERY LARGE since this is only a characteristic 5665 Logcum_narrow=1.5 ! Maximum cumulative log fidelity spec, bottom 10 dB, RBW <= 100 Hz 5666 Inc_wide=.1 ! Inc log fid spec per dB, 0 to -90 dB, RBW >= 300 Hz 5667 Inc_narrow=.2 ! Inc log fid spec per 2 dB, 0 to -90 dB, RBW <= 100 Hz 5668 Lin_spec=3 ! Percentage of reference level 5669 IF Orca THEN Logcum_top20=.85 ! Accommodates future spec tightening 5670 ! 5671 OUTPUT @Printer;"******************************* SCALE FIDELITY *********************************" 5672 OUTPUT @Printer;" Specification:" 5673 OUTPUT @Printer;" LOG mode: " 5674 OUTPUT @Printer;" Incremental:" 5675 OUTPUT @Printer;" 0 to -90 dB from Reference Level:" 5676 OUTPUT @Printer;" RES BW >= 300 Hz: <+/-0.1 dB/ dB" 5677 OUTPUT @Printer;" RES BW <= 100 Hz: <+/-0.2 dB/2 dB" 5678 OUTPUT @Printer;" Cumulative:" 5679 ! IF Orca THEN OUTPUT @Printer;" 0 to -20 dB from Reference Level: <+/-0.30 dB maximum" 5680 OUTPUT @Printer;" 0 to -90 dB from Reference Level: <+/-0.85 dB maximum" 5681 OUTPUT @Printer;" 0 to -100 dB from Reference Level:" 5682 OUTPUT @Printer;" RES BW >= 300 Hz: <+/-2.5 dB (Characteristic)" 5683 OUTPUT @Printer;" RES BW <= 100 Hz: <+/-1.5 dB maximum" 5684 OUTPUT @Printer 5685 OUTPUT @Printer;" LINEAR mode: <+/- 3% of Reference Level" 5686 OUTPUT @Printer 5687 OUTPUT @Printer 5688 OUTPUT @Printer;" 10 dB/ Div LOG Scale Fidelity" 5689 OUTPUT @Printer;" Resolution Bandwidths <=100 Hz" 5690 GOSUB Log_table ! PRINT LOG SCALE TABLE 5691 Test_num=2 5692 Inc_spec=Inc_narrow 5693 GOSUB Log_data ! PRINT LOG SCALE DATA 5694 OUTPUT @Printer;" 10 dB/ Div LOG Scale Fidelity" 5695 OUTPUT @Printer;" Resolution Bandwidths >=300 Hz" 5696 GOSUB Log_table ! PRINT LOG SCALE TABLE 5697 Test_num=1 5698 Inc_spec=Inc_wide 5699 GOSUB Log_data ! PRINT LOG SCALE DATA 5700 OUTPUT @Printer;" 2 dB/ Div LOG Scale Fidelity" 5701 GOSUB Log_table ! PRINT LOG SCALE TABLE 5702 Test_num=3 5703 Inc_spec=Inc_wide 5704 GOSUB Log_data ! PRINT LOG SCALE DATA 5705 OUTPUT @Printer;" LINEAR Scale Fidelity" 5706 GOSUB Lin_table ! PRINT LINEAR SCALE TABLE 5707 Test_num=4 5708 GOSUB Lin_data ! PRINT LINEAR SCALE DATA 5709 ! 5710 Pass_fail(Fail) ! PASS JUDGEMENT 5711 ! 5712 SUBEXIT ! DON'T GO TO SUBROUTINES THAT FOLLOW! 5713 ! 5714 Log_table: ! SUBROUTINE TO PRINT HEADER FOR LOG SCALE TEST 5715 OUTPUT @Printer 5716 OUTPUT @Printer USING "21X,7A,5X,10A,5X,11A";"dB FROM","CUMULATIVE","INCREMENTAL" 5717 OUTPUT @Printer USING "21X,7A,6X,8A,8X,8A";"REF LVL","FIDELITY","FIDELITY" 5718 OUTPUT @Printer USING "36X,4A,10X,7A";"(dB)","(dB/dB)" 5719 OUTPUT @Printer USING "20X,K";RPT$("_",40) 5720 OUTPUT @Printer USING "24X, DD,9X,6A,9X,6A";0,"0(Ref)","0(Ref)" 5721 RETURN ! LOG_TABLE 5722 ! 5723 Log_data: ! SUBROUTINE TO PRINT DATA FOR LOG SCALE TEST 5724 Point=1 5725 Rbw=Test_data(Test_num,2,0) 5726 LOOP 5727 Db_down=-Test_data(Test_num,1,Point) 5728 EXIT IF Test_data(Test_num,1,Point)<0 5729 Cum_err=Test_data(Test_num,2,Point) 5730 Inc_err=Test_data(Test_num,3,Point) 5731 IF Test_num=2 THEN Inc_err=Inc_err*2 ! For Shark, inc spec is per 2 dB 5732 SELECT Db_down 5733 CASE -20 TO 0 5734 IF ABS(Cum_err)>Logcum_top20 THEN 5735 Fail=1 5736 R$="<<<<" 5737 END IF 5738 IF ABS(Inc_err)>Inc_spec THEN 5739 Fail=1 5740 R$="<<<<" 5741 END IF 5742 CASE -90.01 TO -20.01 5743 IF ABS(Cum_err)>Logcum_top THEN 5744 Fail=1 5745 R$="<<<<" 5746 END IF 5747 IF ABS(Inc_err)>Inc_spec THEN 5748 Fail=1 5749 R$="<<<<" 5750 END IF 5751 CASE -100 TO -90.01 5752 IF RbwLogcum_narrow THEN 5753 Fail=1 5754 R$="<<<<" 5755 END IF 5756 IF Rbw>=Min_analog_rbw AND ABS(Cum_err)>Logcum_wide THEN 5757 Fail=1 5758 R$="<<<<" 5759 END IF 5760 END SELECT 5761 IF ABS(Cum_err)>Max_val THEN Cum_err=Max_val 5762 IF ABS(Inc_err)>Max_val THEN Inc_err=Max_val 5763 IF Db_down>=-90 THEN 5764 OUTPUT @Printer USING "22X,SDDD,9X,SZ.DD,10X,SZ.DD,4A";Db_down,Cum_err,Inc_err,R$ 5765 ELSE 5766 OUTPUT @Printer USING "22X,SDDD,9X,SZ.DD,10X,5A,4A";Db_down,Cum_err," N/A ",R$ 5767 END IF 5768 R$=" " 5769 Point=Point+1 5770 END LOOP 5771 OUTPUT @Printer 5772 OUTPUT @Printer 5773 RETURN ! Log_data 5774 ! 5775 Lin_table: ! SUBROUTINE TO PRINT HEADER FOR LINEAR TEST 5776 OUTPUT @Printer 5777 OUTPUT @Printer 5778 OUTPUT @Printer USING "28X,7A,4X,11A";"dB FROM","FIDELITY AS" 5779 OUTPUT @Printer USING "28X,7A,4X,12A";"REF LVL","% OF REF LVL" 5780 OUTPUT @Printer USING "27X,K";"_________________________" 5781 OUTPUT @Printer USING "30X,DD,10X,6A";0,"0(Ref)" 5782 RETURN ! LIN_TABLE 5783 ! 5784 Lin_data: ! SUBROUTINE TO PRINT OUT DATA FOR LINEAR SCALE 5785 Fs_bkts=600 5786 Max_val=99.9 5787 Point=1 5788 LOOP 5789 Nominal=-Test_data(Test_num,1,Point) 5790 EXIT IF Test_data(Test_num,1,Point)<0 5791 Actual=Nominal+Test_data(Test_num,2,Point) 5792 Nmnl_bkts=(10^(Nominal/20))*Fs_bkts 5793 Actual_bkts=(10^(Actual/20))*Fs_bkts 5794 Bkt_err=Actual_bkts-Nmnl_bkts 5795 Pct_err=100*(Bkt_err/Fs_bkts) 5796 IF ABS(Pct_err)>Lin_spec THEN 5797 Fail=1 5798 R$="<<<<" 5799 END IF 5800 IF ABS(Pct_err)>Max_val THEN Pct_err=Max_val 5801 OUTPUT @Printer USING "29X,SDD,10X,SZZ.D,4A";Nominal,Pct_err,R$ 5802 R$=" " 5803 Point=Point+1 5804 END LOOP 5805 ! 5806 RETURN ! Lin_data 5807 ! 5808 SUBEND ! Scalfid_prnt 5809 ! 5810 Resfm_prnt: SUB Resfm_prnt(Test_data(*)) 5811 ! Revised 900315:1715.MLG 5812 OPTION BASE 1 5813 COM /Test_flags/Test_number,Sequence_type,Last_test 5814 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 5815 COM /Conditions/Conditions$(*) 5816 ! 5817 Fail=0 ! INNOCENT UNTIL PROVEN GUILTY 5818 R$=" " 5819 Max_val=999.9 ! MAXIMUM VALUE THAT CAN BE PRINTED 5820 Num_test_pts=2 5821 IF Conditions$(1,2)[3,6]="8560" THEN Num_test_pts=2 5822 IF Conditions$(1,2)[3,6]="8561" THEN Num_test_pts=2 5823 OUTPUT @Printer;"********************************* RESIDUAL FM **********************************" 5824 IF FNOption_present("103") THEN 5825 OUTPUT @Printer;" Specification: < 10 Hz x N p-p in 20 msec, zero span, 10 Hz RES BW" 5826 ELSE 5827 OUTPUT @Printer;" Specification: < 1 Hz x N p-p in 20 msec, zero span, 10 Hz RES BW" 5828 END IF 5829 OUTPUT @Printer 5830 OUTPUT @Printer 5831 OUTPUT @Printer USING "20X,28A";"FREQUENCY RESIDUAL FM" 5832 OUTPUT @Printer USING "20X,29A";" (GHz) (peak-to-peak)" 5833 OUTPUT @Printer USING "19X,K";RPT$("_",30) 5834 FOR N=1 TO Num_test_pts 5835 Spec=FNRes_fm_spec(Test_data(N,1)) 5836 IF Test_data(N,2)>Spec THEN 5837 Fail=1 5838 R$="<<<<" 5839 END IF 5840 IF ABS(Test_data(N,2))>Max_val THEN Test_data(N,2)=Max_val 5841 OUTPUT @Printer USING "20X,3D.2D,9X,3D.D,3A,4A";Test_data(N,1)/1.E+9,Test_data(N,2)," Hz",R$ 5842 NEXT N 5843 OUTPUT @Printer 5844 Pass_fail(Fail) ! PASS JUDGEMENT 5845 SUBEND ! RESFM_PRNT 5846 ! 5847 Noisesb_prnt: SUB Noisesb_prnt(Test_data(*)) 5848 ! Rev C.00.00 Added specs for switched YTO loop BW in Orca and newer 5849 ! Non-Orca. Currently, prefix break for non-Orca is fictitiously 5850 ! set to the year 2000; change to actual break when known. 5851 ! Also, removed 30 kHz offset for Orca; not specified 5852 ! Rev D.00.00 Added support for 8562E 5853 ! Rev D.02.00 Added support for spec improvements 5854 OPTION BASE 1 5855 COM /Test_flags/Test_number,Sequence_type,Last_test 5856 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 5857 COM /Equipment/Present(1:20),Power_mtr_avail,Counter_avail,Sensor_avail(1:20),Source_avail(1:20),Source2_avail(1:20),Enough_equip(1:20) 5858 ALLOCATE Offset$(1:SIZE(Test_data,2))[7],Spec(1:SIZE(Test_data,2)) 5859 DIM Ser$[10] 5860 DIM Mdl$[80] 5861 DIM Model$[10] 5862 INTEGER Min_indx,Max_indx,I 5863 ! 5864 Fail=0 ! INNOCENT UNTIL PROVEN GUILTY 5865 R$=" " 5866 Max_val=999.9 ! MAXIMUM VALUE THAT CAN BE PRINTED 5867 MAT Spec=(100) ! 5868 ! 5869 Dut("READ SERIAL NUMBER",Dummy,Ser$) 5870 Dut("READ MODEL NUMBER",Dummy,Mdl$) 5871 Model$=Mdl$[1,7] 5872 Prefix=VAL(Ser$) 5873 ! 5874 Offset$(1)="100 Hz " 5875 Offset$(2)=" 1 kHz" 5876 Offset$(3)=" 10 kHz" 5877 Offset$(4)=" 30 kHz" 5878 Offset$(5)="100 kHz" 5879 ! 5880 Old_6xe_std: ! Non-Option 103 specs, w/o switched YTO loop BW 5881 DATA -80,-97,-113,-113,-113 5882 Old_6xe_103: ! Option 103 specs, w/o switched YTO loop BW 5883 DATA -70,-90,-113,-113,-113 5884 New_6xe_std: ! Non-Option 103 specs, with switched YTO loop BW 5885 DATA -80,-97,-113,-113,-116 5886 New_6xe_103: ! Option 103 specs, with switched YTO loop BW 5887 DATA -70,-90,-113,-113,-116 5888 Imp_6xe_std: ! Non-Option 103 specs, w/ switched loop BW & new FN VCO 5889 DATA -88,-97,-113,-113,-117 5890 Imp_6xe_103: ! Option 103 specs, w/ switched loop BW & new FN VCO 5891 DATA -70,-90,-113,-113,-117 5892 ! 5893 SELECT Model$ 5894 CASE "HP8560E","HP8561E" ! D.02.00 5895 IF Prefix<3424 AND NOT FNOption_present("103") THEN RESTORE Old_6xe_std 5896 IF Prefix<3424 AND FNOption_present("103") THEN RESTORE Old_6xe_103 5897 IF Prefix>=3424 AND NOT FNOption_present("103") THEN RESTORE Imp_6xe_std 5898 IF Prefix>=3424 AND FNOption_present("103") THEN RESTORE Imp_6xe_103 5899 CASE "HP8562E" ! D.02.00 5900 RESTORE Imp_6xe_std 5901 IF FNOption_present("103") THEN RESTORE Imp_6xe_103 5902 CASE "HP8563E" ! D.02.00 5903 IF Prefix<3436 AND NOT FNOption_present("103") THEN RESTORE Old_6xe_std 5904 IF Prefix<3436 AND FNOption_present("103") THEN RESTORE Old_6xe_103 5905 IF Prefix>=3436 AND NOT FNOption_present("103") THEN RESTORE Imp_6xe_std 5906 IF Prefix>=3436 AND FNOption_present("103") THEN RESTORE Imp_6xe_103 5907 CASE "HP8564E","HP8565E" ! D.02.00 5908 IF Prefix<3510 AND NOT FNOption_present("103") THEN RESTORE New_6xe_std 5909 IF Prefix<3510 AND FNOption_present("103") THEN RESTORE New_6xe_103 5910 IF Prefix>=3510 AND NOT FNOption_present("103") THEN RESTORE Imp_6xe_std 5911 IF Prefix>=3510 AND FNOption_present("103") THEN RESTORE Imp_6xe_103 5912 END SELECT 5913 ! 5914 FOR I=1 TO 5 5915 READ Spec(I) 5916 NEXT I 5917 ! 5918 Ofs_ptr=1 5919 Nsb_ptr=2 5920 ! 5921 OUTPUT @Printer;"******************************* NOISE SIDEBANDS ********************************" 5922 IF Source_avail(Test_number) THEN ! We did measurement at 1 GHz 5923 OUTPUT @Printer;" Measured at 1 GHz:" 5924 ELSE ! We did measurement at 300 MHz 5925 OUTPUT @Printer;" Measured at 300 MHz:" 5926 END IF 5927 OUTPUT @Printer 5928 OUTPUT @Printer USING "21X,6A,5X,8A,5X,13A";"OFFSET","MEASURED","SPECIFICATION" 5929 OUTPUT @Printer USING "32X,8A,7X,8A";"(dBc/Hz)","(dBc/Hz)" 5930 OUTPUT @Printer USING "20X,K";RPT$("_",39) 5931 FOR I=1 TO 5 5932 IF Model$="HP8564E" AND I=4 THEN GOTO Skip_offset! Skip 30 kHz if Orca 5933 IF Model$="HP8565E" AND I=4 THEN GOTO Skip_offset! Skip 30 kHz if Orca 5934 IF (-Test_data(Nsb_ptr,I)>Spec(I)) THEN 5935 Fail=1 5936 R$="<<<<" 5937 END IF 5938 IF ABS(Test_data(Nsb_ptr,I))>Max_val THEN Test_data(Nsb_ptr,I)=Max_val 5939 OUTPUT @Printer USING "21X,7A,5X,SDDD.D,9X,SDDD.D,4A";Offset$(I),-Test_data(Nsb_ptr,I),Spec(I),R$ 5940 R$=" " 5941 Skip_offset: ! 5942 NEXT I 5943 ! 5944 IF NOT Source_avail(Test_number) THEN ! Test done using cal signal 5945 OUTPUT @Printer 5946 OUTPUT @Printer 5947 OUTPUT @Printer;" Note: Noise sidebands measured at 300 MHz using CAL OUTPUT signal" 5948 IF Fail=0 THEN Fail=-1 !If test fails, dont say it passed just be- 5949 END IF !cause the cal output was used. 5950 ! 5951 Pass_fail(Fail) ! PASS JUDGEMENT 5952 SUBEND ! NOISESB_PRNT 5953 ! 5954 Cfaccy_prnt: SUB Cfaccy_prnt(Test_data(*)) 5955 ! Rev C.00.00 Added N=8 capability to support 8564E/65E 5956 ! Also changed freq count marker accuracy fudge factor 5957 ! from 5 Hz to 2 Hz. 5958 OPTION BASE 1 5959 COM /Test_flags/Test_number,Sequence_type,Last_test 5960 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 5961 ! 5962 Khz=1.E+3 5963 Mhz=1.E+6 5964 Ghz=1.E+9 5965 ! 5966 Fail=0 ! INNOCENT UNTIL PROVEN GUILTY 5967 R$=" " ! INNOCENT UNTIL PROVEN GUILTY 5968 Max_rdout=9.9999999E+10 ! MAXIMUM VALUE OF READOUT 5969 Max_pct=999.9 ! MAXIMUM VALUE OF PERCENTAGE 5970 Fref=0 ! FREQUENCY REFERENCE ACCURACY, SET TO ZERO BECAUSE 5971 ! SOURCE IS LOCKED TO ANALYZER. 5972 Span_nar=.01 ! Span contribution for narrow (Frac-N) spans 5973 Span_wide=.05 ! Span contribution for wide (YTO) spans 5974 Pct_rbw=.15 ! RES BW contribution to normal marker accuracy 5975 Fudge_nmkr=10 ! Fudge factor for normal marker accuracy 5976 Fudge_cntmkr=2 ! Fudge factor for Frequency Count Marker ! Rev C.00.00 5977 ! Fudge_cntmkr was 5 Hz before, changed to 2 Hz 5978 Max_fracn_span=2*Mhz ! Maximum Fractional-N span 5979 Cf_ptr=1 ! WHERE CENTER FREQ DATA IS 5980 Span_ptr=2 ! WHERE SPAN DATA IS 5981 Rbw_ptr=3 ! WHERE RES BW DATA IS 5982 Nmkr_ptr=4 ! WHERE NORMAL MARKER DATA IS 5983 Cntmkr_ptr=5 ! WHERE FREQUENCY COUNT MARKER IS 5984 Lsd=1 ! FREQUENCY COUNT MARKER LSD 5985 OUTPUT @Printer;"************************** FREQUENCY READOUT ACCURACY **************************" 5986 OUTPUT @Printer;" Specification:" 5987 OUTPUT @Printer;" SPAN > 2 MHz x N :" 5988 OUTPUT @Printer;" <+/-[(Frequency Readout x Frequency Reference Accuracy)" 5989 OUTPUT @Printer;" +(5% of SPAN) + (15% of RES BW) + 10 Hz]" 5990 OUTPUT @Printer;" SPAN <= 2 MHz x N :" 5991 OUTPUT @Printer;" <+/-[(Frequency Readout x Frequency Reference Accuracy)" 5992 OUTPUT @Printer;" +(1% of SPAN) + (15% of RES BW) + 10 Hz]" 5993 OUTPUT @Printer 5994 OUTPUT @Printer 5995 OUTPUT @Printer;" Note: Source is locked to analyzer's frequency reference," 5996 OUTPUT @Printer;" cancelling the 'Frequency Readout x Frequency Reference" 5997 OUTPUT @Printer;" Accuracy' term" 5998 OUTPUT @Printer 5999 OUTPUT @Printer 6000 OUTPUT @Printer USING "10X,6A,13X,6A,24X,13A";"CENTER","MARKER","PERCENTAGE OF" 6001 OUTPUT @Printer USING "11X,4A,5X,4A,,5X,7A,6X,13A,4X,13A";"FREQ","SPAN","READOUT","SPECIFICATION","SPECIFICATION" 6002 OUTPUT @Printer USING "11X,5A,14X,5A, 9X,8A,12X,3A";"(GHz)","(GHz)","(+/- Hz)","(%)" 6003 OUTPUT @Printer USING "9X,K";"________________________________________________________________" 6004 FOR X=1 TO SIZE(Test_data,1) 6005 FOR Y=1 TO SIZE(Test_data,2) 6006 Cf=Test_data(X,Y,Cf_ptr) 6007 N=1+(Cf>6.46*Ghz)+2*(Cf>13.2*Ghz)+4*(Cf>31.15*Ghz) ! Rev C.00.00 6008 Span=Test_data(X,Y,Span_ptr) 6009 Rbw=Test_data(X,Y,Rbw_ptr) 6010 Readout=Test_data(X,Y,Nmkr_ptr) 6011 IF Span<=Max_fracn_span*N THEN 6012 Pct_span=Span_nar 6013 ELSE 6014 Pct_span=Span_wide 6015 END IF 6016 Spec=(Cf*Fref)+(Span*Pct_span)+(Rbw*Pct_rbw)+Fudge_nmkr 6017 Pct_spec=((Readout-Cf)/Spec)*100 6018 IF ABS(Pct_spec)>100 THEN 6019 Fail=1 6020 R$="<<<<" 6021 END IF 6022 IF ABS(Readout)>Max_rdout THEN Readout=Max_rdout 6023 IF ABS(Pct_spec)>Max_pct THEN Pct_spec=Max_pct 6024 Cnvrt_to_str(Span,3,Span$) 6025 SELECT Y 6026 CASE 1,2 ! 1 and 2 MHz spans 6027 OUTPUT @Printer USING "11X,DD.D,2X,8A,3X,DD.6D,7X,8D,10X,S3D.D,4A";Cf/1.E+9,Span$,Readout/1.E+9,Spec,Pct_spec,R$ 6028 CASE 3,4,5 ! 10, 20, and 50 MHz spans 6029 OUTPUT @Printer USING "11X,DD.D,2X,8A,3X,DD.5D,8X,8D,10X,S3D.D,4A";Cf/1.E+9,Span$,Readout/1.E+9,Spec,Pct_spec,R$ 6030 CASE 6 ! 100 MHz span 6031 OUTPUT @Printer USING "11X,DD.D,2X,8A,3X,DD.4D,9X,8D,10X,S3D.D,4A";Cf/1.E+9,Span$,Readout/1.E+9,Spec,Pct_spec,R$ 6032 CASE 7 ! 1 GHz span 6033 OUTPUT @Printer USING "11X,DD.D,2X,8A,3X,DD.3D,10X,8D,10X,S3D.D,4A";Cf/1.E+9,Span$,Readout/1.E+9,Spec,Pct_spec,R$ 6034 END SELECT 6035 R$=" " 6036 NEXT Y 6037 OUTPUT @Printer 6038 NEXT X 6039 Pass_fail(Fail) ! PASS JUDGEMENT 6040 ! 6041 Fail=0 ! INNOCENT UNTIL PROVEN GUILTY 6042 R$=" " ! INNOCENT UNTIL PROVEN GUILTY 6043 Y=1 6044 OUTPUT @Printer;"*********************** FREQUENCY COUNT MARKER ACCURACY ************************" 6045 OUTPUT @Printer;" Specification:" 6046 OUTPUT @Printer;" <+/- [(Marker Frequency x Frequency Reference Accuracy)" 6047 OUTPUT @Printer;" + (2 Hz x N) + 1 LSD ]" ! Rev C.00.00 6048 OUTPUT @Printer 6049 OUTPUT @Printer;" Note: Source is locked to analyzer's frequency reference," 6050 OUTPUT @Printer;" cancelling the 'Marker Frequency x Frequency Reference" 6051 OUTPUT @Printer;" Accuracy' term" 6052 OUTPUT @Printer 6053 OUTPUT @Printer USING "10X,6A,6X,6A,27X,13A";"CENTER","MARKER","PERCENTAGE OF" 6054 OUTPUT @Printer USING "11X,4A,6X,9A,6X,13A,6X,13A";"FREQ","FREQUENCY","SPECIFICATION","SPECIFICATION" 6055 OUTPUT @Printer USING "11X,5A,7X,5A,10X,8A,14X,3A";"(GHz)","(GHz)","(+/- Hz)","(%)" 6056 OUTPUT @Printer USING "9X,K";"____________________________________________________________" 6057 FOR X=1 TO SIZE(Test_data,1) 6058 Cf=Test_data(X,Y,Cf_ptr) 6059 N=1+(Cf>6.46*Ghz)+2*(Cf>13.2*Ghz)+4*(Cf>31.15*Ghz) ! Rev C.00.00 6060 Count=Test_data(X,Y,Cntmkr_ptr) 6061 Spec=(Cf*Fref)+(N*Fudge_cntmkr)+Lsd 6062 Pct_spec=(((Count-Cf)/Spec)*100) 6063 IF ABS(Count-Cf)>Spec THEN 6064 Fail=1 6065 R$="<<<<" 6066 END IF 6067 IF ABS(Count)>Max_rdout THEN Count=Max_rdout 6068 IF ABS(Pct_spec)>Max_pct THEN Pct_spec=Max_pct 6069 OUTPUT @Printer USING "11X,DD.D,5X,2D.9D,7X,6D,13X,S3D.D,4A";Cf/1.E+9,Count/1.E+9,Spec,Pct_spec,R$ 6070 R$=" " 6071 NEXT X 6072 Pass_fail(Fail) ! PASS JUDGEMENT 6073 SUBEND ! CFACCY_PRNT 6074 ! 6075 Span_prnt: SUB Span_prnt(Test_data(*)) 6076 OPTION BASE 1 6077 COM /Conditions/Conditions$(*) 6078 COM /Test_flags/Test_number,Sequence_type,Last_test 6079 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 6080 ! 6081 Khz=1.E+3 6082 Mhz=1.E+6 6083 Ghz=1.E+9 6084 ! 6085 Fail=0 ! INNOCENT UNTIL PROVEN GUILTY 6086 R$=" " ! INNOCENT UNTIL PROVEN GUILTY 6087 Max_pct=99.9 ! MAXIMUM PERCENTAGE THAT CAN BE PRINTED 6088 Yto_spec=5 ! Spec for YTO spans (> 2 MHz x N) 6089 Fracn_spec=1 ! Spec for fractional-N spans (<=2 MHz x N) 6090 Max_fracn_span=2*Mhz 6091 ! 6092 OUTPUT @Printer;"*************************** FREQUENCY SPAN ACCURACY ****************************" 6093 OUTPUT @Printer;" Specification:" 6094 OUTPUT @Printer;" SPAN > 2 MHz x N: <+/- 5%" 6095 OUTPUT @Printer;" SPAN <= 2 MHz x N: <+/- 1%" 6096 OUTPUT @Printer 6097 OUTPUT @Printer 6098 OUTPUT @Printer USING "14X,6A,15X,6A,7X,8A,7X,4A";"CENTER","SIGNAL","MEASURED","SPAN" 6099 OUTPUT @Printer USING "15X,4A,7X,4A,3X,10A,4X,10A,4X,8A";"FREQ","SPAN","SEPARATION","SEPARATION","ACCURACY" 6100 OUTPUT @Printer USING "15X,5A,44X,3A";"(GHz)","(%)" 6101 OUTPUT @Printer USING "12X,K";"___________________________________________________________" 6102 FOR X=1 TO SIZE(Test_data,1) 6103 Cnvrt_to_str(Test_data(X,1),3,Cf$) 6104 Cnvrt_to_str(Test_data(X,2),3,Span$) 6105 Cnvrt_to_str(Test_data(X,3),3,Nominal$) 6106 Cnvrt_to_str(Test_data(X,4),3,Actual$) 6107 ! 6108 IF Test_data(X,4)<>-9999 THEN ! Do this if span was tested 6109 Span_accy=((Test_data(X,4)-Test_data(X,3))/Test_data(X,3))*100 6110 IF Test_data(X,2)<=Max_fracn_span THEN 6111 Spec=Fracn_spec 6112 ELSE 6113 Spec=Yto_spec 6114 END IF 6115 IF ABS(Span_accy)>Spec THEN 6116 Fail=1 6117 R$="<<<<" 6118 END IF 6119 IF ABS(Span_accy)>Max_pct THEN Span_accy=Max_pct 6120 OUTPUT @Printer USING "13X,8A,2X,8A,3X,8A,6X,8A,7X,SZZ.D,4A";Cf$,Span$,Nominal$,Actual$,Span_accy,R$ 6121 ELSE ! Span was not tested, tell them so. 6122 ! DO NOTHING 6123 END IF 6124 R$=" " 6125 NEXT X 6126 Pass_fail(Fail) ! PASS JUDGEMENT 6127 SUBEND ! SPAN_PRNT 6128 ! 6129 Cnvrt_to_str: SUB Cnvrt_to_str(Freq,Sig_digits,Freq$) 6130 ! SUBPROGRAM TO CONVERT A FREQUENCY TO A STRING, ROUNDED TO A GIVEN 6131 ! NUMBER OF DIGITS. THE STRING LENGTH EQUALS THE NUMBER OF SIGNIFICANT 6132 ! DIGITS + 5 (3 CHARACTERS FOR THE TERMINATOR, ONE BLANK, ONE DECIMAL 6133 ! POINT. MAXIMUM STRING LENGTH IS 20 CHARACTERS, MAXIMUM SIGNIFICANT 6134 ! DIGITS IS 15. 6135 ! 6136 Temp=Freq ! TEMPORARY COPY 6137 L=0 ! POWER OF TEN OF FREQ 6138 ! 6139 REPEAT ! FIND POWER OF TEN OF FREQ 6140 L=L+1 6141 Temp=Temp/10 6142 UNTIL Temp<1 6143 ! 6144 SELECT L ! FIND DIVISOR AND TERMINATOR 6145 CASE 1,2,3 6146 Dvsr=1 6147 T$=" Hz " 6148 CASE 4,5,6 6149 Dvsr=1000 6150 T$=" kHz" 6151 CASE 7,8,9 6152 Dvsr=1.E+6 6153 T$=" MHz" 6154 CASE 10,11,12 6155 Dvsr=1.E+9 6156 T$=" GHz" 6157 CASE ELSE 6158 T$="999 GHz" 6159 END SELECT 6160 ! 6161 Freq$=VAL$(DROUND((Freq/Dvsr),Sig_digits))&T$ 6162 ! 6163 L=LEN(Freq$) ! FILL OUT STRING UNTIL LENGTH=SIG_DIGITS + 5 6164 WHILE L<(Sig_digits+5) 6165 Freq$=" "&Freq$ 6166 L=LEN(Freq$) 6167 END WHILE 6168 SUBEND ! CNVRT_TO_STR 6169 ! 6170 Shd_prnt: SUB Shd_prnt(Test_data(*)) 6171 ! Rev B.01.00 Changes low frequency limit from 30 Hz to 1 MHz 6172 ! Rev B.01.00 Yields FAIL if 8560E and test not done 6173 ! Rev C.00.00 Added support for 8564E/65E 6174 ! Rev D.00.00 Added support for 8562E and SHD spec improvements 6175 ! Rev D.01.00 Changes serial prefix for SHD spec improvements 6176 ! Rev D.02.00 Changes serial prefix for SHD spec improvements 6177 OPTION BASE 1 6178 COM /Test_flags/Test_number,Sequence_type,Last_test 6179 COM /Conditions/Conditions$(0:44,1:2)[160] 6180 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 6181 ! 6182 DIM Spec(3) 6183 DIM Mxr_lvl(3) 6184 DIM Low_freq$(3)[10] 6185 DIM Result$[15] 6186 DIM Ser_num$[10] 6187 ! 6188 Fail=0 ! Innocent until proven guilty 6189 R$=" " ! Innocent until proven guilty 6190 Max_val=999.99! Maximum value that can be printed 6191 Model$=Conditions$(1,2)[1,7] ! Find model number of analyzer 6192 Dut("READ SERIAL NUMBER",Dummy,Ser_num$) ! Find serial number 6193 ! 6194 SELECT Model$ ! Opt H13 gives older analyzers new specs 6195 CASE "HP8560E" 6196 RESTORE Hp8560e_old 6197 IF VAL(Ser_num$)>=3632 THEN RESTORE Hp8560e_new 6198 IF FNOption_present("H13") THEN RESTORE Hp8560e_new 6199 CASE "HP8561E" 6200 RESTORE Hp8561e 6201 CASE "HP8562E" ! Rev D.00.00 6202 RESTORE Hp8562e 6203 CASE "HP8563E" 6204 RESTORE Hp8563e_old 6205 IF VAL(Ser_num$)>=3645 THEN RESTORE Hp8563e_new 6206 IF FNOption_present("H13") THEN RESTORE Hp8563e_new 6207 CASE "HP8564E" 6208 RESTORE Hp8564e_old 6209 IF VAL(Ser_num$)>=3641 THEN RESTORE Hp8564e_new 6210 IF FNOption_present("H13") THEN RESTORE Hp8564e_new 6211 CASE "HP8565E" 6212 RESTORE Hp8565e_old 6213 IF VAL(Ser_num$)>=3641 THEN RESTORE Hp8565e_new 6214 IF FNOption_present("H13") THEN RESTORE Hp8565e_new 6215 END SELECT 6216 ! 6217 Hp8560e_old: ! Pre-Sputpack 6218 DATA 1 ! 1 band of data 6219 DATA .001,1.45,72,-40 ! Low freq, high freq, SHD spec, mixer level 6220 Hp8560e_new: ! Sputpack 6221 DATA 1 ! 1 band of data 6222 DATA .020,1.45,79,-40 ! Low freq, high freq, SHD spec, mixer level 6223 Hp8561e: ! Non-Sputpack 6224 DATA 2 6225 DATA .001,1.45,72,-40 6226 DATA 1.45,3.25,72,-20 6227 Hp8562e: ! 6228 DATA 3 6229 DATA .020,1.45,79,-40 6230 DATA 1.45,2.0,85,-10 6231 DATA 2.0,6.6,100,-10 6232 Hp8563e_old: ! Pre-Sputpack 6233 DATA 3 6234 DATA .001,1.45,72,-40 6235 DATA 1.45,2.0,85,-10 6236 DATA 2.0,13.25,100,-10 6237 Hp8563e_new: ! Sputpack 6238 DATA 3 6239 DATA .020,1.45,79,-40 6240 DATA 1.45,2.0,85,-10 6241 DATA 2.0,13.25,100,-10 6242 Hp8564e_old: ! Pre-Sputpack 6243 DATA 3 6244 DATA .001,1.45,72,-40 6245 DATA 1.45,2.0,85,-10 6246 DATA 2.0,20,90,-10 6247 Hp8564e_new: ! Sputpack 6248 DATA 3 6249 DATA .020,1.45,79,-40 6250 DATA 1.45,2.0,85,-10 6251 DATA 2.0,20,90,-10 6252 Hp8565e_old: ! Pre-Sputpack 6253 DATA 3 6254 DATA .001,1.45,72,-40 6255 DATA 1.45,2.0,85,-10 6256 DATA 2.0,25,90,-10 6257 Hp8565e_new: ! Sputpack 6258 DATA 3 6259 DATA .020,1.45,79,-40 6260 DATA 1.45,2.0,85,-10 6261 DATA 2.0,25,90,-10 6262 ! 6263 READ Num_bands 6264 FOR I=1 TO Num_bands 6265 READ Low_freq,High_freq,Spec(I),Mxr_lvl(I) 6266 IF Low_freq>=1 THEN Low_freq$(I)=VAL$(Low_freq)&" GHz" 6267 IF Low_freq<1 THEN Low_freq$(I)=VAL$(Low_freq*1000)&" MHz" 6268 High_freq$(I)=VAL$(High_freq)&" GHz" 6269 NEXT I 6270 ! 6271 OUTPUT @Printer;"************************** SECOND HARMONIC DISTORTION **************************" 6272 OUTPUT @Printer;" Specification:" 6273 FOR I=1 TO Num_bands 6274 OUTPUT @Printer;" ";Low_freq$(I);" to ";High_freq$(I);"*: <-";VAL$(Spec(I));" with ";VAL$(Mxr_lvl(I));" dBm mixer level" 6275 NEXT I 6276 OUTPUT @Printer 6277 OUTPUT @Printer;" * Applied Signal Frequency Range" 6278 OUTPUT @Printer 6279 OUTPUT @Printer 6280 FOR I=1 TO Num_bands 6281 IF Test_data(I)>0 THEN ! The spec was tested 6282 IF Test_data(I)Max_val THEN Test_data(I)=Max_val 6287 Result$="-"&VAL$(PROUND(Test_data(I),-2))&" dBc"&R$ 6288 ELSE ! Test was not done 6289 Result$=" Not Tested" 6290 IF I>1 AND Fail=0 THEN Fail=-1! Short Pass indication if 1st band 6291 ! passed, and 2nd band not tested 6292 END IF 6293 OUTPUT @Printer USING "25X,K,K,K,K,K";Low_freq$(I)," to ",High_freq$(I),": ",Result$ 6294 R$=" " 6295 ! 6296 NEXT I 6297 ! 6298 IF (Test_data(1)<0) AND (Test_data(2)<0) AND (Test_data(3)<0) THEN Fail=1 6299 Pass_fail(Fail) ! PASS JUDGEMENT 6300 ! 6301 SUBEND 6302 ! 6303 Header_prnt: SUB Header_prnt 6304 ! Rev E.00.00 Modified to support 856xEC 6305 ! Rev D.00.00 Modified to add Op Ver revision to header 6306 ! Rev C.00.00 Modified to list options separately and list f/w revision 6307 COM /Test_flags/Test_number,Sequence_type,Last_test 6308 COM /Conditions/Conditions$(0:44,1:2)[160] 6309 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 6310 ! 6311 ASSIGN @Printer TO VAL(Conditions$(15,2)) 6312 ! 6313 DIM Model$[80] 6314 DIM Serial$[15] 6315 DIM Option$[31] ! Permits up to 8 options to be listed 6316 DIM Operator$[37] 6317 DIM Date$[15] 6318 DIM Time$[15] 6319 DIM Cond$[35] 6320 DIM Comment$[35] 6321 ! 6322 Dut("READ F/W REVISION",Fw_rev) 6323 Dut("READ MODEL NUMBER",Dummy,Model$) 6324 IF LEN(Model$)>7 THEN 6325 Option$=Model$[9;31] 6326 ELSE 6327 Option$="None" 6328 END IF 6329 Space=POS(Conditions$(1,2)," ") 6330 Model$=Conditions$(1,2)[1,7] 6331 Serial$=Conditions$(1,2)[Space+1;10] 6332 Model$=Model$&FNColor_flag$(Model$,Serial$) 6333 IF LEN(Model$)=7 THEN Model$=Model$&" " ! Make same length as EC model 6334 Operator$=Conditions$(2,2)[1;25] 6335 Date$=Conditions$(3,2)[1;15] 6336 Time$=Conditions$(4,2)[1;15] 6337 Cond$=Conditions$(5,2)[1;35] 6338 Comment$=Conditions$(6,2)[1;35] 6339 IF Operator$="" THEN Operator$="_________________________" 6340 IF Time$="" THEN Time$="_______________" 6341 IF Date$="" OR VAL(Date$[7])<1987 THEN ! Valid date can't be before 1987 6342 Date$="_______________" ! User will have to write in a 6343 Time$="_______________" ! valid date. 6344 END IF 6345 IF Cond$="" THEN Cond$=RPT$("_",35) 6346 IF Comment$="" THEN Comment$=RPT$("_",35) 6347 OUTPUT @Printer;"________________________________________________________________________________" 6348 OUTPUT @Printer 6349 OUTPUT @Printer USING "18X,3A,6A,X,34A";" ",Model$[3;6],"OPERATION VERIFICATION TEST RECORD" 6350 OUTPUT @Printer USING "34X,K";"Rev E.00.01" ! Also change in Draw_alpha_hdr 6351 OUTPUT @Printer 6352 ! OUTPUT @Printer;" HEWLETT-PACKARD COMPANY" ! Rev E.00.00 Removed 6353 OUTPUT @Printer;" AGILENT TECHNOLOGIES" ! Rev E.00.00 Added 6354 OUTPUT @Printer 6355 OUTPUT @Printer USING "5X,6A,23A,5X,11A,25A";"Model ",Model$,"Tested By: ",Operator$ 6356 OUTPUT @Printer USING "5X,8A,31A";"Options ",Option$ 6357 OUTPUT @Printer USING "5X,11A,15A,8X,6A,15A";"Serial No. ",Serial$,"Date: ",Date$ 6358 OUTPUT @Printer USING "5X,18A,6D";"Firmware Revision ";Fw_rev 6359 OUTPUT @Printer 6360 OUTPUT @Printer USING "39X,6A,15A";"Time: ",Time$ 6361 OUTPUT @Printer 6362 OUTPUT @Printer USING "14X,K,K";"Test Conditions:",Cond$ 6363 OUTPUT @Printer USING "14X,K,K";"User's Comments:",Comment$ 6364 OUTPUT @Printer 6365 OUTPUT @Printer;"________________________________________________________________________________" 6366 OUTPUT @Printer 6367 OUTPUT @Printer 6368 PRINTER IS CRT 6369 SUBEND 6370 ! 6371 Rectangle: SUB Rectangle(Width,Height) 6372 ! Subprogram to draw a rectangle, thus eliminating the need 6373 ! for the RECTANGLE function of BASIC 3.0 and 4.0 and allowing 6374 ! program to run in BASIC 2.1 6375 IDRAW Width,0 6376 IDRAW 0,Height 6377 IDRAW -Width,0 6378 IDRAW 0,-Height 6379 SUBEND ! Subprogram Rectangle 6380 ! 6381 Input: SUB Input(Return$) 6382 ! Subprogram to accept keyboard input and, if the text has been 6383 ! scrolled, to "unscroll" it and re-draw the header. 6384 ! 6385 COM /Menu/Menu$ 6386 ! 6387 OUTPUT KBD;"#";Return$;"H";! Rev C.00.00 Echo back original value, if 6388 ENTER KBD;Return$ ! provided in call to Input. 6389 ! LINPUT "",Return$ 6390 ! 6391 STATUS CRT,3;Lines_above 6392 IF Lines_above>1 THEN ! Only unscroll and redraw if necessary 6393 CONTROL CRT,1;-Lines_above+1 6394 OUTPUT CRT;"" 6395 Draw_alpha_hdr(Menu$) 6396 END IF 6397 ! 6398 SUBEND 6399 ! 6400 Avail_bws: SUB Avail_bws(Max_avail,Max_specd,Min_avail,Min_specd) 6401 ! Subprogram to determine the maximum and minimum available bandwidths and 6402 ! the specified bandwidths. If bandwidth is available, it will be tested, 6403 ! but if it is not spec'd, the test will not fail if that bandwidth fails. 6404 ! 6405 Max_avail=14 ! These numbers correspond to the indices given 6406 Max_specd=14 ! for arrays Bw(*) and Bw$(*). These arrays are 6407 Min_avail=1 ! initialized at beginning of subprogram Output. 6408 Min_specd=1 6409 ! 6410 SELECT FNMin_rbw 6411 CASE 100 6412 Min_avail=5 6413 Min_specd=5 6414 CASE 10 6415 Min_avail=3 6416 Min_specd=3 6417 CASE 1 6418 Min_avail=1 6419 Min_specd=1 6420 END SELECT 6421 SUBEND 6422 ! 6423 Option_present: DEF FNOption_present(Target$) 6424 ! Function to determine whether or not the option defined in Target$ is 6425 ! present in the 8562A/B. 6426 ! 6427 DIM Model$[255] 6428 Dut("READ MODEL NUMBER",Dummy,Model$) 6429 Found=0 6430 Num_options=(LEN(Model$)-7)/4 6431 IF Num_options>0 THEN 6432 FOR Opt=1 TO Num_options 6433 Opt$=Model$[(5+(Opt*4));3] 6434 IF Opt$=Target$ THEN Found=1 6435 NEXT Opt 6436 END IF 6437 ! IF Target$="026" THEN Found=1 !DEBUG 6438 RETURN Found 6439 FNEND 6440 Freqresp_prnt: SUB Freqresp_prnt(Test_data(*)) ! 891006:1110.MLG; 900814:1009.GPB 6441 ! Rev C.00.00 Revised to accommodate 8564E/8565E 6442 ! Redimensioned band-dependent arrays up to (0:6) from (0:4) 6443 ! Added specs for 8564E/65E 6444 ! Slightly compressed Band-to-Band Freq Resp table to accommodate 6445 ! additional bands for 8564E/65E. 6446 ! Changed pointers to reflect larger Test_data(*) size 6447 ! Rev D.00.00 Added support for 8562E 6448 !----------------------------------------------------------------------- 6449 OPTION BASE 1 6450 COM /Test_flags/Test_number,Sequence_type,Last_test 6451 COM /Conditions/Conditions$(0:44,1:2)[160] 6452 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 6453 COM /Equipment/Present(1:20),Power_mtr_avail,Counter_avail,Sensor_avail(1:20),Source_avail(1:20),Source2_avail(1:20),Enough_equip(1:20) 6454 COM /Coupling/ INTEGER Ac_dc 6455 ! 6456 DIM Band$(0:6)[18],Min_b_ptr(0:6),Max_b_ptr(0:6),Which_specs$[15],Model$[7] 6457 DIM Bnd$(0:6)[2] 6458 DIM Btb_ptr(0:6),Spec(0:6) 6459 DIM Bnd_spec(0:6,0:6),Ref_spec(0:6) 6460 DIM Bnd_data(0:6,0:6) 6461 Fail=0 ! INNOCENT UNTIL PROVEN GUILTY 6462 R$=" " ! INNOCENT UNTIL PROVEN GUILTY 6463 Max_val=99.99 ! MAXIMUM VALUE THAT CAN BE PRINTED 6464 Fltns_ptr=1 ! Y-VALUE FOR FLATNESS DATA IN TEST_DATA(*) 6465 F_min=FNF_min 6466 F_max=FNF_max 6467 ! 6468 Model$=Conditions$(1,2)[1,7] 6469 ! 6470 ! Specs for 8564E & 8565E are for 20degC to 30degC ONLY !!! 6471 Hp8565e: DATA 1.00,1.80,2.80,3.50,4.00,3.00,4.00 !8565E FREQ RESP REF TO CAL 6472 DATA 0.80,3.20,4.00,4.30,4.00,4.70,4.80 !bnd 0,0 --> 0,6 6473 DATA 1.40,4.60,4.90,4.60,5.30,5.40 !bnd 1,1 --> 1,6 6474 DATA 2.20,5.70,5.40,6.10,6.20 !bnd 2,2 --> 2,6 6475 DATA 2.50,5.70,6.40,6.50 !bnd 3,3 --> 3,6 6476 DATA 2.20,6.10,6.20 !bnd 4,4 --> 4,6 6477 DATA 2.90,6.90 !bnd 5,5 --> 5,6 6478 DATA 3.00 !bnd 6,6 6479 ! 6480 Bnd_sw_unc=1 ! Bandswitching Uncertainty Specification 6481 ! 6482 Hp8564e: DATA 1.00,1.80,2.80,3.50,4.00,3.00,3.20 !8564E FREQ RESP REF TO CAL 6483 DATA 0.80,3.20,4.00,4.30,4.00,4.70,4.20 !bnd 0,0 --> 0,6 6484 DATA 1.40,4.60,4.90,4.60,5.30,4.80 !bnd 1,1 --> 1,6 6485 DATA 2.20,5.70,5.40,6.10,5.60 !bnd 2,2 --> 2,6 6486 DATA 2.50,5.70,6.40,5.90 !bnd 3,3 --> 3,6 6487 DATA 2.20,6.10,5.60 !bnd 4,4 --> 4,6 6488 DATA 2.90,6.30 !bnd 5,5 --> 5,6 6489 DATA 2.40 !bnd 6,6 6490 ! 6491 Hp8563e: DATA 1.80,2.40,2.90,4.00,4.00,0.00,0.00 !8563E FREQ RESP REF TO CAL 6492 DATA 1.25,3.75,4.45,4.75,5.55,0.00,0.00 !bnd 0,0 --> 0,4 6493 DATA 1.50,4.70,5.00,5.80,0.00,0.00 !bnd 1,1 --> 1,4 6494 DATA 2.20,5.70,6.50,0.00,0.00 !bnd 2,2 --> 2,4 6495 DATA 2.50,6.80,0.00,0.00 !bnd 3,3 --> 3,4 6496 DATA 3.30,0.00,0.00 !bnd 4,4 6497 DATA 0.00,0.00 !bogus specs 6498 DATA 0.00 !bogus specs 6499 ! 6500 Hp8562e_ac: DATA 1.90,3.00,3.00,0.00,0.00,0.00,0.00 !8562E AC COUPLED SPECS, REF TO CAL ! Rev E.00.01 6501 DATA 1.25,4.25,4.45,0.00,0.00,0.00,0.00 !bnd 0,0 --> 0,2 6502 DATA 2.00,5.20,0.00,0.00,0.00,0.00 !bnd 1,1 --> 1,2 6503 DATA 2.20,0.00,0.00,0.00,0.00 !bnd 2,2 6504 DATA 0.00,0.00,0.00,0.00 !bogus specs 6505 DATA 0.00,0.00,0.00 !bogus specs 6506 DATA 0.00,0.00 !bogus specs 6507 DATA 0.00 !bogus specs 6508 ! 6509 Hp8562e_dc: DATA 1.80,2.50,2.90,0.00,0.00,0.00,0.00 !8562E DC COUPLED SPECS, REF TO CAL ! Rev D.00.00 6510 DATA 1.25,3.75,4.45,0.00,0.00,0.00,0.00 !bnd 0,0 --> 0,2 6511 DATA 1.50,4.70,0.00,0.00,0.00,0.00 !bnd 1,1 --> 1,2 6512 DATA 2.20,0.00,0.00,0.00,0.00 !bnd 2,2 6513 DATA 0.00,0.00,0.00,0.00 !bogus specs 6514 DATA 0.00,0.00,0.00 !bogus specs 6515 DATA 0.00,0.00 !bogus specs 6516 DATA 0.00 !bogus specs 6517 ! 6518 Hp8561e_ac: DATA 1.90,3.00,0.00,0.00,0.00,0.00,0.00 !8561E AC COUPLED SPECS, REF TO CAL 6519 DATA 1.10,4.10,0.00,0.00,0.00,0.00,0.00 !bnd 0,0 --> 0,1 6520 DATA 2.00,0.00,0.00,0.00,0.00,0.00 !bnd 1,1 6521 DATA 0.00,0.00,0.00,0.00,0.00 !bogus specs 6522 DATA 0.00,0.00,0.00,0.00 !bogus specs 6523 DATA 0.00,0.00,0.00 !bogus specs 6524 DATA 0.00,0.00 !bogus specs 6525 DATA 0.00 !bogus specs 6526 ! 6527 Hp8561e_dc: DATA 1.75,2.50,0.00,0.00,0.00,0.00,0.00 !8561E DC COUPLED SPECS, REF TO CAL 6528 DATA 1.00,3.50,0.00,0.00,0.00,0.00,0.00 !bnd 0,0 --> 0,1 6529 DATA 1.50,0.00,0.00,0.00,0.00,0.00 !bnd 1,1 6530 DATA 0.00,0.00,0.00,0.00,0.00 !bogus specs 6531 DATA 0.00,0.00,0.00,0.00 !bogus specs 6532 DATA 0.00,0.00,0.00 !bogus specs 6533 DATA 0.00,0.00 !bogus specs 6534 DATA 0.00 !bogus specs 6535 ! 6536 Hp8560e_ac: DATA 1.70,0.00,0.00,0.00,0.00,0.00,0.00 !8560E AC COUPLED SPECS, REF TO CAL 6537 DATA 1.40,0.00,0.00,0.00,0.00,0.00,0.00 !bnd 0,0 --> 0,1 6538 DATA 0.00,0.00,0.00,0.00,0.00,0.00 !bogus specs 6539 DATA 0.00,0.00,0.00,0.00,0.00 !bogus specs 6540 DATA 0.00,0.00,0.00,0.00 !bogus specs 6541 DATA 0.00,0.00,0.00 !bogus specs 6542 DATA 0.00,0.00 !bogus specs 6543 DATA 0.00 !bogus specs 6544 ! 6545 Hp8560e_dc: DATA 1.50,0.00,0.00,0.00,0.00,0.00,0.00 !8560E DC COUPLED SPECS, REF TO CAL 6546 DATA 1.00,0.00,0.00,0.00,0.00,0.00,0.00 !bnd 0,0 --> 0,1 6547 DATA 0.00,0.00,0.00,0.00,0.00,0.00 !bogus specs 6548 DATA 0.00,0.00,0.00,0.00,0.00 !bogus specs 6549 DATA 0.00,0.00,0.00,0.00 !bogus specs 6550 DATA 0.00,0.00,0.00 !bogus specs 6551 DATA 0.00,0.00 !bogus specs 6552 DATA 0.00 !bogus specs 6553 ! 6554 SELECT Model$ 6555 CASE "HP8560E" 6556 Hi_band=0 6557 IF Ac_dc=1 THEN 6558 RESTORE Hp8560e_dc 6559 ELSE 6560 RESTORE Hp8560e_ac 6561 END IF 6562 CASE "HP8561E" 6563 Hi_band=1 6564 IF Ac_dc=1 THEN 6565 RESTORE Hp8561e_dc 6566 ELSE 6567 RESTORE Hp8561e_ac 6568 END IF 6569 CASE "HP8562E" 6570 Hi_band=2 6571 IF Ac_dc=1 THEN 6572 RESTORE Hp8562e_dc 6573 ELSE 6574 RESTORE Hp8562e_ac 6575 END IF 6576 CASE "HP8563E" 6577 Hi_band=4 6578 RESTORE Hp8563e 6579 CASE "HP8564E" 6580 Hi_band=6 6581 RESTORE Hp8564e 6582 CASE "HP8565E" 6583 Hi_band=6 6584 RESTORE Hp8565e 6585 END SELECT 6586 ! 6587 READ Ref_spec(0),Ref_spec(1),Ref_spec(2),Ref_spec(3),Ref_spec(4),Ref_spec(5),Ref_spec(6) 6588 ! 6589 FOR R=0 TO 6 6590 FOR C=R TO 6 6591 READ Bnd_spec(R,C) 6592 NEXT C 6593 NEXT R 6594 ! 6595 Response_ptr: DATA 521,522 !pointers for location of test data 6596 Min_max_ptr: DATA 523,524,525,526,527,528,529,530,531,532,533,534,535,536 6597 Bnd_to_bnd_ptr: DATA 537,544,550,555,559,562,564 6598 ! 6599 RESTORE Response_ptr 6600 READ Min_resp_ptr,Max_resp_ptr !MAX & MIN FREQ RESP REL TO CAL OUT 6601 ! 6602 FOR Band=0 TO Hi_band !INDEX FOR MIN AND MAX OF EA BAND 6603 READ Min_b_ptr(Band),Max_b_ptr(Band) 6604 NEXT Band 6605 ! 6606 RESTORE Bnd_to_bnd_ptr !RESETS DATA POINTER TO RIGHT DATA 6607 FOR Band=0 TO Hi_band !INDEX FOR BAND TO BAND MEAS 6608 READ Btb_ptr(Band) 6609 NEXT Band 6610 ! 6611 Freq=MAX(F_min,Test_data(1,1)) 6612 SELECT Freq 6613 CASE <1000 6614 Band$(0)=VAL$(Freq)&" Hz" 6615 CASE <1.E+6 6616 Band$(0)=VAL$(Freq/1.E+3)&" kHz" 6617 CASE <1.E+9 6618 Band$(0)=VAL$(Freq/1.E+6)&" MHz" 6619 CASE ELSE 6620 Band$(0)=VAL$(Freq/1.E+9) 6621 END SELECT 6622 ! 6623 Band$(0)=Band$(0)&" to 2.9 GHz" 6624 Band$(1)=" 2.9 to 6.46 GHz" 6625 IF Model$="HP8561E" THEN Band$(1)=" 2.9 to 6.5 GHz" 6626 Band$(2)="6.46 to 13.2 GHz" 6627 Band$(3)=" 13.2 to 22 GHz " 6628 Band$(4)=" 22 to 26.5 GHz " 6629 IF Model$="HP8564E" OR Model$="HP8565E" THEN Band$(4)=" 22 to 26.8 GHz " 6630 Band$(5)="26.8 to 31.15GHz" 6631 IF Model$="HP8564E" THEN Band$(6)="31.15 to 40 GHz" 6632 IF Model$="HP8565E" THEN Band$(6)="31.15 to 50 GHz" 6633 Bnd$(0)="0 " 6634 Bnd$(1)="1 " 6635 Bnd$(2)="2 " 6636 Bnd$(3)="3A" 6637 Bnd$(4)="3B" 6638 Bnd$(5)="4 " 6639 Bnd$(6)="5 " 6640 ! 6641 ! PRINT FREQUENCY RESPONSE TEST OUTPUT HEADER 6642 IF Model$="HP8563E" OR Model$="HP8564E" OR Model$="HP8565E" THEN 6643 OUTPUT @Printer;"***************************** FREQUENCY RESPONSE ******************************" 6644 ELSE 6645 IF Ac_dc=1 THEN 6646 OUTPUT @Printer;"**************************** DC FREQUENCY RESPONSE ****************************" 6647 ELSE 6648 OUTPUT @Printer;"**************************** AC FREQUENCY RESPONSE ****************************" 6649 END IF 6650 END IF 6651 ! 6652 OUTPUT @Printer 6653 IF F_max>3.E+9 THEN 6654 OUTPUT @Printer;" Specification:" 6655 OUTPUT @Printer;" Band Switching Uncertainty: < "&VAL$(Bnd_sw_unc)&" dB" 6656 OUTPUT @Printer;" (included in Band-to-Band Frequency Response)" 6657 IF F_max>3.0E+10 THEN ! 8564E/65E specs apply only at room temp. 6658 OUTPUT @Printer 6659 OUTPUT @Printer;" Specifications listed below apply only" 6660 OUTPUT @Printer;" over 20degC to 30degC temperature range" 6661 END IF 6662 END IF 6663 OUTPUT @Printer 6664 OUTPUT @Printer;" Absolute Frequency Response:" 6665 OUTPUT @Printer;" (Referenced to 300 MHz CAL OUTPUT)" 6666 OUTPUT @Printer 6667 OUTPUT @Printer USING "39X,9A";"MIN/MAX" 6668 OUTPUT @Printer USING "20X,9A,10X,9A";"FREQUENCY","FREQUENCY" 6669 OUTPUT @Printer USING "9X,4A,8X,5A,13X,8A,6X,13A";"BAND","RANGE","RESPONSE","SPECIFICATION" 6670 OUTPUT @Printer USING "42X,4A,9X,4A";"(dB)","(dB)" 6671 OUTPUT @Printer USING "7X,K";"___________________________________________________________" 6672 ! 6673 Fmt: IMAGE 9X,2A,4X,18A,2X,MDD.DD,A,MDD.DD,9X,DD.DD,4A 6674 FOR I=0 TO Hi_band ! PRINTOUT BAND, DATA, AND SPEC FOR IN-BAND FREQ RESP 6675 IF ABS(Test_data(Max_b_ptr(I),Fltns_ptr))>Ref_spec(I) OR ABS(Test_data(Min_b_ptr(I),Fltns_ptr))>Ref_spec(I) THEN 6676 Fail=1 6677 R$="<<<<" 6678 IF ABS(Test_data(Max_b_ptr(I),Fltns_ptr))>Max_val THEN Test_data(Max_b_ptr(I),Fltns_ptr)=Max_val 6679 IF ABS(Test_data(Min_b_ptr(I),Fltns_ptr))>Max_val THEN Test_data(Min_b_ptr(I),Fltns_ptr)=Max_val 6680 END IF 6681 IF Ac_dc=2 AND (POS(Band$(0),"kHz") OR POS(Band$(0)," Hz")) THEN 6682 Band$(0)="100 kHz "&Band$(0)[POS(Band$(0),"to")] !AC COUPLED BAND STARTS AT 100KHZ 6683 END IF 6684 OUTPUT @Printer USING Fmt;Bnd$(I),Band$(I),Test_data(Min_b_ptr(I),Fltns_ptr),"/",Test_data(Max_b_ptr(I),Fltns_ptr),Ref_spec(I),R$ 6685 R$=" " 6686 NEXT I 6687 ! 6688 OUTPUT @Printer 6689 OUTPUT @Printer 6690 OUTPUT @Printer;" Relative Frequency Response:" 6691 OUTPUT @Printer 6692 OUTPUT @Printer USING "19X,9A,5X,9A";"FREQUENCY","FREQUENCY" 6693 OUTPUT @Printer USING "9X,4A,8X,5A,7X,8A,6X,13A";"BAND","RANGE","RESPONSE","SPECIFICATION" 6694 OUTPUT @Printer USING "33X,9A,7X,9A";"(dB, p-p)","(dB, p-p)" 6695 OUTPUT @Printer USING "7X,K";"______________________________________________________" 6696 ! 6697 FOR I=0 TO Hi_band ! PRINTOUT BAND, DATA, AND SPEC FOR IN-BAND FREQ RESP 6698 Specif=Bnd_spec(I,I)*2 ! Correct data for peak-to-peak value 6699 IF Test_data(Btb_ptr(I),Fltns_ptr)>Specif THEN 6700 IF ABS(Test_data(Btb_ptr(I),Fltns_ptr))>Max_val THEN Test_data(Btb_ptr(I),Fltns_ptr)=Max_val 6701 Fail=1 6702 R$="<<<<" 6703 END IF 6704 OUTPUT @Printer USING "9X,2A,4X,18A,2X,DD.DD,11X,DD.DD,4A";Bnd$(I),Band$(I),Test_data(Btb_ptr(I),Fltns_ptr),Specif,R$ 6705 R$=" " 6706 NEXT I 6707 ! 6708 R$=" " ! RESET RESULT FLAG STRING 6709 ! 6710 IF F_max>3.E+9 THEN ! Print Band-to-Band Frequency Response data 6711 OUTPUT @Printer 6712 OUTPUT @Printer 6713 OUTPUT @Printer 6714 OUTPUT @Printer;" Band-to-Band Frequency Response:" 6715 OUTPUT @Printer;" (Specification is in parenthesis)" 6716 OUTPUT @Printer 6717 SELECT Model$ 6718 CASE "HP8561E" 6719 OUTPUT @Printer;" Band 0 1 " 6720 OUTPUT @Printer;" _________________________" 6721 CASE "HP8562E" 6722 OUTPUT @Printer;" Band 0 1 2 " 6723 OUTPUT @Printer;" ___________________________________" 6724 CASE "HP8563E" 6725 OUTPUT @Printer;" Band 0 1 2 3A 3B" 6726 OUTPUT @Printer;" _____________________________________________________" 6727 CASE "HP8564E","HP8565E" 6728 OUTPUT @Printer;" Band 0 1 2 3A 3B 4 5" 6729 OUTPUT @Printer;"______________________________________________________________________" 6730 END SELECT 6731 FOR R=0 TO Hi_band! R=ROW OF TABLE 6732 IF F_max<2.7E+10 THEN OUTPUT @Printer USING "5X,#" ! Add 5 spaces if not 8564E/65E 6733 OUTPUT @Printer USING "2X,2A,#";Bnd$(R) ! PRINT BAND# 6734 FOR C=0 TO Hi_band! C= COLUMN OF TABLE 6735 IF POS(Which_specs$,"OLD")>0 THEN 6736 Bnd_spec(R,C)=Bnd_sw_unc+Spec(R)+Spec(C)! SPECIFICATION 6737 ELSE 6738 Bnd_spec(C,R)=Bnd_spec(R,C) 6739 END IF 6740 IF C>R THEN ! GET BAND-BAND FREQ RESP DATA 6741 Data_ptr=Btb_ptr(R)+C-R! LOCATES PROPER DATA 6742 IF ABS(Test_data(Data_ptr,Fltns_ptr))>Max_val THEN Test_data(Data_ptr,Fltns_ptr)=Max_val 6743 Bnd_data(R,C)=Test_data(Data_ptr,Fltns_ptr) 6744 Bnd_data(C,R)=Test_data(Data_ptr,Fltns_ptr) 6745 END IF 6746 ! 6747 IF Bnd_data(R,C)>Bnd_spec(R,C) THEN ! CHECK BAND-BAND RESP 6748 Fail=1 6749 R$="<<<<" 6750 END IF 6751 IF R<>C THEN 6752 OUTPUT @Printer USING "4X,DD.DD,#";Bnd_data(R,C)! PRINT DATA 6753 ELSE 6754 OUTPUT @Printer USING "4X,5A,#";"*****"! DON'T PRINT DATA; SAME BAND DATA 6755 END IF 6756 ! 6757 NEXT C! NEXT COLUMN 6758 OUTPUT @Printer;R$ 6759 IF F_max<2.7E+10 THEN 6760 OUTPUT @Printer USING "10X,#"! Print 10 spaces if not 8564E/8565E 6761 ELSE 6762 OUTPUT @Printer USING "5X,#"! Print 5 spaces if 8564E/8565E 6763 END IF 6764 FOR C=0 TO Hi_band 6765 IF R<>C THEN 6766 OUTPUT @Printer USING "2X,A,DD.DD,A,#";"(",Bnd_spec(R,C),")"! PRINT SPEC 6767 ELSE 6768 OUTPUT @Printer USING "3X,5A,X,#";"*****"! DON'T PRINT SPEC; SAME BAND SPEC 6769 END IF 6770 ! 6771 NEXT C! NEXT COLUMN 6772 OUTPUT @Printer 6773 OUTPUT @Printer 6774 R$=" " 6775 NEXT R! NEXT ROW 6776 END IF 6777 OUTPUT @Printer 6778 ! 6779 OFF KEY 6780 DUMP GRAPHICS 6781 ! 6782 IF Test_data(1,1)=0 THEN ! Tell them we didn't test 6783 ! below 50 MHz 6784 OUTPUT @Printer 6785 OUTPUT @Printer 6786 OUTPUT @Printer;" Note: Frequency Response not tested below 50 MHz." 6787 OUTPUT @Printer 6788 IF Fail=0 THEN Fail=-1 ! Short Pass indication 6789 END IF 6790 ! 6791 Pass_fail(Fail,Ac_dc) ! PASS JUDGEMENT 6792 ! 6793 End_fr_prnt:! 6794 SUBEND 6795 ! 6796 F_min: DEF FNF_min ! Rev C.00.00 Added 8564E/65E 6797 ! Rev D.00.00 Added 8562E 6798 COM /Conditions/Conditions$(*) 6799 SELECT Conditions$(1,2)[1,7] 6800 CASE "HP8562A","HP8562B" 6801 F_min=1.E+3 6802 CALL Dut("READ SERIAL NUMBER",Dummy,S_n$) 6803 Prefix$=S_n$[1,4] 6804 IF Prefix$>="2929" THEN F_min=9.E+3 6805 IF FNOption_present("H13") THEN F_min=1.E+3 6806 CASE "HP8560A" 6807 F_min=50 6808 CASE "HP8561A" 6809 F_min=1000 6810 CASE "HP8561B" 6811 F_min=50 6812 CASE "HP8563A","HP8563E","HP8564E","HP8565E" 6813 F_min=9.E+3 6814 IF FNOption_present("006") THEN F_min=30 6815 CASE "HP8560E","HP8561E","HP8562E" ! Rev D.00.00 6816 F_min=30 6817 CASE ELSE 6818 F_min=9.E+3 6819 END SELECT 6820 RETURN F_min 6821 FNEND 6822 ! 6823 F_max: DEF FNF_max ! Rev C.00.00 Added 8564E/65E 6824 ! Rev D.00.00 Added 8562E 6825 COM /Conditions/Conditions$(*) 6826 SELECT Conditions$(1,2)[1,7] 6827 CASE "HP8562A","HP8562B" 6828 Max_freq=2.20E+10 6829 IF FNOption_present("026") THEN Max_freq=2.65E+10 6830 CASE "HP8560A","HP8560E" 6831 Max_freq=2.90E+9 6832 CASE "HP8561A" 6833 Max_freq=6.50E+9 6834 CASE "HP8561B","HP8561E" 6835 Max_freq=6.50E+9 6836 CASE "HP8562E" ! Rev D.00.00 6837 Max_freq=1.32E+10 6838 CASE "HP8563A" 6839 Max_freq=2.2E+10 6840 IF FNOption_present("026") THEN Max_freq=2.65E+10 6841 CASE "HP8563E" 6842 Max_freq=2.65E+10 6843 CASE "HP8564E" 6844 Max_freq=4.0E+10 6845 CASE "HP8565E" 6846 Max_freq=5.0E+10 6847 CASE ELSE 6848 Max_freq=2.9E+9 6849 END SELECT 6850 RETURN Max_freq 6851 FNEND 6852 ! 6853 Min_span: DEF FNMin_span 6854 COM /Conditions/Conditions$(*) 6855 Min_span=100 6856 SELECT Conditions$(1,2)[1,7] 6857 CASE "HP8562A","HP8562B" 6858 CALL Dut("READ F/W REVISION",F_w_rev) 6859 SELECT F_w_rev 6860 CASE <870807 6861 Min_span=1.E+4 6862 CASE ELSE 6863 Min_span=2.5E+3 6864 END SELECT 6865 CASE "HP8561A" 6866 Min_span=2.5E+3 6867 END SELECT 6868 RETURN Min_span 6869 FNEND 6870 ! 6871 Min_rbw: DEF FNMin_rbw ! Rev C.00.00 Added 8564E/65E 6872 ! Rev D.00.00 Added 8562E 6873 COM /Conditions/Conditions$(*) 6874 Min_rbw=100 6875 SELECT Conditions$(1,2)[1,7] 6876 CASE "HP8560A","HP8561B","HP8563A" 6877 Min_rbw=10 6878 CASE "HP8560E","HP8561E","HP8562E","HP8563E","HP8564E","HP8565E" 6879 Min_rbw=1 6880 IF FNOption_present("103") THEN Min_rbw=10 6881 END SELECT 6882 RETURN Min_rbw 6883 FNEND 6884 ! 6885 Ac_dc_paths: DEF FNAc_dc_paths ! Rev C.00.00 Added 8564E/65E 6886 ! Rev D.00.00 Added 8562E 6887 COM /Conditions/Conditions$(*) 6888 SELECT Conditions$(1,2)[1,7] 6889 CASE "HP8562A","HP8562B","HP8563A","HP8563E","HP8564E","HP8565E" 6890 Max_ac_dc=1 6891 CASE "HP8560A","HP8561A","HP8561B","HP8560E","HP8561E","HP8562E" 6892 Max_ac_dc=2 6893 END SELECT 6894 RETURN Max_ac_dc 6895 FNEND 6896 ! 6897 Res_fm_spec: DEF FNRes_fm_spec(Freq) 6898 COM /Conditions/Conditions$(*) 6899 ! REVISED 900315:1715 MLG 6900 ! Rev D.00.00 Added support for 8562E 6901 SELECT Conditions$(1,2)[1,7] 6902 CASE "HP8561A","HP8562A","HP8562B" 6903 Spec=50 6904 IF Freq>6.5E+9 THEN Spec=Spec*INT(Freq/5.4E+9) !Spec*N for upper bands 6905 CASE "HP8560A","HP8561B","HP8563A" 6906 Spec=10 6907 IF Freq>6.5E+9 THEN Spec=Spec*INT(Freq/5.4E+9) !Spec*N for upper bands 6908 CASE "HP8560E","HP8561E","HP8562E","HP8563E" ! Rev D.00.00 6909 Spec=1 6910 IF FNOption_present("103") THEN Spec=10 6911 IF Freq>6.5E+9 AND Freq<1.32E+10 THEN Spec=Spec*2 6912 IF Freq>1.32E+10 THEN Spec=Spec*4 6913 CASE "HP8564E","HP8565E" 6914 Spec=1 6915 IF FNOption_present("103") THEN Spec=10 6916 IF Freq>6.5E+9 AND Freq<1.32E+10 THEN Spec=Spec*2 6917 IF Freq>1.32E+11 AND Freq<2.68E+10 THEN Spec=Spec*4 6918 IF Freq>2.68E+10 AND Freq<3.115E+10 THEN Spec=Spec*4 6919 IF Freq>3.115E+10 THEN Spec=Spec*8 6920 END SELECT 6921 RETURN Spec 6922 FNEND 6923 ! 6924 Draw_alpha_hdr: SUB Draw_alpha_hdr(Label$) ! Draw Label$ on header 6925 ! Rev E.00.00 Added support for 856xEC models 6926 ! 6927 COM /Conditions/Conditions$(*) 6928 DIM Line1_text$[80] 6929 DIM Line2_text$[80] 6930 DIM Line3_text$[80] 6931 DIM In_text$[80] 6932 DIM Out_text$[80] 6933 DIM Ruler1$[80] 6934 DIM Ruler2$[80] 6935 Ruler2$="12345678901234567890123456789012345678901234567890123456789012345678901234567890" 6936 Ruler1$="00000000011111111112222222222333333333344444444445555555555666666666677777777778" 6937 ! 6938 STATUS KBD,9;Kbd_status 6939 IF BIT(Kbd_status,5) THEN 6940 Ul$=CHR$(132) 6941 Clr$=CHR$(128) 6942 ELSE 6943 Ul$=CHR$(132) 6944 Clr$=CHR$(128) 6945 END IF 6946 ! 6947 OUTPUT KBD;"K"; 6948 IF POS(Conditions$(1,2),"856") AND Conditions$(1,2)[7;1]="E" THEN 6949 Stop=POS(Conditions$(1,2),",")-1 ! Rev B.00.00 Added check for "E" since 6950 IF Stop<0 THEN Stop=999 ! Op Ver only supports 8560 E-Series 6951 Line1_text$=Conditions$(1,2)[3,7]&"/EC OPERATION VERIFICATION" 6952 ELSE 6953 Line1_text$="8560-E/EC SERIES OPERATION VERIFICATION" 6954 END IF 6955 Line3_text$=Ul$&" Copyright Agilent Technologies 1999 Rev. E.00.01"&Clr$ ! Also change in Header_prnt 6956 PRINT TABXY(1,1),RPT$("_",80) 6957 PRINT TABXY(1,2),"|",TABXY(80,2),"|" 6958 PRINT TABXY(1,3),"|",TABXY(80,3),"|" 6959 PRINT TABXY(1,4),"|",TABXY(80,4),"|" 6960 !PRINT TABXY(1,5),"|";RPT$("_",78);TABXY(80,5),"|" 6961 PRINT TABXY(60,3);RPT$("_",20) 6962 PRINT TABXY(1,4);Ul$&"|"&RPT$(" ",58)&"|"&RPT$(" ",19)&Ul$&"|"&Clr$ 6963 In_text$=Line1_text$ 6964 GOSUB Expand_print 6965 PRINT TABXY(2,2),Out_text$ 6966 In_text$=Label$ 6967 GOSUB Expand_print 6968 Menu_len=LEN(Out_text$) 6969 Start_pos=31-Menu_len/2 6970 PRINT TABXY(Start_pos,3),Out_text$ 6971 PRINT TABXY(2,3),Line2_text$ 6972 PRINT TABXY(2,4),Line3_text$ 6973 SUBEXIT 6974 ! 6975 Expand_print: ! 6976 Out_text$="" 6977 Input_length=LEN(In_text$) 6978 IF Input_length>40 THEN RETURN ! Don't expand print if it will exceed 80 characters 6979 FOR I=1 TO Input_length-1 6980 Out_text$=Out_text$&In_text$[I;1]&" " 6981 NEXT I 6982 Out_text$=Out_text$&In_text$[Input_length;1] 6983 RETURN 6984 ! 6985 SUBEND !Draw_alpha_hdr 6986 ! 6987 ! 6988 Test_16: SUB Lo_output 6989 Lo_output: ! 6990 COM /Conditions/Conditions$(*) 6991 COM /Equipment/Present(1:20),Power_mtr_avail,Counter_avail,Sensor_avail(1:20),Source_avail(1:20),Source2_avail(1:20),Enough_equip(1:20) 6992 COM /Test_flags/Test_number,Sequence_type,Last_test 6993 COM /Coupling/ INTEGER Ac_dc 6994 DIM Test_data(1:64,1:2) 6995 DIM Title$[60] 6996 MAT Test_data=(-9999) 6997 INTEGER I,J 6998 ! 6999 Khz=1.E+3 7000 Mhz=1.E+6 7001 Ghz=1.E+9 7002 ! 7003 Power_meter("CHECK CAL",Quit_flag) ! Make sure it's cal'd. 7004 IF Quit_flag=3 THEN SUBEXIT 7005 IF (Sequence_type=2 OR Sequence_type=4 OR Sequence_type=5) AND Test_number=Last_test THEN Skip_prompt 7006 Check_conn: ! 7007 Ck_connections("LO TO SENSOR",Quit_flag) 7008 IF Quit_flag=3 THEN SUBEXIT 7009 Skip_prompt: ! 7010 Power_meter("INITIALIZE,CONTINUOUS TRIGGER") 7011 Power_meter("READ",Meas_power,4.E+9) 7012 IF Meas_power<0 THEN Check_conn 7013 ! 7014 DISP "Running 1ST LO OUTPUT Amplitude test." 7015 ! 7016 IF FNOption_present("002") THEN ! Can't use external mixing 7017 Dut("INITIALIZE,SINGLE SWEEP,SPAN=0,SWEEP TIME=.05") 7018 Start_freq=0 7019 Stop_freq=2.9*Ghz 7020 Harm_num=1 7021 If_freq=3.9107*Ghz 7022 Nominal=14.5 ! +14.5 dBm nominal output power 7023 Min_lo_freq=3.9*Ghz ! Actually, 3.9107 GHz; this if for graphical title 7024 ELSE 7025 If_freq=310.7*Mhz 7026 Harm_num=54 7027 Start_freq=3.*Ghz*Harm_num-If_freq 7028 Stop_freq=6.7*Ghz*Harm_num-If_freq 7029 Dut("INITIALIZE,EXTERNAL MIXER,CENTER FREQUENCY=300E9,HARMONIC NUMBER=54,SINGLE SWEEP,SPAN=0,SWEEP TIME=.05") 7030 Nominal=16.5 ! +16.5 dBm nominal output power 7031 Min_lo_freq=3.0*Ghz 7032 END IF 7033 ! 7034 ! 7035 Setup_graph(1.E+9,Min_lo_freq/Ghz,6.8,.5,"1st LO Frequency (GHz)",1,Nominal-4,Nominal+4,1,"Power (dBm)","1ST LO OUTPUT Power") 7036 ! 7037 I=0 7038 Plot_type=1 7039 ! 7040 MOVE 0,0 7041 ! 7042 FOR Center_freq=Start_freq TO Stop_freq STEP (Stop_freq-Start_freq)/63 7043 I=I+1 7044 Dut("CENTER FREQ",Center_freq) 7045 Dut("TRIGGER SWEEP") 7046 Test_data(I,1)=(Center_freq+If_freq)/Harm_num 7047 Power_meter("READ",Meas_power,Test_data(I,1)) 7048 Test_data(I,2)=Meas_power 7049 PLOT Test_data(I,1)/Ghz,Test_data(I,2),Plot_type 7050 Plot_type=1 7051 NEXT Center_freq 7052 ! 7053 GRAPHICS OFF 7054 ! 7055 Output(Test_data(*)) 7056 ! 7057 OUTPUT KBD;"K"; 7058 IF (Sequence_type=2 OR Sequence_type=4 OR Sequence_type=5) AND Test_number=Last_test THEN SUBEXIT 7059 Term_lo: ! 7060 Ck_connections("TERMINATE LO OUT",Quit_flag) 7061 IF Quit_flag=3 THEN SUBEXIT 7062 Power_meter("READ",Meas_power,4.E+9) 7063 IF Meas_power>0 THEN Term_lo 7064 ! 7065 ! 7066 End_lo_out: SUBEND 7067 ! 7068 Lo_out_prnt: SUB Lo_out_prnt(Test_data(*)) ! 7069 !----------------------------------------------------------------------- 7070 OPTION BASE 1 7071 COM /Test_flags/Test_number,Sequence_type,Last_test 7072 COM /Conditions/Conditions$(0:44,1:2)[160] 7073 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 7074 COM /Equipment/Present(1:20),Power_mtr_avail,Counter_avail,Sensor_avail(1:20),Source_avail(1:20),Source2_avail(1:20),Enough_equip(1:20) 7075 ! 7076 Fail=0 ! INNOCENT UNTIL PROVEN GUILTY 7077 Min_r$=" " ! INNOCENT UNTIL PROVEN GUILTY 7078 Max_r$=" " 7079 Max_val=99.99 ! MAXIMUM VALUE THAT CAN BE PRINTED 7080 ! 7081 Khz=1.E+3 7082 Mhz=1.E+6 7083 Ghz=1.E+9 7084 ! 7085 IF FNOption_present("002") THEN 7086 Nominal=14.5 7087 Spec=3.0 7088 ELSE 7089 Nominal=16.5 7090 Spec=2.0 7091 END IF 7092 ! 7093 Max_spec=Nominal+Spec 7094 Min_spec=Nominal-Spec 7095 Max_amptd=-99 7096 Min_amptd=99 7097 ! 7098 FOR I=1 TO 64 7099 IF Test_data(I,2)<-9000 THEN Test_data(I,2)=Nominal 7100 IF Test_data(I,2)>Max_amptd THEN 7101 Max_amptd=Test_data(I,2) 7102 Max_freq=Test_data(I,1) 7103 END IF 7104 IF Test_data(I,2)Max_spec THEN 7114 Fail=1 7115 Max_r$="<<<<" 7116 END IF 7117 IF Min_amptd1.E+4 THEN 7424 Start_freq=Offset-4.E+3*(J=1)+2.E+3*(J=2)! 4 to 2 kHz below 7425 ELSE 7426 Start_freq=Offset-1.E+3 7427 END IF 7428 Center_freq=Ref_freq+Start_freq+Span/2 ! 2 to 4 kHz above 7429 Dut("REF LEVEL=-50,CENTER FREQ="&VAL$(Center_freq)&",SPAN="&VAL$(Span))! Thus avoid 30 kHz power supply sideband 7430 Dut("TRIGGER SWEEP,DIGITAL AVERAGE DIV 0 TO 2",Meas(J)) 7431 NEXT J 7432 END IF 7433 ! 7434 Test_data(Nsb_ptr,Offset_index)=Ref_ampltd-(Meas(1)+Meas(2))/2+10*LGT(Rbw)-2.0 7435 ! 7436 NEXT Offset_index 7437 ! 7438 GOTO Skip_print 7439 PRINTER IS 701 7440 FOR I=1 TO Num_offsets 7441 PRINT Test_data(Ofs_ptr,I),Test_data(Nsb_ptr,I) 7442 NEXT I 7443 PRINTER IS CRT 7444 Skip_print: ! 7445 ! 7446 Output(Test_data(*)) 7447 ! 7448 Phase_end: SUBEXIT 7449 Zoom_in: ! 7450 Dut("INITIALIZE,SINGLE SWEEP,ATTENUATOR=0,REF LEVEL=-10,SCALE=10,RBW=1000,VBW=100") 7451 Dut("CLEAR WRITE A,AUTO SWEEP TIME,REF LEVEL=-10,CENTER FREQ="&VAL$(Test_freq)&",SPAN=250E3") 7452 Dut("AUTO RBW,AUTO VBW,AUTO SWEEP TIME") 7453 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER FREQUENCY",Init_ref_freq) 7454 Dut("CLEAR WRITE A,AUTO SWEEP TIME,REF LEVEL=-10,CENTER FREQ="&VAL$(Test_freq)&",SPAN=30E3") 7455 Dut("AUTO RBW,AUTO VBW,AUTO SWEEP TIME") 7456 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER FREQUENCY",Init_ref_freq) 7457 Dut("CENTER FREQ="&VAL$(Init_ref_freq)&",SPAN=5000") 7458 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER FREQUENCY",Init_ref_freq) 7459 Dut("CENTER FREQ="&VAL$(Init_ref_freq)&",SPAN=1000") 7460 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER FREQUENCY",Init_ref_freq) 7461 Dut("READ MARKER AMPLITUDE",Init_amp) 7462 ! 7463 RETURN 7464 ! 7465 Ref_lvl_cal: ! Rev C.00.00 Modified for finer RLCAL DAC Resolution 7466 ! 7467 Dut("READ F/W REVISION",Rev) 7468 IF Rev<=920528 THEN 7469 Max_dac=34 7470 Dac_sens=.16! dB/DAC Step 7471 ELSE 7472 Max_dac=529 7473 Dac_sens=.01 7474 END IF 7475 ! 7476 Dut("READ REF LEVEL CAL",Rlcal) 7477 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp) 7478 Mkr_err=-10-Marker_amp 7479 Rlcal=Rlcal+PROUND(Mkr_err/Dac_sens,0) 7480 Dut("REF LEVEL CAL",Rlcal) 7481 ! 7482 LOOP 7483 Dut("READ REF LEVEL CAL",Rlcal) 7484 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Marker_amp) 7485 EXIT IF Marker_amp=-10 OR Marker_amp=-10.17 7486 EXIT IF Rlcal=-Max_dac OR Rlcal=Max_dac 7487 IF Marker_amp<-10 THEN 7488 Rlcal=Rlcal+1 7489 ELSE 7490 Rlcal=Rlcal-1 7491 END IF 7492 Dut("REF LEVEL CAL",Rlcal) 7493 END LOOP 7494 IF Rlcal=Max_dac OR Rlcal=-Max_dac THEN 7495 Prompt_user("ERROR: Could not set calibrator signal to -10 or -10.17 dBm.") 7496 SUBEXIT 7497 END IF 7498 Dut("READ MARKER FREQUENCY",Init_ref_freq) 7499 RETURN 7500 ! 7501 SUBEND ! Phase Noise 7502 ! 7503 Test_15: SUB Imooboor 7504 Imooboor: ! 7505 ! Rev C.00.00 Added support for 8564E/65E. Changed DATA structure to accommodate 7506 ! different mixer levels for each band. 7507 ! Rev D.00.00 Added support for 8562E 7508 ! This version is for the 856xE analyzers ONLY 920604.0755: BDT 7509 COM /Conditions/Conditions$(*) 7510 COM /Equipment/Present(1:20),Power_mtr_avail,Counter_avail,Sensor_avail(1:20),Source_avail(1:20),Source2_avail(1:20),Enough_equip(1:20) 7511 COM /Test_flags/Test_number,Sequence_type,Last_test 7512 DIM Test_data(1:64,1:4) 7513 DIM Title$[60] 7514 MAT Test_data=(-9999) 7515 INTEGER I,J 7516 Ghz=1.E+9 7517 Max_uw_freq=26.8*Ghz 7518 ! 7519 ! Response Type: 7520 ! 1 = Image 7521 ! 2 = Multiple 7522 ! 3 = Out-of-Band 7523 ! 4 = Out-of-Range 7524 ! 7525 Data_8560e: ! Center Freq, Ref_lvl, Atten, Source_freq, Resp_type, ..., Source_freq, Resp_type, Flag 7526 DATA 2.E9,-10,0,2.0214E9,1,2.6214E9,1,2.3214E9,2,2.6E9,2,7.9107E9,4,9.8214E9,4,-1,-1 7527 DATA 0,0,0 ! End-of-data flags 7528 ! 7529 Data_8561e: ! 7530 DATA 2.E9,-10,0,2.0214E9,1,2.6214E9,1,2.3214E9,2,2.6E9,2,5.6E9,3,6.2214E9,3,7.9107E9,4,9.8214E9,4,-1,-1 7531 DATA 4.E9,-10,0,4.0214E9,1,4.6214E9,1,4.3214E9,2,4.6E9,2,289.3E6,3,8.3107E9,4,8.9321E9,4,-1,-1 7532 DATA 0,0,0 ! End-of-data flags 7533 ! 7534 Data_8562e: ! Rev D.00.00 7535 DATA 2.E9,-10,0,2.0214E9,1,2.6214E9,1,2.3214E9,2,2.6E9,2,7.9107E9,3,9.8214E9,3,-1,-1 7536 DATA 4.E9,-10,0,4.0214E9,1,4.6214E9,1,4.3214E9,2,4.6E9,2,8.3107E9,3,8.9321E9,3,-1,-1 7537 DATA 9.E9,-10,0,9.0214E9,1,9.6214E9,1,9.3214E9,2,9.6E9,2,18.3107E9,3,18.9321E9,3,-1,-1 7538 DATA 0,0,0 ! End-of-data flags 7539 ! 7540 Data_8563e: ! 7541 DATA 2.E9,-10,0,2.0214E9,1,2.6214E9,1,2.3214E9,2,2.6E9,2,7.9107E9,3,9.8214E9,3,-1,-1 7542 DATA 4.E9,-10,0,4.0214E9,1,4.6214E9,1,4.3214E9,2,4.6E9,2,8.3107E9,3,8.9321E9,3,-1,-1 7543 DATA 9.E9,-10,0,9.0214E9,1,9.6214E9,1,9.3214E9,2,9.6E9,2,18.3107E9,3,18.9321E9,3,-1,-1 7544 DATA 15.E9,-10,0,15.0214E9,1,15.6214E9,1,22.65535E9,2,23.27675E9,2,7.34465E9,3,7.96605E9,3,-1,-1 7545 DATA 20.E9,-10,0,20.0214E9,1,20.6214E9,1,15.543725E9,2,25.699075E9,2,9.84465E9,3,10.46605E9,3,-1,-1 7546 DATA 0,0,0 ! End-of-data flags 7547 ! 7548 Data_8564e: ! 7549 DATA 2.E9,-10,0,2.0214E9,1,2.6214E9,1,2.3214E9,2,2.6E9,2,7.9107E9,3,9.8214E9,3,-1,-1 7550 DATA 4.E9,-10,0,4.0214E9,1,4.6214E9,1,4.3214E9,2,4.6E9,2,8.3107E9,3,8.9321E9,3,-1,-1 7551 DATA 9.E9,-10,0,9.0214E9,1,9.6214E9,1,9.3214E9,2,9.6E9,2,18.3107E9,3,18.9321E9,3,-1,-1 7552 DATA 15.E9,-10,0,15.0214E9,1,15.6214E9,1,22.65535E9,2,23.27675E9,2,7.34465E9,3,7.96605E9,3,-1,-1 7553 DATA 20.E9,-10,0,20.0214E9,1,20.6214E9,1,15.543725E9,2,25.699075E9,2,9.84465E9,3,10.46605E9,3,-1,-1 7554 DATA 29.E9,-20,10,28.3786E9,1,23.9786E9,1,24.450925E9,2,28.700E9,2,16.45535E9,3,35.272325E9,3,-1,-1 7555 DATA 35.E9,-20,10,35.0214E9,1,35.6214E9,1,33.093725E9,2,35.3214E9,2,8.774538E9,3,15.54465E9,3,-1,-1 7556 DATA 0,0,0 ! End-of-data flags 7557 ! 7558 Data_8565e: ! 7559 DATA 2.E9,-10,0,2.0214E9,1,2.6214E9,1,2.3214E9,2,2.6E9,2,7.9107E9,3,9.8214E9,3,-1,-1 7560 DATA 4.E9,-10,0,4.0214E9,1,4.6214E9,1,4.3214E9,2,4.6E9,2,8.3107E9,3,8.9321E9,3,-1,-1 7561 DATA 9.E9,-10,0,9.0214E9,1,9.6214E9,1,9.3214E9,2,9.6E9,2,18.3107E9,3,18.9321E9,3,-1,-1 7562 DATA 15.E9,-10,0,15.0214E9,1,15.6214E9,1,22.65535E9,2,23.27675E9,2,7.34465E9,3,7.96605E9,3,-1,-1 7563 DATA 20.E9,-10,0,20.0214E9,1,20.6214E9,1,15.543725E9,2,25.699075E9,2,9.84465E9,3,10.46605E9,3,-1,-1 7564 DATA 29.E9,-20,10,28.3786E9,1,23.9786E9,1,24.450925E9,2,28.700E9,2,16.45535E9,3,35.272325E9,3,-1,-1 7565 DATA 35.E9,-20,10,35.0214E9,1,35.6214E9,1,33.093725E9,2,35.3214E9,2,8.774538E9,3,15.54465E9,3,-1,-1 7566 DATA 45.E9,-20,10,45.0214E9,1,45.6214E9,1,34.479888E9,2,40.593725E9,2,8.316975E9,3,20.54465E9,3,-1,-1 7567 DATA 0,0,0 ! End-of-data flags 7568 ! 7569 Model$=Conditions$(1,2)[1,7] 7570 SELECT Model$ 7571 CASE "HP8560E" 7572 RESTORE Data_8560e 7573 CASE "HP8561E" 7574 RESTORE Data_8561e 7575 CASE "HP8562E" 7576 RESTORE Data_8562e 7577 CASE "HP8563E" 7578 RESTORE Data_8563e 7579 CASE "HP8564E" 7580 RESTORE Data_8564e 7581 CASE "HP8565E" 7582 RESTORE Data_8565e 7583 CASE ELSE 7584 RESTORE Data_8560e 7585 END SELECT 7586 ! 7587 Quit_flag=2 ! doing equipment check 7588 Power_meter("CHECK CAL",Quit_flag) 7589 Ck_connections("LOCK SOURCE TO DUT",Quit_flag) 7590 Ck_connections("SOURCE TO SPLITTER TO SENSOR/DUT",Quit_flag) 7591 IF Quit_flag=3 THEN SUBEXIT 7592 ! 7593 DISP "Running Image and Multiple Responses test." ! Rev B.01.00 7594 Power_meter("INITIALIZE,CONTINUOUS TRIGGER") 7595 Source("INITIALIZE") 7596 Dut("INITIALIZE,SPAN=10E3,RBW=1E3,VBW=100,SINGLE SWEEP,MARKER ON") 7597 ! 7598 Point=0 7599 READ Ctr_freq,Ref_lvl,Atten 7600 WHILE Ctr_freq>0 7601 Dut("CENTER FREQ",Ctr_freq) 7602 Dut("REF LEVEL",Ref_lvl) 7603 Dut("ATTENUATOR",Atten) 7604 Source("FREQUENCY",Ctr_freq) 7605 ! 7606 Source_amp=Ref_lvl+7 7607 IF Ctr_freq>2.9E+9 THEN 7608 Source("AMPLITUDE",Source_amp-5) 7609 Dut("TRIGGER SWEEP,PEAK SEARCH,PEAK PRESELECTOR,DONE?",Dummy_var) 7610 END IF 7611 Set_sig_level(Source_amp,Ref_lvl,.25) ! Set source to reference level +/- 0.25 dB 7612 Dut("READ MARKER AMPLITUDE",Ref_amptd) 7613 Power_meter("READ",Ref_power,Ctr_freq) 7614 ! 7615 READ Source_freq,Resp_type 7616 WHILE Source_freq>0 7617 Point=Point+1 7618 Test_data(Point,1)=Ctr_freq 7619 Test_data(Point,2)=Source_freq 7620 Test_data(Point,3)=Resp_type 7621 ! 7622 Source("FREQUENCY",Source_freq) 7623 Set_source_pwr(Source_amp,Ref_power,.2,Source_freq,Meas_pwr) 7624 Dut("TRIGGER SWEEP,PEAK SEARCH,READ MARKER AMPLITUDE",Spur_amptd) 7625 ! 7626 Test_data(Point,4)=Spur_amptd-Ref_amptd 7627 ! 7628 READ Source_freq,Resp_type 7629 END WHILE 7630 ! 7631 READ Ctr_freq,Ref_lvl,Atten 7632 END WHILE 7633 ! 7634 GOTO Skip_print 7635 PRINTER IS 701 7636 FOR I=1 TO 36 7637 IF Test_data(I,1)>0 THEN 7638 FOR J=1 TO 4 7639 PRINT Test_data(I,J);" "; 7640 NEXT J 7641 PRINT 7642 END IF 7643 NEXT I 7644 PRINTER IS CRT 7645 Skip_print: ! 7646 ! 7647 Output(Test_data(*)) 7648 ! 7649 End_imooboor: SUBEND 7650 ! 7651 ! 7652 Imooboor_prnt: SUB Imooboor_prnt(Test_data(*)) ! SUBPROGRAM FOR Image, Mult, Out-of-Band 7653 ! and Out-of-Range Responses 7654 ! Rev C.00.00 Added support for 8564E/65E 7655 ! Rev D.00.00 Added support for 8562E 7656 OPTION BASE 1 7657 COM /Conditions/Conditions$(*) 7658 COM /Test_flags/Test_number,Sequence_type,Last_test 7659 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 7660 DIM Type$(4)[12] 7661 DIM Spec(0:5,1:4) 7662 INTEGER I,J 7663 ! 7664 Fail=0 ! INNOCENT UNTIL PROVEN GUILTY 7665 R$=" " ! INNOCENT UNTIL PROVEN GUILTY 7666 Flag=999.9 ! LIMIT OF WHAT CAN BE PRINTED 7667 ! 7668 Ghz=1.E+9 7669 Mhz=1.E+6 7670 Khz=1.E+3 7671 Mm_brkpnt=26.8*Ghz ! Millimeter breakpoint; use Mm_spec above this freq 7672 ! 7673 Type$(1)=" Image " ! Image Response 7674 Type$(2)=" Multiple " ! Multiple Response 7675 Type$(3)="Out-of-Band " ! Out-of-Band Response 7676 Type$(4)="Out-of-Range" ! Out-of-Range Response 7677 ! 7678 SELECT Conditions$(1,2)[1,7] 7679 CASE "HP8560E" 7680 OUTPUT @Printer;"****************** IMAGE, MULTIPLE, AND OUT-OF-RANGE RESPONSES *****************" 7681 Hi_band=0 7682 RESTORE Hp8560e_specs 7683 CASE "HP8561E" 7684 OUTPUT @Printer;"************ IMAGE, MULTIPLE, OUT-OF-BAND, AND OUT-OF-RANGE RESPONSES **********" 7685 Hi_band=1 7686 RESTORE Hp8561e_specs ! Rev C.00.00 7687 CASE "HP8562E" ! Rev D.00.00 7688 OUTPUT @Printer;"****************** IMAGE, MULTIPLE, AND OUT-OF-BAND RESPONSES ******************" 7689 Hi_band=2 7690 RESTORE Hp8562e_specs 7691 CASE "HP8563E" 7692 OUTPUT @Printer;"****************** IMAGE, MULTIPLE, AND OUT-OF-BAND RESPONSES ******************" 7693 Hi_band=3 7694 RESTORE Hp8563e_specs ! Rev C.00.00 7695 CASE "HP8564E","HP8565E" ! Rev C.00.00 7696 OUTPUT @Printer;"****************** IMAGE, MULTIPLE, AND OUT-OF-BAND RESPONSES ******************" 7697 Hi_band=5 7698 RESTORE Hp8565e_specs ! Rev C.00.00 7699 CASE ELSE 7700 RESTORE Hp8560e_specs 7701 OUTPUT @Printer;"****************** IMAGE, MULTIPLE, AND OUT-OF-BAND RESPONSES ******************" 7702 END SELECT 7703 ! 7704 ! Rev C.00.00 Added data structure to accommodate different specs for 7705 ! different spur types for each band 7706 ! Specs for Image, Multiple, Out-of-Band, and Out-of-Range for each band 7707 Hp8560e_specs: DATA -80,-80,-80,-80 ! Band 0 7708 Hp8561e_specs: DATA -80,-80,-80,-80 ! Band 0 7709 DATA -80,-80,-80,-80 ! Band 1 7710 Hp8562e_specs: DATA -80,-80,-80,999 ! Band 0 Rev D.00.00 7711 DATA -80,-80,-80,999 ! Band 1 7712 DATA -80,-80,-80,999 ! Band 2 7713 Hp8563e_specs: DATA -80,-80,-80,999 ! Band 0 7714 DATA -80,-80,-80,999 ! Band 1 7715 DATA -80,-80,-80,999 ! Band 2 7716 DATA -80,-80,-80,999 ! Band 3 7717 Hp8565e_specs: DATA -80,-80,-80,999 ! Band 0 7718 DATA -80,-80,-80,999 ! Band 1 7719 DATA -80,-80,-80,999 ! Band 2 7720 DATA -80,-80,-80,999 ! Band 3 7721 DATA -60,-55,-55,999 ! Band 4 7722 DATA -60,-55,-55,999 ! Band 5 7723 ! 7724 FOR Band=0 TO Hi_band 7725 FOR Type=1 TO 4 7726 READ Spec(Band,Type) 7727 NEXT Type 7728 NEXT Band 7729 ! 7730 Cf_ptr=1 ! Pointers to where data is in Test_data(*) 7731 Source_ptr=2 7732 Type_ptr=3 7733 Amptd_ptr=4 7734 ! 7735 OUTPUT @Printer 7736 OUTPUT @Printer USING "11X,6A,6X,6A,5X,8A,20X,8A";"CENTER","SOURCE","RESPONSE","RESPONSE" 7737 OUTPUT @Printer USING "10X,9A,3X,9A,3X,9A,3X,13A,5X,4A";"FREQUENCY","FREQUENCY","AMPLITUDE","SPECIFICATION","TYPE" 7738 OUTPUT @Printer USING "12X,5A,7X,5A,7X,5A,9X,5A";"(GHz)","(MHz)","(dBc)","(dBc)" 7739 OUTPUT @Printer USING "9X,K";RPT$("_",62) 7740 Point=1 7741 WHILE Test_data(Point,Cf_ptr)>0 7742 Type=Test_data(Point,Type_ptr) 7743 IF ABS(Test_data(Point,Amptd_ptr))>Flag THEN Test_data(Point,Amptd_ptr)=Flag 7744 Band=FNBand(Test_data(Point,Cf_ptr)) 7745 IF Test_data(Point,Amptd_ptr)>Spec(Band,Type) THEN 7746 Fail=1 7747 R$="<<<<" 7748 END IF 7749 Ctr_freq=PROUND(Test_data(Point,Cf_ptr)/Ghz,-1) ! 100 MHz resolution 7750 Src_freq=PROUND(Test_data(Point,Source_ptr)/Mhz,-3) ! 1 kHz resolution 7751 IF Ctr_freq<>Last_cf THEN OUTPUT @Printer ! Blank line between center freqs 7752 Out_fmt: IMAGE 12X,DD.D,6X,5D.3D,4X,SDDD.D,8X,SDDD.D,5X,12A,2X,4A 7753 OUTPUT @Printer USING Out_fmt;Ctr_freq,Src_freq,Test_data(Point,Amptd_ptr),Spec(Band,Type),Type$(Type),R$ 7754 R$=" " 7755 Last_cf=Ctr_freq 7756 Point=Point+1 7757 END WHILE 7758 ! 7759 Pass_fail(Fail) ! PASS JUDGEMENT 7760 End_imoob_prnt: SUBEND ! IMOOBOOR_PRNT 7761 ! 7762 Fns200: DEF FNS200 7763 Sys$=SYSTEM$("SYSTEM ID") 7764 SELECT Sys$[3;2] 7765 CASE "36","16","20","17","37" 7766 RETURN 1 7767 CASE ELSE 7768 RETURN 0 7769 END SELECT 7770 FNEND 7771 ! 7772 Csize_val: DEF FNCsize_val(Current_val,Plot_ratio) 7773 IF Plot_ratio<=1 THEN RETURN Current_val 7774 RETURN DROUND(Current_val/(Plot_ratio/1.2),2) 7775 FNEND 7776 ! 7777 Plot_ratio: DEF FNPlot_ratio 7778 IF FNS200 THEN RETURN 1 7779 STATUS CRT,9;Screen_lines 7780 IF Screen_lines<=80 THEN RETURN 1 7781 ALLOCATE INTEGER A_size(1:6) 7782 GESCAPE CRT,3;A_size(*) 7783 Total=A_size(5) 7784 Total=Total*A_size(6) 7785 SELECT Total 7786 CASE <=25600 7787 ! 7788 CASE <=49152 7789 RETURN 2.25 7790 CASE <=102400 7791 ! 7792 CASE <=196608 7793 RETURN 1.75 7794 CASE <=327680 7795 RETURN 2.17 7796 CASE <=393216 7797 RETURN 2.35 ! Has not been tried 7798 CASE ELSE 7799 RETURN 1 7800 END SELECT 7801 RETURN 1 7802 FNEND 7803 ! 7804 Check_options: SUB Check_options 7805 ! 7806 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 7807 COM /Tests/Tests$(*),Short_name$(*),Conn_check(*) 7808 COM /Conditions/Conditions$(0:44,1:2)[160] 7809 ! 7810 Fadc=2 ! Test number for Fast ADC test 7811 ! 7812 FOR Test=1 TO VAL(Tests$(0,1)) 7813 IF Test=Fadc AND NOT FNOption_present("007") THEN Tests$(Test,2)="TEST NOT APPLICABLE" 7814 NEXT Test 7815 ! 7816 SUBEND 7817 ! 7818 Test_2: SUB Fadc_accy ! Added Rev B.00.00 7819 Fadc_accy: ! 7820 ! 7821 IF NOT FNOption_present("007") THEN SUBEXIT ! Don't do test if Opt 007 not present 7822 ! 7823 DIM Test_data(1:1) 7824 MAT Test_data=(-9999) 7825 ! 7826 Ck_connections("CAL OUT TO COUNTER",Quit_flag) 7827 IF Quit_flag=3 THEN SUBEXIT 7828 DISP "Running Fast Sweep Time Accuracy test." 7829 ! 7830 Dut("INITIALIZE") 7831 Counter("INITIALIZE") 7832 ! 7833 Counter("FREQUENCY",Check_freq) 7834 IF ABS(Check_freq-3.00E+8)>6000 THEN 7835 Prompt_user("ERROR: Counter reads "&VAL$(Check_freq)&" Hz. Check counter setup.") 7836 Counter("FREQUENCY",Check_freq) 7837 END IF 7838 Counter("FREQUENCY",Test_data(1)) 7839 ! 7840 Output(Test_data(*)) 7841 ! 7842 SUBEND 7843 ! 7844 Fadcaccy_prnt: SUB Fadcaccy_prnt(Test_data(*)) ! Added Rev B.00.00 7845 OPTION BASE 1 7846 COM /Test_flags/Test_number,Sequence_type,Last_test 7847 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 7848 COM /Conditions/Conditions$(0:44,1:2)[160] 7849 ! 7850 Fail=0 ! INNOCENT UNTIL PROVEN GUILTY 7851 R$=" " ! INNOCENT UNTIL PROVEN GUILTY 7852 Flag=.0999 ! Limit of what can be printed, divided by 100 7853 Nom=3.0E+8 ! Nominal CAL OUT FREQ of 300 MHz 7854 Spec=.001 ! Spec is +/- 0.1 % 7855 St_accy=(Test_data(1)-Nom)/Nom 7856 IF ABS(St_accy)>Flag THEN St_accy=Flag 7857 IF ABS(St_accy)>Spec THEN 7858 Fail=1 7859 R$="<<<<" 7860 END IF 7861 ! 7862 OUTPUT @Printer;"********************* FAST SWEEP TIME ACCURACY, OPTION 007 *********************" 7863 ! 7864 OUTPUT @Printer;" Specification:" 7865 OUTPUT @Printer;" Option 007, Sweep Time < 30 ms: < +/- 0.1 %" 7866 OUTPUT @Printer 7867 OUTPUT @Printer USING "19X,22A,D.3D,2A,4A";"SWEEP TIME ACCURACY = ",St_accy*100," %",R$ 7868 OUTPUT @Printer 7869 OUTPUT @Printer 7870 Pass_fail(Fail) ! PASS JUDGEMENT 7871 ! 7872 SUBEND 7873 SUB Beeper(OPTIONAL Type$) 7874 ! REV C.01.00 Added Beeper for audible prompts 7875 INTEGER Noise 7876 IF NPAR THEN 7877 SELECT UPC$(TRIM$(Type$)) 7878 CASE "ERROR" 7879 BEEP 500,.05 7880 WAIT .05 7881 CASE "WARNING","WARN" 7882 BEEP 100,.3 7883 CASE "BAD_KEY","BAD KEY" 7884 BEEP 200,.1 7885 CASE "ALERT" 7886 FOR Noise=1 TO 4 7887 BEEP 200,.05 7888 BEEP 400,.05 7889 NEXT Noise 7890 CASE "PASS","PASSED" 7891 BEEP 300,.1 7892 CASE "FAIL","FAILURE","FAILED" 7893 FOR Noise=1 TO 4 7894 BEEP 500,.05 7895 WAIT .1 7896 NEXT Noise 7897 CASE "PROMPT" 7898 BEEP 100,.1 7899 CASE ELSE 7900 BEEP 7901 END SELECT 7902 ELSE 7903 BEEP 7904 END IF 7905 SUBEND 7906 ! 7907 Emi_bw: DEF FNEmi_bw(Res_bw) ! Rev D.00.00 Added to support Opt EMI 7908 ! Returns 1 if Res_bw is a 6dB BW (Option EMI) or returns 1 if otherwise 7909 IF NOT FNOption_present("EMI") THEN 7910 RETURN 0 7911 ELSE ! Option EMI installed 7912 SELECT Res_bw 7913 CASE 1.E+6,1.00E+5 ! 1 MHz and 100 kHz are 6 dB BWs 7914 RETURN 1 7915 CASE ELSE ! All other RES BWs are 3 dB BWs 7916 RETURN 0 7917 END SELECT 7918 END IF 7919 ! 7920 FNEND 7921 Driver_5350: SUB Driver_5350(Function$,OPTIONAL Value) ! 535x Driver 7922 ! Rev D.00.00 Added 5350 Driver 7923 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 7924 ! 7925 DIM Command$[80] 7926 SELECT Function$ 7927 CASE "INITIALIZE" 7928 Init$="INIT;" 7929 Trigger_mode$="SAMPLE,HOLD;" 7930 Range$="AUTO;" 7931 Res$="RESOL,0;" 7932 No_offset$="OFFSET,OFF;" 7933 Scale$="SMOOTH,OFF;" 7934 Range$="LOWZ;" 7935 OUTPUT @Counter;Init$ 7936 WAIT .5 7937 Command$=No_offset$&Range$&Res$&Scale$&Trigger_mode$ 7938 OUTPUT @Counter;Command$ 7939 CASE "FREQUENCY" 7940 TRIGGER @Counter 7941 ENTER @Counter;Value 7942 CASE ELSE 7943 Prompt_user("Function$ in Driver_5350 not found") 7944 END SELECT 7945 ! 7946 SUBEND ! Driver_5350 7947 ! 7948 Test_band0: SUB Test_band0(Test_data(*)) 7949 ! Rev D.02.01 BDT 16 Aug 1997 7950 ! Checks the dc-coupled band 0 frequency response data over a limited 7951 ! frequency range for newer 8560E/62E/63E/64E/65E analyzers. 7952 ! 7953 ! Rev D.02.01 Added the No_data_flag check to fix bug w/ 8560E 7954 COM /Io_paths/@Dut,@Printer,@Pwr_mtr,@Counter 7955 COM /Conditions/Conditions$(0:44,1:2)[160] 7956 ! 7957 DIM Test_title$[80] 7958 Mhz=1.E+6 7959 Ghz=1.E+9 7960 No_data_flag=-9999 ! See MAT statement in Test_14 ! D.02.01 7961 Band_min=999 7962 Band_max=-999 7963 Fail=0 7964 R$=" " 7965 Max_val=99.99 7966 ! 7967 Model$=Conditions$(1,2)[1,7]! Find model number of analyzer 7968 Dut("READ SERIAL NUMBER",Dummy,Ser_num$)! Find serial number 7969 Prefix=VAL(Ser_num$) 7970 ! 7971 SELECT Model$ 7972 CASE "HP8560E" 7973 IF Prefix<3632 THEN SUBEXIT 7974 Test_title$=RPT$("*",19)&" RELATIVE FREQUENCY RESPONSE, DC COUPLED "&RPT$("*",20) 7975 Low_freq=100*Mhz 7976 High_freq=2.9*Ghz 7977 Pk_pk_spec=1.4! dB 7978 CASE "HP8561E" ! Improved specs do not apply to 8561E 7979 SUBEXIT 7980 CASE "HP8562E" 7981 Test_title$=RPT$("*",19)&" RELATIVE FREQUENCY RESPONSE, DC COUPLED "&RPT$("*",20) 7982 Low_freq=100*Mhz 7983 High_freq=2.3*Ghz 7984 Pk_pk_spec=1.8! dB 7985 CASE "HP8563E" 7986 IF Prefix<3645 THEN SUBEXIT 7987 Test_title$=RPT$("*",21)&" RELATIVE FREQUENCY RESPONSE, BAND 0 "&RPT$("*",22) 7988 Low_freq=100*Mhz 7989 High_freq=2*Ghz 7990 Pk_pk_spec=2.0! dB 7991 CASE "HP8564E","HP8565E" 7992 IF Prefix<3641 THEN SUBEXIT 7993 Test_title$=RPT$("*",21)&" RELATIVE FREQUENCY RESPONSE, BAND 0 "&RPT$("*",22) 7994 Low_freq=100*Mhz 7995 High_freq=2*Ghz 7996 Pk_pk_spec=1.8! dB ! over 20degC to 30degC range 7997 CASE ELSE 7998 SUBEXIT 7999 END SELECT 8000 ! 8001 I=0 8002 REPEAT 8003 I=I+1 8004 UNTIL Test_data(I,1)>=Low_freq 8005 ! 8006 WHILE Test_data(I,1)<=High_freq AND Test_data(I,1)<>No_data_flag 8007 Band_max=MAX(Band_max,Test_data(I,2)) 8008 Band_min=MIN(Band_min,Test_data(I,2)) 8009 I=I+1 8010 END WHILE 8011 ! 8012 Pk_pk_response=ABS(Band_max-Band_min) 8013 IF Pk_pk_response>Pk_pk_spec THEN Fail=1 8014 IF Pk_pk_response>Pk_pk_spec THEN R$="<<<<" 8015 Low_freq$=VAL$(PROUND(Low_freq/Mhz,0))&" MHz" 8016 High_freq$=VAL$(PROUND(High_freq/Ghz,-1))&" GHz" 8017 Spec$=VAL$(Pk_pk_spec)&" dB pk-pk" 8018 Pk_pk_response=MIN(Max_val,Pk_pk_response) 8019 ! 8020 OUTPUT @Printer;Test_title$ 8021 OUTPUT @Printer;" Specification: <+/- "&Spec$&", "&Low_freq$&" to "&High_freq$ 8022 IF Model$="HP8564E" OR Model$="HP8565E" THEN 8023 OUTPUT @Printer;" (20degC to 30degC temperature range)" 8024 END IF 8025 OUTPUT @Printer 8026 OUTPUT @Printer USING "16X,30A,2D.2D,9A,4A";"RELATIVE FREQUENCY RESPONSE = ",Pk_pk_response," dB pk-pk",R$ 8027 OUTPUT @Printer 8028 Pass_fail(Fail,3) ! PASS JUDGEMENT 8029 ! 8030 SUBEND 8031 ! 8032 Color_flag: DEF FNColor_flag$(Model$,Serial$) ! Added in Rev E.00.00 8033 ! Distinguishes between 856xE (monochrome display) and 856xEC 8034 ! (color display). 8035 ! 8036 C_prefix=3933 ! First prefix of 856xEC products 8037 Sn_8560=4200 ! Approx 8560E serial number at 8560EC intro 8038 Sn_8561=2600 ! Approx 8561E serial number at 8561EC intro 8039 Sn_8562=1200 ! Approx 8562E serial number at 8562EC intro 8040 Sn_8563=10600 ! Approx 8563E serial number at 8563EC intro 8041 Sn_8564=1600 ! Approx 8564E serial number at 8564EC intro 8042 Sn_8565=1250 ! Approx 8565E serial number at 8565EC intro 8043 ! 8044 ! 8045 C_flag$="" ! Default is null for monochrome 8046 Sn_prefix=VAL(Serial$) 8047 Sn_suffix=VAL(Serial$[6;5]) 8048 ! 8049 SELECT Model$ 8050 CASE "HP8560E" 8051 IF Sn_prefix>=C_prefix AND Sn_suffix=C_prefix AND Sn_suffix=C_prefix AND Sn_suffix=C_prefix AND Sn_suffix=C_prefix AND Sn_suffix=C_prefix AND Sn_suffix