{Change Comments ***********************************************************}
{9/19/91
Copied & modified: Fanuc 10T MS [-] L001.82
For: J&H Machine Tools ( Jay Ray/Champion Spark Plugs )
Machine: Mori Seiki SL-25A
Control: MF-T4 ( Fanuc 0T )
Modified per sample program.
Sequence Line Number FORMAT = ttnn where tt = Current Tool# and nn = Sequence Line Number.
This will cause a problem because the control is limited to 4 digits ( N9999 ).
Storing ToolOffsets in variables 1-24 for loading into 'G10' Parameters
Logic will store ToolOffsetXRadius# into Variable = Tool#.
Logic will store ToolOffsetZ# into Variable = ADD# Tool# Num#('12').
Added logic for Stock Feeding.
SetFlag('1') is TRUE IF FirstOperation uses Tool#('12') and is Drilling.
LastOp will output 'M73' and 'M74' Parts Catcher Out/In where needed.
DWB}
{9/27/91
Modified: Fanuc 0T MS SL25A L239.82
For: J&H Machine Tools ( Jay Ray/Champion Spark Plugs )
Deleted EOR from beginning of Prog.
Changed all colons to spaces inside comments.
Changed Num#('-2') to Num#('2') to output G10 X#s as Negative #2s.
JR}
{11/22/91
Modified: Fanuc 0T MS SL25A L239.82.1
For: J&H Machine Tools ( Jay Ray/Champion Spark Plugs )
Changed FORMAT for Recall# from '##0.####;0.0' to '##0.0000;0.0000' for G10 X#s and Z#s in Prog.
Deleted logic for Stock Feeding.
FirstOperation will now always output the Stock Feeding stuff using T1212.
LastOp will now always output 'M73' and 'M74' Parts Catcher if ApproachOD = TRUE.
Replaced Standard Line Number System per Bill Gibbs Instructions.
Normal Line numbers now get output.
Changed Format for 'N' from '##00' to '###0' in Form.
At each Tool Change, we now output 'N' Tool# '00'.
Changed Format for Tool# from '########;0' to '00' in Prog.
Left Original Format for Tool# for Comment Purposes.
DWB}
{4/12/92
Updated:Fanuc 0T MS SL25A L239.82.2
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 0T/3T Miyano L008.82.1 Format.
KM}
{9/15/92
Updated:Fanuc 0T MS SL25A L239.82.3
For: J & H
Changed the word 'OPERATION' to 'OPER' in the comments, per request.
Removed OpToolID '00' and LOfstOff 'OO' prior to the progstop 'M1' output.
Changed the number multiplied in the X-register from '2' to '1', per wrong number was being output.
Removed the literal 'T1200' from the first operation.
KLM}
{10/05/92
Updated:Fanuc 0T MS SL25A L239.82.4
For: J & H
Changed 'X' Recall# TLNum# { X-Register } to 'X' Recall# MUL# TLNum# Num#('1') { X-Register }
Added the MUL# and the Num#('1') at the end of the line to change to output to read past the decimal
point - from an integer output to a 'non-scaled floating point' output.
KLM}
{Prog Numeric Format Definitions *******************************************}
#1 = '#.00'
#2 = '##0.####;0.0'
#3 = '#######0'
#4 = '####^###0'
#5 = '0.######;0.0'
#6 = '###0'
#7 = '00'
#8 = '##0.0000;0.0000'
#9 = '#'
#10 = '###.####;0.'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ZStockMin#,2)
FORMAT(ZDepth#,2)
FORMAT(FirstMoveEPZ#,2)
FORMAT(Program#,3) {.72}
FORMAT(Operation#,3) {.72}
FORMAT(Dwell#,4) {.72}
FORMAT(FeedIPR#,5)
FORMAT(CalcEPRPM#,6)
FORMAT(Tool#,7) {.72}
FORMAT(TLNum#,7)
FORMAT(Recall#,8)
FORMAT(RapidF#,9)
FORMAT(SPX#,10)
FORMAT(SPZ#,10)
{Prog Subroutines **********************************************************}
DoOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
'( OPER ' Operation# ' ' OperationType$ ' )' EOL
END
IF OperationComment?
'( ' OperationComment$ ' )' EOL
END
IF WorkGroupComment?
'( ' WorkGroupComment$ ' )' EOL
END
IF ToolTypeComment?
FORMAT(Tool#,3)
'( TOOL ' Tool# ' ' ToolSize$ ' ' ToolType$ ' )' EOL
FORMAT(Tool#,7)
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
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
ODApproachSP:
SeqLabC StockOnNoCan ZSPC EOL
SeqLabC StockOff XOpCDC
IF LastOp?
'M73' { Parts Catcher Out }
END
EOL
StockOnNoCan
IF NotEqual? CycleStartX# XOpCD#
SeqLabC Feed XSPC FeedRate EOL
ELSE
RapidF# { No Output - Forces FeedRate in ToolPath }
END
RETURN
IDApproachSP:
SeqLabC StockOnNoCan ZSPC EOL
SeqLabC StockOff XOpCDC EOL { for SameTool ApproachID }
StockOnNoCan
IF NotEqual? CycleStartX# XOpCD#
SeqLabC Feed XSPC FeedRate EOL
ELSE
RapidF# { No Output - Forces FeedRate in ToolPath }
END
RETURN
FaceApproachSP:
SeqLabC StockOnNoCan XSPC EOL { for SameTool ApproachFace }
SeqLabC StockOff ZOpCPC EOL
StockOnNoCan
IF NotEqual? CycleStartZ# ZOpCP#
SeqLabC Feed ZSPC FeedRate EOL
ELSE
RapidF# { No Output - Forces FeedRate in ToolPath }
END
RETURN
AppMove:
ZCP
IF NOT ConstantSurfaceFeed?
CoolOn
END
RETURN
Approach: { NOT FOR TAILSTOCK, .82 }
IF ApproachOD?
SeqLabC Rapid XCP AppMove EOL
ODApproachSP
ELSE
IF ApproachID?
SeqLabC Rapid XOpCD AppMove EOL
IDApproachSP
ELSE {ApproachFace}
SeqLabC Rapid StockOnNoCan XSP StockOff AppMove EOL
FaceApproachSP
END
END
RETURN
CheckOffset:
DoEndOpPS
IF LAST ProgStop?
SeqLabC 'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
END
IF NewToolOffset?
SeqLabC LOfstOff '00' EOL
SeqLabC OpToolID LatheOffset EOL
END
IF ConstantSurfaceFeed?
IF LAST NOT ConstantSurfaceFeed?
IF NotEqual? MaxRPM# LAST MaxRPM#
SeqLabC Preset MaxRPM EOL
END
ELSE
SeqLabC Preset MaxRPM EOL
SeqLabC CSSOn 'G96' Speed
END
ELSE
IF LAST ConstantSurfaceFeed?
SeqLabC CSSOff 'G97' Speed
END
END
IF LAST ProgStop?
SeqLabC SpeedC SpinOn EOL
SeqLabC CoolOn EOL
ELSE
SeqLabC SpeedC 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?
ArcIJC
ELSE
ArcRC
END
RETURN
ToolPath:
EACHFeat
GetToolTip
IF LastFeat?
IF Drilling?
IF Tap?
SeqLabC SpinOff EOL
SeqLabC 'G4P2000' EOL
SeqLabC Speed InverseSpinOn EOL
ELSE
IF Dwell?
SeqLabC 'G4P' Dwell# EOL
END
END
ELSE
IF CannedCycle?
SeqLab
END
END
END
IF PointFeat?
SeqLabC MoveSXYC EOL
ELSE
IF RapidFeat?
SeqLabC RapidC MoveXC MoveZC EOL
ELSE
IF LineFeat?
SeqLabC FeedC 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
Rapid
END
END
END
END
END
NEXTFeat
RETURN
CheckRapid:
IF LAST CannedCycle?
Rapid
ELSE
RapidC
END
RETURN
{Start of executable Prog **************************************************}
{setup and initializations}
InitProg
SetAbs
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 {Load G10 Parameters **************************}
Save# Tool# MUL# ToolOffsetXRadius# Num#('1') { X-Register }
Save# ADD# Tool# Num#('12') ToolOffsetZ# { Z-Register }
NextOp
EachOp {Start of post processing *********************}
GetLCycle
IF FirstOperation?
':' Program#
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 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
SeqLabC Rapid 'G28U0.0' EOL { Zero Return }
SeqLabC 'G28W0.0' EOL { Zero Return }
SeqLabC 'M0' EOL
SeqLabC 'W-6.0' EOL
SeqLabC 'M0' EOL
' ' EOL
EachTool { Output G10 Parameters }
'/G10P100' TLNum# { Data Setting }
'X' Recall# MUL# TLNum# Num#('1') { X-Register }
'Z' Recall# ADD# TLNum# Num#('12') { Z-Register }
IF UseComments?
' ( ' TLToolComment$ ' )'
END
EOL
NextTool
' ' EOL
'/G10P0Z' ZStockMin#
IF UseComments?
' ( WRITING WORK COORDINATE OFFSET )'
END
EOL
IF UseComments?
' ' EOL
'( STOCK FEED )' EOL
END
SeqLabC 'M1' EOL
SeqLabC Rapid 'G98T1213' SpinOff EOL { Feed Per Minute }
SeqLabC XCP ZCP EOL
SeqLabC 'X-7.5' EOL
SeqLabC 'W0'
IF UseComments?
' ( LENGTH OF PART )'
END
EOL
SeqLabC 'M11' EOL { Chuck Unclamp }
SeqLabC 'G4P1000' EOL
SeqLabC 'Z0.04'
IF UseComments?
' ( LEAVES MATL FOR FACING )'
END
EOL
SeqLabC 'G4P1000' EOL
SeqLabC 'M10' EOL { Chuck Clamp }
SeqLabC Rapid 'Z5.0' EOL
SeqLabC 'X6.0Z7.0' EOL
SeqLabC 'M1' EOL
' ' EOL
DoOpComments
DoPostScript
Plane
'N' Tool# '00' Rapid 'G99' { Feed Per Revolution }
SeqLabC
IF ConstantSurfaceFeed?
Preset MaxRPM CoolOn EOL
SeqLabC CSSOn 'G96'
ELSE
CSSOff 'G97'
END
Speed OpToolID LatheOffset SpinOn EOL
Approach
ELSE
IF NewTool?
{Finish off last Operation}
StockOff {.62}
CheckRapid
IF LAST ApproachOD?
SeqLabC XCPC EOL
ELSE
IF LAST ApproachID?
SeqLabC LAST XOpECDC EOL
END
END
SeqLabC ZCPC EOL
DoEndOpPS
SeqLabC NewHome CoolOff EOL
SeqLabC
IF LAST ProgStop?
'M0'
ELSE
ProgStop
END
EOL
{Start new Operation}
' ' EOL
DoOpComments
DoPostScript
'N' Tool# '00' Rapid 'G99' { Feed Per Revolution }
SeqLabC
IF ConstantSurfaceFeed?
Preset MaxRPM CoolOn EOL
SeqLabC CSSOn 'G96'
ELSE
CSSOff 'G97'
END
Speed OpToolID LatheOffset 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 ZCPC EOL
SeqLabC XCPC EOL
END
CheckOffset
ODApproachSP
ELSE
IF ApproachID?
IF LAST ApproachID?
SeqLabC LAST XOpECDC EOL
ELSE
IF LAST ApproachOD? {around}
SeqLabC XCPC EOL
END
SeqLabC ZCPC EOL
SeqLabC XOpCDC EOL
END
CheckOffset
IDApproachSP
ELSE {ApproachFace}
IF LAST ApproachFace?
SeqLabC LAST ZOpECPC EOL
ELSE
IF LAST ApproachOD? {around}
SeqLabC XCPC EOL
ELSE {LAST ApproachID}
SeqLabC LAST XOpECDC EOL
END
SeqLabC ZCPC EOL
END
CheckOffset
FaceApproachSP
END
END
END
END
END
END {common point for all operations}
IF CannedCycle?
StockOff
IF Roughing?
IF RoughSimple?
StockOn
SetPass1
IF ApproachFace?
SeqLabC LCycle 'Z' FirstMoveEPZ# XatFinZ XTapAtZ FeedRate EOL
ELSE
SeqLabC LCycle XatFinZ FinZ XTapAtZ FeedRate EOL
END
SimpleRough
ELSE
TagInc
IF RoughContour?
SetPass2
SeqLabC LCycle 'PÅ‚' Tag# 'Q²' Tag# XStkLeft ZStkLeft CutDepth FeedRate EOL
'>' Tag# EOL
IF ApproachFace?
SeqLab StepMove 'Z' SPZ# EOL
SeqLabC 'X' SPX# EOL
ELSE
SeqLab StepMove 'X' SPX# EOL
SeqLabC 'Z' SPZ# EOL
END
ToolPath
'<' Tag# EOL
IF AutoFinish?
SeqLabC 'G70' 'PÅ‚' Tag# 'Q²' Tag# EOL
END
ELSE
IF RoughPatternShift?
SetPass2
SeqLabC LCycle 'PÅ‚' Tag# 'Q²' Tag# XStkLeft ZStkLeft XminusU ZminusW NumCuts FeedRate EOL
'>' Tag# EOL
SeqLab Rapid StrtPos EOL
ToolPath
'<' Tag# EOL
IF AutoFinish?
SeqLabC 'G70' 'PÅ‚' Tag# 'Q²' Tag# EOL
END
END
END
END
ELSE
IF Threading?
IF Chamfer?
SeqLabC 'M23' EOL
END
SeqLabC LCycle XatFinZ FinZ XTapAtZ ThrdHeight CutDepth ThrdLead CutMethod ToolAngle EOL
IF AutoFinish?
SeqLabC 'G92' XatFinZ FinZ XTapAtZ ThrdLead EOL
END
IF Chamfer?
SeqLabC 'M24' EOL
END
ELSE
IF Drilling?
IF Tap?
SeqLabC LCycle ZDepth 'F' FeedIPR# EOL
SeqLabC SpinOff EOL
SeqLabC 'G4P2000' EOL
SeqLabC Speed InverseSpinOn EOL
SeqLabC ZSP EOL
ELSE
IF PeckChipBreaker?
SeqLabC LCycle ZDepth Dwell Peck Retract FeedRate EOL
SeqLabC DrillOff EOL
IF AutoFinish?
SeqLabC Feed ZDepth EOL
IF Dwell?
SeqLabC 'G4P' Dwell# EOL
END
SeqLabC 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
SeqLabC RapidC StrtPos EOL
ToolPath
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 CannedCycle?
Rapid
ELSE
RapidC
END
IF ApproachOD?
SeqLabC XCPC 'M74' EOL { Parts Catcher In }
ELSE
IF ApproachID?
SeqLabC XOpECDC EOL
END
END
SeqLabC ZCPC EOL
DoEndOpPS
SeqLabC FirstHome CoolOff EOL
SeqLabC
IF ProgStop?
'M0'
ELSE
ProgStop
END
EOL
IF UseComments?
'( BAR CHANGE )' EOL
END
'/9M98P1000' EOL { Sub-program Call }
' ' EOL
'M89' EOL { Work Counter }
'/M99P1200' EOL { Return to Main Program }
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 0T MS ( G30) L212 82 1Fanuc 10T MS [2 G54] L066 82Fanuc 10T MS [ PTM] L304 82 2Fanuc 0T Yam CK1A L336 82 1Fanuc 10T MS ( G30) L159 82Fanuc 10T MS [SPM ] L050 82Fanuc 0T MS L579 82mFanuc 10T MS ( EC) L165 82Fanuc 11T MS (HM) L122 82 1Fanuc 6T MS [ BTD] L221 82Fanuc 10T MS ( PTM) L303 82 4Fanuc 0T Azuma MSI L245 82 2Fanuc 16T MS [FD] L389 82 2Fanuc 10T MS [1 G54] L196 82Fanuc 0T MS [SP] L840 85więcej podobnych podstron