10000 REM ****************** G5 routine 24/04/04 ********************** 10010 REM MKIII Grating Synchronization Relation (ref. GS) 10020 REM 10030 REM (Sci-Tec Instruments, March 1995) 10040 REM 10045 REM changed 14660 from step 1500 to 500 and start at 4000 - uses slit 5 (IOS) 10050 REM ************************************************************* 10060 REM 10070 REM This routine records scans, with the standard lamp on, 10080 REM at different step-numbers to collect the necessary data 10090 REM to determine the relationship bewteen the two spectrometers. 10100 REM RD_GS is used to reduce the data collected in the sgdddyy.### 10110 REM file to give the values of GS and GI needed. 10120 REM 10140 REM Side Effects: 10150 REM 10160 REM Global Variables Referenced: 10170 REM IO MU SP TA TD TI TIMER TM T1 VA ZA 10180 REM A1$() CL$ CR$ DD$ DQ$ H$ JD$ MC$ MT$ M5$ M8$ NO$ 10190 REM O1$ TIME$ TR$ YF$ 10200 REM DN% DV% HF% LO% UC% Q8% 10210 REM 10220 REM Exits: 10510, 10520, 13040, 14720, 14940 10230 REM 10240 REM Uses: 2090, 2450, 3100, 4450, 6610, 6635, 6650, 6700, 10250 REM 6900, 7000, 7800, 8600, 9190, 9450, 9500, 9650, 10260 REM 9805 10270 REM 10280 REM ************************************************************* 10290 REM History: dd/mm/yy 10300 REM 28/02/94 - New header, comments added, line numbers 10310 REM cleaned up, .dat extension replaced by .nnn 10320 REM ************************************************************* 11000 DATA sg 11010 IF Q8%=0 OR DN%<>8 OR TYP$<>"mkiii" THEN RETURN 11020 ON ERROR GOTO 3100 13000 ' 13001 '*** Check Standard Lamp *** 13002 ' 13010 IF M9$<>"2" THEN GOSUB 9820 13020 PRINT CL$ 14000 ' 14001 ' *** Take Standard Lamp Scan *** 14002 ' 14010 UC% = 0 14020 CX$ = "4": TR$ = "s"+"a": REM cycle count and track mode 14030 GOSUB 2450: GOSUB 4450: OPEN DD$ + "dum.dta" FOR OUTPUT AS 8 14040 PRINT #8, "Integration time is 0.2294 seconds per sample"; CR$; 14050 PRINT #8, "dt "; T1; CR$; 14060 PRINT #8, "cy "; cx$; CR$; 14070 PRINT #8, A1$(0); 14500 IF MDD$="n2" THEN M4$=MID$(STR$(NOFW1),2):M5$="64" ELSE M4$=MID$(STR$(OZFW1),2):M5$=MID$(STR$(POFW2),2) 14510 GOSUB 6610: GOSUB 6660: GOSUB 6650 14520 TD = 1500: GOSUB 7000: GOSUB 6700: GOSUB 9860 14530 LOCATE , SP: PRINT "4 - Director prism to lamps": GOSUB 9650 14540 T0=TA/3600:GOSUB 8600 14550 LOCATE , SP:PRINT"Waiting until ";H$;" for lamp warmup":GOSUB 6900 14560 IF LO%=1 THEN RETURN 14570 GOSUB 6800: IF HF% = 1 THEN 15000 14640 M8$ = "-" + MC$: GOSUB 9805: M8$ = STR$(-ZERO): GOSUB 9805 14650 PRINT #4, "G5 scan started at "; TIME$: DW=10: SQ=5: DQ$ = STR$(SQ+1) 14660 FOR WW = 4000 TO 9500 STEP 500: GOSUB 31000: IF HF% = 1 THEN 14700 14670 NEXT WW 14680 IF DV% = 1 THEN A1$(IO) = "SG" + CR$ + TIME$ + CR$ + TE$ + CR$ + STR$(ZA) + CR$ + STR$(MU) + CR$ 14700 M8$ = STR$(ZERO+1): GOSUB 9805: M8$ = "-1": GOSUB 9805: M8$ = MC$: GOSUB 9805: GOSUB 9500 14710 PRINT #8, "end": CLOSE 8 14720 IF HF% = 1 THEN PRINT #4, "G5 scan aborted at "; TIME$: GOTO 15000 14900 ' 14901 ' *** Record Data on SG File **** 14902 ' 14910 B$=JD$+YF$+"."+NO$ 14920 PRINT #4, "G5 scan finished at "; TIME$ 14930 SHELL "copy " + DD$ + "G5" + B$ + "+" + DD$ + "dum.dta " + DD$ + "G5" + B$ 14940 PRINT #4, "G5"; B$; " data file extended at "; TIME$ 15000 ' 15001 ' *** Quit *** 15002 ' 15010 CLOSE 8:IF RM%=0 THEN GOSUB 9840 15020 IF G$(JJ+1)<>"lo" THEN GOSUB 9840 15030 RETURN 31000 ' 31001 ' *** Scan w1 to w2 step dw on slit sq *** 31002 ' 31010 O1$ = "R,1,1,40;O": GOSUB 9450: GOSUB 9190: PRINT #8, "DARK"; CR$; VA/40*VAL(CX$) 31020 PRINT "dark="; VA/40*VAL(CX$) 31030 W1=WW-120: W2=WW+120 31040 SN$=STR$(WW) 31050 O1$="M,10," + SN$: GOSUB 9450: FOR WV = W1 TO W2 STEP 10 31060 GOSUB 2090: IF HF% = 0 THEN 31080 31070 PRINT "aborted": PRINT #8, "aborted"; CR$; : WV = W2: RETURN 31080 SN$=STR$(WV) 31090 O1$="M," + N9$ + "," + SN$ + ";R," + DQ$ + "," + DQ$ + "," + CX$ + ";O" 31100 TI=TIMER*60: TM=TI: GOSUB 9450: TM=INT((TM+TI)/72)/100 31120 PRINT #8, SN$, VA 31130 PRINT SN$, VA 31140 NEXT: RETURN 65529 REM proper last line