{Change Comments ***********************************************************}
{6/14/95, Updated for Catalyst v2.20 per Fanuc 10T MS [-] L001.85 Format, DWB}
{7/18/95, Added IF NOT LastFeat? at CkCRC sub, DWB}
{8/26/95, L001.85.01.01, Changed ToolAngle to 'A' InFeedAngle#, JR}
{6/18/96, rewrote CheckOffset to clean up and correct Speed bug, JR}
{10/25/95
Initial: Fanuc 10T MS [-] L001.85.01.02
Created: Fanuc 20TA Colchester Lxxx.85
ForUser: Accurate Tool Company
Control: Fanuc 20TA
Machine: Clausing Colchester Mastiff
Develop: ComPost 4.21.37, Catalyst68K v3.04.10.C
Comment: New Processore per manual asnd sample readouts.
Added GearRange. Go directly to G96 is CSS operations.
PosSideLathe. Spaces between codes. Call only tool offset not the tool!
Only CannedCycles are Simple!
Jim Radcliffe}
{1/6/98
Initial: Fanuc 20TA Colchester L491.85
Created: Fanuc 20TA Clchstr Lxxx.85m
ForUser: Rignes Prototeknikk
Control: Fanuc 20TA
Machine: Colchester Electronic Lathe
Develop: ComPost2 1.1b3, Virtual 4.21.21
Comment: New processor per sample program and G&M Code lists.
Jim Radcliffe}
{Prog Numeric Format Definitions *******************************************}
#1 = '#.00'
#2 = '###.####;0.'
#3 = '#######0'
#4 = '###^##0'
#5 = '#'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(MUL#,2) { Non-Canned Threading AutoFinish }
FORMAT(FirstMoveEPZ#,2)
FORMAT(FirstMoveEPX#,2)
FORMAT(Program#,3) {.72}
FORMAT(Operation#,3) {.72}
FORMAT(Tool#,3) {.72}
FORMAT(Dwell#,4) {.72}
FORMAT(RapidF#,5)
{Command Subroutines *******************************************************}
FeedIPR: { Inches Per Revolution }
IF Flag?('2')
{ G99 has already been output }
ELSE
' G99'
SetFlag('2')
END
RETURN
FeedIPM:
' G98'
RETURN
SpinMode:
IF ConstantSurfaceFeed?
CSSOn ' G96'
ELSE
CSSOff ' G97'
END
RETURN
{Prog Subroutines **********************************************************}
RestoreScale:
IF NOT Metric? {CAM file is in English, tools and tool path}
SetScale('25.4') { change to Metric, this is a Metric 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
SeqC PostScript EOL {literals}
PSStuff {commands}
NextPS
RETURN
DoEndOpPS:
PSInit
EachEOPS
SeqC 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?
FeedIPR FeedC
END
RETURN
FeedRateNoCan:
IF NOT CannedCycle?
FeedRateC
END
RETURN
ApproachSP:
IF ApproachFace?
SeqC StockOnNoCan XSPC EOL
SeqC StockOff ZOpCPC EOL
StockOnNoCan
IF NotEqual? CycleStartZ# ZOpCP#
SeqC FeedNoCan ZSPC FeedRateNoCan EOL
END
ELSE { ODApproach/IDApproach }
SeqC StockOnNoCan ZSPC EOL
SeqC StockOff XOpCDC EOL
StockOnNoCan
IF NotEqual? CycleStartX# XOpCD#
SeqC FeedNoCan XSPC FeedRateNoCan EOL
END
END
RETURN
AppMove:
StockOff ThisOpEntryZCP CoolOn
RETURN
Approach: { NOT FOR TAILSTOCK, .82 }
CRCOff Rapid RapidF# { RapidF# Forces FeedRate }
IF ApproachOD?
SeqC ThisOpEntryXCP AppMove EOL
ELSE
IF ApproachID?
SeqC XOpCD AppMove EOL
ELSE {ApproachFace}
SeqC StockOnNoCan XSP AppMove EOL
END
END
ApproachSP
RETURN
CheckOffset:
DoEndOpPS
IF LAST ProgStop?
SeqC ' M00' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
END
DoOpComments
DoPostScript
IF ConstantSurfaceFeed?
IF LAST ConstantSurfaceFeed?
IF NotEqual? MaxRPM# LAST MaxRPM#
SeqC Preset MaxRPM EOL
END
ELSE
SeqC Preset MaxRPM EOL
END
END
SeqC
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 LAST ProgStop?
SpinOn
END
EOL
SeqC
IF NewToolOffset?
ToolOfst
END
IF LAST ProgStop?
CoolOn
ELSE
IF NOT CoolOff? AND LAST CoolOff?
CoolOn
END
END
EOL
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 }
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?
SeqC SpinOff EOL
SeqC ' G04 P2000' EOL
SeqC Speed InverseSpinOn EOL
ELSE
IF Dwell?
SeqC ' G04 P' Dwell# EOL
END
END
END
END
IF PointFeat?
SeqC MoveSXYC EOL
ELSE
IF RapidFeat?
SeqC
IF LAST ThreadFeat?
Rapid
ELSE
RapidC
END
MoveXC MoveZC EOL
ELSE
IF LineFeat?
SeqC FeedIPR 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 ' G32' MoveXC MoveZC ThrdLead EOL
END
END
END
END
END
NEXTFeat
RETURN
CheckRapid:
CRCOffC
IF LAST CannedCycle?
Rapid
ELSE
IF LAST Threading?
Rapid
ELSE
RapidC
END
END
RETURN
{Start of executable Prog **************************************************}
{setup and initializations}
InitProg
SetAbs
PosSideLathe
StandardXZArcs
SetMaxRPM('2000')
SetMaxFeed('500')
SetFlagF('1') { Threading }
SetFlagF('2') { G99 needs to be output }
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
SetFlagF('2') { G99 needs to be output }
IF FirstOperation?
EOR EOL
ProgID1
IF UseComments? AND ProgramNameComment?
'( ' ProgramName$ ' )'
END
EOL
IF UseComments?
IF ProgramComment?
'( ' ProgramComment$ ' )' EOL
END
IF FormatNameComment?
'( FORMAT: ' FormatName$ ' )' EOL
END
IF TimeComment?
'( ' Date$ ' AT ' Time$ ' )' EOL
END
IF MovesComment?
'( OUTPUT IN ABSOLUTE MILLIMETERS )' EOL
END
END
RestoreScale
OpenSub
StockOff {.71.2}
SetHome
Plane
SeqC ' G21' OpToolID LatheOffset EOL
DoOpComments
DoPostScript
IF ConstantSurfaceFeed?
SeqC Preset MaxRPM EOL
END
SeqC GearRange EOL
IF ConstantSurfaceFeed?
SeqC CSSOn ' G96' Speed SpinOn EOL
ELSE
SeqC CSSOff ' G97' Speed SpinOn EOL
END
SeqC CoolOn EOL
Approach
ELSE
IF NewTool?
{Finish off last Operation}
StockOff {.62}
CheckRapid
IF LAST ApproachOD?
SeqC LAST OpExitXCPC EOL
ELSE
IF LAST ApproachID?
SeqC LAST XOpECDC EOL
END
END
SeqC LAST OpExitZCPC EOL
DoEndOpPS
SeqC CoolOff EOL
SeqC NewHome EOL
SeqC ' M00' ASCII('13') EOL { manual tool change }
{Start new Operation}
SeqC OpToolID LatheOffset EOL
DoOpComments
DoPostScript
IF ConstantSurfaceFeed?
SeqC Preset MaxRPM EOL
END
SeqC GearRange EOL
IF ConstantSurfaceFeed?
SeqC CSSOn ' G96' Speed SpinOn EOL
ELSE
SeqC CSSOff ' G97' Speed SpinOn EOL
END
SeqC CoolOn EOL
Approach
ELSE
IF SameTool? {.62}
{Start new Operation}
StockOff
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 LAST OpExitZCPC EOL
SeqC LAST OpExitXCPC EOL
END
ELSE
IF ApproachID?
IF LAST ApproachID?
SeqC LAST XOpECDC EOL
ELSE
IF LAST ApproachOD? {around}
SeqC LAST OpExitXCPC EOL
END
SeqC LAST OpExitZCPC EOL
SeqC XOpCDC EOL
END
ELSE {ApproachFace}
IF LAST ApproachFace?
SeqC LAST ZOpECPC EOL
ELSE
IF LAST ApproachOD? {around}
SeqC LAST OpExitXCPC EOL
ELSE {LAST ApproachID}
SeqC LAST XOpECDC EOL
END
SeqC LAST OpExitZCPC EOL
END
END
END
CheckOffset
ApproachSP
END
END
END
END {common point for all operations}
IF CannedCycle?
StockOff
SetPass1
IF Roughing? AND RoughSimple?
StockOn
SeqC LCycle
IF ApproachFace?
' Z' FirstMoveEPZ# XatFinZ
ELSE
XatFinZ FinZ
END
XTapAtZ FeedRate EOL
SimpleRough
ELSE
IF Threading?
{simple G92 cycle does not support run in or run out moves}
SetFlagF('1')
IF NotEqual? RunInX# Num#('0')
SetFlag('1')
END
IF NotEqual? RunInZ# Num#('0')
SetFlag('1')
END
IF NotEqual? RunOutX# Num#('0')
SetFlag('1')
END
IF NotEqual? RunOutZ# Num#('0')
SetFlag('1')
END
IF NotEqual? ThreadStarts# Num#('1')
SetFlag('1')
END
IF Flag?('1')
ToolPath
ELSE
SeqC FeedIPR LCycle ' X' FirstMoveEPX# FinZ
IF Taper?
XTapAtZ
END
ThrdLead EOL
{SimpleRough}
EachFeat
IF NOT LastFeat? AND NEXT ThreadFeat? AND NotEqual? EPX# FirstMoveEPX#
SeqC MoveX EOL
END
NextFeat
IF AutoFinish?
SeqC XatFinZ EOL
END
END
END
END
ELSE
StockOn
SetPass1
ToolPath
IF AutoFinish? { .82.1c }
StockOff
IF Turning?
IF ApproachFace?
SeqC RapidC ZOpECPC EOL
ELSE
SeqC RapidC XOpECDC EOL
END
ApproachSP
SeqC StockOff StrtPosC EOL
ToolPath
ELSE
IF Roughing? AND NOT RoughSimple?
SetPass2
SeqC RapidC XSPC ZSPC EOL
SeqC StockOff StrtPosC EOL
ToolPath
SetPass1
ELSE
IF Threading?
SeqC ' X' MUL# Num#('2') ADD# FinishXRadius# Taper# EOL
SeqC ' G32'
IF Taper?
XatFinZ
END
FinZ ThrdLead EOL
SeqC Rapid XSP EOL
SeqC ZSP EOL
END
END
END
END
END
IF Drilling? AND Tap?
SeqC SpinOff EOL
SeqC ' G04 P2000' EOL
SeqC Speed SpinOn EOL
END
NextOp {loops back to EachOP until last Operation}
{End of program ************************************************************}
{finish last operation}
StockOff
CRCOffC
IF CannedCycle?
Rapid
ELSE
IF Threading?
Rapid
ELSE
RapidC
END
END
IF ApproachOD?
SeqC OpExitXCPC EOL
ELSE
IF ApproachID?
SeqC XOpECDC EOL
END
END
SeqC OpExitZCPC EOL
DoEndOpPS
SeqC CoolOff EOL
SeqC FirstHome 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
Wyszukiwarka
Podobne podstrony:
Fanuc 21T MS [ EMT] L642 85mFanuc 0TA Col [MBR] L646 85Fanuc 0T 3T Miyano [R] L652 85mFanuc 6T MS [MS ] L353 85mFanuc 6T MS [MS ] L352 85mFanuc 20TA Colch [WF] L552 85Fanuc 0T 3T Miyano L008 85mFanuc 10T MS [ G54] L002 85mFanuc TC F TS (PM) L214 85mFanuc 0T Col [MS] L577 85Fanuc 0T Mate MS L031 85mFanuc 0T Col [HS] L500 85 4Fanuc 20TA Colchester L491 85Fanuc 21T MS0 [ ] L477 85mFanuc 0TA [C&W] L379 85mwięcej podobnych podstron