Service manual

46 Troubleshooting
550 RESTORE Eprom_data_len
560 !
570 FOR I=l T0 49
580 READ Length(I)
590 NEXT I
600 !
610 SELECT TRIM$(UPC$(Model$)) ! Delete leading/trailing zeros and set to uppercase
620 CASE "6690A"
630 RESTORE Eprom_data_6690
640 CASE "6691A"
650 RESTORE Eprom_data_6691
660 CASE "6692A"
670 RESTORE Eprom_data_6692
680 !
690 CASE ELSE
700 PRINT "Model number not found. Program is for models"
710 PRINT "Agilent 6690A, 6691A, and 6692A only"
720 STOP
730 END SELECT
740 !
750 FOR I=l T0 49 ! Read model dependent data
760 READ Init_data(I)
770 NEXT I
780 !
790 OUTPUT @Ps;"*CLS" ! Clears power supply registers
800 !
810 OUTPUT @Ps;"CAL;STATE ON," ! Turn on cal mode, "0" passcode
820 !
830 GOSUB Ps_error ! Error if passcode is not "0"!
840 IF Err THEN
850 OUTPUT @Ps;"*IDN?" ! Get data from model # location
860 ENTER @Ps;Idn$
870 Model=VAL(Idn$[POS(Idn$,”,”)+1] )
880 ELSE
890 GOTO Start
900 END IF
910 !
920 OUTPUT @Ps;"CAL:STATE ON,";Model ! Turn on cal mode, passcode =
930 ! data at model number location
940 !
950 GOSUB Ps_error ! Error if passcode is not same as
960 ! data at model # location
970 IF Err THEN
980 OUTPUT @Ps;"CAL:STATE ON,";Model$[l,4] ! Turn on cal mode, passcode =
990 ! model #
1000 GOSUB Ps_error
1010 IF Err THEN
1020 PRINT "Change pass code to the power supply model # or zero then restart the program."
1030 STOP
1040 ELSE
1050 GOTO Start
1060 END IF
1070 END IF
1080 !
Figure 3-13. Initialization and Factory Preset Replacement Program Listing (Sheet 2 of 4)