
C FOCAL V3A
01.10 TYPE "***HYBRID DEMONSTRATION PROBLEM***",!
01.11 TYPE "***DSCT SOLUTION OF WAVE EQUATION***",!
01.12 ASK "TYPE IN NUMBER OF SAMPLES FOR THIS RUN",SAMP
01.14 ASK "NUMBER OF ITERATIONS" ITER
01.15
01.16 SET POT =FPOT(3,.1225,4,.4,5,.05)
01.17 C POT 3 IS SET TO DESIRED DELTA X
01.18 C POT 4 DETERMINES THE AMPLITUDE OF THE INPUT PULSE
01.19 C POT 5 DETERMINES THE SOLUTION TIME OF THE PROBLEM
01.20 SET PER=1/SAMP
01.21 C PER DETERMINES PERIOD BETWEEN SAMPLES
01.22
01.30 FOR B=1,1,SAMP; SET PNT(B)=B*PER
01.40 FOR B=1,1,SAMP; DO 1.6
01.41 C 1.3,1.4, AND 1.6 ZERO THE ARRAYS
01.42
01.60 SET U1(B)=0; SET U2(B)=0; SET U3(B)=0
01.61 SET CL=FRCL(0)
01.90 FOR N=1,1,ITER-1; DO 1.91
01.91 DO 2; DO 3; DO 4
01.92 GOTO 5.1
01.93 C THE STATEMENTS ABOVE CAUSE THE NECESSARY ITERATIONS
01.94 C THEN PROCEED TO GROUP 5 TO PLOT THEM OUT
01.95
01.96
02.10 SET LD=FBDA(1,U2(1),PNT(1))+FTDA(0)+FTSL(0)
02.11 C 2.10 INITIALIZED THE DAC'S WITH THE FIRST VALUES
02.12 C AFTER INITIALIZATION RUN START FOR FIRST SPATIAL POINT
02.13
02.20 SET MODE=FSAM(4)
02.30 FOR M=2,1,SAMP; DO 10
02.31 C THIS FOR STATEMENT SAMPLES AND RELOADS THE DACS SAMP TIMES
02.32 C GROUP 10 FETCHES AND STORES THE ARRAY ELEMENTS AS NEEDED
02.40 SET MODE=FSAM(6)+FIDL(2)
02.41 C BACK TO IC
02.53
03.10 SET LD=FBDA(0,U1(1),U3(1),PNT(1))+FTDA(0)+FTSL(0)
03.11 C GROUP 3 DUPLICATES THE ACTIONS OF GROUP 2 BUT FOR THE SECOND
03.12 C SPATIAL POINT
03.13
03.20  DO 2.2;FOR M=2,1,SAMP; DO 11
03.30 DO 2.4
04.10 SET LD=FBDA(0,U2(1),0,PNT(1))+FTDA(0)+FTSL(0)
04.11 C GROUP 4 FOR THE NEXT SPATIAL POINT
04.12
04.13
04.20 DO 2.2; FOR M=2,1,SAMP;DO 12
04.30 DO 2.4
04.88
04.89
04.90 C AFTER THE SPECIFIED ITERATIONS ARE COMPLETE THE RESULTS
04.91 C ARE PLOTTED. CONTROL LINE 0 ENABLES THE PLOTTER PEN TO DROP
05.10 SET CL= FSCL(0)
05.20 SET MODE= FSAM(4)
05.30 DO 2.3
05.40 SET STOP= FSAM(5)+FIDL(60)+FSAM(6)+FIDL(120)+FSAM(4)
05.41 C FIDL IS USED TO GIVE THE PEN TIME TO LIFT AND FOR THE ARM
05.42 C TO RETURN
05.43 C NOW PLOT THE NEXT POINT
05.44
05.45
05.50 DO 3.2
05.60 DO 5.4
05.70 DO 4.2
05.80 SET MODE=FSAM(5)+FIDL(60)+FSAM(6)
05.81
05.88 C 5.9 ASKS FOR AN ANSWER
05.89 C THE ANSWER MUST BE YES OR NO
05.90 ASK "PROBLEM COMPLETE, DO YOU WISH TO CONTINUE?",ANS
05.91 IF (ANS-0YES) 5.92,1.12,5.92
05.92 QUIT
09.10
09.20
09.30
09.90 C GROUP 10 COMPUTES THE FIRST SPATIAL POINT
10.10 SET REL=FSRM(0)
10.20 SET PLS=U2(M)
10.30 DO 15
10.31 C GROUP 15 DOES THE ACTUAL TRANSFERING
10.40 SET U1(M)=AT
10.50 SET REL=FSRP(0)
10.51
11.10 SET MIN=U1(M)
11.20 SET PLS=U3(M)
11.30 DO 15
11.40 SET U2(M)=AT
11.41
12.10 SET MIN=U2(M)
12.20 SET PLS=0
12.30 DO 15
12.40 SET U3(M)=AT
14.10
14.20 C GROUP 15 IS DONE SAMP TIMES TRANSFERRING NEW VALUES TO THE
14.30 C DACS AND READING THE ADCS
15.10 SET TIM=PNT(M)
15.20 SET RUN=FBDA(0,MIN,PLS,TIM)
15.30 SET WAIT=FLVL(0); SET AT=FADC(0)

