plik


{Change Comments ***********************************************************} { Format: Fanuc 6M (FW) B001.10 7/27/95 Added G52 style output for too many coordinate systems Updated to .10 format TH} {11/10/95 Initial: Fanuc 6M (FW) B001.10 Created: Fanuc 6M (FW) B001.10.01 Develop: ComPost 4.21.33, Catalyst68K v2.30.14 Comment: Corrections to Processor. To correct multiple parts output: Added "OR Flag?('2')" to "IF WFOCS?" in "SubCSMP:". To Simplify prog subs and correct errors in MP1ToollAllPXcp: Changed FirstOp3a/NewToolOp5a to FirstOp4/NewToolOp6 Deleted NewToolOp5b sub and changed call to NewToolOp5 (they were identical!) Deleted OfstOn and Cool On from FirstOp3/NewToolOp5 Added calls to FirstOp4/NewToolOp6 after calls to FirstOp3/NewToolOp5. Changed StrtPos in MP1ToollAllPXcp to FirstOp3/NewToolOp5. Corrected format of CSOffsetA# and CSOffsetB#. Deleted RecallWFO sub. It was not used! Jim Radcliffe} {11/15/95 Initial: Fanuc 6M (FW) B001.10.01 Created: Fanuc 6M (FW) B001.10.02 Develop: ComPost 4.21.33, Catalyst68K v2.30.18C Comment: Corrections to Processor Modified WFO Handling: Changes: Deleted NotSameToolWFO & SameToolWFO subs. Added WFOStuff sub. Changed all WFO calls in main loops to WFOStuff. Results: Changes do not effect Multiple Parts output. Correct WFO is output by default at the beginning of each tool. G52, if used, is output by default at the beginning of each tool. G52, without WFO, is output at SameTool only if there is a change. Jim Radcliffe} {1/4/96 Initial: Fanuc 6M (FW) B001.10.02 Created: Cin Acr 950MC Maxim Cxxx.10.02 ForUser: Nupro Company Control: Acramatic 950MC Machine: Cincinnati Milacron Maxim Series (500/630) Horizontal Machining Center Develop: ComPost 4.21.33, Catalyst68K v2.30.22C Comment: New Processor from Manual, Sample readout and conversations with Dexter Dave. * This processor still needs * 1. Custom Block deletes Every line should be block deleted as follows: '/' CS# example: /1 N0001 G00 G90 Xxxx etc... BUG!! Regular block deletes with SetLineStrtChr('/') not working with ReTag! ReTag command causes the block delete to be output 3 times 2. G52 style output not supported Customer said we could use G92 This was not incorporated at this time for obvious reasons. Jim Radcliffe} {2/5/95 - Changed .10 version to .11, MPK} { Format: Cin Acr 950MC Maxim D920.11 For: Nupro Company Converted to D style output by commenting out section that called SetWFOCS and Flag('2') TH} {3/25/96, Tested ZOnlyRepAutoCycle, Changed version # to .12, MPK} { Format: Cin Acr 950MC Maxim C920.12.1 Removed all G52 info. Replaced SeqC's in ToolPath with SeqLabC's TH} {5/2/96 Modified: Cin Acr 950MC Maxim C920.12.1 Created: Cin Acr 950MC Maxim C920.12.2 For: Nupro Concord Versions: ncCad 4.33.02/ncCAM 4.33.01/ncPost 4.33.09/Catalyst v3.04C/Compost 4.21.34.1/1.0a Changes made per Pete Jackson and Steve Buco. Customer reported RLevel value was off -.1 for Canned Drilling Cycles. Changed: 'R' SUB# ADD# ClearancePlane2# NumSc#('-.1') NumSc#('0') to RLevel at IF Drilling. DWB} {5/7/96 Modified: Cin Acr 950MC Maxim C920.12.2 Created: Cin Acr 950MC Maxim C920.12.3 For: Nupro Concord Versions: ncCad 4.33.02/ncCAM 4.33.01/ncPost 4.33.09/Catalyst v3.04C/Compost 4.21.34.1/1.0a Changes made per Pete Jackson and Steve Buco. Customer reported ZDepth value was off -.1 for Canned Drilling Cycles. Changed: 'Z' SUB# ADD# ZDepth# NumSc#('.1') NumSc#('0') to 'Z' SUB# ADD# ZDepth# NumSc#('0') NumSc#('0') at IF Drilling. Corrected bad OR Boolean Condition at EndProgram2. DWB} {5/22/96, Initial: Cin Acr 950MC Maxim C920.12.3 Created: Cin Acr 950MC Maxim C920.12.4 For: Nupro Moved G80 at the end of drilling cycles onto a line by itself before rapid moved to ZCP3, control cannot have two Gcodes on one line, MPK} {8/13/97 Initial: Cin Acr 950MC Maxim C920.12.4 Created: Cin Acr 950MC Maxim CX79.12 ForUser: Braden Engineering / Ramsey Winch Control: Cincinnati Acramatic 950 Machine: Cincinnati Maxim 500 Horizontal Machining Center Model AM Develop: ComPost2 68K 1.0b11, Virtual Gibbs 3.35 PPC Comment: New processor per marked up readout from Todd Lehmann Custom sequence number on colon blocks. Added extra index commands to colon block. Added PreTool. Changed default TCZ# from 10 to 17 inches. Modified output of B axis, basically same as Fadal with no dirction control: absolute positioning between 0 and 360 it will automatically take the shortest route no control over direction the B axis rotates Changed RigidTap feedrate. For 1/4-20 the output would be 'K(1/20)'. Moved Speed SpinOn output to drill cycle line for RigidTap. Added M61 Pallet Shift command to end of program. Changed EOP from M30 to M2. Blank line between tools and subs. BUG FIX: Moved WFOStuff on StrtPos to be before StrtPos so ClearCSOffset would work properly! Jim Radcliffe} {9/25/97 Initial: Cin Acr 950MC Maxim CX79.12 Created: Cin Acr 950MC Maxim CX79.12.1 Develop: ComPost2 1.1b2, Virtual Gibbs 4.21 Comment: Corrected custom sequence number output. Jim Radcliffe} {6/25/98 Initial: Cin Acr 950MC Maxim CX79.12.1 Created: Cin Acr 950MC Maxim Cxxx.12 ForUser: Wilden Pump Develop: ComPost2 1.1b3, Virtual Gibbs 4.24 Comment: Modified format of B axis for machines standard indexer 0 thru 359 in whole degrees with decimal point. Jim Radcliffe} {7/9/98 Initial: Cin Acr 950MC [WP] CU37.12 Created: Cin Acr 950MC [WP] CU37.12.1 Comment: Modified per marked up readouts and conversation with Andrew Purvis Added ABS# to HelixPitch# to force positive output. Also changed prog formatter. Changed 'Z' TCZ# to 'M26', it causes a full retract. Changed Program ID label from O to L in the MachSpec. Added colon block to begining of program. Modified so standard sequence number will be output in place of colon block in subs. Jim Radcliffe} {30Jul98 Original: Cin Acr 950MC [WP] CU37.12.1 Created: Cin Acr 950MC [WP] CU37.12.2 For: Wilden Pumps Changes made per: Andrew Purvis Deleted the Boolean which output the literal 'G99M57' in BeginTool1 Charles Winston} {Prog Numeric Format Definitions ****} #1 = '#.00' #2 = '##0^' #3 = '*#####.###;0.' #4 = '####.####;0.' #5 = '#######0' #6 = '####^##0' FORMAT(FileFeet#,1) FORMAT(FileMeters#,1) FORMAT(MUL#,2) FORMAT(CSOffsetA#,3) FORMAT(CSOffsetB#,3) FORMAT(ToolDiameter#,4) FORMAT(CSOffsetX#,4) FORMAT(CSOffsetY#,4) FORMAT(CSOffsetZ#,4) FORMAT(TrackZNO#,4) FORMAT(SUB#,4) FORMAT(FeedTapIPR#,4) FORMAT(ABS#,4) FORMAT(Tag#,5) FORMAT(Program#,5) FORMAT(Operation#,5) FORMAT(Tool#,5) FORMAT(NewWFO#,5) FORMAT(ADD#,5) FORMAT(CS#,5) FORMAT(Parts#,5) FORMAT(CallMasterNum#,5) FORMAT(Recall#,5) FORMAT(DIV#,5) FORMAT(Dwell#,6) {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 DoSubComment: IF UseComments? AND SubComment? SeqLabC '(MSG, SUB NUMBER: ' Program# ' )' EOL END RETURN CalcCSWFO#: {(iPart-1)*NumOfCS#} ADD# MUL# NumOfCS# SUB# PartNum# Num#('1') ADD# CS# SUB# NewWFO# Num#('1') RETURN CSWFO: 'H' ADD# CS# SUB# NewWFO# Num#('1') RETURN CalcCSWFO: {(iPart-1)*NumOfCS#} 'H' ADD# MUL# NumOfCS# SUB# PartNum# Num#('1') ADD# CS# SUB# NewWFO# Num#('1') RETURN DoCSWFOComment: SeqLabC '(MSG, CS#' CS# ' - ' CSComment$ ' )' EOL SeqLabC '(MSG, ' CalcCSWFO '= X' CSOffsetX# ' Y' CSOffsetY# ' Z' CSOffsetZ# ' )' EOL RETURN OffsetComments: IF NOT MultipleParts? IF WFOCS? IF ChangeCS? DoCSWFOComment END END END RETURN DoOpComments: IF UseComments? SetScale('1') IF OperationIDComment? SeqLabC '(MSG, OPERATION ' Operation# ': ' OperationType$ ' )' EOL END IF OperationComment? SeqLabC '(MSG, ' OperationComment$ ' )' EOL END IF WorkGroupComment? SeqLabC '(MSG, ' WorkGroupComment$ ' )' EOL END IF ToolTypeComment? SeqLabC '(MSG, TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL END IF ToolComment? SeqLabC '(MSG, ' ToolComment$ ' )' EOL END RestoreScale END OffsetComments RETURN CSAngleA: IF AAxisAvail? 'A' CSOffsetA# END RETURN CSAngleAC: IF AChange? CSAngleA END RETURN CSAngleB: IF BAxisAvail? Save# Num#('2') SUB# DIV# CSOffsetB# Num#('360') TRUNC# DIV# CSOffsetB# Num#('360') IF LessThan? Recall# Num#('2') Num#('0') Save# Num#('2') ADD# Recall# Num#('2') Num#('1') END Save# Num#('2') MUL# Recall# Num#('2') Num#('360') IF GTEqual? Recall# Num#('2') Num#('359.5') {if the output would be 360} 'B0.' {then output the max output} ELSE 'B' MUL# Recall# Num#('2') Num#('1') '.' {formatter '##0.' did not output the decimal point so I used a literal} END END RETURN CSAngleBC: IF BChange? CSAngleB END RETURN PSInit: MasterOpF CallMasterOpF RETURN PSStuff: RETURN DoPostScript: PSInit EachPS SeqLabC PostScript EOL PSStuff NextPS RETURN DoEndOpPS: PSInit EachEOPS SeqLabC EndOpPS EOL PSStuff NextPS RETURN EntryMove: IF FeedEntry? SeqLabC Feed ZIn FeedEnt EOL ELSE SeqLabC RapidC ZIn EOL END RETURN StartSub: OpenSub ' ' EOL '(DFS,L' Program# ')' EOL DoSubComment RETURN SubWarning: IF NOT FeedConnect? IF AnyZshift? ' ' EOL '(MSG, WARNING Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT )' EOL ' ' EOL END END RETURN StdSub: TagInc SeqLabC 'G10=[T2]V0' EOL {sets temporary register #2 to 0} SeqLabC 'Q' Tag# '1' EOL {branch label 1} SeqLabC '(CLS,L' Program# ')' EOL {call subroutine} SeqLabC 'G10=[T2]V[T2]+1' EOL {increment register #2 by 1} SeqLabC 'G11E[T2]=' Repeats# 'L' Tag# '2' EOL {if register #2 is equal to number of repeats then jump to branch label 2} SeqLabC 'G11L-' Tag# '1' EOL {jump backwards to branch label 1} SeqLabC 'Q' Tag# '2' EOL {branch label 2} StartSub RETURN FinishSub1: {part 1} SeqLabC CRCOffC IF NOT FeedConnect? IF AutoCycle? ZCP3C ELSE IF FIFO? FeedC ZCP3C FeedEntC ELSE RapidC ZCP3C END END END EOL RETURN FinishSubG92: {part 2} SeqLabC Preset ShiftRC EOL SeqLabC '(ENS)' EOL CloseSub SeqLabC Preset UnshftRC EOL RETURN ToggleIncDecWFO: IF Flag?('3') SetFlagF('3') ELSE SetFlag('3') END RETURN OpenMP: IF WFOCS? NewProg StartSub SaveCSProg SaveCSOpStart ClearCSOffset ELSE NewProg IF WorkFixtureOffsets? NewWFO EachWFO {simple eachPart} SeqLabC SetWFO EOL SeqLabC '(CLS,L' Program# ')' EOL IncWFO NextWFO {simple NextPart} ELSE TagInc SeqLabC 'G10=[T1]V0' EOL {sets temporary register #1 to 0} SeqLabC 'Q' Tag# '1' EOL {branch label 1} SeqLabC '(CLS,L' Program# ')' EOL {call subroutine} SeqLabC 'G10=[T1]V[T1]+1' EOL {increment register #1 by 1} SeqLabC 'G11E[T1]=' Parts# 'L' Tag# '2' EOL {if register #1 is equal to number of parts then jump to branch label 2} SeqLabC 'G11L-' Tag# '1' EOL {jump backwards to branch label 1} SeqLabC 'Q' Tag# '2' EOL {branch label 2} END StartSub END RETURN CloseMP: IF WFOCS? SeqLabC '(ENS)' EOL CloseSub IF Flag?('3') NewWFO EachWFO {simple eachPart} EachCSOp DoCSWFOComment ClearCSOffset SeqLabC CalcCSWFO EOL SeqLabC '(CLS,L' CSSubID# ')' EOL NextCSOp ClearCSOffset IncWFO NextWFO {simple NextPart} ELSE LastWFO EachWFO {simple eachPart} EachCSOp DoCSWFOComment ClearCSOffset SeqLabC CalcCSWFO EOL SeqLabC '(CLS,L' CSSubID# ')' EOL NextCSOp ClearCSOffset DecWFO NextPrevWFO {simple NextPart} END IF Flag?('4') ToggleIncDecWFO END ELSE IF WorkFixtureOffsets? SeqLabC '(ENS)' EOL CloseSub SeqLabC WFO1 EOL ELSE SeqLabC Preset ShiftPC EOL SeqLabC '(ENS)' EOL CloseSub SeqLabC Preset UnshftPC EOL END END RETURN SubCSMP: IF WFOCS? IF ChangeCS? SeqLabC '(ENS)' 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? SeqLabC AbsValue EOL END RETURN FormatArc: DoAbsOrInc IF ArcCW? CWArcC ELSE CCWArcC END IF XYPlane? IF ZMove? MoveX MoveY MoveZ ArcIJ 'K' ABS# HelixPitch# ELSE MoveX MoveY ArcIJ END ELSE IF XZPlane? IF YMove? MoveX MoveY MoveZ ArcIJ 'J' ABS# HelixPitch# ELSE MoveX MoveZ ArcIJ END ELSE { YZPlane } IF XMove? MoveX MoveY MoveZ ArcIJ 'I' ABS# HelixPitch# ELSE MoveY MoveZ ArcIJ END END END RETURN CkCRC: { 4.2 } IF XMove? OR YMove? { Approach Length Feature and Multiple Pockets } IF NOT ZMove? CRCOnC IF NOT EmptyLine? ResetCRCNum END END END IF LastFeat? AND EmptyLine? { Exit Length Feature } CRCOffC END RETURN StdLine: {enables CRC on first call} IF Decelerate? IF RoomToDecel? DecelMove1 SeqLabC DoAbsOrInc CkCRC FeedC MoveXYZC FeedRateC EOL DecelMove2 END SeqLabC DoAbsOrInc CkCRC FeedC MoveXYZC DecelFeed EOL ELSE IF XMove? OR YMove? OR ZMove? SeqLabC DoAbsOrInc CkCRC FeedC MoveXYZC FeedRateC EOL END END RETURN ToolPath: EACHFeat IF PointFeat? IF AutoCycle? SeqLabC MoveSXYC EOL SeqLabC '(CLS,L' Program# ')' EOL CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY} ELSE SeqLabC DoDrillAbsOrInc MoveSXYZC EOL END ELSE IF RapidFeat? IF LastFeat? SeqLabC DoAbsOrInc CRCOffC RapidC MoveXYZC EOL ELSE IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps} SeqLabC DoAbsOrInc RapidC MoveXYZC EOL ELSE IF XMove? OR YMove? OR ZMove? SeqLabC DoAbsOrInc CRCOnC RapidC MoveXYZC EOL END END END ELSE IF LineFeat? IF LastFeat? SeqLabC DoAbsOrInc CRCOffC FeedC MoveXYZC FeedRateC EOL ELSE IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps} SeqLabC DoAbsOrInc FeedC MoveXYZC FeedRateC EOL ELSE IF Decelerate? IF RoomToDecel? DecelMove1 SeqLabC DoAbsOrInc CkCRC FeedC MoveXYZC FeedRateC EOL DecelMove2 END SeqLabC DoAbsOrInc CkCRC FeedC MoveXYZC DecelFeed EOL ELSE IF XMove? OR YMove? OR ZMove? SeqLabC DoAbsOrInc CkCRC FeedC MoveXYZC FeedRateC EOL 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 SeqLabC FormatArc ArcFeedC EOL DecelMove2 END SeqLabC FormatArc DecelFeed EOL ELSE SeqLabC FormatArc ArcFeedC EOL END NEXTQuadrant END END END END NEXTFeat RestoreAbsOrInc RETURN AutoCycCutSub1: {part 1} SaveSubStatus {save tool position} SetPass1 {element cut moves} StartSub SetSRXYtoSP SeqLab IncValue EOL RETURN AutoCycCutSub2: {part 2} ToolPath SeqLabC AbsOrInc IF Repeats? AND FeedConnect? AND ZshiftOnly? ELSE IF FIFO? FeedC ZCP2 FeedEntC ELSE RapidC ZCP2 END END EOL SeqLabC '(ENS)' 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 G92Sub: SubWarning StdSub SeqLabC AbsOrInc Connect StrtPos EOL Milling FinishSub1 FinishSubG92 RETURN ZonlyRepAutoCycle: AutoCycPat {write pattern moves and main calls} StartSub NewProg EachCycle SetSRXYtoEP IF FeedConnect? IF NOT FirstCycle? IF SPXMove? OR SPYMove? SeqLabC Feed IncValue StrtPosC EOL SeqLabC AbsOrInc ELSE SeqLabC Feed END ELSE SeqLabC Feed END ZInPlusInc FeedEnt EOL ELSE IF NOT FirstCycle? IF SPXMove? OR SPYMove? SeqLabC Rapid IncValue StrtPosC EOL IF FeedEntry? SeqLabC AbsOrInc ZCP2PlusInc EOL SeqLabC Feed ZInPlusInc FeedEnt EOL ELSE SeqLabC AbsOrInc ZInPlusInc EOL END ELSE IF FeedEntry? SeqLabC Rapid ZCP2PlusInc EOL SeqLabC Feed ZInPlusInc FeedEnt EOL ELSE SeqLabC Rapid ZInPlusInc EOL END END ELSE IF FeedEntry? SeqLabC Feed ZInPlusInc FeedEnt EOL ELSE SeqLabC Rapid ZInPlusInc EOL END END END IF FirstCycle? SetStatusOff {protect Z position for incremental sub} END SeqLabC '(CLS,L' Program# ')' EOL NextCycle SetStatusOn AutoCycCutSub1 {build element sub} AutoCycCutSub2 IF FeedConnect? {there is no Z up in the sub} IF FIFO? SeqLabC Feed ZCP2 FeedEnt EOL ELSE SeqLabC Rapid ZCP2 EOL END END SeqLabC '(ENS)' EOL CloseSub {Element shift, not pattern} RETURN ZonlyRep: EachCycle IF NOT FirstCycle? SeqLabC Connect StrtPos EOL {added Connect} END IF FeedConnect? SeqLabC FeedC ZInPlusInc FeedEnt EOL {changed to FeedC} ELSE {Entry/Exit Connect} IF FeedEntry? IF NOT FirstCycle? SeqLabC RapidC ZCP2PlusIncC EOL {cannot call for cycle =1} {added Rapid, reads better} {.71.2, changed to RapidC, reads better} END SeqLabC Feed ZInPlusInc FeedEnt EOL ELSE SeqLabC RapidC ZInPlusInc EOL {added Rapid, reads better} {changed to RapidC, reads better} END END SeqLabC '(CLS,L' Program# ')' EOL NextCycle StartSub TrackZNO# FIRST SPZ# ToolPath FinishSub1 SeqLabC '(ENS)' EOL CloseSub RETURN CheckPass: IF AutoCycle? {use the correct StrtPos} SetPass2 ELSE SetPass1 END RETURN SkipToLastFeat: EachFeat IF LastFeat? TrackXNO# SPX# TrackYNO# SPY# END NextFeat RETURN SetDrillEndOpZ: IF RetractToCP1? TrackZNO# ClearancePlane1# ELSE TrackZNO# ClearancePlane2# END RETURN OpGuts: IF Milling? SeqLabC 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? SeqLabC ZCP3C EOL ELSE IF FIFO? SeqLabC FeedC CRCOffC ZCP3C FeedEntC EOL ELSE SeqLabC RapidC CRCOffC ZCP3C EOL END END ELSE IF Drilling? IF Repeats? NewProg StdSub SeqLabC AbsOrInc Rapid StrtPos EOL END GetCycle SeqLabC IF FIFO? AND Dwell? 'G89' ELSE Cycle END 'Z' SUB# ADD# ZDepth# NumSc#('0') NumSc#('0') RLevel IF RetractToCP1? IF NotEqual? ClearancePlane1# ClearancePlane2# 'W' SUB# ClearancePlane1# ClearancePlane2# END END Peck IF Peck? IF PeckChipBreaker? 'J0' ELSE 'J1' END END IF RigidTap? 'K(1/' DIV# Num#('1') FeedTapIPR#('1') ')' Speed SpinOn ELSE FeedEnt END EOL IF CallMasterOp? SeqLabC '(CLS,L' CallMasterNum# ')' EOL SkipToLastFeat ELSE TrackZNO# FIRST SPZ# IF MasterOp? SetFlag('1') {std sep sub Zreps in effect} NewMasterProg SeqLabC '(CLS,L' Program# ')' EOL StartSub ToolPath SeqLabC '(ENS)' EOL CloseSub SetFlagF('1') {not std sep sub Zreps in effect} ELSE ToolPath END END SetDrillEndOpZ SeqLabC 'G80' EOL SeqLabC Rapid ZCP3 EOL IF Repeats? FinishSubG92 END END END RETURN DefaultWFO: IF NeedWFO1? WFO1 END RETURN WFOStuff: IF MultipleParts? IF NOT WorkFixtureOffsets? DefaultWFO END ELSE IF WFOCS? IF ChangeCS? CSWFO ELSE IF NOT SameTool? CSWFO END END ClearCSOffset ELSE IF ChangeCS? DefaultWFO ELSE IF NOT SameTool? DefaultWFO END END END END RETURN ProgStart: InitProg TagInit ReverseXZArcs InitWFONum SetFlood Save# Num#('1') Num#('0') { Custom Sequence number } Save# Num#('2') Num#('0') { B Axis handling } SetFlagF('1') {not std sep sub Zreps in effect} {rep change 2} SetFlag('3') {True = incrementing WFO numbers for MP. False = decrementing WFO numebrs for MP} SetFlag('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 ' ToolChangeZ(10.0), TCZ(10.0) -' EOL ' The value in parenthese establishes the value the spindle will retract to.' EOL ' It is Modal and 10.0000 is the default.' EOL END IF MultipleParts? IF WorkFixtureOffsets? IF LTEqual? MUL# Parts# NumOfCS# Num#('16') 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 no WFO style output. )' EOL END END END ELSE IF LTEqual? NumOfCS# Num#('16') {****} 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 no WFO style output. )' EOL END END END RETURN InitOp: EOR EOL '(PGM,="' ProgramName$ '"' ProgID1 ')' EOL ':' Recall# Num#('1') EOL IF ToolChangeAtHome? SetHome END IF UseComments? IF ProgramNameComment? SeqLabC '(MSG, PROGRAM NAME: ' ProgramName$ ' )' EOL END IF ProgramComment? SeqLabC '(MSG, ' ProgramComment$ ' )' EOL END IF FormatNameComment? SeqLabC '(MSG, FORMAT: ' FormatName$ ' )' EOL END IF TimeComment? SeqLabC '(MSG, ' Date$ ' AT ' Time$ ' )' EOL END IF MovesComment? SeqLabC '(MSG, OUTPUT IN ' MoveType$ ' INCHES )' EOL END IF PartsComment? SeqLabC '(MSG, PARTS PROGRAMMED: ' Parts# ' )' EOL END IF StartToolComment? SeqLabC '(MSG, FIRST TOOL NOT IN SPINDLE )' EOL END END OpenSub RestoreScale RETURN BeginTool1: IF NOT FirstOperation? ' ' EOL END IF MultipleParts? AND AllToolsOnePart? SeqLab ELSE Save# Num#('1') ADD# Recall# Num#('1') Num#('1') ':' Recall# Num#('1') END ToolChng OpToolID CSAngleA CSAngleB EOL DoOpComments DoPostScript RETURN BeginTool2: CheckPass SeqLabC AbsOrInc Plane Rapid WFOStuff StrtPos CSAngleA CSAngleB ZCP1 IF Drilling? AND RigidTap? { speed and SpinOn are output on the Drill Cycle line } ELSE Speed SpinOn END CoolOn PreTool EOL RETURN EndTool1: SeqLabC 'M26' CoolOff EOL RETURN EndTool2: DoEndOpPS IF ToolChangeAtHome? SeqLabC Rapid Home SpinOff EOL ELSE SeqLabC SpinOff EOL END IF LAST ProgStop? SeqLabC 'M0' EOL ELSE SeqLabC ProgStop EOL END RETURN SameToolOp1: DoEndOpPS IF LAST ProgStop? SeqLabC 'M26' CoolOff EOL SeqLabC 'M0' EOL ELSE SeqLabC IF NewToolOffset? or ChangeCS? 'M26' END IF CoolOff? AND LAST NOT CoolOff? CoolOff END EOL END RETURN SameToolOp2: {Start new Operation} DoOpComments DoPostScript CheckPass RETURN SameToolOp3: {Start new Operation} IF LAST ProgStop? SeqLabC AbsOrInc PlaneC Rapid WFOStuff StrtPos CSAngleA CSAngleB ZCP1 IF Drilling? AND RigidTap? { speed and SpinOn are output on the Drill Cycle line } ELSE SpeedC SpinOn END CoolOn EOL ELSE SeqLabC AbsOrInc PlaneC Rapid WFOStuff StrtPos CSAngleA CSAngleB IF NewToolOffset? OR ChangeCS? ZCP1 END IF Drilling? AND RigidTap? { speed and SpinOn are output on the Drill Cycle line } ELSE SpeedC END IF NOT CoolOff? AND LAST CoolOff? CoolOn END EOL END RETURN EndProgram2: DoEndOpPS IF FIRST ToolChangeAtHome? {added FIRST modifier} SeqLabC Rapid FirstHome SpinOff EOL ELSE SeqLabC SpinOff EOL END IF Equal? CSOffsetA# Num#('0') AND Equal? CSOffsetB# Num#('0') ELSE SeqLabC IF AAxisAvail? 'A0' END IF BAxisAvail? 'B0' END EOL END IF ProgStop? SeqLabC 'M0' EOL END RETURN EndProgram3: SeqLabC 'M61' EOL SeqLabC EOP EOL CloseSub Post2 {organize Subs into one program} IF UseComments? SetScale('1') {restore scale for comments} IF FileBytesComment? SeqLabC '( FILE LENGTH: ' FileBytes# ' CHARACTERS )' EOL END IF FileFeetComment? SeqLabC '( FILE LENGTH: ' FileFeet# ' FEET )' EOL END IF FileMetersComment? SeqLabC '( FILE LENGTH: ' FileMeters# ' METERS )' EOL END END EOR EOL Close Retag RETURN MPallTools1P: {Multiple Parts, All Tools 1 Part} EachOp {Start of post processing} IF FirstOperation? InitOp OpenMP BeginTool1 BeginTool2 ELSE IF NewTool? EndTool1 EndTool2 {to tool change, CS problem} SubCSMP BeginTool1 BeginTool2 ELSE {implied SameTool?} SameToolOp1 SubCSMP SameToolOp2 SameToolOp3 END END {common point for all operations} OpGuts NextOp {loops back to EachOP until last Operation} EndTool1 {End of program} EndProgram2 CloseMP EndProgram3 RETURN MP1ToollAllPfu: {Multiple Parts, 1 Tool all Parts, full up} EachOp {Start of post processing} IF FirstOperation? InitOp BeginTool1 OpenMP BeginTool2 ELSE IF NewTool? EndTool1 CloseMP EndTool2 {to tool change, CS problem} BeginTool1 OpenMP BeginTool2 ELSE {implied SameTool?} SameToolOp1 SubCSMP SameToolOp2 SameToolOp3 END END {common point for all operations} OpGuts NextOp {loops back to EachOP until last Operation} EndTool1 {End of program} CloseMP EndProgram2 EndProgram3 RETURN MP1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane} EachOp {Start of post processing} IF FirstOperation? InitOp BeginTool1 OpenMP BeginTool2 ELSE IF NewTool? CloseMP EndTool1 EndTool2 {to tool change, CS problem} BeginTool1 OpenMP BeginTool2 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} EndTool1 EndProgram2 EndProgram3 RETURN NoMPs: {no multiple parts} EachOp {Start of post processing} IF FirstOperation? InitOp BeginTool1 BeginTool2 ELSE IF NewTool? EndTool1 EndTool2 BeginTool1 BeginTool2 ELSE {implied SameTool?} SameToolOp1 SameToolOp2 SameToolOp3 END END {common point for all operations} OpGuts NextOp {loops back to EachOP until last Operation} EndTool1 {End of program} EndProgram2 EndProgram3 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

Wyszukiwarka