{11/4/98 Copied: Fanuc 6M RM001.16.05 Created: Fanuc 6M RM001.16.06 For: Gibbs & Associates Added resetting the A-axis to be between -0.001 and -359.999 at setAngleUnder360. Cleaned up. DWB}
{11/6/98 Copied: Fanuc 6M RM001.16.06 Created: Fanuc 6M RM001.16.07 For: Gibbs & Associates Changed FORMAT for Address A from '#####.###;0.' to '*#####.###;0.' in Compost Default Format Dialog. Changed TrackC#, TrackCNO#, MoveC# and UnitAngle# from FORMAT#2 to FORMAT#3 at Prog Numeric Format Definitions. FORMAT changes are for staying consistant with 4th Axis Verticle Rotary 4th X+ SetUp. Additional cleaning up. DWB}
{11/20/98 Copied: Fanuc 6M RM001.17 Created: Fanuc 6M RM001.17.1 For: Gibbs & Associates Modified to support Incremental Rotated RotaryMill Subs. Identicle situation to Patterns. Modified doAbsOrInc Procedure. Modified doACAbsOrInc Procedure. Modified doDrillAbsOrInc Procedure. Modified restoreAbsOrInc Procedure. Added doSepSubFeedConnect Procedure. Changed name of rotaryStartPosC Procedure to rotateStartPosC. Added IF NOT RotaryMill? for MoveSYC. Changed calls five places at rotaryReps Procedure. DWB}
{11/24/98 Copied: Fanuc 6M RM001.17.1 Created: Fanuc 6M RM001.17.2 For: Gibbs & Associates Versions: Virtual 5.03/ComPost2 1.7b11 Added IF AAxisAvail? condition at setAngleUnder360. Deleted FIFO Boolean condition at finishSub1, autoCycCutSub2, doSepSubExit and millingOp. Deleted NotEqual CP2 CP3 Boolean condition at rotaryReps. DWB}
{12/23/98 Copied: Fanuc 6M RM001.17.2 Created: Fanuc 6M RM001.17.3 For: Gibbs & Associates Versions: Virtual 5.03/ComPost2 1.7b11 Change IF Flag(9) to IF Rotations at doDrillAbsOrInc. Deleted FIRST modifier two places at doSepSubContour. Deleted Rotations? Boolean at doSepSubSPMove. Deleted FIRST modifier at setSepSubZ. Deleted ZCP3 for non-AutoCycle at doSepSubExit. Added Rapid command in its place. Deleted AND NOT Rotations? Boolean at zonlyRepAutoCycle. Moved resetSepSubSR to before TrackZNO# at zonlyRepAutoCycle. Deleted IF FeedConnect? AND Rotations? Boolean at zonlyRepAutoCycle. Moved resetSepSubSR to before IF FeedConnect? at zonlyRep. Moved TrackZNO# ClearancePlane3# to IF FeedConnect? ELSE at zonlyRep. Deleted FIRST modifier at drillingOp. Moved TrackXNO# to end of rotaryReps. Moved TrackZNO# to end of rotaryReps. Added TrackYNO# to end of rotaryReps. DWB}
{1/13/99 Copied: Fanuc 6M RM001.17.3 Created: Fanuc 6M RM001.17.4 For: Gibbs & Associates Versions: Virtual 5.03.06/ComPost2 1.7b14 Corrected Bad AutoCycle MoveC. Added SUB# to FORMAT#2 at Prog Numeric Format Definitions. Changed FORMAT for UnitAngle# from #3 to #2 at Prog Numeric Format Definitions. Changed FORMAT for TrackCNO# from #3 to #2 at Prog Numeric Format Definitions. Modified report procedure. Added spReset procedure. Contains Tracking code from resetSP. Added Save# Num#(5) MoveC# Added call to report procedure. Modified resetSP. Moved Tracking code to spReset. Functions same as getEP now. Modified saveEP. Changed to Save# Num#(4) MoveC# to one place at end. Added Save# Num#(5) SUB# MoveC# Recall# Num#(5) for AutoCycle Contour. Added call to report procedure. Modified getEP. Deleted call to report procedure. Modified setSRXYtoACEP. Added TrackCNO# ADD# Recall# Num#(4) Recall# Num#(5) EOL Modified tpPointFeat. Added TrackCNO# ADD# Recall# Num#(5) MoveC# EOL Added Save# Num#(5) Num#(0) initialization at progStart. Deleted FIRST modifier at end2. DWB}
{1/19/99 Copied: Fanuc 6M RM001.17.4 Created: Fanuc 6M RM001.17.5 For: Gibbs & Associates Versions: Virtual 5.05.04/ComPost2 1.7b15 Changed SetArcSegmentAccuracy to be .0005 for English and .0127 for Metric at progStart. DWB}
1. Under Default Formats, changed F to ###.#;0. 2. Under Origins and Values, Removed First & Last WFO Label and changed Number to 0 3. Under Arcs, changed I-J Max Arc Radius to 9999.000, checked Use Absolute Arc Center and Arc Stop on Quadrents, and un-checked Negative Angles > 180. 4. Under Tool Offsets, removed Tool Length Offset Enable and Cancel & changed Number to 0. Also removed CRC Offset and Tool Length Offset Labels. 5. Under Program Stops, changed End Program Number to 2. 6. Under Drill Cycles, changed Peck Partial Retract Number to 87, removed Dwell Label P, and changed Peck Label to Z. Also removed Drill from Part & Entry Clearance Labels and changed the Numbers to 0.
Changes to "Prog":
1. Changed all open comment "(" to "/" and removed all close comment ")". 2. Removed ProgID1. 3. Removed all calls to wFOStuff sub (this control don't have fixture offset). 4. Changed firstOp1, 2, and 3 subs to match ND330 post output. 5. Changed newToolOp1, 2, 3, and 5 subs to match ND330 post output. 6. Changed sameToolOp1 and 2 subs to match ND330 post output. 7. Changed end1, 2, and 3 subs to match ND330 post output. 8. Added IF XMove? OR YMove? OR ZMove? inside EACH/NEXTQuadrant loop. 9. Under tpArcFeat sub, added Plane and removed C from ArcIJ. 10. Removed FromCP, RLevel, Dwell, and Retract from canned cycle line (2 places). 11. Changed DrillOff to two blocks (3 places). 12. Changed ZDepth to doZDepth (2 places) and added a sub doZDepth. 13. Changed DrillCP to ZCP2C (2 places). 14. Under ptPointFeat sub, added 2 sections of codes IF RetractToCP1?. 15. Removed all calls to ckCRCNum sub. 16. Added M32 (rotary clamp) at program start. JHE}
{Prog Numeric Format Definitions *************************}
report: IF PalletIn? '------------------------------------' EOL SetStatusOff IF FirstFeat? IF AutoCycle? AND NOT PointFeat? 'Num#(5) cSP = ' Recall# Num#('5') EOL END END IF LastFeat? 'Num#(1) xEP = ' Recall# Num#('1') EOL 'Num#(2) yEP = ' Recall# Num#('2') EOL 'Num#(4) cEP = ' Recall# Num#('4') EOL IF AutoCycle? '#5 AC cDist = ' Recall# Num#('5') EOL IF PointFeat? ' AC cEP = ' ADD# Recall# Num#('5') MoveC# EOL END END END ' UnitAngle = ' UnitAngle# EOL SetStatusOn '------------------------------------' EOL END RETURN
spReset: {update to the correct StartPos} TrackXNO# SPX# TrackYNO# SPY# TrackCNO# MoveC# IF AutoCycle? AND NOT PointFeat? Save# Num#('5') MoveC# { cOpEP } END report RETURN
resetSP: {update to the correct StartPos} IF Rotations? OR Repeats? OR AutoCycle? CalcSCAng IF AbsValue? spReset ELSE SetAbs spReset 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 Save# Num#('4') MoveC# { cOpEP } IF AutoCycle? AND NOT PointFeat? Save# Num#('5') SUB# MoveC# Recall# Num#('5') { cOpEP } END report RETURN
getEP: {save the correct EndPos} IF Rotations? OR Repeats? OR AutoCycle? IF AbsValue? saveEP ELSE SetAbs saveEP SetInc END END RETURN
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: {Removed all calls - JHE} 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 ToolTypeComment? '/ TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ EOL END IF ToolComment? '/ ' ToolComment$ EOL END restoreScale END 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
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: IF RotaryMill? 'X' TrackX# StartPosX# 'Y0.' TrackYNO# StartPosY# ELSE StrtPos END 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
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
doAbsOrInc: IF Rotations? AND RotaryMill? incValueC ELSE IF Flag?('1') { Milling ZShiftOnly SepSubs/DrillSubs activated } IF ZMove? incValueC ELSE absOrIncC END END END RETURN
doACAbsOrInc: IF Rotations? AND CMove? incValueC ELSE absOrIncC END RETURN
doDrillAbsOrInc: IF Rotations? AND RotaryMill? incValueC ELSE IF Flag?('1') { DrillSubs activated } IF SPZMove? incValueC ELSE absOrIncC END END END RETURN
restoreAbsOrInc: IF Rotations? AND RotaryMill? AND NOT AutoCycle? SeqC absOrIncC EOL ELSE IF Flag?('1') { Milling ZShiftOnly SepSubs/DrillSubs activated } SeqC absOrIncC EOL END END RETURN
ckCRC: IF LastFeat? CRCOffC ELSE IF NOT ZMove? CRCOnC END END RETURN
ckCRCNum: {Removed all calls - JHE} IF NOT LastFeat? AND Equal? SPZ# EPZ# CRCOffsetC END RETURN
doZDepth: {Added this sub - JHE} 'Z' ADD# ABS# CalcCP2FmSurf# ABS# CalcZFmSurf# RETURN
tpPointFeat: IF AutoCycle? IF RotaryMill? CalcSCAng SeqC doACAbsOrInc MoveSXC MoveCC EOL SetAbsOrInc TrackCNO# ADD# Recall# Num#('5') MoveC# EOL {calc MoveC position after sub call} ELSE SeqC MoveSXYC EOL END 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 {implies drilling} 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 {implies drilling 2nd, 3rd,... locations} IF RetractToCP1? {Added this section - JHE} SeqC DrillOff EOL SeqC Rapid ZCP1 EOL END IF RotaryMill? CalcSCAng SeqC doDrillAbsOrInc MoveSXC {MoveSZC} MoveCC EOL {Removed MoveSZC - JHE} ELSE SeqC doDrillAbsOrInc MoveSXC MoveSYC EOL {Was MoveSXYZC - JHE} END IF RetractToCP1? {Added this section - JHE} SeqC ZCP2C EOL IF RotaryMill? SeqC Cycle MoveSX MoveC doZDepth Peck FeedEnt EOL ELSE SeqC Cycle MoveSX MoveSY doZDepth Peck FeedEnt EOL END END 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 RotaryMill? CalcCAng IF XMove? OR ZMove? OR CMove? SeqC doAbsOrInc ckCRC RapidC MoveXC MoveZC MoveCC {* ckCRCNum *} EOL END ELSE IF XMove? OR YMove? OR ZMove? SeqC doAbsOrInc ckCRC RapidC MoveXYZC {* ckCRCNum *} EOL END END RETURN
tpLineFeat: IF RotaryMill? CalcCAng IF XMove? OR ZMove? OR CMove? SeqC doAbsOrInc ckCRC FeedC MoveXC MoveZC MoveCC AngleFeedC {* ckCRCNum *} EOL END ELSE IF XMove? OR YMove? OR ZMove? SeqC doAbsOrInc ckCRC FeedC MoveXYZC FeedRateC {* ckCRCNum *} EOL END END RETURN
tpArcFeat: IF RotaryMill? EachArcSegment CalcCAng SeqC doAbsOrInc ckCRC FeedC MoveXC MoveZC MoveCC AngleFeedC {* ckCRCNum *} EOL NextArcSegment ELSE EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop } IF XMove? OR YMove? OR ZMove? {Added - JHE} SeqC doAbsOrInc IF ArcCW? CWArcC ELSE CCWArcC END Plane MoveXYZC {Added Plane - JHE} IF ArcIJFormat? ArcIJ {Removed C - JHE} ELSE ArcRC END ArcFeedC EOL END NEXTQuadrant END RETURN
toolPath: ResetCRCNum EACHFeat IF FirstFeat? resetSP END IF PointFeat? tpPointFeat ELSE IF RapidFeat? tpRapidFeat ELSE IF LineFeat? tpLineFeat ELSE IF ArcFeat? tpArcFeat END END END END IF LastFeat? getEP END NEXTFeat restoreAbsOrInc RETURN
autoCycCutSub2: {part 2} toolPath SeqC absOrIncC CRCOffC IF Repeats? AND FeedConnect? AND ZshiftOnly? ELSE RapidC ZCP2 END EOL SeqC EndSub EOL CloseSub SetSRSubXY {restore SR to 1st position value} SetSRSubMove RETURN
autoCycPat: SetPass2 {position pattern} toolPath {call after NewProg for correct sub calls} SetPass1 {reset} RETURN
milling: IF AutoCycle? NewProg autoCycCutSub1 entryMove autoCycCutSub2 autoCycPat ELSE entryMove toolPath END RETURN
doSepSubFeedConnect: IF FeedConnect? IF CMove? AngleFeedC ELSE FeedEntC END END RETURN
doSepSubSPMove: SetStatusOff IF RotaryMill? CalcSCAng IF SPXMove? OR CMove? IF Rotations? OR AutoCycle? incValueC END SeqC Connect MoveSXC MoveCC doSepSubFeedConnect EOL absOrIncC ELSE Connect END ELSE IF SPXMove? OR SPYMove? IF AutoCycle? incValueC END SeqC Connect StrtPosC doSepSubFeedConnect EOL absOrIncC ELSE Connect END END SetStatusOn RETURN
doSepSubZMoves: IF FeedConnect? SeqC FeedC ZInPlusInc FeedEnt EOL ELSE IF FeedEntry? IF NOT FirstCycle? SeqC RapidC ZCP2PlusInc EOL END SeqC Feed ZInPlusInc FeedEnt EOL ELSE IF FirstCycle? AND AutoCycle? Rapid END SeqC RapidC ZInPlusInc EOL END END SeqC SubCall CallLab EOL IF NOT FeedConnect? AND NOT AbsValue? TrackZNO# ZCP2PlusInc# SeqC ZCP2C EOL IF NOT AutoCycle? TrackZNO# ClearancePlane3# END END RETURN
zonlyRepAutoCycle: doSepSubContour EachCycle IF NOT FirstCycle? doSepSubSPMove END doSepSubZMoves NextCycle IF FeedConnect? doSepSubExit END SeqC EndSub EOL CloseSub {Element shift, not pattern} autoCycPat {write pattern moves and main calls} resetSepSubSR TrackZNO# ClearancePlane2# RETURN
zonlyRep: doSepSubContour EachCycle IF NOT FirstCycle? doSepSubSPMove END doSepSubZMoves NextCycle resetSepSubSR IF FeedConnect? doSepSubExit ELSE TrackZNO# ClearancePlane3# END RETURN
millingOp: SeqC ZCP2C EOL IF Repeats? NewProg IF ZshiftOnly? IF AutoCycle? {incremental Autocycle sub can have Z moves} zonlyRepAutoCycle ELSE {Z shift only, NOT Auto Cycle} SetFlag('1') { Milling ZShiftOnly SepSubs activated } zonlyRep SetFlagF('1') { Milling ZShiftOnly SepSubs deactivated } END {end Auto Cycle IF} ELSE {not Z only} g92Sub END {end Z only IF} ELSE {no repeat OPs} milling END IF AutoCycle? SeqC CRCOffC ZCP3C EOL setSRXYtoACEP ELSE SeqC CRCOffC RapidC ZCP3C EOL END RETURN
skipToLastFeat: EachFeat IF LastFeat? TrackXNO# SPX# TrackYNO# SPY# CalcSCAng TrackCNO# MoveC# END NextFeat RETURN
setDrillEndOpZ: IF RetractToCP1? TrackZNO# ClearancePlane1# ELSE TrackZNO# ClearancePlane2# END RETURN
drillingOp: SeqC ZCP2C EOL {Changed from DrillCP - JHE} GetCycle SeqC Cycle doStartPos doZDepth Peck FeedEnt EOL IF CallMasterOp? SeqC SubCall CallLabB CallMasterNum# EOL skipToLastFeat ELSE TrackZNO# SPZ# IF MasterOp? SetFlag('1') { DrillSubs activated } NewMasterProg SeqC SubCall CallLab EOL startSub toolPath SeqC EndSub EOL CloseSub SetFlagF('1') { DrillSubs deactivated } ELSE toolPath END END setDrillEndOpZ IF NOT Rotations? SeqC DrillOff EOL SeqC Rapid ZCP3 EOL END RETURN
checkPass: {use the correct StrtPos} IF AutoCycle? SetPass2 ELSE SetPass1 END RETURN
rotateStartPosC: TrackXNO# Recall# Num#('1') { xOpEP } MoveSXC IF NOT RotaryMill? TrackYNO# Recall# Num#('2') { yOpEP } MoveSYC END CalcSCAng MoveC RETURN
rotaryReps: {use the correct EndPos} EachRotation IF Milling? IF FirstRotation? NewProg SaveProgNum2 StartSub millingOp SeqC EndSub EOL CloseSub checkPass ELSE SeqC rotateStartPosC EOL END SeqC SubCall CallLabB Program2# EOL ELSE IF Drilling? IF FirstRotation? drillingOp checkPass ELSE IF RetractToCP1? AND Equal? ClearancePlane1# ClearancePlane3# SeqC rotateStartPosC EOL ELSE IF NOT RetractToCP1? AND Equal? ClearancePlane2# ClearancePlane3# SeqC rotateStartPosC EOL ELSE { Need to cancel Drill Cycle between Rotations } SeqC DrillOff EOL SeqC Rapid ZCP3 EOL SeqC rotateStartPosC EOL SeqC ZCP2C EOL {Changed from DrillCP - JHE} SeqC Cycle rotateStartPosC doZDepth Peck FeedEnt EOL END END END IF CallMasterOp? IF NOT FirstRotation? SeqC SubCall CallLabB CallMasterNum# EOL END ELSE IF MasterOp? IF NOT FirstRotation? SeqC SubCall CallLab EOL END ELSE IF Flag?('9') { valid Drill Rotation Sub } SeqC SubCall CallLab EOL END END END IF LastRotation? SeqC DrillOff EOL SeqC Rapid ZCP3 EOL END END END IF LastRotation? EachFeat IF LastFeat? IF PointFeat? CalcSCAng ELSE CalcCAng END TrackCNO# MoveC# EOL END NextFeat END NextRotation TrackXNO# Recall# Num#('1') { xOpEP } TrackYNO# Recall# Num#('2') { yOpEP } TrackZNO# ClearancePlane3# RETURN
opGuts: IF Rotations? rotaryReps ELSE IF Milling? millingOp ELSE IF Drilling? drillingOp END END END RETURN
progStart: InitProg ReverseXZArcs InitWFONum SetFlood SetMaxRPM('10000') IF Metric? SetMaxFeed('12700') SetArcSegmentAccuracy('.0127') ELSE SetMaxFeed('500') SetArcSegmentAccuracy('.0005') END Save# Num#('1') Num#('0') { Status Register Variable for X Axis } Save# Num#('2') Num#('0') { Status Register Variable for Y Axis } Save# Num#('4') Num#('0') { Status Register Variable for C Axis } Save# Num#('5') Num#('0') { AutoCycle SetPass1 C Axis Travel } SetFlagF('1') { Milling ZShiftOnly SepSubs/DrillSubs deactivated } SetFlagF('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others } SetFlagF('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP } SetFlagF('9') { For valid Drill Rotation Sub } IF PSComment? AND UseComments? 'Utility Data:' EOL ' At Op Start: All literals and commands will appear at the beginning of the operation.' EOL ' At Op End: All literals and commands will appear at the end of the operation.' EOL ' Literals: put between single or double quotes.' EOL ' Separate commands and literals with at least one space.' EOL ' A CR ( RETURN key ) will start a new line.' EOL ' Commands: may be capital and/or lower case letters. Separate commands with a space.' EOL ' NewWFO(56), NWFO(56) -' EOL ' The Work Fixture Offset # you specify will be used for all following operations.' EOL ' Do not use with the ncPost multiple part option.' EOL ' 5thAxisCW(30), 5ACW(30) -' EOL ' generates a + B move of the value you specify' EOL ' 5thAxisCCW(22.5), 5ACCW(22.5) -' EOL ' generates a - B move of the value you specify' EOL END RETURN
initOp: EOR EOL {* ProgID1 *} {Removed - JHE} IF UseComments? AND ProgramNameComment? '/ PROGRAM: ' ProgramName$ END EOL IF UseComments? IF ProgramComment? '/ ' ProgramComment$ EOL END IF FormatNameComment? '/ FORMAT: ' FormatName$ EOL END IF TimeComment? '/ ' Date$ ' AT ' Time$ EOL END IF MovesComment? '/ OUTPUT IN ' MoveType$ ' INCHES' EOL END IF PartsComment? '/ PARTS PROGRAMMED: ' Parts# EOL END IF StartToolComment? '/ FIRST TOOL NOT IN SPINDLE' EOL END END OpenSub restoreScale RETURN
firstOp1: IF ToolChangeAtHome? SetHome END doOpComments Seq Rapid Plane 'G70' AbsOrInc Speed OpToolID ToolChng EOL doPostScript IF AAxisAvail? SeqC 'M32' EOL {rotary axis clamp on - JHE} END RETURN
newToolOp2: doEndOpPS IF ToolChangeAtHome? SeqC RapidC Home EOL {Removed SpinOff - JHE} END IF LAST ProgStop? SeqC 'M0' EOL ELSE SeqC ProgStop EOL END RETURN
sameToolOp1: doEndOpPS IF LAST ProgStop? SeqC CoolOff EOL SeqC 'M25' EOL {Changed from incValueC OfstOff - JHE} {SeqC SpinOff EOL} {Removed - JHE} SeqC 'M0' EOL ELSE IF CoolOff? AND LAST NOT CoolOff? SeqC CoolOff EOL END IF NewToolOffset? SeqC 'M25' EOL {Changed from incValueC OfstOff - JHE} END END setAngleUnder360 RETURN
sameToolOp2: {Start new Operation} doOpComments doPostScript checkPass RETURN
sameToolOp3: {Start new Operation} {* SeqC wfoStuff EOL *} {Removed - JHE} IF LAST ProgStop? SeqC PlaneC Speed SpinOn EOL SeqC AbsOrInc Rapid doStartPos EOL SeqC ZCP1 CoolOn EOL {Changed from OfstOn - JHE} ELSE SeqC PlaneC AbsOrInc Rapid doStartPos SpeedC EOL IF NewToolOffset? SeqC ZCP1 EOL {Changed from OfstOn - JHE} END IF NOT CoolOff? AND LAST CoolOff? SeqC CoolOn EOL END END RETURN
end1: SeqC CoolOff EOL SeqC 'M25' EOL {Changed from incValueC OfstOff - JHE} setAngleUnder360 IF NotEqual? UnitAngle# Num#('0') SeqC absOrIncC RapidC 'A' TrackC# Num#('0') EOL END RETURN
end2: doEndOpPS IF ToolChangeAtHome? SeqC absOrIncC RapidC Home SpinOff EOL ELSE SeqC SpinOff EOL END IF ProgStop? SeqC 'M0' EOL END RETURN
end3: SeqC EOP EOL CloseSub Post2 {organize Subs into one program} 'E' EOL {Changed from EOR - JHE} Close IF UseComments? SetScale('1') {restore scale for comments} Reopen IF FileBytesComment? '/ FILE LENGTH: ' FileBytes# ' CHARACTERS' EOL END IF FileFeetComment? '/ FILE LENGTH: ' FileFeet# ' FEET' EOL END IF FileMetersComment? '/ FILE LENGTH: ' FileMeters# ' METERS' EOL END Close END RETURN
mpAllTools1P: {Multiple Parts, All Tools 1 Part} EachOp {Start of post processing} IF EquallySpacedOffsets? SetFlag('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others } END IF FirstOperation? openMP firstOp1 firstOp2 firstOp3 ELSE IF NewTool? newToolOp1 newToolOp2 {to tool change, CS problem} newToolOp3 newToolOp4 newToolOp5 ELSE {implied SameTool?} sameToolOp1 sameToolOp2 sameToolOp3 END END {common point for all operations} opGuts NextOp {loops back to EachOP until last Operation} end1 end2 closeMP end3 RETURN
mp1ToollAllPfu: {Multiple Parts, 1 Tool all Parts, full up} EachOp {Start of post processing} IF EquallySpacedOffsets? SetFlag('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others } END IF FirstOperation? firstOp1 openMP firstOp2 firstOp3 ELSE IF NewTool? newToolOp1 closeMP newToolOp2 {to tool change, CS problem} newToolOp3 openMP newToolOp4 newToolOp5 ELSE {implied SameTool?} sameToolOp1 sameToolOp2 sameToolOp3 END END {common point for all operations} opGuts NextOp {loops back to EachOP until last Operation} end1 closeMP end2 end3 RETURN
mp1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane} EachOp {Start of post processing} SetFlag('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others } IF FirstOperation? firstOp1 firstOp2 firstOp3 openMP firstOp2 {need StrtPos in Sub} ELSE IF NewTool? closeMP newToolOp1 newToolOp2 {to tool change, CS problem} newToolOp3 newToolOp4 newToolOp5 openMP newToolOp4 {need StrtPos in Sub} ELSE {implied SameTool?} sameToolOp1 sameToolOp2 sameToolOp3 END END {common point for all operations} opGuts NextOp {loops back to EachOP until last Operation} closeMP end1 end2 end3 RETURN
noMPs: {no multiple parts} EachOp {Start of post processing} SetFlag('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others } IF FirstOperation? firstOp1 firstOp2 firstOp3 ELSE IF NewTool? newToolOp1 newToolOp2 newToolOp3 newToolOp4 newToolOp5 ELSE {implied SameTool?} sameToolOp1 sameToolOp2 sameToolOp3 END END {common point for all operations} opGuts NextOp {loops back to EachOP until last Operation} end1 end2 end3 RETURN
{Start of executable Prog, Top Level ****}
progStart {setup and initializations} initOp
IF MultipleParts? IF AllToolsOnePart? mpAllTools1P ELSE {implied OneToolAllParts?} IF FullUp? mp1ToollAllPfu ELSE {implied ExitClearancePlane?} mp1ToollAllPXcp END END ELSE noMPs END