Fanuc 5T MS [MM] L795 85 1


{
MILL=F
LATHE=T
SIMPLE_ROT_POS=F
ROTARY_MILL=F
ADV_MILL=F
SUBS=F
MILLTURN_POLAR-SEG=F
MILLTURN_Y-AXIS=F
METRIC=F
}

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

{7/24/90, Added InitProg globally to posts with this remark, DWB}
{11/20/90, Updated: Fanuc 5T [+Ä] L027.54 to .71 format, JR}

{3/29/91
Modified: Fanuc 5T [+Ä] L027.71
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 10T MS [-] L001.80 Format.
All normal Fanuc Canned Cycles except for Drilling are supported.
DWB}

{08/05/91
Updated: Fanuc 5T [+Ä] L027.80
Updated to Version 4.0 per Fanuc 6M M001.82 Format.
Kim Michelman}

{10/15/91
Modified & Changed: Fanuc 5T [+Ä] L027.82
Changed ToolChange Command in Form from M6 to M11.
Deleted Leading Zeros in the 'N' Code or Sequence Numbers.
And Deleted Leading Zeros from the 'P' and 'Q' codes in the Form.
Kim Michelman}

{1/24/97, updated to .85 format, MPK}

{1/2/98
Updated:Fanuc 5T [A&D+Ä] L244.85
Created: Fanuc 5T [A&D+Ä] L244.85.1
For: Gibbs & Associates/General Hone Corporation
Versions: Catalyst v4.21.30(mac)/ComPost2 1.1b3
Updated for Catalyst v3.35C per Fanuc 10T MS [-] L001.85.02e Format.
DWB}

{25Nov98
Original: Fanuc 5T [A&D+Ä] L244.85
Created: Fanuc 5T MS [MM] L795.85
For: Muse Metals
Changes made per: Tom Muse
Added Post Header Comment at the top of Prog.
Added FORMAT#8 and Formatted ArcI#, ArcJ#, Add# and Sub# in Prog Numeric Format Definitions.
Added DoFeedC, DoRapid, DoRapidC and DoG61 Subs
Rapid moves are G00G61, Feed Moved are G01G61
Chandes all FeedC commands to DoFeedC, Rapid to DoRapid and RapidC to DoRapidC
Added '/' to all CoolOn anf SpinOn commands and put them onto seperate lines
Added NegSideLathe and ReverseXZArcs in ProgStart
Added 'G27' to Home move in NewTool and End of Prog
Added explicit Arc formating in FormatArc: and Deleted ArcIJC due to customers IJ Arc Centre rounding problem.
Charles Winston}

{13Jan99
Original: Fanuc 5T MS [MM] L795.85
Created: Fanuc 5T MS [MM] L795.85.1
For: Muse Metals
Changes made per: Tom Muse
Changed Approach Sub moves for ID Approach. Needs to output first Z and then X on seperate Lines.
Changed Tool Retract to ToolChange Position, at NewTool for ID Approach. Needs to output first X and then Z on seperate Lines
Charles Winston}

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

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(MUL#,2) { Non-Canned Threading AutoFinish }
FORMAT(InFeedAngle#,2)
FORMAT(FirstMoveEPX#,2)
FORMAT(FirstMoveEPZ#,2)
FORMAT(TurretX#,2)
FORMAT(TurretZ#,2)
FORMAT(Program#,3)
FORMAT(Operation#,3)
FORMAT(Tool#,3)
FORMAT(Dwell#,4)
FORMAT(FeedIPR#,5)
FORMAT(CalcEPRPM#,6)
FORMAT(RapidF#,7)
FORMAT(ArcI#,8)
FORMAT(ArcJ#,8)
FORMAT(Add#,8)
FORMAT(Sub#,8)

{Custom Subroutines ******}

DoG61:
'G61'
RETURN

DoFeedC:
IF NOT Feed?
Feed DoG61
END
RETURN

DoRapid:
Rapid DoG61
RETURN

DoRapidC:
IF NOT Rapid?
Rapid DoG61
END
RETURN

{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

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

feedNoCan:
IF NOT CannedCycle?
DoFeedC
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
RETURN

approach: { NOT FOR TAILSTOCK, .82 }
DoRapid RapidF# { RapidF# Forces FeedRate }
IF ApproachOD?
SeqLabC ThisOpEntryXCP appMove EOL
ELSE
IF ApproachID? { Special appMove for ID Approach }
SeqLabC XOpCD OpToolID LatheOffset EOL
SeqLabC StockOff ThisOpEntryZCP EOL
ELSE {ApproachFace}
SeqLabC stockOnNoCan XSP appMove EOL
END
END
SeqLabC '/' CoolOn EOL
approachSP
RETURN

checkOffset:
doEndOpPS
IF LAST ProgStop?
SeqLabC 'M00' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
END
IF NewToolOffset?
IF NewGear?
SeqLabC LOfstOff '00' SpinOff EOL
SeqLabC OpToolID LatheOffset GearRange EOL
ELSE
SeqLabC LOfstOff '00' EOL
SeqLabC OpToolID LatheOffset EOL
END
ELSE
IF NewGear?
SeqLabC SpinOff EOL
SeqLabC GearRange EOL
END
END
IF ConstantSurfaceFeed?
CSSOn
IF LAST ConstantSurfaceFeed?
IF NotEqual? MaxRPM# LAST MaxRPM#
SeqLabC Preset MaxRPM EOL
END
IF LAST ProgStop? OR NewGear?
'G96' Speed
ELSE
IF NotEqual? SpeedRPM# LAST SpeedRPM#
'G96' Speed
END
END
ELSE
SeqLabC Preset MaxRPM EOL
'G96' Speed
END
ELSE
CSSOff
IF LAST ConstantSurfaceFeed?
'G97' Speed
ELSE
IF LAST ProgStop? OR NewGear?
'G97' Speed
ELSE
IF NotEqual? SpeedRPM# LAST SpeedRPM#
'G97' Speed
END
END
END
END
IF LAST ProgStop?
SeqLabC {SpeedC} '/' SpinOn EOL
SeqLabC '/' CoolOn EOL
ELSE
SeqLabC {SpeedC}
IF NewGear?
'/' SpinOn
END
EOL
IF NOT CoolOff? AND LAST CoolOff?
SeqLabC '/' CoolOn EOL
END
END
doPostScript
RETURN

formatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXC MoveZC
IF ArcIJFormat? { Can't use ArcIJC here because of Virtual's Arc rounding bug }
IF NOT Equal? ArcJ# Num#('0')
IF GreaterThan? ArcJ# Num#('0')
'I' Add# ArcJ# Num#('0.00001')
ELSE
'I' Sub# ArcJ# Num#('0.00001')
END
END
IF NOT Equal? ArcI# Num#('0')
'K' ArcI#
END
ELSE
ArcRC
END
RETURN

ckCRC: { 4.2 }
IF XMove? OR ZMove? { Approach Length Feature and Multiple Pockets }
IF LastFeat?
CRCOffC { Exit Length Feature }
ELSE
CRCOnC { Entry Length Feature }
END
END
RETURN

toolPath:
EACHFeat
GetToolTip
IF LastFeat?
IF Drilling?
IF Tap?
SeqLabC SpinOff EOL
SeqLabC 'G04P2000' EOL
SeqLabC Speed EOL
SeqLabC '/' InverseSpinOn EOL
ELSE
IF Dwell?
SeqLabC 'G04P' Dwell# EOL
END
END
ELSE
IF CannedCycle?
SeqLab
END
END
END
IF PointFeat?
SeqLabC MoveSXYC EOL
ELSE
IF RapidFeat?
IF LAST ThreadFeat?
DoRapid
END
SeqLabC DoRapidC MoveXC MoveZC EOL
ELSE
IF LineFeat?
SeqLabC ckCRC DoFeedC 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
ELSE
IF ThreadFeat?
SeqLabC 'G32' MoveXC MoveZC ThrdLead EOL
END
END
END
END
END
NEXTFeat
RETURN

checkRapid:
CRCOffC
IF LAST CannedCycle? OR LAST Threading?
DoRapid
ELSE
DoRapidC
END
RETURN

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

{setup and initializations}
InitProg
SetAbs
NegSideLathe
ReverseXZArcs
SetMaxRPM('10000')
IF Metric?
SetMaxFeed('12700')
ELSE
SetMaxFeed('500')
END
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 ABSOLUTE INCHES )' EOL
END
END
restoreScale
OpenSub
StockOff {.71.2}
SetHome
doOpComments
doPostScript
Plane
SeqLabC GearRange Plane EOL
SeqLabC Preset Home MaxRPM OpToolID '00' EOL
SeqLabC CSSOff 'G97'
IF ConstantSurfaceFeed?
CalcRPM1
ELSE
Speed
END
EOL
SeqLabC '/' SpinOn EOL
approach
ELSE
IF NewTool?

{Finish off last Operation}

StockOff {.62}
checkRapid
IF LAST ApproachOD?
SeqLabC LAST OpExitXCPC EOL
ELSE
IF LAST ApproachID?
SeqLabC LAST XOpECDC EOL
END
END
SeqLabC LAST OpExitZCPC EOL
doEndOpPS
IF LAST ConstantSurfaceFeed?
SeqLabC CSSOff 'G97' CalcRPM2 EOL
END
IF LAST ApproachID?
SeqLabC 'Z' TurretZ# LOfstOff '00' EOL
SeqLabC 'G27X' TurretX#
ELSE
SeqLabC 'G27' NewHome LOfstOff '00'
END
IF NewGear?
SpinOff
END
EOL
IF LAST ProgStop?
SeqLabC 'M00' EOL
ELSE
SeqLabC ProgStop EOL
END

{Start new Operation}

doOpComments
doPostScript
SeqLab GearRange EOL
SeqLabC Preset Home MaxRPM OpToolID '00' EOL
SeqLabC CSSOff 'G97'
IF ConstantSurfaceFeed?
CalcRPM1
ELSE
Speed
END
EOL
SeqLabC '/' SpinOn EOL
approach
ELSE
IF SameTool? {.62}

{Start new Operation}

StockOff
doOpComments
IF LAST StraightConnect?
checkOffset
checkRapid
SeqLabC stockOnNoCan XSPC ZSPC EOL
ELSE
checkRapid
IF ApproachOD?
IF LAST ApproachOD?
SeqLabC LAST XOpECDC EOL
ELSE {around}
IF LAST ApproachID?
SeqLabC LAST XOpECDC EOL
END
SeqLabC LAST OpExitZCPC EOL
SeqLabC LAST OpExitXCPC EOL
END
ELSE
IF ApproachID?
IF LAST ApproachID?
SeqLabC LAST XOpECDC EOL
ELSE
IF LAST ApproachOD? {around}
SeqLabC LAST OpExitXCPC EOL
END
SeqLabC LAST OpExitZCPC EOL
SeqLabC XOpCDC EOL
END
ELSE {ApproachFace}
IF LAST ApproachFace?
SeqLabC LAST ZOpECPC EOL
ELSE
IF LAST ApproachOD? {around}
SeqLabC LAST OpExitXCPC EOL
ELSE {LAST ApproachID}
SeqLabC LAST XOpECDC 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 LCycle
IF ApproachFace?
'Z' FirstMoveEPZ# XatFinZ
ELSE
XatFinZ FinZ
END
XTapAtZ FeedRate EOL
SimpleRough
ELSE
TagInc
SetPass2
IF RoughContour?
SeqLabC LCycle 'PÅ‚' Tag# 'Q²' Tag# XStkLeft ZStkLeft CutDepth FeedRate EOL
'>' Tag# EOL
SeqLab StepMove StrtPos EOL
ELSE
IF RoughPatternShift?
SeqLabC LCycle 'PÅ‚' Tag# 'Q²' Tag# XStkLeft ZStkLeft XminusU ZminusW NumCuts FeedRate EOL
'>' Tag# EOL
SeqLab DoRapid StrtPos EOL
END
END
toolPath
'<' Tag# EOL
IF AutoFinish?
SeqLabC 'G70' 'PÅ‚' Tag# 'Q²' Tag# EOL
END
SetPass1
TrackXNO# CycleStartX#
TrackZNO# CycleStartZ#
END
ELSE
IF Threading?
IF NOT ConstantVolumeCut? AND NOT SingleEdgeCut?
SeqLabC 'G92X' FirstMoveEPX# FinZ XTapAtZ ThrdLead EOL
SimpleRough
SeqLabC XatFinZ EOL
IF AutoFinish?
SeqLabC XatFinZ EOL
END
ELSE
IF Chamfer?
SeqLabC 'M23' EOL
END
SeqLabC LCycle XatFinZ FinZ XTapAtZ ThrdHeight CutDepth ThrdLead 'A' InFeedAngle# EOL
IF Chamfer?
SeqLabC 'M24' EOL
END
IF AutoFinish?
SeqLabC 'G92' XatFinZ FinZ XTapAtZ ThrdLead EOL
END
END
END
END
ELSE
StockOn
SetPass1
toolPath
IF AutoFinish? { .82.1c }
StockOff
IF Turning?
IF ApproachFace?
SeqLabC DoRapidC ZOpECPC EOL
ELSE
SeqLabC DoRapidC XOpECDC EOL
END
approachSP
SeqLabC StockOff StrtPosC EOL
toolPath
ELSE
IF Roughing? AND NOT RoughSimple?
SetPass2
SeqLabC DoRapidC XSPC ZSPC EOL
SeqLabC StockOff StrtPosC EOL
toolPath
SetPass1
ELSE
IF Threading?
SeqLabC 'X' MUL# Num#('2') ADD# FinishXRadius# Taper# EOL
SeqLabC 'G32'
IF Taper?
XatFinZ
END
FinZ ThrdLead EOL
SeqLabC DoRapid XSP EOL
SeqLabC ZSP EOL
END
END
END
END
END
IF Drilling? AND Tap?
SeqLabC SpinOff EOL
SeqLabC 'G04P2000' EOL
SeqLabC Speed EOL
SeqLabC '/' SpinOn EOL
END
NextOp {loops back to EachOP until last Operation}

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

{finish last operation}
StockOff
CRCOffC
IF CannedCycle? OR Threading?
DoRapid
ELSE
DoRapidC
END
IF ApproachOD?
SeqLabC OpExitXCPC EOL
ELSE
IF ApproachID?
SeqLabC XOpECDC EOL
END
END
SeqLabC OpExitZCPC EOL
doEndOpPS
SeqLabC CoolOff EOL
IF ConstantSurfaceFeed?
SeqLabC CSSOff 'G97S' CalcEPRPM# EOL
END
SeqLabC 'G27' FirstHome OpToolID '00' SpinOff EOL
SeqLabC UnTool '00' EOL
IF ProgStop?
SeqLabC 'M00' 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

Podobne podstrony:
Fanuc 16T MS [ MM] L771 85
Fanuc 5T MS [PM] L644 85 2
Fanuc 11T MS [MM] L793 85
Fanuc 6T MS [MM] L450 85
Fanuc 6T MS [MM] L450 85
Fanuc 6T MS [SE] L683 85
Fanuc 10T MS [PT] L703 85 1
Fanuc 16T MS [AM] L615 85 2
Fanuc 15T MS ( CDS) L418 85 1
Fanuc 6T MS [VE] L392 85 1
Fanuc 10TEF MS SL 4 L281 85
Fanuc 10T MS [BMR] L768 85
Fanuc 21TB MS [YMS] L770 85
Fanuc 10T MS [ TPM] L455 85
Fanuc 16T MS [ IN] L443 85
Fanuc 10T MS [ CES] L107 85

więcej podobnych podstron