Annexe A Partie I COMPHER NOSTACK C SCANNER TEST C MODEL2 FOR ME C 10/13/75 RSM@@ EXTERHAL SCANO COMMON /COM@UN/ KEY, DONE, STATE, DRIVE, IUSE (10) COMMON /OUTPUT/ UBUF, IBUF (10511) 1, ICOM4(3), ICOM5(3), ICOM6(3), ICOM7(3) 2, ICOM8(3), ICOM9(3), ICON1(3), ICOM2(3) INTESER DUMMY, STATUS, ERROR, YESNO, COMMAND(3), JARRAY(1) C THERE ARE 11 EXTBA WORDS FOR LAST DATA POINT TO BE ADDED C AND 10 LEADING GREEN WORDS - ANGLE, DATE, ETC INTEGER CORR(2,2) DIMENSION ICOUHT(3) DIMENSION IDIRL(3), IDIRR(3) INTEGER MYOUT(5), IPOSM(18) EQUIVALENCE (ICOM4(2), YESND), (ICOM5(2), ICNEW) EQUIVALENCE (IBUF91), ANGLE) EQUIVALENCE (IANGLE, IUSE(1)) DATR CORR/34,-34,41,0-41/ DATA UBUF @@@@, "VETERANS ADMINISTRATION HOSPITAL DATA IDIRR /0,-21750,15700/, IDIRL /1,15700,-21750/ DATA COFF /0,0/, CONS /0.01460494/ DATA ICOUNT/750,13,25/ DATA DELTAR/12./, IROT /2/, ASTART /-968/, LSTART 1/23500/ DATA KEY/0/, DONE/2/, STATE/1/, DRIVE/0/, LUSE/10*0/ DATA ICOM@ /3,0,34/, ICOM2 /4,1,25/, ICOM3 /4,5,33/ 1, ICOM4 /3,0,18/, ICOM5 /3,0,10/, ICOM6 /4,7,10/ 2, ICOM7 /4,1,10/, ICOM8 /4,4,3/, ICOM9 /4,5,43/ 3, ICONI /4,2,36/, ICON2 /4,3,14/ DATA ONN /"ON "/, OFF /"OFF "/ DATA MYOUT /"SLICE "/ 1, IPOSM /" CEMTIMETERS DEGREES "/ C THIS SUBROUTINE SETS CNTRL-A CNTRL-C BREAK EXITS TO C SUBROUTINE ABREAK AND CBREAK RESPECTIVELY CALL REBREAK CALL SPDIS ("STTO", ERROR) CALL OPERAT ("SET SWITCH TO BUFFERED/XMIT RETURN*, ICOMI) COMMAND(1) = 1 C THIS BUILDS THE OPERATOR OPERAT CALL OPRAT (IBUF, COMMAND) CALL OPERAT ("MODELL SCANNER - 10/13/75 *, ICOM2) CALL PRI (20) CALL FTASK (SCANO, @6000, 10) CALL XMT (KEY, 1, @6000) 10010 CONTINUE GO TO (1001, 10010, 3020), DONE 10001 CONTINUE CALL OPERAT ("TO CALIBRATE - INITIALIZE SCANNER", ICOM3) 3. CONTINUE CALL OPERAT ("XMIT YES OR NO ", ICOM4) IF (YESRO .EQ. "NO") GO TO 2 IF (YESNO .NE. "YE") GO TO 3 CALL SETZ (1) CALL PEADZ (IPPOS, 1) CALL WRIT (1000, 1, ERROR) CALL SETZ (2) CALL READZ (IANGLE, 2) 2 'CONTINUE 5 CONTINUE CALL MOTUR (LSTART, 1) CALL MOTOR (ASTART, 2) DRIVE = 0 CALL NOXRAY CALL OPERAT (OFF, ICOMS) CALL ENCODER (IPPOS, 1) IPPOS = (IPPOS + ISING (50, IPPOS) )/100 CALL CONVS (IPPOS, IPOSM) CALL ENCODER (IANGLE, 2) ANGLE = FLOAT (IANGLE) IANGLE = ANGLE*. 1460494 + SING (.5, ANGLE) CALL CONVS (IANGLE, IPOSM(11) ) CALL OPERAT (IPOSM, ICONI) CALL OPERAT ("LOAD POINT", ICOM7) LEPTRT = 1 STATE = 1 IROT = 2 COMMAND(1) = 2 CALL OPERAT (USUF(29), COMMAND) UBUF(7) = 0 GO TO 4 1 CONTINUE ICOLD = ICNEW 4 CONTINUE DONE = 1 STATE = 2 CALL OPERAT ("SCAN OPTION:SCAN, NEW, XRAY, REW, EXIT", ICOMS) CALL OPERAT ("SMIT REPLY", ICOM5) IF (ICNEW .EQ. "XR") GO TO 6400 IF (ICNEW .WQ. "NO") GO TO 7 IF (ICNEW .EQ. "SC") GO TO 6 IF (ICNEW .EQ. "RE") GO TO 3000 IF (ICNEW .EQ. "EX") GO TO 3000 IF (ICNEW .EQ. "NE") GO TO 5 CALL OPERAT ("NOT OPTION", ICOM7) GO TO 4 6 CONTINUE IF (DRIVE .NE. 0) GO TO 7 CALL OPERAT ("XRAY OFF", ICOM7) CALL OPERAT (OFF, ICOM8) GO TO 4 7 CONTINUE GO TO (8, 9), LEFTRT 8 CONTINUE CALL MOTOR (-16000, 1) GO TO 10 9 CONTINUE CALL MOTOR (11000, 1) 10 CONTINUE CALL OPERAT ("SCAN BEGUN", ICOM7) CALL XRAY (YESNO) IF (ICNEW .EQ. "NO") GO TO 11 IF (YESNO .EQ. 0) GO TO 6 11 STATE = 3 GO TO (12. 11. 7000), DONE 12 CONTINUE UBUF(7) = UBUF(7) + 1 IF (ICNEW .EQ. "NO") GO TO 13 CALL XMT (KEY, 3, $6000) 13 CONTINUE CALL CONV (UBUF(7), IUSE) MYOUT(4) = IUSE(3) CALL OPERAT MYGUT, ICOM6) GO TO (15, 20), IROT 15 CONTIHUE IROT = 2 BEGIN = 156.