{4/25/89 Copied & Modified; Fanuc 10T-MS [-] L001.58, for Brunswick. Machine is a Cincinnati Series 208 Turning Center, Acramatic 850TC Jim Radcliffe}
{7/24/90, Added InitProg globally to posts with this remark, DWB} {5/17/91, Updated Cincinnati Acr 850TC L102.56 to .81 format, JR}
{08/06/91 Updated: Cincinnati Acr 850TC L102.81 For: Gibbs & Associates Updated to Version 4.0 per Fanuc 6M M001.82 Format. Kim Michelman}
{08/06/91 Using "Reference Rewind Stop" characters (:) unstead of SeqLab (N) at beginning of operations. Changed the startup code per the manual, ':' Program# Rapid Plane 'G62G70' AbsOrInc 'G95' Home GearRange EOL. Added the GetSpinOn sub to differentiate the 'M13' from 'M03' and 'M14' from 'M04'. The GetSpinOn replaced the SpinOn command throughout the processor. Added the missing NextOp at the end of the prog. Put the EOP on the same line as the FirstHome, per the manual. Deleted the ProgStop and the Untool ToolChng from the end of the prog. Kim Michelman}
{Prog Numeric Format Definitions *******************************************}
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# ': ' ToolSize$ ' ' ToolType$ ' )' EOL END IF ToolComment? '(MSG, ' ToolComment$ ' )' EOL END IF Metric? {CAM file is in Metric, tools and tool path} SetScale('.03937007874') { change to English, this is an English post} END END RETURN
Approach: { NOT FOR TAILSTOCK, .82 } IF ApproachOD? SeqC Rapid XCP AppMove EOL ODApproachSP ELSE IF ApproachID? SeqC Rapid XOpCD AppMove EOL IDApproachSP ELSE {ApproachFace} SeqC Rapid StockOnNoCan XSP StockOff AppMove EOL FaceApproachSP END END RETURN
GetSpinOn: IF CWSpindle? IF CoolOff? 'M03' ELSE 'M13' END ELSE IF CoolOff? 'M04' ELSE 'M14' END END RETURN
CheckOffset: DoEndOpPS IF LAST ProgStop? SeqC 'M00' EOL ELSE IF NewGear? SeqC SpinOff EOL ELSE IF CoolOff? AND LAST NOT CoolOff? SeqC CoolOff EOL END END END IF NewToolOffset? SeqC 'H00' EOL SeqC 'H' LatheOffset EOL END IF NewGear? SeqC GearRange EOL END IF ConstantSurfaceFeed? IF LAST ConstantSurfaceFeed? SeqC SpeedC EOL ELSE SeqC Preset MaxRPM EOL {set in main after StrtPos} END ELSE IF LAST ConstantSurfaceFeed? SeqC CSSOff 'G97' Speed EOL ELSE SeqC SpeedC EOL END END IF LAST ProgStop? SeqC GetSpinOn EOL ELSE IF NewGear? SeqC GetSpinOn EOL ELSE IF NOT CoolOff? AND LAST CoolOff? SeqC CoolOn EOL END END END DoPostScript RETURN
FormatArc: IF ArcCW? CWArcC ELSE CCWArcC END MoveXC MoveZC IF ArcIJFormat? ArcIJC ELSE ArcRC END RETURN
ToolPath: EACHFeat GetToolTip IF LastFeat? AND Drilling? IF Dwell? SeqC 'G04F' Dwell# EOL END END IF PointFeat? SeqC MoveSXYC EOL ELSE IF RapidFeat? SeqC RapidC MoveXC MoveZC EOL ELSE IF LineFeat? SeqC FeedC MoveXC MoveZC FeedRateC EOL ELSE IF ArcFeat? EACHQuadrant { Do not use NOT, LAST, FIRST or NEXT modifiers in this loop } SeqC FormatArc FeedRateC EOL NEXTQuadrant ELSE IF ThreadFeat? SeqC 'G33' MoveXC MoveZC ThrdLead EOL Rapid END END END END END NEXTFeat RETURN
CheckRapid: IF LAST CannedCycle? Rapid ELSE RapidC END RETURN
{Start of executable Prog **************************************************}
{setup and initializations} InitProg SetAbs PosSideLathe 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: must be all capital letters when typed in.' 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 END EACHOp TagInc GetLCycle IF FirstOperation? SetHome ':' Program# Rapid Plane 'G62G70' AbsOrInc 'G95' Home GearRange EOL IF UseComments? IF ProgramNameComment? '(MSG, ' ProgramName$ ' )' EOL END IF ProgramComment? '(MSG, ' ProgramComment$ ' )' EOL END IF FormatNameComment? '(MSG, FORMAT: ' FormatName$ ' )' EOL END IF MovesComment? '( OUTPUT IN ABSOLUTE INCHES )' EOL END IF TimeComment? '(MSG, ' Date$ ' AT ' Time$ ' )' EOL END END IF Metric? {CAM file is in Metric, tools and tool path} SetScale('.03937007874') { change to English, this is an English post} END OpenSub StockOff {.71.2} DoOpComments DoPostScript IF ConstantSurfaceFeed? SeqC Preset MaxRPM EOL SeqC CSSOff 'G97' CalcRPM1 ELSE SeqC CSSOff 'G97' Speed END OpToolID ToolChng GetSpinOn EOL Approach ELSE IF NewTool? StockOff {.62} CheckRapid IF LAST ApproachOD? SeqC XCPC EOL ELSE IF LAST ApproachID? SeqC LAST XOpECDC EOL END END SeqC ZCPC EOL SeqC ZCPC EOL DoEndOpPS IF LAST ConstantSurfaceFeed? SeqC CSSOff 'G97' CalcRPM2 EOL END SeqC NewHome 'H00' EOL IF LAST ProgStop? SeqC 'M00' EOL ELSE SeqC ProgStop IF NewGear? SpinOff END EOL END
{Start new Operation}
DoOpComments DoPostScript NewProg ':' Program# Rapid Plane 'G62G70' AbsOrInc 'G95' Home GearRange EOL IF ConstantSurfaceFeed? SeqC Preset MaxRPM EOL SeqC CSSOff 'G97' CalcRPM1 ELSE SeqC CSSOff 'G97' Speed END OpToolID ToolChng GetSpinOn EOL Approach ELSE IF SameTool? {.62}
{Start new Operation}
DoOpComments StockOff IF LAST StraightConnect? CheckOffset CheckRapid SeqC StockOnNoCan XSPC ZSPC EOL ELSE CheckRapid IF ApproachOD? IF LAST ApproachOD? SeqC LAST XOpECDC EOL ELSE {around} IF LAST ApproachID? SeqC LAST XOpECDC EOL END SeqC ZCPC EOL SeqC XCPC EOL END CheckOffset ODApproachSP ELSE IF ApproachID? IF LAST ApproachID? SeqC LAST XOpECDC EOL ELSE IF LAST ApproachOD? {around} SeqC XCPC EOL END SeqC ZCPC EOL SeqC XOpCDC EOL END CheckOffset IDApproachSP ELSE {ApproachFace} IF LAST ApproachFace? SeqC LAST ZOpECPC EOL ELSE IF LAST ApproachOD? {around} SeqC XCPC EOL ELSE {LAST ApproachID} SeqC LAST XOpECDC EOL END SeqC ZCPC EOL END CheckOffset FaceApproachSP END END END END END END {common point for all operations} IF ConstantSurfaceFeed? IF SameTool? IF LAST NOT ConstantSurfaceFeed? SeqC CSSOn 'G96R' StartPosX# Speed EOL END ELSE SeqC CSSOn 'G96R' StartPosX# Speed EOL END END IF CannedCycle? StockOff IF Roughing? IF RoughContour? SetPass2 SeqC Feed Feedrate EOL SeqC '(BAR,' IF ApproachFace? 'H1' END IF NOT AutoFinish? 'C1' END CutDepth XStkLeft ZStkLeft XSP ZSP ')' EOL SeqC Feed XSP ZSP FeedRate EOL ToolPath SeqC '(ENC)' EOL ELSE IF RoughPatternShift? SetPass2 SeqC Feed Feedrate EOL SeqC '(CPY,' IF ApproachFace? 'H1' END IF NOT AutoFinish? 'C1' END IF ApproachFace? 'D' ZCutDepth# ELSE 'D' XCutDepth# END XStkLeft ZStkLeft XSP ZSP ')' EOL SeqC Feed XSP ZSP FeedRate EOL ToolPath SeqC '(ENC)' EOL END END ELSE IF Threading? SeqC 'G63' EOL {radius programming code, using for lack of ComPost commands} SeqC XatFinZ ThrdHeight EOL {major diameter.} IF SingleEdgeCut? SeqC '(THD,' CutDepth ToolAngle 'R' CycleStartXRadius# XatFinZ ZSP ')' EOL ELSE SeqC '(THD,' CutDepth 'A0' 'R' CycleStartXRadius# XatFinZ ZSP ')' EOL END SeqC LCycle IF Chamfer? ThrdHeight {move to major diameter. force auto 45Ą pullout} END FinZ ThrdLead EOL SeqC '(ENC)' EOL IF AutoFinish? SeqC Rapid XatFinZ ZSP EOL SeqC LCycle IF Chamfer? ThrdHeight {move to major diameter. force auto 45Ą pullout} END FinZ ThrdLead EOL SeqC RapidC 'X' CycleStartXRadius# EOL SeqC ZCSP EOL END SeqC 'G62' EOL {set back to diameter programming} ELSE IF Drilling? SeqC LCycle ZDepth RLevel Dwell Peck Retract FeedRate EOL SeqC DrillOff EOL IF AutoFinish? SeqC Feed ZDepth EOL SeqC RLevel EOL END ELSE IF Grooving? Seq StrtPos EOL ToolPath END END END END ELSE StockOn SetPass1 ToolPath IF AutoFinish? AND NOT Drilling? StockOff IF Turning? SetPass1 ELSE SetPass2 END SeqC RapidC StrtPos EOL ToolPath END END NextOp {loops back to EachOP until last Operation}
{End of program ************************************************************}
{finish last operation} StockOff IF CannedCycle? Rapid ELSE RapidC END IF ApproachOD? SeqC XCPC EOL ELSE IF ApproachID? SeqC XOpECDC EOL END END SeqC ZCPC EOL DoEndOpPS SeqC CoolOff EOL SeqC RapidC FirstHome 'H00' EOP EOL Post Close IF UseComments? Reopen SetScale('1') 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