NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is...

22
NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS DIVISION TECHNICAL NOTE NO. 116 TITLE: Lathe Table APPLESOFT Program AUTHOR (S): Roger D. Norrod DATE: March 16, 1983 DISTRIBUTION: GB GB Library R. Fisher R. Lacasse W. Brundage R. Weimer D. Schiebel C. Moore C. Brockway J. Coe G. Behrens R. Mauzy R. Norrod F. Crews CV CV Library H. Hvatum M. Balister S. Weinreb C. Burgess TU Library Downtown Library Mountain J. Payne VLA VLA Library P. Napier JCampbell

Transcript of NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is...

Page 1: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If

NATIONAL RADIO ASTRONOMY OBSERVATORY

ELECTRONICS DIVISION TECHNICAL NOTE NO. 116

TITLE: Lathe Table APPLESOFT Program

AUTHOR (S): Roger D. Norrod

DATE: March 16, 1983

DISTRIBUTION:

GB GB Library R. Fisher R. Lacasse W. Brundage R. Weimer D. Schiebel C. Moore C. Brockway J. Coe G. Behrens R. Mauzy R. Norrod F. Crews

CV CV Library H. Hvatum M. Balister S. Weinreb C. Burgess

TU Library Downtown Library Mountain J. Payne

VLA VLA Library P. Napier J• Campbell

Page 2: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If
Page 3: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If

Version 15Mar83

LATHE TABLE APPLESOFT PROGRAM

Roger D. Norrod

March 15, 1983

The following is a description of an Applesoft BASIC program which is intended to produce a table of data describing a part to be machined on a lathe equipped with a numerical readout. The program is set for the conventions followed by the Green Bank lathe readout; that is, the carriage (Z) readout increases posi¬ tive toward the tailstock and the crossfeed (X) readout increases positive to¬ ward the operator.

This program description consists of two sections. The first is intended for someone who merely wants to use the program to produce a table. The second sec¬ tion is intended for a programmer who wishes to describe a new part or modify the existing program.

1.0 Using the Program

With the APPLE off, insert the proper disk into the disk drive and close the door. Turn the APPLE power on. The video display will soon display a list of programs that are on the disk and then a blinking block cursor. Type RUN LATHE TABLE and Return or the disk may automatically load and run the proper program. A menu is then displayed. To begin the process of producing a table, the user selects "T".

The program then asks the user several questions about how the piece is mounted in the lathe and how the table is to be organized. Most questions have only two acceptable answers and the choices are highlighted on the screen. In addi¬ tion, most questions have default answers that are displayed between slashes. If the user presses only Return in response to a question, then the default answer is used. An entry of "QQ" will cause the program to return to the menu. The questions asked are:

1. If the machinist will start at reference point 1 or 2. A draw¬ ing of the part being machined should indicate two reference points on the Z axis, normally at the endpoints of the described curve. The Z axis will be zeroed at the point selected here, so the user will usually enter the point where the cut begins.

2. If the carriage will move toward the headstock or tailstock dur¬ ing the cut.

3. If the table should have a constant X step size or a constant Z step.

4. The tool radius.

5. The size of the step. The program will only accept inputs here greater than zero.

6. The amount of any oversize, such as would be required for roughing cuts, etc. No checks are made on this input, so the user should be careful to enter the proper sign for this offset. Note that the oversize is a diameter measurement, not a radius.

Page 4: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If

7. The diameter at which the X axis is zeroed. An entry of zero here implies that the X axis is zeroed at the lathe axis of rotation.

The program then displays the ranges of Z and X (including the effect of the entry In 7 above but not including the oversize or tool radius offsets), and asks the user if he wants the total table or a portion only. If the partial option is selected, the program asks for the starting and ending values. Selecting the starting and ending entries may require some thought since the entries do not include oversize or tool radius offsets, while displayed table values do include the offsets.

The program then asks the user to wait and calculates the data points. This may take several minutes, depending on the number of points requested. Be¬ cause of memory size restrictions, the computer can only hold 500 points at one time. If the user has requested more than 500, the program will calcu¬ late the first 500 and alert the user that the memory is full.

Upon completion of the calculations, the display menu is presented. Options here are:

(P) To print the table. The printout may be terminated at any time by pressing Q. Upon completion of printing, the pro¬ gram returns to the display menu.

(D) To display the table. The data is displayed on the video screen and the I/O paddle buttons may be used to scroll the screen. Upon pressing Q at the keyboard, the program returns to the display menu.

(R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If calculations are complete, the program will return to the main menu, ready to make a new table.

(E) To end the program.

The program saves on disk the entries made by the user so that these become new default values the next time the program is run. Figure 1 shows how the tool radius should be accounted for when zeroing the Z and X axis.

i

TOOL RADXUS

Figure 1: Zeroing the axes,

Page 5: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If

2.0 Programming Notes

The programmer should first read section 1.0. The program is organized as a group of subroutines. Remarks have been used extensively to make the program self-documenting. A program listing and a variable cross reference index are attached for an example program that has been used to machine a L-band OMT mandrel. For illustration, a drawing of the mandrel is also attached.

The axis along the bed of the lathe is the Z axis; the crossfeed moves along the X axis. Variables Z and X are the positions displayed to the user and agree in magnitude and sign with the digital lathe readout. Program variables RZ and RX are variables in equations that the programmer uses to describe the part. The program converts the variables RZ and RX to Z and X, automatically assigning the correct sign and magnitude.

In order to describe a new part, the programmer need only modify four sub¬ routines :

500-599 This routine calculates RX given a value of RZ, where RX is the radius of the part and RZ is the position along the length of the part.

600-699 This routine calculates the slope at a point RZ, RX and assigns it to the variable SL.

700-899 This routine calculates RZ given a value of RX. This routine is used if the user requests constant steps in the X direction.

900-999 In this routine, the user defines certain variables re¬ quired by the program. These are:

UNIT% 0 for units of inches 1 for millimeters

TI$ A string used as a title for the program.

U1$,U2$ Optional strings printed as headers for the data table.

Z1,Z2 Real variables defining the RZ endpoints of the curve. These will usually correspond to the values of RZ at Reference Points 1 and 2, respectively. It is recommended that Zl < Z2.

XI,X2 Real variables defining the values of RX at Zl and Z2. These are used if the user re¬ quests constant X steps and only make sense if the described curve is monotonic. It is recommended that XI < X2.

FG +1 for outside cut, -1 for inside cut. This flag is used when calculating offsets due to oversizes or tool radii.

Page 6: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If

Following is a routine by routine description of the program:

1-29 Loads a "PRINT USING" utility, dimensions the arrays, calls the user routine 900, displays a screen heading, loads default values from disk (routine 1800), and jumps to line 100 to display the main menu.

30-99 Subroutine that displays five lines of the data array on the screen.

100-199 The main menu. Options and destinations are:

(T) - Make new table -»■ 200 (E) - End program -*■ APPLESOFT.

200-219 Directs flow of the process in calculating and display¬ ing a table. Sets up the table (2000), gets user in¬ puts (1000), saves user inputs to disk (1830), branches to the proper calculation routine (220 or 300), and returns to the main menu (100).

220-299 Subroutine called by 200 to calculate data array with con¬ stant RZ steps. Calculates 500 points or the entire array (whichever is less), calls the display menu (400), and then completes the table if required before returning to 200.

300-349 Similar to 220 except for constant RX steps.

350-399 Stores calculated points in the data array. Data stored is Z, X, and the increments of Z and X. Called by 220 or 330.

400-449 The display menu. Options and destinations are:

(D) - Screen display -*- Subroutine 30 (R) - Resume calculations -»• Returns to calling routine (P) - Prints hardcopy -*■ Subroutine 9100 (E) - Ends program -»■ APPLESOFT

The display menu is called by 220 or 330.

460-479 Transforms RZ, RX to Z,X. Adds offsets and converts the radius RX to the diameter X. Flips the Z axis if the Z axis is zeroed at Reference Point 2.

490-499 Calculates tool radius offsets needed by 460.

1000-1749 Prompts and accepts user inputs for configuring the table.

1800-1829 Three routines that read and write the user inputs to 1830-1849 disk for use as defaults. If an attempt is made to read a 1880-1899 non-existent disk file, then "default" default values are

written to the disk. The name of the disk default file is TI$+,,.DEF".

Page 7: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If

2000-2099 Routines to set up the table. Defines the proper round¬ ing on units chosen, defines column headings, and defines printer header strings.

5300-5340 Printer initialization routine.

9100-9400 Routine to dump the data array to the printer.

Please report any bugs or problems to the author. It is recommended that anyone who modifies this program to describe a new part should generate a dedicated disk containing only his version, clearly identified. The disk must contain a copy of the "PU&F.O" binary program. I have found it helpful to have the greeting (HELLO) program run the proper "LATHE TABLE" program so that the user need not type the program name at each power-up.

RDN/cjd

Page 8: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If

PRQSRRM LENSTH= 11342 BVTES URRIRBLES^ 35 BYTES FREE MEHORV= 29878 BVTES STRRT=2049 LOMEH=13391 FREE=13426 STRINS=34384 HIMEM=34384

1 REM LQTHE TABLE UERSIQN 15HRR83

2 PRINT CHPS <4),,HRXFILES3H:RDR = PEEK <115) + 258 * PEEK <116) - 533: PRINT CHR$ <4>HBL0RD PU&F.O,RHifiDR 3 FOR I = 1 TO 11: RERD D1»D2:D1 = 01 + RDH:D2 = 02 + RDR: POKE Dl + 1*02 --' 256: POKE 01,02 - 258 * PEEK <D1 + 1): NEXT : DRTR 3,18,17,13. 26,72,47,72,64,118,68,117,117,138,125,382,127,427,123,485,371,ISO 4 CRLL RDR: REM INUOKE PRINT USING <REF CRLL fl.P.P.L.E. IN DEPTH UOL 1)

5 REM BEGIN 6 NO = 581: DIM U<4,ND),US<4) 8 REM OISPLRV HEROINS 18 TEXT : HOME 11 60SUB 388: REM RERD PR06RRMHER INPUTS 12 9.$ = TI$ + " PROGRAM" :B$ = HNRR0-15MRR83,,

14 PRINT TRB< 28 - LEN <&$') s 2)#R*: PRINT TRBC 28 - LEN <B*> s 2>iB$ 16 U = 2: UTRB U + 2: POKE 34,U: REM SCREEN WINOOM

18 REM INITIALIZE CONSTANTS 28 0$ = CHR* <4): REM D*=CTRL-D 22 REM OEFRULT URLUES 24 GOSUB 1888 26 GOTO 188: REM OISPLRV MENU

38 REM TRBLE UIOEO OISPLRV 31 HOME :R* = "PRESS Q TO EXIT": HTRB <20 - LEN <&$) / 2): INUERSE

: PRINT R$: NORMAL 32 U = 4: UTRB U + 1 34 PRINT TflB< 4>iU*<l); TRB< 14)*U$<2)J? TRB< 24);U*<3)i: TRB< 34>»U*<4) 38 POKE 34,U: REM SCREEN WINDOW 38 UTRB 12: 8, RPT PRINT > ,,-,,,48 33 UTRB 14: % RPT PRINT > "-",48 44 Nl = 127:N2 = 123:N3 = - 4:N4 = - 6:N5 = 4:N6 = 8:N7 = 7:N8 = 3:N3 = 1 45 R4"; = - 16334: REM KEV BUFFER RDDR 46 JA = 1:R1": = - 16287: R2"; = - 16286: REM PBS AND PB1 43 GOSUB 138: REM OISPLRV FIRST PRGE 58 NT* = 256 51 KV = PEEK <R4?0: IF KV = 283 OR KV = 31 THEN POKE - 16368,8:U = 2: POKE 34,U: RETURN : REM RETURN IF Q PRESSED 52 IF PEEK <R1?0 < N2 THEN 51: REM WRIT FOR BUTTON 56 SC"; = N3: IF PEEK <A230 > Nl THEN SC3J = N4 58 J5s = J* + SC"C 88 IF J3s < N3 THEN J"; = N3 62 IF J5i > IZ THEN J* = IZ

Page 9: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If

64 GOSUB 88 68 FOR NT = NS TO NT";: NEXT WT: REM WRIT 68 IF PEEK <R1'0 > Nl THEN WT:-; = WT": -•' N5: GOTO 56: REM BUTTON STILL DOWN

78 GOTO 58 88 REM OISPLRV PRGE 82 FOR LN = N6 TO N5 34 UTRB N7 + LN * N3: & CLERR TO EOL S3 & PRINT USN8 > FR$iU< l,J"i>,U<2,J";>,U<3,J"i>,U<4,J'0 32 J* = J"; -f 1 34 IF JZ > IZ THEN LN = 5: & CLERR TO EOP 36 NEXT LN 38 PRINT CHR* O): RETURN : REM

188 HOME : UTRB U + 2: REM MENU OISPLRV 185 PRINT "PRESS <T> TO MRKE NEW TRBLE" 118 HTRB 7: PRINT H<E) TO END PROGRAM" 188 PRINT : & CLEAR TO EOL: INPUT "SELECTION? H;P$ 185 IF P$ = "T" THEN GOTO 288 137 IF P$ = "E" THEN TEXT : HOME : END 133 S» BELL: GOTO 188: REM FRULTV ENTRY

288 REM MAIN PR08RRM 282 CH = 1: REM INITIRLIZE HEADING FLAG 288 GOSUB 2888: REM SET UP TABLE 218 GOSUB 1888: REM GET USER INPUTS 211 U3* = U3$ + STR$ •' FN R4<TC:D + ", OUERSIZE DIR = " + STR* < FN R4<0U>> 212 U4$ = U4* + STR$ <RF> + ", TOOL RRD = " + STR* (. FN R4<TR>>: REM HERDER INFO 214 HOME : UTRB ll:fl* = "PLEASE WAIT": PRINT TABC 28 - LEN <$$) / 2)#A$ 216 GOSUB 1838; REM SAUE DEFAULT UALUES 217 I = FRE <8>: REM GARBAGE COLLECTION 218 ON BR GOSUB 228,388: REM BRANCH FOR CONSTANT Z STEP OR X STEP 213 GOTO 180: REM DISPLAY MENU

228 REM CONSTANT Z STEP 222 RZ = SZ: REM INITIALIZE RZ 224 GOSUB 588: GOSUB 468: REM CALC INITIAL RX AND Z,X 225 ZO = Z:XO = X: REM INITIALIZE OLD POINTS 238 I = 8: REM BEGIN COUNT 231 IF DD < 8 AND RZ < EZ THEN RZ = EZ 232 IF DD > 8 AND RZ > EZ THEN RZ = EZ 237 GOSUB 588: REM CALC RX<RZ> 238 GOSUB 468: REM CALC Z,X 248 GOSUB 358: REM SRUE DATA 245 RZ = RZ + DD 258 IF I = NO - 1 THEN CP = 8: GOTO 265: REM ARRAY FULL 253 IF DD < 8 AND RZ > EZ + DO + IE - 5 THEN 232 255 IF DD > 8 AND RZ < EZ + DD - IE - 5 THEN 232 288 CP = 1: REM END OF TABLE FLAG 265 IZ - I 278 GOSUB 488: REM PROMPT USER FOR TYPE DISPLAY 288 IF NOT CP THEN 238 285 RETURN : REM TABLE COMPLETE

Page 10: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If

8

388 REM ROUTINE FOR CONSTANT X STEP 382 RX = SX: REM INITIALIZE RX 383 GOSUB 788: GOSUB 468: REM CALC RZ AND Z,X 384 ZO = Z:XO = X: REM INITIALIZE OLD DATA 388 I = 8: REM BEGIN COUNT 318 REM BEGIN LOOP 311 IF DD < 8 AND RX < EX THEN RX = EX 312 IF DD > 8 AND RX > EX THEN RX = EX 318 GOSUB 788: GOSUB 488: REM CALC RZ AND Z X 318 GOSUB 358: REM STORE DATA 328 RX = RX + DO 322 IF I = NO - 1 THEN CP = 8: GOTO 338: REM ARRAY FULL 323 IF DD < 8 AND RX > EX + DD + IE - 5 THEN 318 325 IF DD > 8 AND RX < EX + DO - IE - 5 THEN 318 327 CP = 1: REM END OF TABLE 338 IZ = I 332 GOSUB 488: REM PROMPT USER FOR TYPE DISPLAY 336 IF NOT CP THEN 388 348 RETURN : REM TABLE COMPLETE

358 REM STORE DATA IN ARRAY 355 DZ = Z - ZO:ZO = Z 3b8 OX = X - XO:XO = X: REM CALC STEPS 385 I = I + 1 378 U<l,n = FN R4<Z * ZS>:U<2,n = FN R4<DZ * ZS) 375 U<3,I> = FN R4<X - TC>:U<4,I> = FN R4<DX>: REM TC IS CENTER

OFFSET 388 RETURN : REM

488 REM SECONDARY MENU FOR DISPLAY TYPE 485 HOME 413 UTAB U + 2: PRINT "NUMBER POINTS IS "sIZ 412 IF NOT CP THEN UTAB U + 3:A* = "MEMORY FULL - CALCULATIONS INCOHPLE TE": INUERSE : PRINT A$: NORMAL 413 IF CP THEN UTAB U + 3:R$ = "CALCULATIONS COMPLETE": PRINT A$ 415 UTAB U + 5: PRINT "PRESS <P> TO PRINT TRBLE" 413 HTRB 7: PRINT "<D> TO OISPLRV TABLE" 428 HTAB 7: PRINT "<R) TO RESUME CALCULATIONS" 422 HTAB 7: PRINT HCE> TO END PROGRAM" 425 PRINT : & CLEAR TO EOL; INPUT "SELECTION? M*P$ 428 IF P$ = "D" THEN GOSUB 38: GOTO 485: REM DISPLAY TABLE 438 IF p-$ = "R" THEN 445: REM CALC REST OF POINTS OR RETURN TO MENU 435 IF P* = HPH THEN GOSUB 3188: GOTO 485: REM PRINT TABLE 437 IF P$ = "E" THEN POP : POP : TEXT : HOME ; END : REM END PROGRAM 448 & BELL: GOTO 415: REM FAULTY INPUT 445 IF CP THEN RETURN : REM IF TABLE FINISHED, DISPLAY MENU! 447 HOME :A$ = "PLEASE WAIT":BS = "CALCULATING MORE POINTS" 443 UTAB 18: PRINT TAB< 28 - LEN <A$> s 2>5Af: PRINT : PRINT TAB< 28 - LEN <B$> s 2>JB$ 443 RETURN : REM ELSE CALCULATE REST OF TABLE

468 REM TRANSFORMS RZ,RX TO Z,X 462 GOSUB 888: GOSUB 438: REM CALC SLOPE AND OFFSETS 464 X = 2 * {RX + FX - TR): REM ADD OFFSETS AND CGNUERT TO DIA 468 Z = RZ + FZ 478 REM CHANGE Z ZERO TO REF PT 2 472 IF RF = 2 THEN 2 = Z2 - Z 473 RETURN : REM

Page 11: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If

438 REM CALCULATES FZ AND FX, TOOL RADIUS OFFSETS 432 AG = ATN <SL> 434 FZ = - FG * <TR + OU / 2) * SIN <A8) 436 FX = FG * CTR + OU .-' 2) * COS (AG) 433 RETURN : REN

588 REM ROUTINE THAT CALCULATES RX 8IUEN RZ 528 IF RZ < Zl THEN RX = XI: RETURN 538 IF RZ > 12.85 THEN RX = X2: RETURN 548 RX = 1.4318 + 8.86725 * <1 + SIN <.268713883 * <RZ - 6.825>>> 533 RETURN : REM

688 REM ROUTINE TO CALCULATE SLOPE AT POINT RZ,RX 618 IF RZ c 8 THEN SL = 8: RETURN 815 IF RZ > 12.85 THEN SL = 8; RETURN 628 SL = 8.22818342 * COS <-268713883 * <RZ - 6.825)) 633 RETURN : REM

788 REM ROUTINE TO CALCULATE RZ GIUEN RX 712 IF RX < XI THEN RZ = Zl: RETURN 714 IF RX > X2 THEN RZ = Z2; RETURN 728 Rl = 1.15387 * RX - 2.7876367 725 IF Rl > =1.8 THEN CI = 1.5787363: GOTO 748 723 IF Rl < = - 1.8 THEN CI = - 1.5787383: GOTO 748 733 CI = ATN <R1 s SQR < - Rl * Rl + 1>): REM ARC SINE 748 RZ = 3.8358341 * CI + 6.825 833 RETURN : REM

388 REM ROUTINE TO SET UP TABLE PARAMETERS 383 UNIT'-; = 8: REM 8 FOR INCHES, 1 FOR MILLIMETERS 385 FG = 1: REM +1 FOR OUTSIDE CUT, -1 FOR INSIDE 318 TI$ = "LOHT MANDREL" 314 Ul$ « "L-BAND OMT MANDREL" 328 REM EXTREMES OF Z AND X 322 Zl = 8:22 = 14.1888 324 XI = 1.4318:X2 = 3.2155 333 RETURN : REM

1888 REM ROUTINE TO GET USER INPUTS 1885 HOME : UTAB U + 1:A$ = "ENTER QQ TO EXIT" 1887 HTRB 28 - LEN <A$> / 2; INUERSE : PRINT A$: NORMAL 1888 U = 3: POKE 34,U: REM

1818 UTRB U + 2: PRINT "START AT REF POINT % 1828 INUERSE : PRINT "1";: NORMAL 1830 PRINT " OR "i 1848 INUERSE : PRINT "2";: NORMAL 1858 PRINT " "i:OL* = STR* <RF): GOSUB 1788: REM DISPLAY OLD VALUE 1852 POKE 43163,8: INPUT UI$: GOSUB 1658: REM CLR KEYS, ACCEPT INPUT, LOOK FOR "QQ" INPUT OR JUST RETURN FOR OLD VALUE

1855 UI$ = LEFTS CUI*,!) 1068 IF UIS = "1" THEN RF = 1: PRINT "—> "iRF: GOTO 1188 1878 IF UI$ = "2" THEN RF = 2: PRINT "—> "*RF: GOTO 1108

Page 12: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If

10

1888 & BELL: GOTO 1818: REM FAULTY INPUT

1.188 UTRB V + 5: PRINT "CARRIAGE MOVES TOWARD "; 1118 INUERSE : PRINT "H";: NORMAL 1128 PRINT "ERD OR "* 1138 INUERSE : PRINT "T";: NORMAL 1148 PRINT "AIL STOCK"? 1142 IF ZS < 8 THEN 0L$ = "H" 1144 IF ZS > 8 THEN 0L$ = "T" 1146 GOSUB 1788 1.143 INPUT UI*: GOSUB 1658 1158 UI$ = LEFT$ c;UI$,l> 1168 IF UI* = "H" THEN ZS = - 1.8: PRINT "--> H»UI*: GOTO 1288 1178 IF UT$ = "T" THEN ZS = 1.8: PRINT "—> H;UI$: GOTO 1288 1188 S, BELL; GOTO 1188: REM FAULTY INPUT

1288 UTAB U + 8: PRINT "CONSTANT "* 1218 INUERSE : PRINT "Z";: NORMAL 1228 PRINT " STEP OR CONSTANT M* 1238 INUERSE : PRINT "X";: NORMAL 1248 PRINT " STEP"i 1242 IF BR = 1 THEN OL* = "Z" 1243 IF BR = 2 THEN 0L$ = "X" 1244 GOSUB 1788 1245 INPUT Ul$i GOSUB 1658 1247 UI$ = LEFTS <UIS,1) 1258 IF UIS = "Z" THEN BR = 1: PRINT "—> "iUPS; GOTO 1288 1268 IF UI$ = "X" THEN BR = 2: PRINT "--> "iUIS: GOTO 1288 1278 & BELL: GOTO 1288: REM FAULTY INPUT

1288 UTAB V +11: PRINT "TOOL RADIUS"*UNIT*# 1282 QL$ = STR$ CTR): GOSUB 1788 1284 INPUT UIS: GOSUB 1858 1286 TR = UAL <UI$>: PRINT "--> "; FN R4<TR) 1283 REM

1388 UTAB U + 14: PRINT "SIZE OF STEP";UNIT** 1382 OLS = STR* < ABS (DD)> 1383 IF BR = 2 THEN QL* = STRS < FN R4< ABS <DD) * 2)) 1384 GOSUB 1788 1318 INPUT UIS: GOSUB 1658 1328 DD = UAL <UI*) 1325 IF DD < = 8 THEN & BELL: GOTO 1388; REM FAULTY INPUT 1327 PRINT "— > "i FN R4<DD): REM

1338 UTAB U + 17: PRINT "X AXIS OUERSIZE DIR"*UNITS; 1332 0L$ = STR$ <0U): GOSUB 1788 1334 INPUT UI*: GOSUB 1658 1336 OU = UAL CUI$): PRINT "—> "; FN R4<0U) 1333 REM

1340 UTAB V + 13: PRINT "ABSOLUTE X RXIS ZEROED RT "iUNITS; 1342 0L$ = STR$ <TC>: GOSUB 1788 1344 INPUT UI*: GOSUB 1858 1348 TC = URL <UI*): PRINT M— > "i FN R4<TC)

Page 13: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If

11 1343 REM

1353 REM SETUP TRBLE RANGES 1351 IF RF = 1 THEN SX = XI:EX = X2:SZ = Z1:EZ = Z2 1352 IF RF = 2 THEN SX = X2:EX = X1:SZ = Z2:EZ = Zl 1353 IF BR = 2 THEN DD = DD s 2: REM CONVERT DIA TO RADIUS 1354 IF SX > EX AND BR = 2 THEN DD = - DD 1355 IF SZ > EZ AND BR = 1 THEN DD = - DD 135S HOME : UTAB V + 1; FLASH : PRINT "RANGES DO NOT INCLUDE TOOL RADIUS OFFSET": NORMAL 1358 PRINT "RANGE OF Z :": PRINT FN R4<Z1), FN R4<Z2> 1388 UTAB U + 5: PRINT "RANGE OF X :" 1362 PRINT FN R4C2 * SX - TC), FN R4<2 * EX - TC) 1384 UTAB U + 8: INUERSE : PRINT "P";: NORMAL 1388 PRINT "ARTIAL OR "s 1388 INUERSE : PRINT "T"i: NORMAL 1378 PRINT "OTRL TABLE"]: 1372 CALL - 868: INPUT UI$: GOSUB 1858 1374 UI* = LEFT* <Ur*,l) 1376 IF UI* = "T" THEN PRINT "— > "iUI*: GOTO 1888 1378 IF UI* = "P" THEN PRINT "— > "iUI*: GOTO 1488 1388 & BELL: GOTO 1364: REM FAULTY INPUT

1488 REM PARTIAL TABLE 1428 ON BR GOTO 1438,1588: REM BRANCH ON CONSTANT Z OR X STEPS

1438 UTRB U + 12: PRINT "STARTING Z'^UNIT** 1432 OL* = STR* <Z1): GOSUB 1788 1448 INPUT UI*: GOSUB 1658 1458 Z3 = UAL <UI*): PRINT "--> "; FN R4<Z3) 1488 UTAB V + 14; PRINT "ENDING ZH;UNIT*; 1482 OL* = STR* <Z2): GOSUB 1788 1478 INPUT UI*: GOSUB 1658 1488 Z4 = UAL <UI*>: PRINT M—> "; FN R4<Z4) 1433 IF <Z4 < = Z3) THEN & BELL: UTAB V + 18: PRINT "ERROR IN EHDPOINT? ": GOTO 1438 1435 IF RF = 1 THEN SZ = Z3:EZ = Z4 1437 IF RF = 2 THEN SZ = Z2 - Z3:EZ = Z2 - Z4 1433 GOTO 1688: REM CONTINUE

1588 UTAB U + 12: PRINT "STARTING XM;UNIT*; 1585 OL* = STR* <2 * SX - TC): GOSUB 1733 1518 INPUT UI*: GOSUB 1658 1528 X3 = UAL <UI*) + TC: PRINT "--> "* FN R4<X3): REM SUBTRACT TOOL

1539" UTAB U + 14: PRINT "ENDING X"*UNIT*; 1535 OL* = STR* (2 * EX - TO: GOSUB 1788 1548 INPUT UI*: GOSUB 1658 1553 X4 = URL <UI*) + TC: PRINT l,~> "; FN R4<X4) 1588 IF <DD < 3 AND X3 < X4) OR <DD > 8 AND X3 > X4) THEN % BELL: UTRB U + 18: PRINT "ERROR IN ENDPOINTS": GOTO 1588 1565 SX = X3 / 2:EX = X4 / 2 1575 REM CONTINUE

1638 U = 2: POKE 34,U; HOME : REM SCREEN WINDOW 1610 RETURN : REM END USER INPUT

Page 14: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If

12

1858 REM EXIT ROUTINE WHEN "QQ" INPUT OR USE OLD VALUE IF NULL STRG 1655 IF LEFT* c:UI$,2) = "QQ" THEN POP : POP :U = 2: POKE 34,U: GOTO 138: REM DISPLAY MENU

1657 IF UI* = "" THEN UI* = OL* 1653 & CLEAR TO EOL 1668 RETURN : REM

1788 REM DISPLAY OLD INPUT 1718 PRINT "-•'" + OL* + nsni 1715 %. CLERR TO EOL 1743 RETURN : REM

1308 REM LORD DEFAULT UALUES FROM DISK 1883 ONERR GOTO 1888 1886 PRINT CHR* <8):TD* = TI* + ".DEF" 1883 PRINT D*j:"OPEN",-TD* 1812 PRINT D*5HREAD,^TD* 1815 INPUT RF,ZS,BR,OD,OU,TC,TR 1.318 PRINT D*5 "CLOSE" ;TD* 1828 POKE 216,8: REM CLEAR ERR FLG 1823 RETURN : REM

1838 REM WRITES CURRENT DEFAULT URLUES TO DISK 1832 PRINT CHR* <8):TD* = TI* + ".DEF":CM* = "," 1834 PRINT D*i"OPEN";TD* 1836 PRINT 0*;"DELETE";TD* 1838 PRINT 0*5"OPEN"5TD* 1833 PRINT D*i"WRITE";TB* 1848 PRINT RF5CM*5ZSiCM*5BRiat*iDDiai*iOUiai*iTCiCM*5TR 1845 PRINT 0*;"CLOSE"iTD* 1843 RETURN : REM

1388 REM IF NO DEFAULT FILE, MAKE ONE 1882 PRINT CHR* <8): PRINT D*;"CLOSE" 1883 RF = i:ZS = 1.8;BR = 1:DD = 8:0V = 3:TC = 8;TR = 8 1888 GOSUB 1838 1888 GOTO 22 1333 REM

2888 REM ROUTINE TO SET UP TABLE 2818 ON UNIT-i + 1 GOSUB 2880,2838 2828 U*<1) = "Z" + UNIT*; REM COLUMN HEADINGS 2825 U*<2) = "DZ" + UNIT* 2838 U*<3) = "X" + UNIT* 2335 U*<4) = "DX" + UNIT* 2848 NC = 4: REM FOUR COLUMNS 2845 U3* = "CROSSFEED X READOUT ZEROED RT OIfl= " 2858 U4* = "CARRIAGE Z READOUT ZEROED RT REF POINT " 2873 RETURN : REM

2888 REM INCHES 2882 UNIT* = M<IN)" 2084 DEF FN R400 = INT <>rX + 0.88825) * 2888) --- 2888: REM ROUNDING

Page 15: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If

13

FUNCTION 2835 FR* = " 8.8888": REM FORMRT STRING 2886 RETURN : REM

2838 REM MILLIMETERS 2832 UNIT* = "<MM)" 2834 DEF FN R4<X) = INT <<H + 8.885) * 188) FUNCTION 2835 FR* = " 8.88"; REM FORMAT STRING 2836 RETURN : REM

188: REM ROUNDING

5380 REM TURNS ON TRENOCOM PRINTER 5385 0* = CHR* <4): REM D*=CTRL D 5387 PRINT CHR* <8) 5318 PRINT D*i"PR# 1": 5323 POKE 1313,8: POKE 5338 POKE 1657,88: REM 5348 RETURN : REM

PRINT 17135,"

CHR* <8> 3: REM MARGIN

LINE LENGTH

3188 9118 TAB<

3128 3288 3282 3283 9285 3287 9283 3283 3218 3212 3214 3216 3228

/• 2! 9225 3238 3255 3288 3275 3282 REM

3283 3285 3287 3283 9238 3232 3235

PRESS Q TO TERMINATE": PRINT REM DUMPS TRBLE TO PRINTER HOME : UTRB 11:R* = "PRINTING, 28 - LEN <R*) .-' 2)i;R*

FP* = " " + FR*: REM ADD 3 SPACES TO FORMAT REM PRINTS TABLE OF CALDJLRTED DATR GOSUB 5388: REM TURN ON PRINTER I* = CHR* <3): REM I*=CTRL I PRINT I*i"N": REM DISABLE UIDEO POKE 33,38; REM SET APPLESOFT LINE LENGTH IF NOT CH THEN 3255 PRINT TAB< 48 - LEN OJl*) --

TABc: 48 - LEN c;U2*) -• TAB< 48 - LEN <U3*) ^ TABC 48 - LEN <U4*) s PRINT COLUMNAR HEADINGS = 1 TO NC: PRINT TAB< 5

PRINT PRINT PRINT REM FOR J

2)iUl*: 2)iU2$ 2)iU3* 2)iiJ4*:

PRINT : REM PRINT HEADING

PRINT : REM PRINT HEADING

+ <2*J-1)*9 LEN <U*<J)) UU*<J)i: NEXT J PRINT CHR* <0):CH = 8 GOSUB 3388 REM PRINT DATR FOR J = 1 TO IZ & PRINT USN6 > FP*J:UC1,J),LK2,J),U<3,J),U<4,J)

KV = PEEK < - 16334): IF KV = 283 OR KV = 31 THEN "Q" TO TERMINATE PRINT. POKE - 16368,8: PRINT K = K + 1: IF K > =5 THEN GOSUB 3388 NEXT J PRINT : PRINT : PRINT PRINT 0*i"PR#8": REM TURN PRINTER OFF POKE 33,48: PRINT I**"I": REM RESTORE UIDEO RETURN : REM

J = IZ + 1

33fi8 FOR II = t TO 28 * NC 3318 PRINT "-"; 3323 NEXT II 3338 K = 8: PRINT CHR* <8): RETURN

Page 16: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If

NOTE'.

OK TO MASK" SURFACE DP TO 0,20 TNCHES F£OK COB/OEtS.

2, MfiNO&EL MATE/HAL AL<eOt>l-T<b ■ . ! " I

/. SLFCTjeOFOieM COfiPEt ABOUT rtA/OOKEt. \ TO HTNIfUJlhA THlClcmsS OF O.OVS. I

AfASJC EtOOS. »

v AJOTFO TOL', .XX =t*020 'X/Xs^'003

A) £A0 Qr£EEti tiktit, \*)V

"MTS Mt'lOtoCLSZ

AI>I*ROVIO MVi DRAWN BV £6*)

OMT SH-ELL. PHOTOTYPE MfirMG&ZL L 0ANO OtAT

2.(02*7" 215-OOZ onAwirta NUM*ia

I ii i ? mntnn mi HO. IMOM . ■• a-auvxiHT rAM • aur

Page 17: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If

15

PROGRAM: LOMT MANDREL

A* rtrsc USE 12 t4 31 21^ 412 413 44? 448 1885 188? 3118

oi-/. M)P(L op PB0 46 52 S3

R2% AfOIL OP P&L 48 5S

A4?; /wpe ^P KsredM-o sopped 4Fi •nl

RQR AOPI& flF POfiF "7 ••? o ... -y

AG — • --^^ GLO(>£ OF coEVE ows-tfi-ywe.) 432 434 43s5

** /(ISC ^SE* 14 44? 443 1"^

218 1242 1243 1258 1288 1383 1353 i"«4 ti^ 1428 1815 1848 1383 ~" " *

?25 ?28 ?38 ?48

*$ 1-9- prffitzr- hecLJUr* friirir&cL, -i. oMwu)****' 282 3288 3225

CI

CH

CM* "j *' 1832 1843

CP -ztf If memory fullj =1 }$ cafcula%h^H3 -fiVsJie^, 258 288 288 322 32? 338 412 413 445

D* s crei-jO 20 -^9 J?F ^tS 1^ tS38 1338 1333 1845 133; 5385 531U 32yy

Dl Temjo S"h>^«5e-

02 Temp StcrA^e^

DD fc? efc RX 5T£^ .^S^1 23;;? 245 ?57 —5 311 312 328 323 7^ i^po 138^ 1328 1325 132? 1353 1354 1355 1568 lIS is-M

OK CifiW^E c/0 X

Page 18: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If

16

388 3?S

TV?

3?0 "7*- •="

Vf

EX B/VQXJOG- X 311 312 323 325 1351 1352 1354 1382 1535 15S5

EZ SAMrtfc- e 253 232 1351 1352 255 1355 1435 143? 231

434 43K 335

FN m< HOVVfiTJOt' PvvLcTtO*-' 212 211 3?8 3?5 1236 1383 132? 1336 134R i.^Rft

1362 1458 1488 1528 1558 2884 2834

FP* PGXVrzjL For^taf s-hrf** 3128 32?5 ^

FR* Screen F6\n4ia+ s+Wkq

PV:*

Uy 2885 2835 3128

434 433

FZ ^ Offset 486 434

I Counf-e^ X^iflf^x 370 375 365 3 21? 322 265 258 238 383 338

1$ GTfcL-X 3233 3205 3232

II COi>A>TE>e. r*u/£x: 3388 3328

IZ

J":

LN

A/pw-ber- /mes /A. oiAf-cL CLpray 26::. 62 34 338 3268 3282 418

"Prfu+e,*- roui-iAt, cou*Cte,y* t*.chi#. 3228 3268 3275 3282 3287

Screen^ dliMay c-ov*$-&** 53 46 68 y8 32 34 62

Pr/whei^ IIA es c o u K+e K* 3285 y338

C/C«y p ress VOL \ o e~

34 34 38 sfe

Page 19: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If

17

56 68 44

N2 r IZd

N3 -z - 4 58 44

N4 = -^ 58 44

N5 ^ 4 ild. po oo

N6 s ^ 44 32 86

N7 ^ 7 44 84

N8 -Z 3 84 44

N3 s. i 44 68

NC A)ut*btr- cd!<;*KKS friiA.j'^JL 2848 3223 3388

NO D/jftefts/ox- of- CLVirays 258 o

OL* 6>li of- ct-fauH" c^se^ l^fot v'tnu-g 1858 1142 1144 1242 1243 1232 1332 1383 13-**

1342 1432 1482 1585 1535 1857 1718

ou Ovev^/ee^ dLfcLwete*** y/alvc* 1332 1336 211 434 1815 1848 1883 436

P* Use*- jHe*tu t*fart 185 187 438 435 437 425 188 428

Rl T^Mfi STGroLqo^ 728 725 728 738

,^-, ie?R 212 t351 t352 lQm 1435 t437 1315 1848 1883 472 1858

RX 'Wr X 728 382 528 323 ?12 714 538 325 312 328 548

484 311

245 27*2 538 818 232

sc-; fcfVec'h'b/u, o-f screen. Scroll

245 222 628 2^3 255 ?t4 ?4R ^4^ "S^Q ^^t pi^ 538 818 232 712 466 """" """

56

Page 20: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If

18

SL Slope* of- cvrve* 618 615 432 623

17.P:1 17i52 3^2 13^4 1362 1585 1565

l7Jri] t352 1355 t435 1.43? 222

211 1342 1362 1346 1585 1523 1535 1553 1815 1843 1883 375

TD* DefauH- dhk fil* **»&> 1808 1833 1312 1813 1832 1834 1836 1833 1833

1845

TI* User cle-PiA^J. yOrogra*c- Ka.H4e» 318 1886 1832 12

TR Tool BaJiVs 436 434 1315 1286 1848 212 1883 464 1282

6 34 2828 2825 2838 2835 3228

88 378 3275 6 375

UI* 314 3283

02* / Ir 3218 / Prater- H-^oudi^j S+riMa*

ft"7,*

212 2853 3214

UI* User #iipu+" St-rmj 1478 1483 1245 1344 1148 124? 1518 1523 1258

1878 1548 1558 1268 1855 1857 1328 1288 1153 1348 1336 1855 1378 1334 1888 1458 1168 1372 1374 1234 1448 1376 1178 1318 1852

UNIT$ UCXAO" OK "(Af/O" 1388 1583 1468 2828 2825 2838 2835 2832 2832

1288 1538 1348 1438 1338

UNIT * * # if /nek i;*<r+5 ^ i. /f /•fi^t- 2313 383

u "Top o-f- scree*^ vomaduo IZm 51 1538 1353 1288 1433 1835 413 1855 1364

36 1188 1568 1288 18 1348 188 32 418 1538 14t;8 1388 1888 415 1433 1.318 1688 1338 412

MT U)aiH- Cotm+ei^

Page 21: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If

19 H6

53 63 66

X r Cross f*<xJi a.K|CS 375 2384 225 363 2834 484 384

xi ^ ?e* Pi- 1 ex cooird,CMate. 324 1352 712 528 1351

X2 « £cf pt Z foC CoorJUa+e* 533 1351 1352 714 324

X3 Tie-inp Sf-orcLft, 1588 1565 1528

X4 TZ,«*jp St* ***.$£* 1568 1558 1565

xo PrcWoi;* K t/ala^ 225 368 384

378 355 472 334 466 225

zi Bef Pt- i. K? CG*rM*x&e~ 1432 1351 1352 528 322 1358 712

Z2 Ref Pf- 2- R2r Coo^,VAfe. 13^1 1358 1482 472 1437 714 322

Z3 T^iMp S1-O ^tt j e- 1435 1458 1437 1438

£.•■*

ZO

i-iD^

1437 1435 1438 1488

384 355 225

1168 1178 1142 1883 1848 378 1144 1815 'tulls'hck

Page 22: NATIONAL RADIO ASTRONOMY OBSERVATORY ELECTRONICS … · (R) To resume calculations. If memory is full, the program will resume calculations and then return to the display menu. If