{9/23/88 Copied & modified: Okuma OSP 3000-LB20 For: Mike Kenney Modified Form and Prog for Non-Decimal Leading Zero Suppression. Added literal 'M44' on SpinOn line at FirstOperation and NewTool. }
{9/15/89, added PostScript to Okuma OSP 3000 LC10 L069.56, JR} {7/24/90, Added InitProg globally to posts with this remark, DWB}
{4/2/91 Modified: Okuma OSP 3000 LC10 L069.58 For: Gibbs & Associates Updated to Version 4.0 per Fanuc 10T MS [-] L001.80 Format. SimpleRough Canned Cycle not supported. DWB}
{8/7/91 Updated: Okuma OSP 3000 LC10 L069.80 For: Gibbs & Associates Updated per Fanuc 10T MS [-] L001.81 Format. KM}
{8/14/92 Updated: Okuma OSP 3000 LC10 L069.82 For: OPW Eng Services Updated per Fanuc 10T MS [-] L001.82 Format. Added Canned Taper Threading Cycle Support. Changed ' G32' to ' G34' at ToolPath ThreadFeat. Added XTapAtZ at ToolPath ThreadFeat. DWB}
{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
StockOnNoCan: IF NOT CannedCycle? StockOn {need stock for SP positioning, if not a canned cycle} END RETURN
ODApproachSP: SeqC StockOnNoCan ZSPC EOL SeqC StockOff XOpCDC EOL StockOnNoCan IF NotEqual? CycleStartX# XOpCD# SeqC Feed XSPC CheckFeedRate EOL ELSE RapidF# { No Output - Forces FeedRate in ToolPath } END RETURN
IDApproachSP: SeqC StockOnNoCan ZSPC EOL SeqC StockOff XOpCDC EOL { for SameTool ApproachID } StockOnNoCan IF NotEqual? CycleStartX# XOpCD# SeqC Feed XSPC CheckFeedRate EOL ELSE RapidF# { No Output - Forces FeedRate in ToolPath } END RETURN
FaceApproachSP: SeqC StockOnNoCan XSPC EOL { for SameTool ApproachFace } SeqC StockOff ZOpCPC EOL StockOnNoCan IF NotEqual? CycleStartZ# ZOpCP# SeqC Feed ZSPC CheckFeedRate EOL ELSE RapidF# { No Output - Forces FeedRate in ToolPath } END RETURN
AppMove: ZCP RETURN
Approach: { NOT FOR TAILSTOCK, .82 } IF ApproachOD? SeqC XCP AppMove EOL ODApproachSP ELSE IF ApproachID? SeqC XOpCD AppMove EOL IDApproachSP ELSE {ApproachFace} SeqC StockOnNoCan XSP StockOff AppMove EOL FaceApproachSP END END RETURN
CheckOffset: DoEndOpPS IF LAST ProgStop? SeqC ' M0' EOL ELSE IF CoolOff? AND LAST NOT CoolOff? SeqC CoolOff EOL END END IF NewToolOffset? SeqC OpToolID LatheOffset EOL END IF ConstantSurfaceFeed? IF LAST ConstantSurfaceFeed? IF NotEqual? MaxRPM# LAST MaxRPM# SeqC Preset MaxRPM EOL END ELSE SeqC Preset MaxRPM EOL SeqC CSSOn ' G96' Speed END ELSE IF LAST ConstantSurfaceFeed? SeqC CSSOff ' G97' Speed END END IF LAST ProgStop? SeqC SpeedC SpinOn CoolOn EOL ELSE SeqC SpeedC EOL IF NOT CoolOff? AND LAST CoolOff? SeqC CoolOn EOL 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? IF Drilling? IF Tap? SeqC SpinOff EOL SeqC ' G4 F200' EOL SeqC Speed InverseSpinOn EOL ELSE IF Dwell? SeqC ' G4 F' 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 ' G34' MoveXC MoveZC XTapAtZ ThrdLead EOL Rapid END END END END END NEXTFeat RETURN
CheckRapid: IF LAST CannedCycle? IF LAST Threading? AND LAST Taper? ELSE Rapid END ELSE RapidC END RETURN
{Start of executable Prog **************************************************}
{setup and initializations} InitProg PosSideLathe StandardXZArcs 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 {Start of post processing *********************} GetLCycle IF FirstOperation? EOR EOL IF UseComments? IF ProgramNameComment? '( PROGRAM: ' 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 EOL IF ConstantSurfaceFeed? SeqC Preset MaxRPM EOL END SeqC Rapid CSSOff ' G97' IF ConstantSurfaceFeed? CalcRPM1 ELSE Speed END OpToolID LatheOffset SpinOn CoolOn ' M44' FeedRate EOL Approach ELSE IF NewTool?
{Finish off last Operation}
StockOff {.62} CheckRapid IF LAST ApproachOD? SeqC XCPC EOL ELSE IF LAST ApproachID? SeqC LAST XOpECDC EOL END END SeqC ZCPC EOL DoEndOpPS IF LAST ConstantSurfaceFeed? SeqC CSSOff ' G97' CalcRPM2 EOL END SeqC NewHome IF LAST ProgStop? ' M0' ELSE ProgStop END EOL
{Start new Operation}
DoOpComments DoPostScript Seq IF ConstantSurfaceFeed? SeqC Preset MaxRPM EOL END SeqC Rapid CSSOff ' G97' IF ConstantSurfaceFeed? CalcRPM1 ELSE Speed END OpToolID LatheOffset SpinOn CoolOn ' M44' FeedRate EOL Approach ELSE IF SameTool? {.62}
{Start new Operation}
StockOff DoOpComments 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? AND NOT SameTool? SeqC CSSOn ' G96' Speed EOL END IF CannedCycle? StockOff IF Roughing? IF RoughContour? SetPass2 SeqC LCycle EOL IF ApproachFace? SeqC ' G82' EOL END SeqC StepMove CutDepth XStkLeft ZStkLeft EOL SeqC StrtPos EOL ToolPath SeqC ' G80' EOL SeqC Rapid XCSPC ZCSPC EOL IF AutoFinish? SeqC RapidC XSPC ZSPC EOL ToolPath SeqC RapidC XCSPC ZCSPC EOL END ELSE IF RoughPatternShift? SetPass2 SeqC LCycle EOL IF ApproachFace? SeqC ' G82' EOL END SeqC Rapid IF ApproachFace? ZminusW ELSE XminusU END XStkLeft ZStkLeft EOL SeqC StrtPos EOL ToolPath SeqC ' G80' EOL SeqC Rapid XCSPC ZCSPC EOL IF AutoFinish? SeqC RapidC XSPC ZSPC EOL ToolPath SeqC RapidC XCSPC ZCSPC EOL END END END ELSE IF Threading? IF Chamfer? SeqC ' M23' EOL END IF Taper? IF ConstantVolumeCut? SeqC LCycle EOL SeqC CutDepth 'E' DiaDistanceToThread# EOL END ToolPath IF AutoFinish? SeqC RapidC ' X' ADD# FinishXDia# MUL# Taper# Num#('2') EOL SeqC ' G34' XatFinZ FinZ XTapAtZ ThrdLead EOL SeqC Rapid XCSP EOL SeqC ZCSP EOL END IF ConstantVolumeCut? SeqC ' G80' EOL END ELSE IF ConstantVolumeCut? SeqC LCycle EOL SeqC CutDepth 'E' DiaDistanceToThread# EOL SeqC ' G33' XatFinZ FinZ XTapAtZ ThrdLead EOL SeqC ' G80' EOL SeqC Rapid XCSPC EOL SeqC ZCSPC EOL IF AutoFinish? SeqC ' G33' XatFinZ FinZ XTapAtZ ThrdLead EOL END ELSE SeqC ' G33 X' FirstMoveEPX# FinZ XTapAtZ ThrdLead EOL SimpleRough SeqC XatFinZ EOL IF AutoFinish? SeqC XatFinZ EOL END END END IF Chamfer? SeqC ' M22' EOL END ELSE IF Drilling? IF Tap? SeqC LCycle ZDepth ' F' FeedIPR# EOL SeqC SpinOff EOL SeqC ' G4 F200' EOL SeqC Speed InverseSpinOn EOL SeqC ZSP EOL ELSE IF PeckChipBreaker? SeqC LCycle EOL SeqC ' G82' EOL SeqC Peck ' E0.' EOL SeqC Feed ZDepth FeedRate EOL SeqC DrillOff EOL SeqC Rapid ZSP EOL IF AutoFinish? SeqC Feed ZDepth EOL IF Dwell? SeqC ' G4 F' Dwell# EOL END SeqC Rapid ZSP EOL END END END END END END ELSE StockOn SetPass1 ToolPath IF AutoFinish? IF NOT Drilling? AND NOT Grooving? AND NOT RoughSimple? StockOff IF Turning? SetPass1 ELSE SetPass2 END SeqC RapidC StrtPos EOL ToolPath END END END IF Drilling? AND Tap? SeqC SpinOff EOL SeqC ' G4 F200' EOL SeqC Speed SpinOn EOL END NextOp {loops back to EachOP until last Operation}
{End of program ************************************************************}
{finish last operation} StockOff IF CannedCycle? IF Threading? AND Taper? ELSE Rapid END ELSE RapidC END IF ApproachOD? SeqC XCPC EOL ELSE IF ApproachID? SeqC XOpECDC EOL END END SeqC ZCPC EOL DoEndOpPS SeqC CoolOff EOL IF ConstantSurfaceFeed? SeqC CSSOff ' G97 S' CalcEPRPM# EOL END SeqC FirstHome IF ProgStop? ' M0' END EOL SeqC EOP EOL 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