{ MILL=T LATHE=F SIMPLE_ROT_POS=T ROTARY_MILL=F ADV_MILL=F SUBS=T MILLTURN_Y-AXIS=F METRIC=F } {Change Comments ***********************************************************} {10/31/89 Copied & modified: Fan 6M MS MV35 [¨] M051.55 For: Accutool Machine: Matsura RA2 Control: Yasnac MX3 Modified per customer requests. JR} {7/24/90, Added InitProg globally to posts with this remark, DWB} {4/26/91, Modified: Yasnac MX3 Mat [AM] M267.62 For: Gibbs & Associates Updated to new 4.0 Version per Fanuc 6M M001.80 DWB} {8/31/95, Updated Yasnac MX3 Mat [AM] M267.79 to .85 version per Fanuc 6M M001.85.01.03, JR} {1/17/96, Updated .85 to .86 version, MPK} {3/22/96, Tested zOnlyRepAutoCycle, Changed version # to .89, MPK} {1/29/97 Initial: Yasnac MX3 Mat [AM] M267.89 Created: Yasnac MX3 Mat [AM] Mxxx.89 ForUser: Imaginetics Control: ???? Machine: ???? Develop: Develop: ComPost2 1.0b11.exe & Virtual 3.25 Changes: New Processor per marked up readout from Dean Spears Added tool list to beginning of program Changed to First Tool Not In Spindle format Added G95/G94 for Rigid Tapping Jim Radcliffe} {2/10/97 Initial: Yasnac MX3 Tree 1050 MY18.89 Created: Yasnac MX3 Tree 1050 MY18.89.1 Postscipt commands were commented out in doPostScript and doEndOpPS subs, uncommented them, MPK} {1/14/99 Initial: Yasnac MX3 Tree 1050 MY18.89.1 Created: Yasnac MX3 Tree 1050 PMY18.17 Created simple 4th positioning post MPK} {1/22/99 Inital: Yasnac MX3 Tree1050 PMY18.17 Created: Yasnac MX3 Tree1050 PT87.17.3 For: Lamothermic Comments Form: Changed tool offset cancel to G49 Prog: Changed tool start and end blocks per customer request, Tool list now outputs tool number and user tool comment only MPK} {Prog Numeric Format Definitions *******************************************} #1 = '#.00' #2 = '#####.###;0.' #3 = '*#####.###;0.' #4 = '####.####;0.' #5 = '#######0' #6 = '####^##0' #7 = '#' FORMAT(FileFeet#,1) FORMAT(FileMeters#,1) FORMAT(Dwell#,2) FORMAT(TrackC#,3) FORMAT(TrackCNO#,3) FORMAT(MoveC#,3) FORMAT(UnitAngle#,3) FORMAT(Recall#,4) FORMAT(ADD#,4) FORMAT(ToolDiameter#,4) FORMAT(TLDia#,4) FORMAT(TrackXNO#,4) FORMAT(TrackYNO#,4) FORMAT(TrackZNO#,4) FORMAT(TRUNC#,5) FORMAT(Program#,5) FORMAT(Program2#,5) FORMAT(CallMasterNum#,5) FORMAT(Operation#,5) FORMAT(Tool#,5) FORMAT(TLNum#,5) FORMAT(NewWFO#,5) FORMAT(Parts#,5) FORMAT(RapidF#,7) {Added Subroutines ****} report: IF PalletIn? '------------------------------------' EOL 'Num#(1) xEP = ' Recall# Num#('1') EOL 'Num#(2) yEP = ' Recall# Num#('2') EOL '------------------------------------' EOL END RETURN resetSP: {update to the correct StartPos} IF Rotations? OR Repeats? OR AutoCycle? IF AbsValue? TrackXNO# SPX# TrackYNO# SPY# ELSE SetAbs TrackXNO# SPX# TrackYNO# SPY# SetInc END END RETURN saveEP: {save the correct EndPos} IF PointFeat? IF AutoCycle? SetACSPCompF Save# Num#('1') ADD# Recall# Num#('1') SPX# { xOpEP } Save# Num#('2') ADD# Recall# Num#('2') SPY# { yOpEP } SetACSPComp ELSE Save# Num#('1') SPX# { xOpEP } Save# Num#('2') SPY# { yOpEP } END ELSE Save# Num#('1') EPX# { xOpEP } Save# Num#('2') EPY# { yOpEP } END RETURN getEP: {save the correct EndPos} IF Rotations? OR Repeats? OR AutoCycle? IF AbsValue? saveEP ELSE SetAbs saveEP SetInc END report END RETURN setSRXYtoACEP: TrackXNO# Recall# Num#('1') { xOpEP } TrackYNO# Recall# Num#('2') { yOpEP } RETURN {Prog Subroutines ****} restoreScale: IF Metric? {CAM file is in Metric, tools and tool path} SetScale('.03937007874') { change to English, this is an English post} END RETURN wfo: 'G' NewWFO# RETURN wfoStuff: IF NewWFO? IF MultipleParts? AND WorkFixtureOffsets? EOL '*** WARNING *** DO NOT USE NEWWFO() WITH MULTIPLE PARTS AND WORK FIXTURE OFFSETS' EOL ELSE wfo END ELSE IF Flag?('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others } IF NOT SameTool? IF MultipleParts? IF WorkFixtureOffsets? WFO1 ELSE wfo END ELSE wfo END END END END SetFlagF('2') { Do not output WFO second time wfoStuff is called for MP-WFO-OTAP-ECP } RETURN doSubComment: IF UseComments? AND SubComment? '( SUB NUMBER- ' Program# ' )' EOL END RETURN doOpComments: IF UseComments? SetScale('1') IF OperationIDComment? '( OPERATION ' Operation# '- ' OperationType$ ' )' EOL END IF OperationComment? '( ' OperationComment$ ' )' EOL END IF WorkGroupComment? '( ' WorkGroupComment$ ' )' EOL END IF NOT SameTool? IF ToolTypeComment? '( TOOL ' Tool# '- ' ToolDiameter# ' ' ToolType$ ' )' EOL END IF ToolComment? '( ' ToolComment$ ' )' EOL END END restoreScale END RETURN psInit: {reset flags} NewWFOF FourthCWF FourthCCWF RotateF OptCyc1F MasterOpF CallMasterOpF RETURN psStuff: IF FifthCW? FORMAT(FifthDegree#,2) SeqC 'B' FifthDegree# EOL FifthCWF END IF FifthCCW? FORMAT(FifthDegree#,3) SeqC 'B' FifthDegree# EOL FifthCCWF END RETURN doPostScript: psInit EachPS SeqC PostScript EOL {literals} psStuff {commands} NextPS RETURN doEndOpPS: psInit EachEOPS SeqC EndOpPS EOL {literals} psStuff {commands} NextPS RETURN absValueC: IF NOT AbsValue? AbsValue END RETURN incValueC: IF AbsValue? IncValue END RETURN absOrIncC: IF AbsoluteMoves? absValueC ELSE incValueC END RETURN setAngleUnder360: {sets status register and machine to current rotary position between -360 and 360 deg} IF AAxisAvail? SetAbs IF GTEqual? MoveC# Num#('360') {reset the A-axis to be between 0 and 359.999} ResetAngle SeqC Preset 'A' TrackC# UnitAngle# EOL ELSE IF LTEqual? MoveC# Num#('-360') IF Equal? UnitAngle# Num#('0') {reset the A-axis to be 0} ResetAngle SeqC Preset 'A' TrackC# UnitAngle# EOL ELSE {reset the A-axis to be between -0.001 and -359.999} ResetAngle SeqC Preset 'A' TrackC# SUB# UnitAngle# Num#('360') EOL END END END SetInc { Because we call setAngleUnder360 right after incValueC OfstOff } END RETURN doStartPos: StrtPos IF AAxisAvail? CalcSCAng MoveC ELSE TrackCNO# Num#('0') END RETURN entryMove: IF FirstOperation? OR NewTool? RapidF# { Forces FeedEnt/FeedRate } ELSE IF LAST Rotations? OR LAST Repeats? RapidF# { Forces FeedEnt/FeedRate } END END IF FeedEntry? SeqC Feed ZIn FeedEntC EOL ELSE SeqC RapidC ZIn EOL END RETURN startSub: OpenSub SubID EOL doSubComment RETURN subWarning: IF NOT FeedConnect? IF AnyZshift? ' ' EOL '( WARNING Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT )' EOL ' ' EOL END END RETURN stdSub: SeqC SubCall CallLab RepLab RepCycs EOL startSub RETURN finishSub1: {part 1} SeqC CRCOffC IF NOT FeedConnect? RapidC ZCP3C END EOL RETURN finishSubG92: {part 2} SeqC Preset ShiftRC EOL SeqC EndSub EOL CloseSub SeqC Preset UnshftRC EOL RETURN doWFOOps: IF Flag?('5') SetFlagF('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP } ELSE SeqC SetWFO EOL END SeqC SubCall CallLab RepLab OnePart EOL RETURN openMP: NewProg IF WorkFixtureOffsets? IF OneToolAllParts? AND ExitClearancePlane? SetFlag('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP } END NewWFO EachWFO {simple eachPart} doWFOOps IncWFO NextWFO {simple NextPart} startSub ELSE SeqC SubCall CallLab RepLab Parts EOL IF OneToolAllParts? AND ExitClearancePlane? SetFlag('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others } END startSub END RETURN closeMP: IF WorkFixtureOffsets? SeqC EndSub EOL CloseSub SeqC WFO1 EOL ELSE SeqC absOrIncC EOL SeqC Preset ShiftPC EOL SeqC EndSub EOL CloseSub SeqC Preset UnshftPC EOL END RETURN doAbsOrInc: IF Flag?('1') { Milling ZShiftOnly SepSubs/DrillSubs activated } IF ZMove? incValueC ELSE absOrIncC END END RETURN doDrillAbsOrInc: IF Flag?('1') { DrillSubs activated } IF SPZMove? incValueC ELSE absOrIncC END END RETURN restoreAbsOrInc: IF Flag?('1') { Milling ZShiftOnly SepSubs/DrillSubs activated } SeqC absOrIncC EOL END RETURN ckCRC: IF LastFeat? CRCOffC ELSE IF NOT ZMove? CRCOnC END END RETURN ckCRCNum: IF NOT LastFeat? AND Equal? SPZ# EPZ# CRCOffsetC END RETURN tpPointFeat: IF AutoCycle? SeqC MoveSXYC EOL IF Repeats? AND ZshiftOnly? SeqC SubCall CallLabB TRUNC# SUB# Program# Num#('1') EOL ELSE SeqC SubCall CallLab EOL END CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY} ELSE IF FirstFeat? SetFlagF('9') { For valid Drill Rotation Sub } IF Rotations? IF NOT LastFeat? IF NOT MasterOp? SetFlag('9') { valid Drill Rotation Sub } NewProg StartSub END END END ELSE SeqC doDrillAbsOrInc MoveSXYZC EOL END IF LastFeat? IF Flag?('9') { valid Drill Rotation Sub } restoreAbsOrInc IF NOT MasterOp? SeqC EndSub EOL CloseSub END END END END RETURN tpRapidFeat: IF XMove? OR YMove? OR ZMove? SeqC doAbsOrInc ckCRC RapidC MoveXYZC ckCRCNum EOL END RETURN tpLineFeat: IF XMove? OR YMove? OR ZMove? SeqC doAbsOrInc ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL END RETURN tpArcFeat: EACHQuadrant { Do not use NOT,...
kmex