AB 7370 Hard [PP] L782 85 2


{
MILL=F
LATHE=T
SIMPLE_ROT_POS=F
ROTARY_MILL=F
ADV_MILL=F
SUBS=F
METRIC=F
}

{Change Comments ***********************************************************}

{2/8/90, Updated: Allen Bradley Hard L019.53 to .69 format, JR}
{7/24/90, Added InitProg globally to posts with this remark, DWB}
{7/24/90, Replaced all occurances of FinishThreadRadius# with FinishXRadius#, DWB}

{3/26/91
Modified: Allen Bradley Hard L019.70
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 10T MS [-] L001.80 Format.
Rapid outputs 'G94' to set control into ipm, Feed outputs 'G95' to set control into ipr.
'G1' is only output on initial Approach line from FirstOperation and NewTool, and
to cancel 'G2/G3', Thread Cycle and Canned Drill Cycles.
Only Canned Cycles supported are SimpleRough, Threading and PeckFullRetract.
DWB}

{10/08/98, Updated for Catalyst v2.20 per Fanuc 10T MS [-] L001.85 Format,
Changed post to use IK arcs.
CDH}

{10/14/98
Initial: Allen Bradley Hard [PP] L782.85
Created: AB 7370 Hard [PP] L782.85.1
ForUser: Precise Products
Control: Allen Bradley 7370
Machine: Hardinge CHNC
Develop: Compost2 v1.6b8, Virtual 4.29.63
Comment: Modified per marked up readout and conversation with Brent Shmidt
Added NoIJKSigns to initializations.
Added to the beginning of the program, the subs that are called during the program.
Added optional Bar Feed routine to the beginning of the program.
Updated per Allen Bradley Hard L019.85
Jim Radcliffe}

{11/10/98
Initial: AB 7370 Hard [PP] L782.85.1
Created: AB 7370 Hard [PP] L782.85.2
Comment: Minor modifications to beginning of program per marked up readout from Brent Schmidt
Jim Radcliffe}

{Prog Numeric Format Definitions *******************************************}

#1 = '#.00'
#2 = '##.#####;0.'
#3 = '#######0'
#4 = '###^##0'
#5 = '#.######;0.'
#6 = '###0'
#7 = '###.#;0.'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ADD#,2) { Non-Canned Threading AutoFinish }
FORMAT(CutDepth#,2)
FORMAT(FirstCutRadius#,2)
FORMAT(FinishXRadius#,2)
FORMAT(DistanceToThread#,2)
FORMAT(Program#,3) {.72}
FORMAT(Operation#,3) {.72}
FORMAT(Tool#,3) {.72}
FORMAT(Dwell#,4) {.72}
FORMAT(FeedIPR#,5)
FORMAT(CalcEPRPM#,6)
FORMAT(RapidF#,7)

{Prog Subroutines **********************************************************}

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

PSInit: {reset flags from last Op, .70}
RETURN

PSStuff:
RETURN

DoPostScript:
PSInit
EachPS
SeqLabC PostScript EOL {literals}
PSStuff {commands}
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqLabC EndOpPS EOL {literals}
PSStuff {commands}
NextPS
RETURN

DoSpinOn:
IF CoolOff?
IF CWSpindle?
'M3'
ELSE
'M4'
END
ELSE
IF CWSpindle?
'M13'
ELSE
'M14'
END
END
RETURN

DoInverseSpinOn:
IF CoolOff?
IF CWSpindle?
'M4'
ELSE
'M3'
END
ELSE
IF CWSpindle?
'M14'
ELSE
'M13'
END
END
RETURN

checkG1:
IF Flag?('21')
'G1'
SetFlagF('21')
END
RETURN

StockOnNoCan:
IF NOT CannedCycle?
StockOn {need stock for SP positioning, if not a canned cycle}
END
RETURN

FeedNoCan:
IF NOT CannedCycle?
FeedC
END
RETURN

FeedRateNoCan:
IF NOT CannedCycle?
FeedRateC
END
RETURN

ApproachSP:
IF ApproachFace?
SeqLabC StockOnNoCan XSPC EOL
SeqLabC StockOff ZOpCPC EOL
StockOnNoCan
IF NotEqual? CycleStartZ# ZOpCP#
SeqLabC FeedNoCan ZSPC FeedRateNoCan EOL
END
ELSE { ODApproach/IDApproach }
SeqLabC StockOnNoCan ZSPC EOL
SeqLabC StockOff XOpCDC EOL
StockOnNoCan
IF NotEqual? CycleStartX# XOpCD#
SeqLabC FeedNoCan XSPC FeedRateNoCan EOL
END
END
RETURN

AppMove:
StockOff ThisOpEntryZCP OpToolID LatheOffset RapidF
RETURN

Approach: { NOT FOR TAILSTOCK, .82 }
SetFlag('21')
Rapid checkG1
IF ApproachOD?
SeqLabC ThisOpEntryXCP AppMove EOL
ELSE
IF ApproachID?
SeqLabC XOpCD AppMove EOL
ELSE {ApproachFace}
SeqLabC StockOnNoCan XSP AppMove EOL
END
END
ApproachSP
RETURN

CheckOffset:
DoEndOpPS
IF LAST ProgStop?
SeqLabC 'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
END
DoOpComments
DoPostScript
IF ConstantSurfaceFeed?
IF LAST ConstantSurfaceFeed?
IF NotEqual? MaxRPM# LAST MaxRPM#
SeqLabC Preset MaxRPM EOL
END
ELSE
SeqLabC Preset MaxRPM EOL
END
END
SeqLabC
IF ConstantSurfaceFeed?
IF LAST ConstantSurfaceFeed?
IF NotEqual? SpeedRPM# LAST SpeedRPM#
Speed
END
ELSE
CSSOn 'G96' Speed
END
ELSE
IF LAST ConstantSurfaceFeed?
CSSOff 'G97' Speed
ELSE
IF NotEqual? SpeedRPM# LAST SpeedRPM#
Speed
END
END
END
IF NewToolOffset?
LOfstOff '00'
END
IF LAST ProgStop?
DoSpinOn
ELSE
IF NOT CoolOff? AND LAST CoolOff?
CoolOn
END
END
EOL
SeqLabC
IF NewToolOffset?
OpToolID LatheOffset
END
EOL
RETURN

FormatArc:
IF ArcCW?
'G2'
ELSE
'G3'
END
MoveXC MoveZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
RETURN

CkCRC: { 4.2 }
IF XMove? OR ZMove? { Approach Length Feature and Multiple Pockets }
IF NOT LastFeat?
CRCOnC
END
END
IF LastFeat? AND EmptyLine? { Exit Length Feature }
CRCOffC
END
RETURN

ToolPath:
EACHFeat
GetToolTip
IF LastFeat?
IF Drilling?
IF Tap?
SeqLabC SpinOff EOL
SeqLabC 'G4P2000' EOL
SeqLabC Speed DoInverseSpinOn EOL
ELSE
IF Dwell?
SeqLabC 'G4P' Dwell# EOL
END
END
END
END
IF PointFeat?
SeqLabC MoveSXYC EOL
ELSE
IF RapidFeat?
SeqLabC RapidC checkG1 MoveXC MoveZC
IF LAST ThreadFeat?
RapidF
ELSE
RapidFC
END
EOL
ELSE
IF LineFeat?
SeqLabC CkCRC FeedC checkG1 MoveXC MoveZC FeedRateC EOL
ELSE
IF ArcFeat?
EACHQuadrant { Do not use NOT, LAST, FIRST or NEXT modifiers in this loop }
SeqLabC FormatArc FeedRateC EOL
NEXTQuadrant
SetFlag('21')
ELSE
IF ThreadFeat?
SeqLabC Feed 'G33' MoveXC MoveZC ThrdLead EOL
SetFlag('21')
END
END
END
END
END
NEXTFeat
RETURN

CheckRapid:
CRCOffC checkG1
IF LAST CannedCycle?
Rapid
ELSE
RapidC
END
RETURN

CheckRapidF:
IF LAST CannedCycle?
RapidF
ELSE
RapidFC
END
RETURN

CheckRapid2:
CRCOffC checkG1
IF CannedCycle?
Rapid
ELSE
RapidC
END
RETURN

CheckRapidF2:
IF CannedCycle?
RapidF
ELSE
RapidFC
END
RETURN

{Start of executable Prog **************************************************}

{setup and initializations}
InitProg
PosSideLathe
StandardXZArcs
XsAreRadii
NoIJKSigns
SetMaxRPM('10000')
SetMaxFeed('500')
SetFlagF('21')
SetFlagF('22')
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
IF CutOff?
SetFlag('22')
END
NextOp
EachOp {Start of post processing *********************}
GetLCycle
IF FirstOperation?
EOR EOL
'(DP,0000000001)' EOL
SeqLab Feed IncValue 'Z0' EOL
SeqLabC CRCOff EOL
SeqLabC 'G99G97' EOL
SeqLabC 'G21' AbsValue 'G94' RapidF EOL
SeqLabC '(CP,999)' EOL
'(DP,0000000002)' EOL
SeqLab 'G21' AbsValue 'G94' 'Z.4' RapidF EOL
SeqLabC CRCOff EOL
SeqLabC 'G99G97' EOL
SeqLabC '(CP,999)' EOL
SeqLabC Feed 'M01' EOL
'(DP,0000000999)' EOL
SeqLab 'X0.Z10.T0' EOL
'(TN,0001)' 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
IF Flag?('22')
{ Bar Feed Routine }
'O?(T0101 Feed Stock)S0250M3' EOL
SeqLabC '(CP,1)' EOL
SeqLabC 'T0101' EOL
SeqLabC 'X0.Z.15M20' EOL
SeqLabC 'Z0.F100M21' EOL
SeqLabC 'M22' EOL
SeqLabC '(CP,2)' EOL
SeqLabC ProgStop EOL
END
DoOpComments
DoPostScript
Plane
'O?'
IF ConstantSurfaceFeed?
CalcRPM1
ELSE
Speed
END
DoSpinOn EOL
SeqLabC '(CP,1)' EOL
SeqLabC AbsOrInc EOL
SeqLabC OpToolID '00' EOL
IF ConstantSurfaceFeed?
SeqLabC Preset MaxRPM EOL
END
Approach
ELSE
IF NewTool?

{Finish off last Operation}

StockOff {.62}
IF LAST ApproachOD?
SeqLabC CheckRapid LAST OpExitXCPC CheckRapidF EOL
SeqLabC LAST OpExitZCPC EOL
ELSE
IF LAST ApproachID?
SeqLabC CheckRapid LAST XOpECDC CheckRapidF EOL
SeqLabC LAST OpExitZCPC EOL
ELSE {LAST ApproachFace}
SeqLabC CheckRapid LAST OpExitZCPC CheckRapidF EOL
END
END
DoEndOpPS
IF LAST ConstantSurfaceFeed?
SeqLabC CSSOff 'G97' CalcRPM2 EOL
END
SeqLabC '(CP,2)' EOL
IF LAST ProgStop?
SeqLabC 'M0' EOL
ELSE
SeqLabC ProgStop EOL
END

{Start new Operation}

DoOpComments
DoPostScript
'O?'
IF ConstantSurfaceFeed?
CalcRPM1
ELSE
Speed
END
DoSpinOn EOL
SeqLabC '(CP,1)' EOL
SeqLabC OpToolID '00' EOL
IF ConstantSurfaceFeed?
SeqLabC Preset MaxRPM EOL
END
Approach
ELSE
IF SameTool? {.62}

{Start new Operation}

StockOff
IF LAST StraightConnect?
CheckOffset
SeqLabC StockOnNoCan CheckRapid XSPC ZSPC CheckRapidF EOL
ELSE
IF ApproachOD?
IF LAST ApproachOD?
SeqLabC CheckRapid LAST XOpECDC CheckRapidF EOL
ELSE {around}
IF LAST ApproachID?
SeqLabC CheckRapid LAST XOpECDC CheckRapidF EOL
SeqLabC LAST OpExitZCPC EOL
ELSE {LAST ApproachFace}
SeqLabC CheckRapid LAST OpExitZCPC CheckRapidF EOL
END
SeqLabC LAST OpExitXCPC EOL
END
ELSE
IF ApproachID?
IF LAST ApproachID?
SeqLabC LAST XOpECDC EOL
ELSE {around}
IF LAST ApproachOD?
SeqLabC CheckRapid LAST OpExitXCPC CheckRapidF EOL
SeqLabC LAST OpExitZCPC EOL
ELSE {LAST ApproachFace}
SeqLabC CheckRapid LAST OpExitZCPC CheckRapidF EOL
END
SeqLabC XOpCDC EOL
END
ELSE {ApproachFace}
IF LAST ApproachFace?
SeqLabC CheckRapid LAST ZOpECPC CheckRapidF EOL
ELSE
IF LAST ApproachOD? {around}
SeqLabC CheckRapid LAST OpExitXCPC CheckRapidF EOL
ELSE {LAST ApproachID}
SeqLabC CheckRapid LAST XOpECDC CheckRapidF EOL
END
SeqLabC LAST OpExitZCPC EOL
END
END
END
CheckOffset
ApproachSP
END
END
END
END {common point for all operations}
IF ConstantSurfaceFeed? AND NOT SameTool?
SeqLabC CSSOn 'G96' Speed EOL
END
IF CannedCycle?
StockOff
IF Roughing?
IF RoughSimple?
StockOn
SetPass1
SeqLabC IncValue EOL
IF ApproachFace?
SeqLabC LCycle FinZ XatFinZ 'K' CutDepth# FeedRate EOL
ELSE
SeqLabC LCycle XatFinZ FinZ 'I' CutDepth# FeedRate EOL
END
SeqLabC AbsOrInc EOL
END
ELSE
IF Threading?
IF ConstantVolumeCut?
SeqLabC 'G28' 'X' FirstCutRadius# ZCSP 'D' FinishXRadius# 'F100' EOL
SeqLabC 'G29G33' FinZ 'D' DistanceToThread# ThrdLead 'F100L0' EOL
SetFlag('21')
IF AutoFinish?
SeqLabC Rapid checkG1 XatFinZ RapidF EOL
END
ELSE
StockOn
SetPass1
ToolPath
IF AutoFinish?
SeqLabC XatFinZ EOL
END
END
IF AutoFinish?
SeqLabC Feed 'G33' FinZ ThrdLead EOL
SetFlag('21')
SeqLabC Rapid checkG1 XCSP RapidF EOL
SeqLabC ZCSP EOL
END
ELSE
IF Drilling?
IF PeckFullRetract?
SeqLabC IncValue EOL
SeqLabC LCycle ZDepth Peck Retract FeedRate 'L0.' EOL
SetFlag('21')
SeqLabC DrillOff EOL
SeqLabC AbsOrInc EOL
IF AutoFinish?
SeqLabC Feed checkG1 ZDepth FeedRate EOL
SeqLabC Rapid ZCSP RapidF EOL
END
END
END
END
END
ELSE
StockOn
SetPass1
ToolPath
IF AutoFinish? { .82.1c }
StockOff
IF Turning?
IF ApproachFace?
SeqLabC RapidC checkG1 ZOpECPC RapidFC EOL
ELSE
SeqLabC RapidC checkG1 XOpECDC RapidFC EOL
END
ApproachSP
SeqLabC StockOff StrtPosC EOL
ToolPath
ELSE
IF Roughing? AND NOT RoughSimple?
SetPass2
SeqLabC RapidC checkG1 XSPC ZSPC RapidFC EOL
SeqLabC StockOff StrtPosC EOL
ToolPath
SetPass1
ELSE
IF Threading?
SeqLabC 'X' ADD# FinishXRadius# Taper# EOL
SeqLabC Feed 'G33'
IF Taper?
XatFinZ
END
FinZ ThrdLead EOL
SetFlag('21')
SeqLabC Rapid checkG1 XSP RapidFC EOL
SeqLabC ZSP EOL
END
END
END
END
END
IF Drilling? AND Tap?
SeqLabC SpinOff EOL
SeqLabC 'G4P2000' EOL
SeqLabC Speed SpinOn EOL
END
NextOp {loops back to EachOP until last Operation}

{End of program ************************************************************}

{finish last operation}
StockOff
IF ApproachOD?
SeqLabC CheckRapid2 OpExitXCPC CheckRapidF2 EOL
SeqLabC OpExitZCPC EOL
ELSE
IF ApproachID?
SeqLabC CheckRapid2 XOpECDC CheckRapidF2 EOL
SeqLabC OpExitZCPC EOL
ELSE {ApproachFace}
SeqLabC CheckRapid2 OpExitZCPC CheckRapidF2 EOL
END
END
DoEndOpPS
IF ConstantSurfaceFeed?
SeqLabC CSSOff 'G97S' CalcEPRPM# EOL
END
SeqLabC '(CP,2)' EOL
SeqLabC Rapid 'G1G40' RapidF '(THE END)' EOL
SeqLabC 'G99G97' EOL
SeqLabC FirstHome 'T0' EOL
IF ProgStop?
SeqLabC 'M0' EOL
END
SeqLabC EOP EOL
Post
EOR EOL
Close
Retag
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


Wyszukiwarka