C This is a DEC Fortran program to calculate all threading combinations C for a Jet GHB-1340 lathe, based on knowing all the tooth counts of C all the gears. The program compiles and runs on Digital's Alpha C systems running OpenVMS, but hopefully will compile and run on other C fortran compilers with little or no change. C C Jim Kirkpatrick C jimkirk at uwyo.edu PROGRAM GEARS C Compute various gearbox results for a lathe. IMPLICIT NONE REAL RATIO PRINT *,' QC back gears TPI "-pitch metric-pitch' PRINT *,' ' CALL CHANGES (1.0,'40x127x40 (D)') CALL CHANGES (120./127.,'40x127x120x40 (M1)') CALL CHANGES ((30./127.)*(120./40.),'30x127x120x40 (M2)') CALL CHANGES (127./120.,'40x120x127x40 (?1)') CALL CHANGES (30./40.,'30x127x40 (?2)') CALL CHANGES ((30./120.)*(127./40.),'30x120x127x40 (?3)') END SUBROUTINE CHANGES (RATIO,TEXT) C Given a particular gear ratio between the spindle and the input to C the quick-change gear box, and assuming a given pitch on the feed C rod, compute and display all the combinations of feed. C RATIO is the incoming spindle-to-gearbox ratio C TEXT is a textual description for inclusion in the chart IMPLICIT NONE INTEGER I,J REAL RATIO,TPI,INCHPITCH,METRICPITCH CHARACTER*(*) TEXT CHARACTER*1 C C "GEARBOX" is a list of the English threads cut at all the settings, C according to the manual. Of course these numbers are correct for C a particular leadscrew pitch, but it turns out the exact value C cancels out of the calculations so we don't even need to know it! C This also assumes the numbers are all completely correct; the alternative C is to count teeth on the gearbox gears (which I also did; yawn). C These values are for the Jet GHB-1340 -- REAL GEARBOX (8,5) DATA GEARBOX / 4, 4.5, 5, 5.5, 5.75, 6, 6.5, 7, - 8, 9, 10, 11, 11.5, 12, 13, 14, - 16, 18, 20, 22, 23, 24, 26, 28, - 32, 36, 40, 44, 46, 48, 52, 56, - 64, 72, 80, 88, 92, 96, 104, 112/ C Optional -- to calculate thread pitches based on using the C power feed instead of the threading rod, there seems to be C a ratio of 2.4880:1 that gets thrown in by the apron gearing. C This number was derived by comparing the claimed feed rate C at certain settings/gearings with the threading for the same C settings/gearings. The number wandered a bit because the C printed feed rates were approximate, but averaged out to C the above number. A more precise value could be determined C by following all the gearing right up to the rack and pinion C but then you'd have to know/measure the rack pitch accurately. C Note that using power feed to do threading may not be very C consistent because of the rack/pinion feeding. C If the line "TPI=TPI*2.4880" below is commented out, then standard C threading values are calculated; if it is not commented out, then you C get the very unusual case of using the power feed. DO J=1,5 C=CHAR(ICHAR('A')-1+J) DO I=1,8 TPI=GEARBOX(I,J)/RATIO C TPI=TPI*2.4880 INCHPITCH=1./TPI METRICPITCH=INCHPITCH*25.4 PRINT 100,C,I,TEXT,TPI,INCHPITCH,METRICPITCH 100 FORMAT (1X,A1,'-',I1,2X,A,T27,F7.3,3X,F6.4,3X,F6.4) END DO END DO END