{10/13/89, Updated: Fanuc OM (G54) M107.55, P.S. & SepSubs commented out, JR} {7/24/90, Added InitProg globally to posts with this remark, DWB} {5/14/91, Updated Fanuc 0M G54 M107.57 to .80 format, JR}
{10/29/91 Updated: Fanuc 0M G54 M107.80 For: Gibbs & Associates Updated to Version 4.0 per Fanuc 6M M001.81 Format. KM}
{10/20/92 Updated: Fanuc 0M G54 M107.81 For: Gibbs & Associates Updated to Version 4.1 per Fanuc 6M M001.81.2 Format. DWB}
{8/18/95, Updated Fanuc 0M G54 M107.81.2 to .85 format, JR}
{1/17/96, Updated .85 to .86 version, MPK}
{3/22/96, Tested ZOnlyRepAutoCycle, Changed version # to .89, MPK}
{5/30/96 Initial: Fanuc 0M G54 M107.89 Created: Fanuc 0M Robodrill Mxxx.89 ForUser: Aavid Control: Fanuc 0MB Machine: Robodrill Develop: ComPost 4.21.37, Catalyst68K v3.04.10.C Comment: New processor per marked up readout Moved WFOStuff to StrtPos line. Moved CoolOn to StrtPos line. Moved Speed & SpinOn to OfstOn line. Added StrtPos to SetWFO line for OneToolAllParts AND ExitClearancePlane. Deleted WFO1 from CloseMP. Added IncValue OfstOff to begin program. Added 'G49' to tool change line. Moved ProgStop to after tool change. Changed Program ID label to a colon. Changed 'M98P1' to 'M98P'. Added Rigid Tapping. Jim Radcliffe}
{6/24/96 Initial: Fanuc 0M Robodrill ATT M219.89 Created: Fanuc 0M Robodrill ATT C219.12 Develop: ComPost 4.21.37, Catalyst68K v3.04.10.C Comment: Created Advanced Mill version per Bob Winchester. Changed to First Tool In Spindle format. Deleted G91G28Z0M9 from tool change positions. Added extended WFOs G54 thru G59 then G54P1 thru G54P48. Jim Radcliffe}
{7/9/96 Initial: Fanuc 0M Robodrill ATT C219.12 Created: Fanuc 0M Robodrill ATT C219.121 Develop: ComPost 4.21.37, Catalyst68K v3.04.10.C Comment: Modificatons per Steve Wood Commented out CSWFOComment Changed CRC label from H to D Changed D and H default formats to leading zeros Removed IncValue OfstOff output from SameTool and ChangeCS. Jim Radcliffe}
{8/12/96 Initial: Fanuc 0M Robodrill ATT C219.121 Created: Fanuc 0M Robodrill ATT C219.122 Develop: ComPost 4.21.37, Catalyst68K v3.04.10.C Comment: Modified per marked up readout from Bob Winchester. Corrections per Fanuc 6M (FW) B001.12.08 Jim Radcliffe}
{8/12/96 Initial: Fanuc 0M Robodrill ATT C219.122 Created: Fanuc 0M Robodrill ATT C219.123 Develop: ComPost 4.21.37, Catalyst68K v3.04.10.C Comment: Added 'G91G30X0Y0' to EOP. Jim Radcliffe}
{9/4/96 Initial: Fanuc 0M Robodrill ATT C219.123 Created: Fanuc 0M Robodrill ATT C219.124 Comment: Changed literal colons in comments to spaces. Jim Radcliffe}
{12/2/96 Initial: Fanuc 0M Robodrill ATT C219.124 Created: Fanuc 0M Robodrill ATT C219.125 Develop: ComPost2 68k v1.0b4, Catalyst68K v3.09.05C Comment: Modified per conversation with Steve Wood Suppressed output of redundant WFO output when posting multiple parts. Changed SetFlag('4') to SetFlagF('4') to prevent toggling of Inc/Dec WFO MPs. Jim Radcliffe}
{1/31/97 Initial: Fanuc 0M Robdrill ATT C219.12.5 Created: Fanuc 0M Robdrill ATT C219.12.6 Develop: ComPost2 68K 1.0b11, Virtual Gibbs 3.23 Comment: Modified per fax from Bob Winchester at Acam Deleted CoolOff commands and created ckCoolOff sub and called from OpGuts. Jim Radcliffe}
{2/5/97 Initial: Fanuc 0M Robdrill ATT C219.12.6 Created: Fanuc 0M Kitamura ATT Cxxx.12 ForUser: Aavid Thermal Techmology Control: Fanuc 0M Machine: Kitamura Develop: ComPost2 68K 1.0b11, Virtual Gibbs 3.23 Comment: New processor per marked up readout from Bib Winchester Changed CoolOn and SpinOn commands to combined comand with DoSpinOn. Added PreTool. Deleted 'G49'. Output OfstOff regardless of ToolChangeAtHome was only being output if ToolChangeAtHome was true. Added subs and calls AbsValueC, IncValueC & AbsOrIncC to simplify prog. Modified RigidTap handling. Deleted Saftey Start Block between tools. Jim Radcliffe}
{2/13/97 Initial: Fanuc 0M Kitamura ATT CY22.12 Created: Fanuc 0M Kitamura ATT CY22.12.1 Comment: Modified per marked up readout Moved spindle from ofstOn line to StrtPos line. Modified Pretooling: M106 puts tool from magazine, called with PreTool, into ready position. Moved PreTool to OfstOn line. Moved M106 line to ToolPath so it is called after machine starts its operation. Jim Radcliffe}
{2/20/97 Initial: Fanuc 0M Kitamura ATT CY22.12.1 Created: Fanuc 0M Kitamura ATT CY22.12.2 Comment: Commented out CoolOff commands per marked up readout. Jim Radcliffe}
{3/25/97 Initial: Fanuc 0M Kitamura ATT CY22.12.2 Created: Yasnac i80 Mat RAIIIF Cxxx.12 ForUser: Aavid Thermal Techmology Control: Yasnac i80 Machine: Matsuura RAIIIF Develop: ComPost2 68K 1.0b11, Virtual Gibbs 3.31 PPC Comment: New Processor per marked up readout from Steve Wood Changed program label from ':' to 'O'. Modified spindle commands: Changed DoSpinOn to SpinOn. Moved Speed & SpinOn commands to OfstOn line. Modified coolant: Added CoolOn to StrtPos line. Un-commented out ckCoolOff. Modified RigidTap: Suppress output of Speed & SpinOn at beginning of operation. G93 is output just before Cycle line. Speed is on output Cycle line. Feed is output in IPR. G93 is output just after DrillOff line. Deleted M106 line. Changed 'G91G30X0Y0' EOP at end of program to 'M99'. Jim Radcliffe}
{4/10/97 Initial: Yasnac I80 Mat [ATT] CY59.12 Created: Yasnac I80 Mat [ATT] CY59.12.1 Comment: Modified per marked up readout from Steve Wood. Changed CoolOff handling to standard format. Jim Radcliffe}
{10Apr98 Original: Yasnac I80 Mat [ATT] CY59.12.1 Created: Yasnac I80 Mat [FP] Cxxx.12 For: Flanders Precision Changes made per: Keith Nepp Deleted old version numbers and comments e.g. {.62}, {commands}, {literals}, etc Added Seq to ToolTypeComment line in DoOpComments Changed to R Format Arcs in MachSpec NOTE: Added support for PreTooling on the Middle feature of ToolPath: CalcPreToolPosition Sub, Stores the Number of Features, in Toolpath,to the nearest whole number. Added PreToolCheck Sub, used to PreTool in ToolPath Added PreventPreTool Sub, used to prevent a PreTool in AutoCycCutSub2 Added DoPreTool Sub, used to PreTool in Drilling, ZonlyRep and ToolPath AutoCycles Added Booloeans to call DoPreTool in ToolPath AutoCycle, ZonlyRep, Drilling CallMasterOp and MasterOp Added Booloeans to call PreToolCheck at RapidFeat, LineFeat and ArcFeat in ToolPath NOTE: Added support for CoolOff to be called in OpGuts with the addition of the following subs: doCoolOff takes care of the coolant TestForCoolOFF handles the special case of OneToolAllParts and ExitClearancePlane Moved WFOStuff from FirstOp2 to FirstOp1 Moved RigidTap Boolean from FirstOp3 to FirstOp2 Moved OfstOn CoolOn to FirstOp2 Moved OfstOn to NewToolOp4 and Deleted to contents of NewToolOp5 Created FirstOp2a, NewToolOp1a, NewToolOp4a and End1a for OneToolAllParts and ExitClearancePlane Deleted Pretooling in FirstOp3 and NewToolOp5 Rewrote the logic in SameToolOp3 Changed 'M19' to 'M6' in NewToolOp1 and End1 Deleted UnTool ToolChng in End2 Changed 'M99' to 'M30' in End3 Charles Winston}
{13Apr98 Original: Yasnac I80 Mat [ATT] CY59.12.1 Created: Yasnac I80 Mat [FP] Cxxx.12.1 For: Flanders Precision Changes made per: Keith Nepp Deleted IncValue OfstOff in InitOp Moved CoolOn to a seperate line in FirstOp2, NewToolOp4 and SameToolOp3 Charles Winston}
{Prog Numeric Format Definitions *******************************************}
G52Stuff: IF NOT MultipleParts? IF NOT WFOCS? IF ChangeCS? SeqC DoCSG52 EOL ELSE IF NOT SameTool? SeqC DoCSG52 EOL END END END ClearCSOffset END RETURN
WFOStuff: IF Flag?('2') IF WFOCS? IF NOT SameTool? CSWFO ELSE IF ChangeCS? IF MultipleParts? {MP ChangeCS is hadled in SubCSMP and CloseMP} ELSE CSWFO END END END ELSE IF NOT SameTool? WFO END END SetFlagF('2') 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
DoSubComment: IF UseComments? AND SubComment? '( SUB NUMBER ' Program# ' )' END RETURN
OffsetComments: IF NOT MultipleParts? IF WFOCS? IF ChangeCS? DoCSWFOComment END ELSE IF ChangeCS? DoCSG52Comment ELSE IF NOT SameTool? DoCSG52Comment END END END 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? Seq '( TOOL ' Tool# ' ' ToolDiameter# ' ' ToolType$ ' )' EOL END IF ToolComment? '( ' ToolComment$ ' )' EOL END RestoreScale END OffsetComments RETURN
CSAngleA: IF AAxisAvail? 'A' CSOffsetA# END RETURN
CSAngleAC: IF AChange? CSAngleA END RETURN
CSAngleB: IF BAxisAvail? 'B' CSOffsetB# END RETURN
PSStuff: IF FourthCW? FORMAT(FourthDegree#,2) SeqC 'A' FourthDegree# EOL FourthCWF END IF FourthCCW? FORMAT(FourthDegree#,3) SeqC 'A' FourthDegree# EOL FourthCCWF END IF FifthCW? FORMAT(FifthDegree#,2) SeqC 'B' FifthDegree# EOL FifthCWF END IF FifthCCW? FORMAT(FifthDegree#,3) SeqC 'B' FifthDegree# EOL FifthCCWF END RETURN
ToggleIncDecWFO: IF Flag?('3') SetFlagF('3') ELSE SetFlag('3') END RETURN
OpenMP: NewProg IF WorkFixtureOffsets? StartSub SaveCSProg SaveCSOpStart ClearCSOffset ELSE SeqC SubCall CallLabB Parts# Program# EOL StartSub END RETURN
DoCSWFOOps: EachCSOp DoCSWFOComment ClearCSOffset IF Flag?('3') AND FirstPart? AND OneToolAllParts? AND ExitClearancePlane? AND NOT SameTool? {skip redundant WFO output} ELSE IF NOT Flag?('3') AND LastPart? AND OneToolAllParts? AND ExitClearancePlane? AND NOT SameTool? {skip redundant WFO output} ELSE SeqC CSWFO EOL END END SeqC SubCall CallLabB CSSubID# EOL NextCSOp RETURN
CloseMP: SeqC AbsOrIncC EOL IF WorkFixtureOffsets? SeqC EndSub EOL CloseSub IF Flag?('3') NewWFO EachWFO {simple eachPart} IF WFOCS? DoCSWFOOps ELSE SeqC SetWFO EOL DoCSG52Ops END ClearCSOffset IncWFO NextWFO {simple NextPart} IF Flag?('4') DecWFO ELSE NewWFO END ELSE LastWFO EachWFO {simple eachPart} IF WFOCS? DoCSWFOOps ELSE SeqC SetWFO EOL DoCSG52Ops END ClearCSOffset DecWFO NextPrevWFO {simple NextPart} IF Flag?('4') IncWFO ELSE LastWFO END END IF Flag?('4') ToggleIncDecWFO END ELSE SeqC Preset ShiftPC EOL SeqC EndSub EOL CloseSub SeqC Preset UnshftPC EOL END RETURN
SubCSMP: IF WorkFixtureOffsets? IF ChangeCS? SeqC EndSub EOL CloseSub NewProg StartSub SaveCSProg END ClearCSOffset END RETURN
DoAbsOrInc: IF Flag?('1') AND AbsoluteMoves? IF ZMove? AND AbsValue? IncValue ELSE IF NOT ZMove? AND NOT AbsValue? AbsValue END END END RETURN
DoDrillAbsOrInc: IF Flag?('1') AND AbsoluteMoves? IF SPZMove? AND AbsValue? IncValue ELSE IF NOT SPZMove? AND NOT AbsValue? AbsValue END END END RETURN
RestoreAbsOrInc: IF Flag?('1') AND AbsoluteMoves? AND NOT AbsValue? SeqC AbsValue EOL END RETURN
FormatArc: DoAbsOrInc IF ArcCW? CWArcC ELSE CCWArcC END MoveXYZC IF ArcIJFormat? ArcIJC ELSE ArcRC END RETURN
CheckPass: IF AutoCycle? {use the correct StrtPos} SetPass2 ELSE SetPass1 END RETURN
CalcPreToolPosition: {Stores the Number of Features, in Toolpath, Divided by 2, in NUM#('1') to the nearest whole number C.W.} SetPass1 Save# NUM#('1') NUM#('0') Save# NUM#('3') NUM#('0') EachFeat Save# NUM#('1') ADD# Recall# NUM#('1') NUM#('1') NextFeat Save# NUM#('2') TRUNC# DIV# Recall# NUM#('1') NUM#('2') IF NOT EQUAL? Recall# NUM#('1') MUL# Recall# NUM#('2') NUM#('2') Save# NUM#('1') ADD# Recall# NUM#('2') NUM#('1') ELSE Save# NUM#('1') Recall# NUM#('2') END CheckPass RETURN
PreToolCheck: { used to PreTool in ToolPath } IF EQUAL? Recall# NUM#('1') Recall# NUM#('3') Save# NUM#('3') ADD# Recall# NUM#('3') NUM#('1') IF NOT SameTool? SeqC Pretool EOL END END RETURN
PreventPreTool: { Used to prevent a PreTool in AutoCycCutSub2 } Save# NUM#('1') NUM#('0') RETURN
DoPreTool: { used to PreTool in Drilling, ZonlyRep and ToolPath AutoCycs } Save# NUM#('1') NUM#('0') IF NOT SameTool? SeqC Pretool EOL END RETURN
ToolPath: ResetCRCNum EACHFeat IF PointFeat? IF AutoCycle? SeqC MoveSXYC EOL SeqC SubCall CallLabB Program# EOL IF FirstFeat? DoPreTool END CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY} ELSE SeqC DoDrillAbsOrInc MoveSXYZC EOL END ELSE Save# NUM#('3') ADD# Recall# NUM#('3') NUM#('1') IF RapidFeat? IF LastFeat? SeqC DoAbsOrInc CRCOffC RapidC MoveXYZC EOL ELSE IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps} SeqC DoAbsOrInc RapidC MoveXYZC EOL ELSE IF XMove? OR YMove? OR ZMove? SeqC DoAbsOrInc CRCOnC RapidC MoveXYZC CRCOffsetC EOL PreToolCheck END END END ELSE IF LineFeat? IF LastFeat? SeqC DoAbsOrInc CRCOffC FeedC MoveXYZC FeedRateC EOL ELSE IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps} SeqC DoAbsOrInc FeedC MoveXYZC FeedRateC EOL ELSE IF Decelerate? IF RoomToDecel? DecelMove1 SeqC DoAbsOrInc CRCOnC FeedC MoveXYZC FeedRateC CRCOffsetC EOL DecelMove2 END SeqC DoAbsOrInc CRCOnC FeedC MoveXYZC DecelFeed CRCOffsetC EOL ELSE IF XMove? OR YMove? OR ZMove? SeqC DoAbsOrInc CRCOnC FeedC MoveXYZC FeedRateC CRCOffsetC EOL PreToolCheck END END END END ELSE IF ArcFeat? EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop } IF LastQuadrant? AND Decelerate? IF RoomToDecel? DecelMove1 SeqC FormatArc ArcFeedC EOL DecelMove2 END SeqC FormatArc DecelFeed EOL ELSE SeqC FormatArc ArcFeedC EOL PreToolCheck END NEXTQuadrant END END END END NEXTFeat RestoreAbsOrInc RETURN
AutoCycCutSub2: {part 2} PreventPreTool ToolPath SeqC AbsOrInc IF Repeats? AND FeedConnect? AND ZshiftOnly? ELSE IF FIFO? FeedC ZCP2 FeedEntC ELSE RapidC ZCP2 END 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
ZonlyRepAutoCycle: AutoCycPat {write pattern moves and main calls} StartSub NewProg EachCycle SetSRXYtoEP IF FeedConnect? IF NOT FirstCycle? IF SPXMove? OR SPYMove? SeqC Feed IncValue StrtPosC EOL SeqC AbsOrInc ELSE SeqC Feed END ELSE SeqC Feed END ZInPlusInc FeedEnt EOL ELSE IF NOT FirstCycle? IF SPXMove? OR SPYMove? SeqC Rapid IncValue StrtPosC EOL IF FeedEntry? SeqC AbsOrInc ZCP2PlusInc EOL SeqC Feed ZInPlusInc FeedEnt EOL ELSE SeqC AbsOrInc ZInPlusInc EOL END ELSE IF FeedEntry? SeqC Rapid ZCP2PlusInc EOL SeqC Feed ZInPlusInc FeedEnt EOL ELSE SeqC Rapid ZInPlusInc EOL END END ELSE IF FeedEntry? SeqC Feed ZInPlusInc FeedEnt EOL ELSE SeqC Rapid ZInPlusInc EOL END END END IF FirstCycle? SetStatusOff {protect Z position for incremental sub} END SeqC SubCall CallLabB Program# EOL NextCycle SetStatusOn AutoCycCutSub1 {build element sub} AutoCycCutSub2 IF FeedConnect? {there is no Z up in the sub} IF FIFO? SeqC Feed ZCP2 FeedEnt EOL ELSE SeqC Rapid ZCP2 EOL END END SeqC EndSub EOL CloseSub {Element shift, not pattern} RETURN
ZonlyRep: EachCycle IF NOT FirstCycle? SeqC Connect StrtPos EOL END IF FeedConnect? SeqC FeedC ZInPlusInc FeedEnt EOL ELSE {Entry/Exit Connect} IF FeedEntry? IF NOT FirstCycle? SeqC RapidC ZCP2PlusIncC EOL END SeqC Feed ZInPlusInc FeedEnt EOL ELSE SeqC RapidC ZInPlusInc EOL END END SeqC SubCall CallLabB Program# EOL IF FirstCycle? DoPreTool END NextCycle StartSub TrackZNO# FIRST SPZ# ToolPath FinishSub1 SeqC EndSub EOL CloseSub RETURN
SkipToLastFeat: EachFeat IF LastFeat? TrackXNO# SPX# TrackYNO# SPY# END NextFeat RETURN
SetDrillEndOpZ: IF RetractToCP1? TrackZNO# ClearancePlane1# ELSE TrackZNO# ClearancePlane2# END RETURN
doCoolOff: IF NOT CoolOff? IF NOT LastOp? IF NEXT NOT SameTool? CoolOff END ELSE CoolOff END END RETURN
TestForCoolOFF: IF MultipleParts? IF AllToolsOnePart? doCoolOff ELSE {implied OneToolAllParts?} IF FullUp? doCoolOff ELSE {implied ExitClearancePlane?} { DO NOT call doCoolOff here } END END ELSE doCoolOff END RETURN
OpGuts: IF Milling? CalcPreToolPosition 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} IF UseSeparateSubCalls? AND CyclesLessThanMaxSubCalls? SetFlag('1') {std sep sub Zreps are in effect} {rep change 2} ZonlyRep {rep change 1} SetFlagF('1') {not std sep sub Zreps in effect} {rep change 3} ELSE {no sep subs desired} G92Sub END END {end Auto Cycle IF} ELSE {not Z only} G92Sub END {end Z only IF} ELSE {no repeat OPs} Milling END IF AutoCycle? SeqC ZCP3C EOL ELSE IF FIFO? SeqC FeedC CRCOffC ZCP3C FeedEntC TestForCoolOFF EOL ELSE SeqC RapidC CRCOffC ZCP3C TestForCoolOFF EOL END END ELSE IF Drilling? IF Repeats? NewProg StdSub SeqC AbsOrInc Rapid StrtPos EOL END SeqC DrillCP EOL GetCycle IF RigidTap? SeqC 'G93' EOL END SeqC Cycle FromCP StrtPos ZDepth RLevel Dwell Peck Retract IF RigidTap? Speed 'F' FeedTapIPR#('1') ELSE FeedEnt END EOL IF CallMasterOp? SeqC SubCall CallLabB CallMasterNum# EOL DoPreTool SkipToLastFeat ELSE TrackZNO# FIRST SPZ# IF MasterOp? SetFlag('1') {std sep sub Zreps in effect} NewMasterProg SeqC SubCall CallLabB Program# EOL DoPreTool StartSub ToolPath SeqC EndSub EOL CloseSub SetFlagF('1') {not std sep sub Zreps in effect} ELSE ToolPath END END SetDrillEndOpZ SeqC Rapid 'G80' ZCP3 TestForCoolOFF EOL IF Repeats? FinishSubG92 END IF RigidTap? SeqC 'G94' EOL END END END RETURN
ProgStart: InitProg ReverseXZArcs InitWFONum SetFlood SetFlagF('1') {not std sep sub Zreps in effect} {rep change 2} SetFlag('2') {WFO needs to be output} SetFlag('3') {True = incrementing WFO numbers for MP. False = decrementing WFO numebrs for MP} SetFlagF('4') {True = toggle between incrementing/decrementing WFO's } UseSeparateSubCalls SetMaxSeparateSubCalls('50') SetMaxRPM('10000') SetMaxFeed('500') IF PSComment? AND UseComments? 'PostScript:' 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 ' EndOP -' EOL ' all literals and commands before an ENDOP command' EOL ' will appear at the beginning of the operation. All ' EOL ' literals and commands after an ENDOP command will appear' EOL ' at the end of the operation. ' 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 ' 4thAxisCW(12.5), 4ACW(12.5) -' EOL ' generates a + A move of the value you specify' EOL ' 4thAxisCCW(22.5), 4ACCW(22.5) -' EOL ' generates a - A move of the value you specify' 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 IF MultipleParts? IF WorkFixtureOffsets? IF LTEqual? MUL# Parts# NumOfCS# Num#('54') SetWFOCS { use WFO for CS changes } ELSE IF UseComments? '( Not enough Work Fixture Offsets to handle this part. )' EOL '( Number of parts [ ' Parts# ' ] times CSs [ ' NumOfCS# ' ] )' EOL '( exceeds the machine limit. Switching to G52 style output. )' EOL END END END ELSE IF LTEqual? NumOfCS# Num#('54') SetWFOCS { use WFO for CS changes } ELSE IF UseComments? '( Not enough Work Fixture Offsets to handle this part. )' EOL '( Number of CSs [ ' NumOfCS# ' ] exceeds the machine limit. )' EOL '( Switching to G52 style output. )' EOL END END END RETURN
InitOp: EOR EOL 'O' Program# IF UseComments? AND ProgramNameComment? '( PROGRAM ' ProgramName$ ' )' END EOL IF ToolChangeAtHome? SetHome END 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 IN SPINDLE )' EOL END END OpenSub RestoreScale RETURN
NewToolOp2: DoEndOpPS IF ToolChangeAtHome? SeqC AbsOrIncC Rapid Home EOL END IF LAST ProgStop? SeqC 'M0' EOL ELSE SeqC ProgStop EOL END RETURN
NewToolOp3: {Start new Operation} DoOpComments DoPostScript G52Stuff RETURN
NewToolOp4: CheckPass SeqC IF NOT RigidTap? Speed SpinOn END AbsOrInc WFOStuff Rapid StrtPos CSAngleA CSAngleB OfstOn EOL SeqC CoolOn EOL RETURN
NewToolOp4a: CheckPass SeqC IF NOT RigidTap? Speed SpinOn END AbsOrInc WFOStuff Rapid StrtPos CSAngleA CSAngleB EOL RETURN
NewToolOp5: RETURN
SameToolOp1: DoEndOpPS IF LAST ProgStop? SeqC CoolOff EOL SeqC IncValueC OfstOff EOL SeqC 'M0' EOL ELSE IF NewToolOffset? SeqC IncValueC OfstOff EOL END END RETURN
SameToolOp2: {Start new Operation} DoOpComments DoPostScript CheckPass RETURN
SameToolOp3: {Start new Operation} G52Stuff IF LAST ProgStop? SeqC IF NOT RigidTap? Speed SpinOn END PlaneC AbsOrInc WFOStuff Rapid StrtPos CSAngleA CSAngleB OfstOn EOL SeqC CoolOn EOL ELSE SeqC IF NOT RigidTap? SpeedC END AbsOrInc WFOStuff Rapid StrtPos CSAngleA CSAngleB IF NewToolOffset? OR ChangeCS? OfstOn END EOL IF NOT CoolOff? AND LAST CoolOff? SeqC CoolOn EOL END END RETURN
End2: DoEndOpPS IF FIRST ToolChangeAtHome? {added FIRST modifier} SeqC AbsOrIncC Rapid FirstHome EOL END IF Equal? CSOffsetA# Num#('0') AND Equal? CSOffsetB# Num#('0') ELSE SeqC IF AAxisAvail? CSAngleA END IF BAxisAvail? CSAngleB END EOL SeqC Preset IF AAxisAvail? 'A0' END IF BAxisAvail? 'B0' END EOL END IF ProgStop? SeqC 'M0' EOL ELSE SeqC ProgStop EOL END RETURN
End3: SeqC 'M30' EOL CloseSub Post2 {organize Subs into one program} EOR EOL 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} SetFlagF('2') IF FirstOperation? InitOp OpenMP FirstOp1 FirstOp2 FirstOp3 ELSE IF NewTool? NewToolOp1 NewToolOp2 {to tool change, CS problem} SubCSMP NewToolOp3 NewToolOp4 NewToolOp5 ELSE {implied SameTool?} SameToolOp1 SubCSMP SameToolOp2 SameToolOp3 END END {common point for all operations} OpGuts NextOp {loops back to EachOP until last Operation} End1 {End of program} End2 CloseMP End3 RETURN
MP1ToollAllPfu: {Multiple Parts, 1 Tool all Parts, full up} EachOp {Start of post processing} SetFlagF('2') IF FirstOperation? InitOp FirstOp1 OpenMP FirstOp2 FirstOp3 ELSE IF NewTool? NewToolOp1 CloseMP NewToolOp2 {to tool change, CS problem} NewToolOp3 OpenMP NewToolOp4 NewToolOp5 ELSE {implied SameTool?} SameToolOp1 SubCSMP SameToolOp2 SameToolOp3 END END {common point for all operations} OpGuts NextOp {loops back to EachOP until last Operation} End1 {End of program} CloseMP End2 End3 RETURN
MP1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane} EachOp {Start of post processing} SetFlag('2') IF FirstOperation? InitOp FirstOp1 FirstOp2 FirstOp3 OpenMP FirstOp2a {need StrtPos in Sub} ELSE IF NewTool? CloseMP NewToolOp1a NewToolOp2 {to tool change, CS problem} NewToolOp3 NewToolOp4 NewToolOp5 OpenMP NewToolOp4a {need StrtPos in Sub} ELSE {implied SameTool?} SameToolOp1 SubCSMP SameToolOp2 SameToolOp3 END END {common point for all operations} OpGuts NextOp {loops back to EachOP until last Operation} CloseMP {End of program} End1a End2 End3 RETURN
NoMPs: {no multiple parts} EachOp {Start of post processing} SetFlag('2') IF FirstOperation? InitOp 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 {End of program} End2 End3 RETURN
{Start of executable Prog, top level ****}
ProgStart {setup and initializations}
IF MultipleParts? IF AllToolsOnePart? MPallTools1P ELSE {implied OneToolAllParts?} IF FullUp? MP1ToollAllPfu ELSE {implied ExitClearancePlane?} MP1ToollAllPXcp END END ELSE NoMPs END