{7/24/90, Added InitProg globally to posts with this remark, DWB}
{1/6/89 Modified Cincinnati 900 V2 M029.54 for Northwest Machining. Changed OfstOn to ZCP1. Added StrtPos to OpenMP. Jim Radcliffe}
{11/9/90, Updated: Cincinnati 900V2 M029.56 to .76.1 format, JR}
{4/03/91 Modified: Cincinnati 900V2 M029.76.1 For: Gibbs & Associates Updated to Version 4.0 per Fanuc 6M M001.80 Format. DWB}
{12/14/93 Modified: Cincinnati 900V2 M029.79 For: Northwest Modified FormatArc to output unconditional G02/G03 and IJK info. Added missing DoOpComment calls in FirstOp and NewTool. Deleted PeckManual command and added Manual Peck routine. Minor uptated stuff per Fanuc 6M M001.81.2 Jim Radcliffe}
{6/27/95 Initial: Cincinnati 900V2 M029.81.3 ForUser: CKC Control: Acramatic 900 Machine: Cincinnati 10V-2000 Comment: New Processor per marked up readout and conversation with Phil Keisel and Tommy Deleted program ID line from beginning of program. Added 'MSG,' to all comments Tool handling (This is a manual tool change machine): Deleted OpToolID and ToolChng Using M00 to stop program for tool change. Changed StartToolComment to read: FIRST TOOL IN SPINDLE Added TCZ# with default of 8" for retract Using WFO Offsets, H code, for tool offsets, outputting the tool number with OpToolID. Drilling: Changed RLevelCin to RLevel, he says thats the way it should be!? Skip move to ZCP1 when drilling, go directly to DrillCP They will not be using RetractToCP1. I am not supporting it in the prog. Z Depths are incremental and I added a formula to prperly handle. NOTES: They have not run into subs yet and doubt they will Work Fixture Offset code is being output with OpToolID Jim Radcliffe}
{9/7/95, Updated Cin Acr 900 [CKC] M818.81.2 to .85 format per Fanuc 6M M001.85.01.03, JR}
{1/17/96, Updated .85 to .86 version, MPK}
{3/22/96, Tested ZOnlyRepAutoCycle, Changed version # to .89, MPK}
{Prog Numeric Format Definitions *******************************************}
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? '(MSG, SUB NUMBER: ' Program# ' )' EOL END RETURN
DoOpComments: IF UseComments? SetScale('1') IF OperationIDComment? '(MSG, OPERATION ' Operation# ': ' OperationType$ ' )' EOL END IF OperationComment? '(MSG, ' OperationComment$ ' )' EOL END IF WorkGroupComment? '(MSG, ' WorkGroupComment$ ' )' EOL END IF ToolTypeComment? '(MSG, TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL END IF ToolComment? '(MSG, ' ToolComment$ ' )' EOL END RestoreScale END 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
FinishSub1: {part 1} SeqC CRCOffC EOL SeqC IF NOT FeedConnect? IF AutoCycle? ZCP3C ELSE IF FIFO? {.81} FeedC ZCP3C FeedEntC ELSE RapidC ZCP3C END END END EOL 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? CWArc ELSE CCWArc END MoveXYZC IF ArcIJFormat? ArcIJ ELSE ArcR END RETURN
DoLastPeck: {OldZ - Peck# ² Depth} SeqC Feed 'Z' TrackZ# SPZ# FeedEntC EOL {move to Depth} IF RetractToCP1? SeqC Rapid ZCP1 EOL {move to CP1} ELSE SeqC Rapid ZCP2 EOL {move to CP2} END RETURN
DoPeck: IF GreaterThan? SUB# Recall# Num#('1') Peck# SPZ# {IF OldZ - Peck# > Depth} Save# Num#('1') SUB# Recall# Num#('1') Peck# {Save#1 = OldZ - Peck# = NewZ} SeqC Feed 'Z' TrackZ# Recall# Num#('1') FeedEntC EOL {move to NewZ} IF PeckFullRetract? SeqC Rapid ZCP2 EOL {move to CP2} END SeqC RapidC 'Z' TrackZ# ADD# Recall# Num#('1') Retract# EOL {move to RetractZ} END RETURN
ToolPath: EACHFeat IF PointFeat? IF AutoCycle? SeqC MoveSXYC EOL SeqC '(CLS,I' ProgNum ')' EOL CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY} ELSE SeqC DoDrillAbsOrInc MoveSXYC EOL {.80.01} END ELSE 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 EOL 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 EOL DecelMove2 END SeqC DoAbsOrInc CRCOnC FeedC MoveXYZC DecelFeed EOL ELSE IF XMove? OR YMove? OR ZMove? SeqC DoAbsOrInc CRCOnC FeedC MoveXYZC FeedRateC EOL END END END END ELSE IF ArcFeat? EACHQuadrant IF LastQuadrant? AND Decelerate? IF RoomToDecel? DecelMove1 SeqC FormatArc ArcFeedC EOL DecelMove2 END SeqC FormatArc DecelFeed EOL ELSE SeqC FormatArc ArcFeedC EOL END NEXTQuadrant END END END END NEXTFeat RestoreAbsOrInc RETURN
WFOStuff: { Not used in this processor. Using the H code for tool length offset } IF NewWFO? IF MultipleParts? '*** WARNING *** DO NOT USE NEWWFO() WITH NCPOST MULTIPLE PARTS' EOL ELSE SeqC 'H' NewWFO# EOL END ELSE IF NOT SameTool? IF NeedWFO1? SeqC 'H' NewWFO# EOL END END 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 '(CLS,I' ProgNum ')' EOL NextCycle SetStatusOn AutoCycCutSub1 {build element sub} AutoCycCutSub2 {.69, removed FinishSub1} IF FeedConnect? {there is no Z up in the sub, .69} IF FIFO? {.81} SeqC Feed ZCP2 FeedEnt EOL {.69} ELSE SeqC Rapid ZCP2 EOL {.69} END END {.69} SeqC EndSub EOL EOR EOL CloseSub {Element shift, not pattern} RETURN
ZonlyRep: EachCycle IF NOT FirstCycle? SeqC Connect StrtPos EOL {.71.2, added Connect} END IF FeedConnect? SeqC FeedC ZInPlusInc FeedEnt EOL {.71.2, changed to FeedC} ELSE {Entry/Exit Connect} IF FeedEntry? IF NOT FirstCycle? SeqC RapidC ZCP2PlusIncC EOL {can't call for cycle =1} {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better} END SeqC Feed ZInPlusInc FeedEnt EOL ELSE SeqC RapidC ZInPlusInc EOL {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better} END END SeqC '(CLS,I' ProgNum ')' EOL NextCycle StartSub TrackZNO# FIRST SPZ# ToolPath FinishSub1 SeqC EndSub EOL EOR 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
{Start of executable Prog **************************************************}
{setup and initializations} InitProg ReverseXZArcs InitWFONum SetFlood UseSeparateSubCalls SetMaxSeparateSubCalls('50') {?} SetMaxRPM('10000') {?} SetMaxFeed('500') {?} SetTCZ('8') SetFlagF('1') { Milling ZShiftOnly SepSubs } 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 EachOp {Start of post processing *********************} IF FirstOperation? EOR EOL IF ToolChangeAtHome? SetHome END IF UseComments? IF ProgramNameComment? '(MSG, ' ProgramName$ ' )' EOL END IF ProgramComment? '(MSG, ' ProgramComment$ ' )' EOL END IF FormatNameComment? '(MSG, FORMAT: ' FormatName$ ' )' EOL END IF TimeComment? '(MSG, ' Date$ ' AT ' Time$ ' )' EOL END IF MovesComment? '(MSG, OUTPUT IN ' MoveType$ ' INCHES )' EOL END IF PartsComment? '(MSG, PARTS PROGRAMMED: ' Parts# ' )' EOL END IF StartToolComment? '(MSG, FIRST TOOL IN SPINDLE )' EOL END END OpenSub RestoreScale IF MultipleParts? AND AllToolsOnePart? OpenMP END Plane DoOpComments SeqC AbsOrInc EOL DoPostScript SeqC OpToolID EOL SeqC Speed SpinOn EOL IF MultipleParts? AND OneToolAllParts? AND FullUp? OpenMP END CheckPass SeqC Rapid StrtPos EOL IF NOT Drilling? SeqC ZCP1 EOL END SeqC CoolOn EOL IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? OpenMP SeqC Rapid StrtPos EOL END ELSE IF NewTool? IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? CloseMP END SeqC CoolOff EOL SeqC 'Z' TCZ# EOL IF MultipleParts? AND OneToolAllParts? AND FullUp? CloseMP END DoEndOpPS SeqC 'M00' EOL
{Start new Operation}
Plane DoOpComments SeqC AbsOrInc EOL DoPostScript SeqC OpToolID EOL SeqC Speed SpinOn EOL IF MultipleParts? AND OneToolAllParts? AND FullUp? OpenMP END CheckPass SeqC Rapid StrtPos EOL IF NOT Drilling? SeqC ZCP1 EOL END SeqC CoolOn EOL IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? OpenMP SeqC Rapid StrtPos EOL END ELSE IF SameTool? DoEndOpPS IF LAST ProgStop? SeqC CoolOff EOL SeqC 'Z' TCZ# EOL SeqC 'M00' EOL
{Start new Operation}
GetStartOfSameTool SeqC PlaneC Rapid StrtPos SpeedC SpinOn EOL IF NOT Drilling? SeqC ZCP1 EOL END SeqC CoolOn EOL ELSE IF CoolOff? AND LAST NOT CoolOff? SeqC CoolOff EOL END
{Start new Operation}
GetStartOfSameTool SeqC PlaneC Rapid StrtPos SpeedC EOL IF NOT CoolOff? AND LAST CoolOff? SeqC CoolOn EOL END END END END END {common point for all operations} IF Milling? SeqC ZCP2 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') { Milling ZShiftOnly SepSubs } ZonlyRep SetFlagF('1') 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? {.81} SeqC FeedC CRCOffC EOL SeqC ZCP3C FeedEntC EOL ELSE SeqC CRCOffC EOL SeqC RapidC ZCP3C EOL END END ELSE IF Drilling? IF Repeats? NewProg StdSub SeqC Rapid StrtPos EOL END IF Peck? DrillPath ELSE SeqC ZCP2 EOL GetCycle SeqC Cycle StrtPos 'Z' SUB# ZDepth# ClearancePlane2# {calculate incremental depth} RLevel Dwell Peck Retract FeedEnt EOL IF CallMasterOp? SeqC '(CLS,I' CallMasterNum# ')' EOL SkipToLastFeat ELSE TrackZNO# FIRST SPZ# IF MasterOp? SetFlag('1') {std sep sub Zreps in effect} NewMasterProg SeqC '(CLS,I' ProgNum ')' EOL StartSub ToolPath SeqC EndSub EOL EOR EOL CloseSub SetFlagF('1') {not std sep sub Zreps in effect} ELSE ToolPath END END SetDrillEndOpZ SeqC 'G80' EOL SeqC Rapid ZCP3 EOL END IF Repeats? FinishSubG92 END SeqC RapidC ZCP3C EOL END END NEXTOp IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? CloseMP END SeqC CoolOff EOL SeqC 'Z' TCZ# EOL IF MultipleParts? AND OneToolAllParts? AND FullUp? CloseMP END DoEndOpPS IF MultipleParts? AND AllToolsOnePart? SeqC 'M00' EOL CloseMP END SeqC EOP EOL EOR EOL Post Close IF UseComments? SetScale('1') {restore scale for comments} Reopen IF FileBytesComment? '(MSG, FILE LENGTH: ' FileBytes# ' CHARACTERS )' EOL END IF FileFeetComment? '(MSG, FILE LENGTH: ' FileFeet# ' FEET )' EOL END IF FileMetersComment? '(MSG, FILE LENGTH: ' FileMeters# ' METERS )' EOL END Close END