Troubleshooting 67
1150 !
1160 GOSUB Ps_error ! Error if passcode is not "0" !
1170 IF Err THEN
1180 OUTPUT @Ps;"*IDN" ! Get data from # location
1190 ENTER @Ps;Idn$
1200 Model=VAL(Idn$[POS(Idn$,",")+1])
1210 ELSE
1220 GOTO START
1230 END IF
1240 !
1250 OUTPUT @Ps;"CAL:STATE ON,";Model ! Turn on cal mode, passcode =
1260 ! data at model number location
1270 !
1280 GOSUB Ps_error ! Error if passcode is not same as
1290 ! data at model # location
1300 IF Err THEN
1310 OUTPUT @Ps;"CAL:STATE ON,";Model$[1,4} ! Turn on cal mode, passcode =
1320 ! model #
1330 GOSUB Ps_error
1340 IF Err THEN
1350 PRINT "Change pass code to the power supply model # or zero then restart the program."
1360 STOP
1370 ELSE
1380 GOTO Start
1390 END IF
1400 END IF
1410 !
1420 Start: !
1430 !
1440 !
1450 INPUT “Select Initialization (I) or Factory preset replacement (F).”,Sel$
1460 CLEAR SCREEN
1470 SELECT (UPC$(Sel$))
1480 CASE "I" ! Select Initialization
1490 GOTO Init_eeprom
1500 CASE "F" ! Select install new factory data
1510 GOTO Fact_preset
1520 CASE ELSE
1530 BEEP
1540 GOTO Start
1550 END SELECT
1560 !
1570 Init_eeprom: !
1580 PRINT “Initializing EEPROM”
1590 !
1600 FOR I=1 TO 45
1610 OUTPUT @Ps;"DIAG:EEPR '';Addr(I);'','';Length(I);'','';Init_data(I)
1620 NEXT I
1630 GOTO Cal_off
1640 !
Figure 3-18. Initialization and Factory Preset Replacement Program Listing (Sheet 4 of 6)