{8/7/89 Copied & modified: G & L 800 L111.55 For: BGA. Made minor format changes. JR}
{7/24/90, Added InitProg globally to posts with this remark, DWB}
{4/2/91 Modified: G & L 800 (BGA) L112.57 For: Gibbs & Associates Updated to Version 4.0 per Fanuc 10T MS [-] L001.80 Format. Only Canned Cycle supported is Tapping. NOTE: The Canned Tapping Cycle outputs 'E' FeedTapIPR#('.9'). The argument seems to be a bug, I don't understand it. DWB}
{08/07/91 Updated: G & L 800 (BGA) L112.80 For: Gibbs & Associates Updated to Version 4.0 per Fanuc 6M M001.82 Format. Kim Michelman}
{3/17/94 Modified: G & L 800 (BGA) L112.82 For: BGA Modified FormatArc to output unconditional IJ. Minor changes to reflect .82 format per Fanuc 10T MS [-] L001.82ż NOTE: Only Prog difference between this and the L114 is the L114 has ReverseXZArcs! Jim Radcliffe}
{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
DoOpComments: IF UseComments? SetScale('1') IF OperationIDComment? '( OPERATION ' Operation# ': ' OperationType$ ' )' EOL END IF OperationComment? '( ' OperationComment$ ' )' EOL END IF WorkGroupComment? '( ' WorkGroupComment$ ' )' EOL END IF ToolTypeComment? '( TOOL ' Tool# ': ' ToolSize$ ' ' ToolType$ ' )' EOL END IF ToolComment? '( ' ToolComment$ ' )' EOL END RestoreScale END RETURN
IDApproachSP: SeqC StockOnNoCan ZSPC EOL SeqC StockOff XOpCDC EOL { for SameTool ApproachID } IF NotEqual? CycleStartX# XOpCD# SeqC Feed StockOnNoCan XSPC CheckFeedRate EOL END RETURN
FaceApproachSP: SeqC StockOnNoCan XSPC EOL { for SameTool ApproachFace } SeqC StockOff ZOpCPC EOL IF NotEqual? CycleStartZ# ZOpCP# SeqC Feed StockOnNoCan ZSPC CheckFeedRate EOL END RETURN
AppMove: StockOff ZCP StartInfo RETURN
Approach: { NOT FOR TAILSTOCK, .82 } IF ApproachOD? SeqC Rapid StockOff XCP AppMove EOL ODApproachSP ELSE IF ApproachID? SeqC Rapid StockOff XOpCD AppMove EOL IDApproachSP ELSE {ApproachFace} SeqC Rapid StockOnNoCan XSP AppMove EOL FaceApproachSP END END RETURN
CheckCoolOff: IF CoolOff? AND LAST NOT CoolOff? SeqC CoolOff EOL END RETURN
CheckCSS: IF ConstantSurfaceFeed? AND LAST NOT ConstantSurfaceFeed? 'C' SpeedSFPM# MaxRPM ELSE SpeedC END RETURN
CheckSpinOn: IF LAST ProgStop? SpinOn ELSE IF NewGear? SpinOn END END RETURN
CheckCoolOn: IF LAST ProgStop? CoolOn ELSE IF NOT CoolOff? AND LAST CoolOff? CoolOn END END RETURN
CheckOffset: DoEndOpPS IF LAST ProgStop? IF NewToolOffset? IF NewGear? SeqC 'H00M00' SpinOff EOL SeqC GearRange EOL ELSE SeqC 'H00M00' EOL END CheckCoolOff SeqC CheckCSS 'H' ToolOffset# CheckSpinOn CheckCoolOn EOL ELSE IF NewGear? SeqC 'M00' SpinOff EOL SeqC GearRange EOL ELSE SeqC 'M00' EOL END CheckCoolOff SeqC CheckCSS CheckSpinOn CheckCoolOn EOL END ELSE IF NewToolOffset? IF NewGear? SeqC 'H00' SpinOff EOL SeqC GearRange EOL ELSE SeqC 'H00' EOL END CheckCoolOff SeqC CheckCSS 'H' ToolOffset# CheckSpinOn CheckCoolOn EOL ELSE IF NewGear? SeqC SpinOff EOL SeqC GearRange EOL END CheckCoolOff SeqC CheckCSS CheckSpinOn CheckCoolOn EOL END END DoPostScript RETURN
FormatArc: IF ArcCW? CWArcC ELSE CCWArcC END MoveXC MoveZC IF ArcIJFormat? ArcIJ ELSE ArcRC END RETURN
ToolPath: EACHFeat GetToolTip IF LastFeat? IF Drilling? IF Tap? SeqC SpinOff EOL SeqC 'G04F20' EOL SeqC Speed InverseSpinOn EOL ELSE IF Dwell? SeqC 'G04F' Dwell# EOL END END 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
{Start of executable Prog **************************************************}
{setup and initializations} InitProg PosSideLathe XsAreRadii SetMaxRPM('2000') 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 {Start of post processing *********************} GetLCycle IF FirstOperation? EOR EOL IF UseComments? IF ProgramNameComment? '( ' ProgramName$ ' )' EOL END 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 END RestoreScale OpenSub StockOff {.71.2} SetHome DoOpComments DoPostScript Plane Seq AbsOrInc Rapid Home 'H00' GearRange EOL Approach ELSE IF NewTool?
{Finish off last Operation}
StockOff {.62} RapidC IF LAST ApproachOD? SeqC XCPC EOL ELSE IF LAST ApproachID? SeqC LAST XOpECDC EOL END END SeqC ZCPC EOL DoEndOpPS SeqC NewHome 'H00' IF LAST ProgStop? 'M00' ELSE ProgStop END IF NewGear? SpinOff END ASCII('13') EOL
DoOpComments StockOff IF LAST StraightConnect? CheckOffset SeqC RapidC StockOnNoCan XSPC ZSPC EOL ELSE RapidC 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 CannedCycle? StockOff IF Drilling? IF Tap? SeqC LCycle ZDepth 'K' CycleStartZ# 'R' CycleStartZ# 'E' FeedTapIPR#('.9') EOL END END ELSE StockOn SetPass1 ToolPath IF AutoFinish? IF NOT Drilling? AND NOT Grooving? AND NOT RoughSimple? StockOff IF Turning? SetPass1 RapidC IF ApproachFace? SeqLabC ZOpECPC EOL FaceApproachSP ELSE SeqLabC XOpECDC EOL IF ApproachOD? ODApproachSP ELSE {ApproachID} IDApproachSP END END ELSE SetPass2 SeqC RapidC StrtPos EOL END ToolPath END END END IF Drilling? AND Tap? AND NOT CannedCycle? SeqC SpinOff EOL SeqC 'G04F20' EOL SeqC Speed SpinOn EOL END NextOp {loops back to EachOP until last Operation}
{End of program ************************************************************}
{finish last operation} StockOff RapidC IF ApproachOD? SeqC XCPC EOL ELSE IF ApproachID? SeqC XOpECDC EOL END END SeqC ZCPC EOL DoEndOpPS IF ProgStop? SeqC FirstHome 'H00M00' EOL SeqC EOP EOL ELSE SeqC FirstHome 'H00' EOP EOL END Post 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