{8/3/90 Copied & modified: Allen Bradley Hard L019.70 For: Quality Machine Machine: Allen Bradley Control: Hardinge Modified formats to leading zeros. Deleted all occurances of G94's, G95's and F190's. Added 'G99' followed by 'G00X00Z00' just before each Preset. Replaced Speed with GearRange SpeedRPM#/SpeedSFPM# Added GearRange to Form. Moved OpToolID LatheOffset to before Approach call. Added G0 and G1 in prog and form. Added RapidF to prog. Modified M13 SpinOn to M3 in form. Added CoolOn and CoolOff to prog. Deleted all occurances of SeqC 'O' Speed SpinOn EOL. Moved Speed SpinOn to line after Preset MaxRPM. Removed '(TN,0001)','(CP,1)' and '(CP,2)' commands. Modified G96/G97 handeling at home. Updated to Version 3.2 per Fanuc 10T MS [-] L001.71.1 Format DWB}
{10/25/90 Added AbsOrInc per Pete's request. DWB}
{3/26/91 Modified: AB 7360 Hardinge L167.71.2 For: Quality Machine Moved AbsOrInc to beginning of operation before tool call line. Moved 'G95' at beginning of program to tool call line and added it to NewTool. Changed format T to suppress leading zeros. Changed format G & M to show leading zeros. Changed LatheOffset to ToolOffset#. Changed AbsValue to Rapid on line following 'G99'. Added Home to Preset line and moved it out of CSS discrimination. Corrected speed calls in FirstOp & NewTool. Changed format F from 1 to 2 preceding zeros. Added offset cancel at end of tools. Deleted the 'G40G0F0(THE END)' and 'G99G97' lines from the end of the program. Changed the EOP code to M30. Added SpinOff to NewTool if NewGear. Moved CoolOff to be on line with ZCPC. JR}
{6/11/91 Modified: AB 7360 Hardinge L167.71.3 For: Gibbs & Associates Updated to Version 4.0 per Fanuc 10T MS [-] L001.80 Format. Only Canned Cycles supported are SimpleRough, Threading and PeckFullRetract. DWB}
{9/7/95, Updated AB 7360 Hardinge L167.80 to .85 format per v2.20 Update Instructions .01, JR}
{02/24/99, Initial: AB 7360 Hardinge L167.85 Created: AB 7360 Hardinge [SP] Lxxx.85 For: Stanko Products
Changes to Form: 1) Default Formats - changed X and Z formats to 000^#####;0
Changes to Prog: 1) FORMATS - Changed FORMAT 2 to 000^####;0 2) FirstOp/NewTool - Modified according to Customer specifications. 3) Deleted all GearRange commands and NewGear? booleans. 4) DoRangeCode/DoRangeCodeSameTool - Added subroutines to handle Gear changes. CDH}
{Prog Numeric Format Definitions *******************************************}
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 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 ThisOpEntryXCP AppMove EOL ELSE IF ApproachID? SeqC Rapid XOpCD AppMove EOL ELSE {ApproachFace} SeqC Rapid StockOnNoCan XSP AppMove EOL END END ApproachSP RETURN
DoRangeCode: IF ConstantSurfaceFeed? IF GreaterThan? CalcRPM1# NUM#('125') 'M51' {High Range} Save# NUM#('1') NUM#('4') ELSE 'M50' Save# NUM#('1') NUM#('3') END ELSE IF GreaterThan? SpeedRPM# NUM#('125') 'M51' {High Range} Save# NUM#('1') NUM#('4') ELSE 'M50' Save# NUM#('1') NUM#('3') END END RETURN
DoRangeCodeSameTool: IF ConstantSurfaceFeed? IF GreaterThan? CalcRPM1# NUM#('125') IF NOT Equal? Recall# NUM#('1') NUM#('4') DoRangeCode END ELSE IF NOT Equal? Recall# NUM#('1') NUM#('3') DoRangeCode END END ELSE IF GreaterThan? SpeedRPM# NUM#('125') IF NOT Equal? Recall# NUM#('1') NUM#('4') DoRangeCode END ELSE IF NOT Equal? Recall# NUM#('1') NUM#('3') DoRangeCode END END END RETURN
CheckOffset: DoEndOpPS IF LAST ProgStop? SeqC 'M00' EOL ELSE IF CoolOff? AND LAST NOT CoolOff? SeqC CoolOff EOL END END SeqC IF NewToolOffset? LOfstOff '00' END EOL IF NewToolOffset? SeqC OpToolID ToolOffset# EOL END IF ConstantSurfaceFeed? IF LAST ConstantSurfaceFeed? IF NotEqual? MaxRPM# LAST MaxRPM# SeqC Preset MaxRPM EOL END SeqC DoRangeCodeSameTool CalcRPM1 ELSE SeqC CSSOn 'G96' DoRangeCodeSameTool CalcRPM1 END ELSE IF LAST ConstantSurfaceFeed? SeqC CSSOff 'G97' DoRangeCodeSameTool Speed ELSE SeqC DoRangeCodeSameTool Speed END END EOL IF LAST ProgStop? SpinOn EOL SeqC CoolOn EOL ELSE 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
CkCRC: { 4.2 } IF XMove? OR ZMove? { Approach Length Feature and Multiple Pockets } CRCOnC END IF LastFeat? AND EmptyLine? { Exit Length Feature } CRCOffC END RETURN
ToolPath: EACHFeat GetToolTip IF LastFeat? IF Drilling? IF Tap? SeqC SpinOff EOL SeqC 'G94' EOL SeqC 'G4F2' EOL SeqC 'G95' Speed InverseSpinOn EOL ELSE IF Dwell? SeqC 'G94' EOL SeqC 'G4F' Dwell# EOL SeqC 'G95' EOL END END END END IF PointFeat? SeqC MoveSXYC EOL ELSE IF RapidFeat? SeqC RapidC MoveXC MoveZC IF LAST ThreadFeat? RapidF ELSE RapidFC END EOL ELSE IF LineFeat? SeqC CkCRC 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
CheckRapid1: CRCOffC IF LAST CannedCycle? IF LAST Roughing? IF LAST RoughSimple? Rapid END ELSE IF LAST Threading? IF LAST NOT AutoFinish? Rapid END ELSE IF LAST Drilling? IF LAST PeckFullRetract? IF LAST NOT AutoFinish? Rapid END END END END END ELSE RapidC END RETURN
CheckRapidF1: IF LAST CannedCycle? IF LAST Roughing? IF LAST RoughSimple? RapidF END ELSE IF LAST Threading? IF LAST NOT AutoFinish? RapidF END ELSE IF LAST Drilling? IF LAST PeckFullRetract? IF LAST NOT AutoFinish? RapidF END END END END END ELSE RapidFC END RETURN
CheckRapid2: CRCOffC IF CannedCycle? IF Roughing? IF RoughSimple? Rapid END ELSE IF Threading? IF NOT AutoFinish? Rapid END ELSE IF Drilling? IF PeckFullRetract? IF NOT AutoFinish? Rapid END END END END END ELSE RapidC END RETURN
CheckRapidF2: IF CannedCycle? IF Roughing? IF RoughSimple? RapidF END ELSE IF Threading? IF NOT AutoFinish? RapidF END ELSE IF Drilling? IF PeckFullRetract? IF NOT AutoFinish? RapidF END END END END END ELSE RapidFC END RETURN
{Start of executable Prog **************************************************}
{setup and initializations} InitProg PosSideLathe XsAreRadii SetMaxRPM('1030') 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 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} SetHome DoOpComments DoPostScript Plane SeqC Preset Home MaxRPM EOL SeqC 'G70' EOL SeqC AbsOrInc EOL SeqC 'G94' EOL SeqC 'G04F00002' OpToolID ToolOffset# 'M17' EOL SeqC 'G04F00002' DoRangeCode EOL IF ConstantSurfaceFeed? SeqC CSSOn 'G96' CalcRPM1 SpinOn EOL ELSE SeqC CSSOff 'G97' Speed SpinOn EOL END Approach ELSE IF NewTool?
{Finish off last Operation}
StockOff {.62} IF LAST ApproachOD? SeqC CheckRapid1 LAST OpExitXCPC CheckRapidF1 EOL SeqC LAST OpExitZCPC CoolOff EOL ELSE IF LAST ApproachID? SeqC CheckRapid1 LAST XOpECDC CheckRapidF1 EOL SeqC LAST OpExitZCPC CoolOff EOL ELSE IF LAST ApproachFace? SeqC CheckRapid1 LAST OpExitZCPC CheckRapidF1 CoolOff EOL END END END DoEndOpPS SeqC LOfstOff '00' EOL IF LAST ProgStop? SeqC 'M00' EOL ELSE SeqC ProgStop EOL END
StockOff DoOpComments IF LAST StraightConnect? CheckOffset SeqC CheckRapid1 StockOnNoCan XSPC ZSPC CheckRapidF1 EOL ELSE IF ApproachOD? IF LAST ApproachOD? SeqC CheckRapid1 LAST XOpECDC CheckRapidF1 EOL ELSE {around} IF LAST ApproachID? SeqC CheckRapid1 LAST XOpECDC CheckRapidF1 EOL SeqC LAST OpExitZCPC EOL ELSE IF LAST ApproachFace? SeqC CheckRapid1 LAST OpExitZCPC CheckRapidF1 EOL END END SeqC LAST OpExitXCPC EOL END ELSE IF ApproachID? IF LAST ApproachID? SeqC CheckRapid1 LAST XOpECDC CheckRapidF1 EOL ELSE IF LAST ApproachOD? {around} SeqC CheckRapid1 LAST OpExitXCPC CheckRapidF1 EOL SeqC LAST OpExitZCPC EOL ELSE IF LAST ApproachFace? SeqC CheckRapid1 LAST OpExitZCPC CheckRapidF1 EOL END END SeqC XOpCDC EOL END ELSE {ApproachFace} IF LAST ApproachFace? SeqC CheckRapid1 LAST ZOpECPC CheckRapidF1 EOL ELSE IF LAST ApproachOD? {around} SeqC CheckRapid1 LAST OpExitXCPC CheckRapidF1 EOL ELSE {LAST ApproachID} SeqC CheckRapid1 LAST XOpECDC CheckRapidF1 EOL END SeqC LAST OpExitZCPC EOL END END END CheckOffset ApproachSP END END END END {common point for all operations} IF CannedCycle? StockOff IF Roughing? IF RoughSimple? StockOn SetPass1 IF ApproachFace? SeqC LCycle FinZ XatFinZ 'K' CutDepth# FeedRate EOL ELSE SeqC LCycle XatFinZ FinZ 'I' CutDepth# FeedRate EOL END END ELSE IF Threading? IF ConstantVolumeCut? SeqC LCycle 'X' FirstCutRadius# ZCSP 'D' FinishXRadius# 'F100' EOL SeqC 'G29G33' FinZ 'D' DistanceToThread# ThrdLead 'F100L0' EOL IF AutoFinish? SeqC Rapid XatFinZ RapidF EOL END ELSE StockOn SetPass1 ToolPath IF AutoFinish? SeqC RapidC XatFinZ RapidFC EOL END END IF AutoFinish? SeqC 'G33' FinZ ThrdLead EOL SeqC Rapid XCSP RapidF EOL SeqC ZCSP EOL END ELSE IF Drilling? IF Tap? SeqC LCycle 'Z' FinishZ# 'K' FeedIPR# EOL SeqC SpinOff EOL SeqC 'G94' EOL SeqC 'G4F2' EOL SeqC 'G95' Speed InverseSpinOn EOL SeqC LCycle ZSP 'K' FeedIPR# EOL ELSE SeqC LCycle ZDepth Peck Retract FeedRate 'L0' EOL SeqC 'G80' EOL IF AutoFinish? SeqC Feed ZDepth FeedRate EOL SeqC Rapid 'Z' CycleStartZ# RapidF EOL END END END END END ELSE StockOn SetPass1 ToolPath IF AutoFinish? { .82.1c } StockOff IF Turning? IF ApproachFace? SeqC RapidC ZOpECPC RapidFC EOL ELSE SeqC RapidC XOpECDC RapidFC EOL END ApproachSP SeqC StockOff StrtPosC EOL ToolPath ELSE IF Roughing? AND NOT RoughSimple? SetPass2 SeqC RapidC XSPC ZSPC RapidFC EOL SeqC StockOff StrtPosC EOL ToolPath SetPass1 ELSE IF Threading? SeqC 'X' MUL# Num#('2') ADD# FinishXRadius# Taper# EOL SeqC 'G33' IF Taper? XatFinZ END FinZ ThrdLead EOL SeqC Rapid XSP RapidF EOL SeqC ZSP EOL END END END END END IF Drilling? AND Tap? SeqC SpinOff EOL SeqC 'G94' EOL SeqC 'G4F2' EOL SeqC Speed SpinOn EOL END NextOp {loops back to EachOP until last Operation}
{End of program ************************************************************}
{finish last operation} StockOff IF ApproachOD? SeqC CheckRapid2 OpExitXCPC CheckRapidF2 EOL SeqC OpExitZCPC CoolOff EOL ELSE IF ApproachID? SeqC CheckRapid2 XOpECDC CheckRapidF2 EOL SeqC OpExitZCPC CoolOff EOL ELSE IF ApproachFace? SeqC CheckRapid2 OpExitZCPC CheckRapidF2 CoolOff EOL END END END DoEndOpPS SeqC FirstHome EOL SeqC OpToolID '00' EOL IF ProgStop? SeqC 'M00' EOL END 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