{5/12/92 Copied & modified: Fanuc 6M M001.81 For: Armco. Machine: Giddings & Lewis Horizontal Machining Center Control: G & L NumeriPath 8000B Changes made per conversation with Bill Barber @ Armco, and manual. Changed all occurances of Z address to W address in Form and Prog. FORM Changes: Use Absolute Arc Centers = T Allow R-Format Arcs = F Keep Subs in Front of Program = T Z EndPoint Label = W Rapid Z EndPoint Label = W Sub Call Label = Sub Repeat Label = Program ID Label = Optional Program ID Label = Tool Length Offset Label = D Call sub = Return from Sub = Tool Length Offset Enable = Tool Length Offset Cancel = First Work Fixture Offset = E1 Last Work Fixture Offset = E99 Drill from CP1 = Drill from CP2 = PROG Changes: Changed FORMAT 6 for Dwell# from ####^##0 to ###.#;0. Added FORMAT 7 ##.#####;0. for FeedTapIPR# used in Canned Tapping Cycle. Added Address 'K' for this. Added ClearancePlane1# and ClearancePlane2# to FORMAT 4 used in Canned Drilling Cycles and based on RetractToCP1 Boolean, and replaces FromCP Command. Added ArcZRads# to FORMAT 4 used for 3-Axis ArcFeat. Added Repeats# to FORMAT 5. Added TYPE II Conversational Codes: PGM, Program Name MSG, Operator Message CLS, Call Subroutine Changed all SeqC EndSub to EOR. Modified formatArc Sub to handle all Planes. Unconditional h, v, I and J; d and K for Helical ArcFeat. Added Flag('1') to bypass Helical ArcFeat for zonlyRep Sub which uses SkipZ Command. Changed Address G to Address E at wFOStuff Sub. Added literal 'D0' to IncValue OfstOff. Changed Address P to Address F for Canned Drilling Cycle Dwells. Dwell for Canned Cycle is output as 'G4' Dwell. Deleted FeedEnt from Canned Drilling Cycles. I didn't see an example of FeedEnts being used in the manual, I assume it is defaulted. DWB}
{7/1/92 Modified: G & L Numeripath 8000 M499.81 For: Armco. Changes made per conversation with Bill Barber @ Armco. Bill requested that the Tool Length Offset be output prior to any table motion. The D Address controls both the Length AND Diameter Offset values. Deleted CRCOffsetC 3 places at StdLine sub. Deleted ResetCRCNum at toolPath sub. Added ToolOfst to block prior to StrtPos at FirstOperation, NewTool and 2 places at SameTool. Changed OfstOn to ZCP1 at FirstOperation, NewTool and 2 places at SameTool. DWB}
{10/7/94 Copied & modified: G & L Numeripath 8000 M499.81.1 For: CNCCS / Marshall Engineering Changed to a no subs format per Fanuc 6M NoSubs M001.81.2 Added sequence numbers to all comments. Changed Z address from W to Z Added codes to saftey start blocks. wFO's output by PostScript request only. SpinOff on ZCP3. Commented out OfstOff. Added FeedEnt to DrillCycle. Added move to machine home at end of program. Jim Radcliffe}
{10/11/96, Initial: G&L Numeripath 8000B M758.81.2 Created: G&L Num 8000B [RE] MXXX.81 For: Remmele Eng. Plant #40 Deleted SpinOff commands, Changed label for Z moves in form to W. Customer wants to use W (table depth axis) for milling ops and clearance planes, but use z axis for drill depths. Changed G94 in saftey start block to G95, customer wants to program feed rates in IPR, Put OpToolID and ToolChng on same line, Put ToolOffset on line with OpToolID and ToolChng, instead of calling ZCP3C at tool changes before tool changes and at the last op, post outputs 'Z0.W' TCZ#, TCZ it set in initalizations to 20, deleted output of program number, deleted literal 'G98X0.Y0.' at program end, added literal 'Z0.' before ZCP1 calls (zeros the Z axis so W axis moves are correct, moved Speed command in FirstOp and NewTool to same line with OpToolID, Added literal 'G98Z0.' to line with SpinOn in FirstOp and NewTool, deleted format #7, changed FeedTapIPR to format #4, MPK}
{1/16/97 Initial: G & L Num 8000B [RE] MZ64.89 Created: G & L Num 8000B [RE] MZ64.89.1 ForUser: Remmele Plant 40 Develop: ComPost2 MSL 68K, Virtual Gibbs 3.23 Comment: Modified per fax and conversation with Dave Lemire Changed format of F to 4 decimal places. Jim Radcliffe}
{*** NOTE ***} { Customer is typing in IPR feeds into the Virtual Feed dialog boxes! That is the way he wants it! }
{14 Oct98 Original: G & L Num 8000B [RE] MZ64.89.1 Created: G & L Num 8000H [GD] NDT14.15 For: General Dynamics Changes made per: Pat Rosemellia New Post First Draft Added Post Header Comment at the top of Prog. Added Format#8 at Prog Numeric Format Definitions and changed formatting for NewWFO# and PartNum# Added ckCRC Sub Added doTCZ Sub to handle Clearanceplanes Adjusted FirstOperation, NewTool and SameTool per customers FAX and Conversation with Pat Rosemellia Changes too numerous to list.
{*** NOTE ***} Because the user is specifying the TCZ value, this may not always going to be safe in NewTool or, in SameTool, where ProgStop OR NewToolOffset OR CSChanges are TRUE. Virtual calculates the safe Clearance Plane for indexing: This post only outputs the TCZ value. To ensure the Tool Clears the Part, the post will output TCZ or ZCP3, whichever is the greater, and will output a warning telling the user the amount he needs to increase the TCZ, to be safe.
Updated to D_Style LongHand Advanced Mill Post per Fanuc 6M NoSubs D877.15.3 Charles Winston}
{26 Oct98 Created: G & L Num 8000H [GD] NDT14.15 Created: G & L Num 8000H [GD] NDT14.15.1 For: General Dynamics Changes made per: Pat Rosemellia Added a Boolean to suppress the CSComment$ when SubComment is FALSE Added Utility Data Instructions at InitProg. Split the StartPosition Line into two lines with the the B-Axis index on a seperate line in FirstOparation, NewTool and SameTool Rewrote the formatArc Sub to handle Helical milling per customers CNC Manual. Charles Winston}
{2Nov98 Created: G & L Num 8000H [GD] NDT14.15.1 Created: G & L Num 8000H [GD] NDT14.15.2 For: General Dynamics Changes made per: Pat Rosemellia Put Speed and SpinOn onto a seperate line, before the Index line in FirstOperation, NewTool and SameTool Deleted 'Z' Zdepth# from drill cycles Added Rapid 'G98' after the Drill cycle cancellation Added Rapid or Feed and 'G98' to the TCZ line at the end of all milling operations ( Including Thread milling ) Added a Boolean to return the Indexer to the ZERO INDEX position, in FinishLastOp. Charles Winston}
{3Nov98 Created: G & L Num 8000H [GD] NDT14.15.2 Created: G & L Num 8000H [GD] NDT14.15.3 For: General Dynamics Changes made per: Pat Rosemellia Changes to Drill Cycles: Changed W to Z for all Drill Cycles in MachSpec Added ZDepth to Drill Cycle line at IF Drilling? Added TrackZNO# FIRST SPZ# after the drill cycle. Cycle was not correctly tracking the Zdepth. Moved Rapid 'B0' before SpinOff at end of Prog, per conversation with Pat Rosemellia. Charles Winston}
{11Nov98 Original: G & L Num 8000H [GD] NDT14.15.3 Created: G & L Num 8000H [GD] NDT14.15.4 For: General Dynamics Changes made per: Pat Rosemellia Modified the use of TCZ. All operations now call ZCP3 in opGuts and TCZ where appropropriate in NewTool and SameTool. Charles Winston}
{10Feb99 Original: G & L Num 8000H [GD] NDT14.15.4 Created: G & L Num 8000H [GD] NDT14.15.5 For: General Dynamics Changes made per: Pat Rosemellia Develop: Catalyst 5.03/ComPost2 1.7b15 Added booleans in cSAngleA and cSAngleB to suppress redundant rotations. Deleted all use of TCZ# throughout the Prog. Post now uses ZCP1. Moved doPostScript call before StartPos line in FirstOperation, NewTool and SameTool. Customer needs to output X and Y moves as Literals entered in Utility Data. Deleted the move tro ZCP1 before CoolOn in FirstOperation and NewTool and SameTool. Adjusted SameTool to output SpeedC. It was suppressed unless there was a ChangeCS Added ModCSOffsetB. Rotary table requires Positive, Absolute Index values. Charles Winston}
{25Feb99 Original: G & L Num 8000H [GD] NDT14.15.5 Created: G & L Num 8000H [GD] NDT14.15.6 For: General Dynamics Changes made per: Pat Rosemellia Develop: Catalyst 5.05/ComPost2 1.7b15 Added OR NewTool? to the Boolean in cSAngleA and cSAngleB Subs. Added a Boolean in SameTool to Suppress the whole rotation line unless AChange? OR BChange? is TRUE. Charles Winston}
{08Mar99 Original: G & L Num 8000H [GD] NDT14.15.6 Created: G & L Num 8000H [OT] NDQ37.15 For: Ort Tool Changes made per: Jeff Burgard Develop: Catalyst 5.05/ComPost2 1.7b15 Added Post Header Comment at the top of Prog. NEW POST : FIRST Draft W-Axis for all moves to ClearancePlanes, Z-Axis moves thereafter. Added WCP1C, WCP2C and WCP3C Conditional ClearancePlane Subs. Other changes per custmers FAX and Conversation with Jeff Burgard. Charles Winston}
{11Mar99 Original: G & L Num 8000H [OT] NDQ37.15 Created: G & L Num 8000H [OT] NDQ37.15.1 For: Ort Tool Changes made per: Jeff Burgard Develop: Catalyst 5.05/ComPost2 1.7b15 Added WCP1, WCP2 and WCP3 Unconditional Clearance Plane Subs. Deleted moves to ZCP3 at the end of Milling. Deleted Rapid ' W' ClearancePlane3# at the end of Drilling. Rewrote the Logic at the common point to handle the W-Axis approach moves. Charles Winston}
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: ' E' PartNum# RETURN
WFONum: ' E' NewWFO# RETURN
wFOStuff: IF MultipleParts? AND WorkFixtureOffsets? wFO ELSE IF NewWFO? WFONum ELSE IF NOT SameTool? IF NeedWFO1? WFONum END END END END RETURN
doCSComment: IF AAxisAvail? OR BAxisAvail? IF UseComments? AND SubComment? doSeqC ' ! ( CS#' CS# ' - ' CSComment$ ' )' EOL END END RETURN
cSComments: IF FirstOperation? OR NewTool? OR ChangeCS? doCSComment END RETURN
doToolComment: IF UseComments? SetScale('1') IF ToolTypeComment? doLineNumber ' ! ( TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL END IF ToolComment? doSeqC ' ! ( ' ToolComment$ ' )' EOL END restoreScale END RETURN
doOperationComment: IF UseComments? SetScale('1') IF OperationComment? doSeqC ' ! ( ' OperationComment$ ' )' EOL END restoreScale END RETURN
doOpComments: IF UseComments? SetScale('1') IF MultipleParts? AND SubComment? doSeqC ' ! ( PART ' Tag# ' )' EOL END IF OperationIDComment? doSeqC ' ! ( OPERATION ' Operation# ': ' OperationType$ ' )' EOL END IF WorkGroupComment? doSeqC ' ! ( ' WorkGroupComment$ ' )' EOL END restoreScale END cSComments RETURN
cSAngleA: IF AAxisAvail? IF FirstOperation? OR NewTool? 'A' ModCSOffsetA ELSE IF AChange? 'A' ModCSOffsetA END END END RETURN
cSAngleAC: IF AChange? cSAngleA END RETURN
cSAngleB: IF BAxisAvail? IF FirstOperation? OR NewTool? 'B' ModCSOffsetB Save# Num#('9') Recall# Num#('50') ELSE IF BChange? 'B' ModCSOffsetB Save# Num#('9') Recall# Num#('50') END END END RETURN
cSAngleBC: IF BChange? cSAngleB END RETURN
absValueC: IF NOT AbsValue? AbsValue END RETURN
incValueC: IF AbsValue? IncValue END RETURN
absOrIncC: IF AbsoluteMoves? absValueC ELSE incValueC END RETURN
psStuff: IF FourthCW? FORMAT(FourthDegree#,2) doSeqC ' A' FourthDegree# EOL FourthCWF END IF FourthCCW? FORMAT(FourthDegree#,3) doSeqC ' A' FourthDegree# EOL FourthCCWF END IF FifthCW? FORMAT(FifthDegree#,2) doSeqC ' B' FifthDegree# EOL FifthCWF END IF FifthCCW? FORMAT(FifthDegree#,3) doSeqC ' B' FifthDegree# EOL FifthCCWF END RETURN
formatArc: IF ArcCW? CWArcC ELSE CCWArcC END MoveXY IF ArcIJFormat? ArcIJ ELSE ArcR END MoveZC RETURN
ckCRC: IF LastFeat? CRCOffC ELSE IF NOT ZMove? CRCOnC END END RETURN
ckCRCNum: { not supported } RETURN
StdRapid: IF XMove? OR YMove? OR ZMove? doSeqC ckCRC RapidC MoveXYZC ckCRCNum EOL END RETURN
StdLine: {enables CRC on first call, .70} IF XMove? OR YMove? OR ZMove? IF Decelerate? IF RoomToDecel? DecelMove1 doSeqC ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL DecelMove2 END doSeqC ckCRC FeedC MoveXYZC DecelFeed ckCRCNum EOL ELSE doSeqC ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL END END RETURN
StdArc: EACHQuadrant IF LastQuadrant? AND Decelerate? IF RoomToDecel? DecelMove1 doSeqC formatArc ArcFeedC EOL DecelMove2 END doSeqC formatArc DecelFeed EOL ELSE doSeqC ckCRC formatArc ArcFeedC EOL END NEXTQuadrant RETURN
ToolPath2: {for AutoCycle element moves} EACHFeat IF RapidFeat? StdRapid ELSE IF LineFeat? StdLine ELSE IF ArcFeat? StdArc END END END NEXTFeat RETURN
entryMove: IF FeedEntry? doSeqC FeedC ZInC FeedEntC EOL ELSE doSeqC RapidC ZInC EOL END RETURN
cutAutoCycle: SaveSubStatus {save tool position} SetPass1 {element cut moves} SetSRXYtoSP doSeqC IncValue EOL IF Repeats? AND ZshiftOnly? EachRep IF NOT FirstCycle? IF SPXMove? OR SPYMove? IF FeedConnect? doSeqC FeedC StrtPosC EOL ELSE doSeqC RapidC StrtPosC EOL END END END entryMove ToolPath2 doSeqC CRCOffC IF NOT FeedConnect? ExitType PRIME ZCP2 END ExitFeed EOL NextRep ELSE entryMove ToolPath2 END doSeqC CRCOffC AbsOrInc ExitType ZCP2 ExitFeed EOL SetSRSubXY {restore tool position} SetSRSubMove ReSetPass2 {restore for positioning moves} RETURN
toolPath: EACHFeat IF PointFeat? IF AutoCycle? doSeqC IF FIFO? AND NOT FirstFeat? Rapid END MoveSXYC EOL CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY} cutAutoCycle ELSE doSeqC MoveSXYZC EOL {.80.01} END ELSE IF RapidFeat? StdRapid ELSE IF LineFeat? StdLine ELSE IF ArcFeat? StdArc END END END END NEXTFeat RETURN
CheckPass: IF AutoCycle? {use the correct StrtPos} SetPass2 ELSE SetPass1 END RETURN
WCP1: ' W' ClearancePlane1# RETURN
WCP1C: LoadFeat Num#('0') Num#('0') ClearancePlane1# IF ZMove? WCP1 END RETURN
WCP2: ' W' ClearancePlane2# RETURN
WCP2C: LoadFeat Num#('0') Num#('0') ClearancePlane2# IF ZMove? WCP2 END RETURN
WCP3: ' W' ClearancePlane3# RETURN
WCP3C: LoadFeat Num#('0') Num#('0') ClearancePlane3# IF ZMove? WCP3 END RETURN
ProgStart: InitProg TagInit ReverseXZArcs InitWFONum SetFlood SetMaxRPM('10000') SetMaxFeed('500') SetFlagF('1') {done flag} SetFlagF('2') {TCZ warning flag} Save# Num#('1') Num#('0') {tools 1st op} Save# Num#('2') Num#('0') {tools last op} Save# Num#('3') Num#('0') {ncCAMs last op} Save# Num#('50') Num#('0') {Tool Line Numbering} 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 ' NewWFO(56), NWFO(56) -' EOL ' The Work Fixture Offset # you specify will be used for all following operations.' EOL ' Do not use with the multiple part work fixture offset 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 EachOp IF FirstOperation? EOR EOL IF ToolChangeAtHome? SetHome END IF UseComments? IF ProgramNameComment? doSeqC ' (PGM, ' ProgramName$ ' )' EOL END IF ProgramComment? doSeqC ' ! ( ' ProgramComment$ ' )' EOL END IF FormatNameComment? doSeqC ' ! ( FORMAT: ' FormatName$ ' )' EOL END IF TimeComment? doSeqC ' ! ( ' Date$ ' AT ' Time$ ' )' EOL END IF MovesComment? doSeqC ' ! ( OUTPUT IN ' MoveType$ ' INCHES )' EOL END IF PartsComment? doSeqC ' ! ( PARTS PROGRAMMED: ' Parts# ' )' EOL END IF StartToolComment? doSeqC ' ! ( FIRST TOOL NOT IN SPINDLE )' EOL END END restoreScale END NextOp RETURN
DoOp: IF FirstOperation? IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart? IF FullUp? doSeqC CoolOff EOL doSeqC Rapid ' M63000 W0 Z0' EOL END doOpComments doSeqC wFOStuff EOL ELSE doOpComments doToolComment doSeqC CoolOff SpinOff EOL doSeqC Rapid Plane ' M63000 W0 Z0' EOL IF OptionalStops? doSeqC ' M01' EOL END IF MultipleParts? AND WorkFixtureOffsets? doSeqC WFOStuff EOL END END checkPass IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? AND NOT FirstPart? doSeqC absOrIncC RapidC cSAngleA cSAngleB EOL doSeqC RapidC StrtPos EOL ELSE doSeqC Speed OpToolID ToolOfst ToolChng SpinOn EOL doSeqC absOrIncC RapidC cSAngleA cSAngleB EOL doSeqC ' M63000 Z0' EOL doPostScript doSeqC PreTool EOL doSeqC RapidC StrtPos EOL END ELSE IF NewTool? IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart? {only need to set up for tool change on 1st part} ELSE doOpComments doToolComment doSeqC CoolOff SpinOff EOL doSeqC Rapid ' M63000 W0 Z0' EOL doEndOpPS IF LAST ProgStop? doSeqC ' M00' EOL ELSE doSeqC ProgStop EOL END END
{Start new Operation}
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart? doOpComments IF FullUp? doSeqC CoolOff EOL doSeqC Rapid ' M63000 W0 Z0' EOL END doSeqC wFOStuff EOL ELSE doSeqC Speed OpToolID ToolOfst ToolChng SpinOn EOL doSeqC absOrIncC RapidC cSAngleA cSAngleB EOL doPostScript doSeqC ' M63000 Z0' EOL IF MultipleParts? AND WorkFixtureOffsets? doSeqC WFOStuff EOL END IF LastTool? doSeqC ' T00' EOL ELSE doSeqC PreTool EOL END END CheckPass IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? AND NOT FirstPart? doSeqC absOrIncC RapidC cSAngleA cSAngleB EOL doSeqC RapidC StrtPos EOL ELSE doSeqC RapidC StrtPos EOL END ELSE IF SameTool?
{Finish off last Operation}
IF LAST ProgStop? doSeqC CoolOff SpinOff EOL ELSE IF CoolOff? AND LAST NOT CoolOff? doSeqC CoolOff EOL END END IF LAST ProgStop? OR NewToolOffset? OR ChangeCS? doSeqC Rapid ' M63000 W0 Z0' EOL END doEndOpPS IF LAST ProgStop? doSeqC ' M00' EOL END
{Start new Operation}
IF LAST ProgStop? OR NewToolOffset? OR ChangeCS? IF LAST ProgStop? doSeqC Speed SpinOn EOL ELSE IF NewToolOffset? doSeqC ToolOfst EOL ELSE IF ChangeCS? WFOStuff END END END doSeqC ' M63000 Z0' EOL END doSeqC SpeedC EOL checkPass IF AChange? OR BChange? doSeqC PlaneC absOrIncC Rapid cSAngleA cSAngleB EOL END doPostScript doSeqC PlaneC absOrIncC RapidC StrtPos EOL END END END
{ Common Point for All Operations }
ResetCRCNum {call here to reset for each new operation only, call in tool path to reset for each repeat in an operation} RapidF# {forces the output of a conditional feedrate for each operation}
IF milling? { Position the W-Axis First } IF NOT SameTool? doSeqC WCP1 EOL ELSE doSeqC WCP1C EOL END doSeqC ZCP2C EOL { Milling uses the Z-Axis to approach ClearancePlane2 } ELSE IF SameTool? { Conditional Clearance Plane moves } IF RetractToCP1? doSeqC WCP1C EOL ELSE doSeqC WCP2C EOL END ELSE { UnConditional Moves } IF RetractToCP1? doSeqC WCP1 EOL TrackZNO# ClearancePlane1# ELSE doSeqC WCP2 EOL TrackZNO# ClearancePlane2# END END END IF SameTool? IF LAST ProgStop? doSeqC CoolOn EOL ELSE IF NOT CoolOff? AND LAST CoolOff? doSeqC CoolOn EOL END END ELSE doSeqC CoolOn EOL END doOperationComment
IF milling? IF Repeats? IF ZshiftOnly? AND AutoCycle? {done in cutAutoCycle called from toolPath} ELSE EACHRep IF NOT FirstCycle? doSeqC Connect StrtPos EOL IF NOT FeedConnect? doSeqC ZCP2C EOL END END END END IF NOT AutoCycle? entryMove END toolPath IF Repeats? IF ZshiftOnly? AND AutoCycle? {done in cutAutoCycle called from toolPath} ELSE doSeqC CRCOffC IF NOT FeedConnect? ExitType 'Z' TrackZ# ADD# CSOffsetZ# PRIME ClearancePlane2# END ExitFeed EOL NEXTRep END END IF NOT AutoCycle? doSeqC CRCOffC EOL END ELSE IF Drilling? IF Repeats? EACHRep END {doSeqC DrillCP EOL} GetCycle doSeqC Cycle StrtPos ZDepth RLevel IF RetractToCP1? {.81} ' P' ClearancePlane1# { FromCP } ELSE ' P' ClearancePlane2# { FromCP } END Peck IF Dwell? ' G4' Dwell END IF Tap? ' K' FeedTapIPR#('1') ELSE FeedEnt END EOL TrackZNO# FIRST SPZ# {.81.2} toolPath IF RetractToCP1? {.81} TrackZNO# ClearancePlane1# ELSE TrackZNO# ClearancePlane2# END doSeqC DrillOff EOL IF Repeats? NEXTRep END END END Save# Num#('5') ClearancePlane3# { Stores ZCP3 to check it against TCZ# } RETURN
FinishLastOp: doSeqC CoolOff SpinOff EOL doSeqC Rapid ' M63000 W0 Z0' EOL IF ProgStop? doSeqC ' M00' EOL ELSE doSeqC ProgStop EOL END doEndOpPS doSeqC ' T00 D00' ToolChng EOL IF BAxisAvail? IF NOT Equal? Recall# Num#('9') Num#('0') { If not at 0 deg, return to Zero } doSeqC Rapid ' B0' EOL END END doSeqC EOP EOL RETURN
DoToolsOps: EachOp IF GTEqual? Operation# Recall# Num#('1') AND LTEqual? Operation# Recall# Num#('2') {Tools1stOp ˛ op ˛ ToolsLastOp} DoOp END NextOp RETURN
NextTools1stOp: SetNextToolOp Operation# RETURN
GetToolsOps: EachOp IF Equal? Operation# Recall# Num#('1') {if op = Tools1stOp} IF GreaterThan? NextTools1stOp Recall# Num#('1') {if NextTools1stOp is greater Tools1stOp} Save# Num#('2') SUB# NextTools1stOp Num#('1') {ToolsLastOp becomes NextTools1stOp less 1} ELSE {else} Save# Num#('2') Recall# Num#('3') {ToolsLastOp becomes ncCAMsLastOp} END END NextOp RETURN
DoTool: IF NOT Flag?('1') GetToolsOps IF WorkFixtureOffsets? NewWFO EachWFO TagInc DoToolsOps IncWFO NextWFO ELSE EachPart TagInc DoToolsOps NextPart END IF LessThan? Recall# Num#('2') Recall# Num#('3') {if ToolsLastOp < ncCAMsLastOp} Save# Num#('1') ADD# Recall# Num#('2') Num#('1') {Tools1stOp becomes NextTools1stOp} ELSE {else} SetFlag('1') {set DoneFlag} END TagInit END RETURN
{Start of executable Prog, Top Level ****}
progStart {setup and initializations}
IF MultipleParts? IF AllToolsOnePart? IF WorkFixtureOffsets? NewWFO EachWFO TagInc EachOp DoOp NextOp FinishLastOp IncWFO NextWFO ELSE EachPart TagInc EachOp DoOp NextOp FinishLastOp NextPart END ELSE IF OneToolAllParts? EachOp IF FirstOperation? Save# Num#('1') Operation# {ncCAMs1stOp becomes Tools1stOp} END IF LastOp? Save# Num#('3') Operation# {save ncCAMsLastOp} END NextOp DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool FinishLastOp END END ELSE EachOp DoOp NextOp FinishLastOp END IF UseComments? SetScale('1') IF FileBytesComment? doSeqC ' ! ( FILE LENGTH: ' FileBytes# ' CHARACTERS )' EOL END IF FileFeetComment? doSeqC ' ! ( FILE LENGTH: ' FileFeet# ' FEET )' EOL END IF FileMetersComment? doSeqC ' ! ( FILE LENGTH: ' FileMeters# ' METERS )' EOL END END Close