DIM X(2800),Y(2800),XE(2000),YE(2000) INPUT "DRIVE#:FILE";F$ OPEN F$ FOR INPUT AS #1 INPUT #1,N INPUT #1,XL,XH,YL,YH INPUT #1,DM1,DM2 INPUT"SUPERPOSE EXPTL.SPECTRA(1) OR NOT(0)?",NEX IF NEX=0 THEN 31 NVDS=0 INPUT "DRIVE#:FILE";G$ OPEN G$ FOR INPUT AS #2 INPUT #2,NPX,YEL,YEH YER=YEH-YEL FOR I=1 TO NPX INPUT #2,XE(I),YE(I) IF YE(I)YEH THEN YE(I)=YEH NEXT I 31 INPUT "PHASE -1 0R +1 ?", NPH 32 INPUT "X-LENGTH AND Y-LENGTH IN CM.?",XLEN,YLEN IF XLEN>36 OR YLEN>20 THEN 32 NST = 1 : NED = N 24 FOR I = 1 TO N INPUT #1,X(I),Y(I) Y(I) = Y(I)*NPH NEXT I IF NPH>0 THEN 18 YT = YL YL = -YH YH = -YT 18 XL = X(NST) : XH = X(NED) 17 XR = XH-XL YR = YH-YL INPUT "SEND TO PLOTTER (P) OR TO FILE (F) ?", A$ IF A$="P" OR A$="p" THEN 45 ELSE 46 45 OPEN "COM2:9600,E,7,2,RS,CS65535,DS,CD" AS #3 GOTO 47 46 PRINT "The plot data is sent to the file ESR.HP" OPEN "ESR.HP" FOR OUTPUT AS #3 47 PRINT #3,"IN;" PRINT #3,"SP1;" X%=INT((1.25 + (X(NST)-XL)*XLEN/XR)*400) Y%= INT((5.0 + (Y(NST)-YL)*YLEN/YR)*400):GOSUB 98 FOR I=NST+1 TO NED X%=INT((1.25 + (X(I)-XL)*XLEN/XR)*400) Y%= INT((5.0 + (Y(I)-YL)*YLEN/YR)*400):GOSUB 99 NEXT I : IF NEX=0 THEN 33 X%=INT((1.25 + (XE(1)-XL)*XLEN/XR)*400) Y%=INT((5.0 + (YE(1)-YEL)*YLEN/YER)*400):GOSUB 98 FOR I=2 TO NPX X%=INT((1.25 + (XE(I)-XL)*XLEN/XR)*400) Y%=INT((5.0 + (YE(I)-YEL)*YLEN/YER)*400):GOSUB 99 NEXT I 33 XNEX=0 :FLD=XL:FIN=XR*4.0/XLEN X%=500:Y%=1600:GOSUB 98:Y%=Y%+100:GOSUB 99:Y%=Y%-100:GOSUB 99 35 XNEX=XNEX+1600 IF XNEX > XLEN * 400 THEN 37 FLD=FLD+FIN X%=X%+1600:GOSUB 99:Y%=Y%+100:GOSUB 99:Y%=Y%-100:GOSUB 99 GOTO 35 37 XNEW=0 :FLD=XL:FIN=XR*4.0/XLEN:Z$="LB####"+CHR$(3) X%=500:Y%=1600:GOSUB 98:X%=X%-200:Y%=Y%-250:GOSUB 98 PRINT #3,"SI .35, .45" PRINT #3, USING Z$; FLD 36 XNEW=XNEW+1600 IF XNEW > XLEN * 400 THEN 34 FLD=FLD+FIN X%=500:Y%=1600:GOSUB 98:X%=X%+XNEW-200:Y%=Y%-250:GOSUB 98 PRINT #3,"SI .35, .45;" PRINT #3, USING Z$; FLD GOTO 36 34 X%=500+XLEN*200:Y%=1600:X%=X%-1000:Y%=Y%-1000:GOSUB 98 PRINT #3,"SI .35, .45;" PRINT #3,"LBMagnetic Field / G";CHR$(3) GOTO 100 98 X$=STR$(X%):Y$=STR$(Y%):LX%=LEN(X$):LY%=LEN(Y$) IF LX%=4 THEN X$=" "+X$ IF LY%=4 THEN Y$=" "+Y$ R$="PU "+X$+", "+Y$+";" PRINT #3,R$:RETURN 99 X$=STR$(X%):Y$=STR$(Y%):LX%=LEN(X$):LY%=LEN(Y$) IF LX%=4 THEN X$=" "+X$ IF LY%=4 THEN Y$=" "+Y$ R$="PD "+X$+", "+Y$+";" PRINT #3,R$:RETURN 100 CLOSE END