{Change Comments ***********************************************************}
{5/20/91
Copied & modified: Fanuc 10T MS [-] L001.81
For: Bacharach, Inc
Machine: Mazak
Control: Fanuc 6T
Changes made per conversations with Bob Ketchell and sample COMPACT II printouts.
Rapid outputs 'G98' to set control into IPM, Feed outputs 'G99' to set control
into IPR. 'G00 is only output for turning Offsets On and Off. 'G01' is only output
on initial Approach line from FirstOperation and NewTool, and to cancel 'G2/G3'.
All normal Fanuc Canned Cycles are supported.
Added literal 'G20' to set Control into INCH mode in FirstOperation.
Changed Home to literal 'X11.875Z18.8822' in FirstOperation and NewTool.
Changed NewHome to literal 'G28U0W0' in NewTool.
Changed FirstHome to literal 'G28U0W0' at the end of the Prog.
Output MaxRPM only if ConstantSurfaceFeed? = TRUE in FirstOperation and NewTool.
Added logic to handle Tool Positions #10 and #13.
Tool #10 is used for BarFeeding. Needed output is handled in FirstOperation and NewTool only.
SameTool only gives a warning. User must choose a Drilling operation to get the desired output.
If user does not choose a Drilling operation, output will be normal.
Selection of Tool #10 will SetFlag('1') which will output a literal 'M99' and 'M02' at end of
Prog, instead of EOP.
Tool #13 is actually User's Tool #11 Part Off Tool, but by selecting Tool #13, the Post Processor
will output a literal 'M31' to advance the Programmable Tailstock with Parts Catcher Attachment,
and a literal 'M32' to retract it. Advancing is handled in FirstOperation and NewTool, and
retraction is handled in NewTool and at the end of the Prog.
DWB}
{7/23/91
Modified: Fanuc 6T Mazak L217.80
For: Bacharach
Changed literal 'X11.875Z18.8822' back to Home in FirstOperation and NewTool.
JC}
{7/31/91
Modified: Fanuc 6T Mazak L217.80.1
For: Bacharach
Added CoolOff and SpinOff before the 'M06' in the BarFeed.
KM}
{8/1/91
Modified: Fanuc 6T Mazak L217.80.2
For: Bacharach
Modified OpToolID and LOfstOff to output literal 'T11' if user selects Tool #13.
Lathe has 12 Tools maximum.
Modified SeqC to SeqLabC in SameTool.
DWB}
{8/6/91
Modified: Fanuc 6T Mazak L217.80.3
For: Bacharach
Added the LAST modifier to GetLOfstOff sub.
DWB}
{11/1/91
Modified: Fanuc 6T Mazak L217.80.4
For: Bacharach
Changes made per Bob Ketchell at Bacharach.
Updated to Version 4.1 per Fanuc 10T MS [-] L001.82 Format.
Deleted CutMethod from Canned Threading Cycle in Mach Spec and Prog.
Changed FORMAT of Canned Threading Cycle ToolAngle from "####.####;0." to "##0" in Mach Spec.
DWB}
{Prog Numeric Format Definitions *******************************************}
#1 = '#.00'
#2 = '###.####;0'
#3 = '########;0'
#4 = '###.###;0'
#5 = '#.######;0'
#6 = '###0'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(FirstMoveEPX#,2)
FORMAT(FirstMoveEPZ#,2)
FORMAT(ZDepth#,2)
FORMAT(Program#,3) {.72}
FORMAT(Operation#,3) {.72}
FORMAT(Tool#,3) {.72}
FORMAT(Dwell#,4) {.72}
FORMAT(RapidF#,4)
FORMAT(FeedIPR#,5)
FORMAT(CalcEPRPM#,6)
{Prog Subroutines **********************************************************}
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
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
GetOpToolID:
IF ToolOver?('12') AND NOT ToolOver?('13')
'T11'
ELSE
OpToolID
END
RETURN
GetLOfstOff:
IF LAST ToolOver?('12') AND LAST NOT ToolOver?('13')
'T11'
ELSE
LOfstOff
END
RETURN
StockOnNoCan:
IF NOT CannedCycle?
StockOn {need stock for SP positioning, if not a canned cycle}
END
RETURN
ODApproachSP:
SeqLabC StockOnNoCan ZSPC RapidFC EOL
SeqLabC StockOff XOpCDC EOL
SeqLabC Feed StockOnNoCan XSPC FeedRate EOL
RETURN
IDApproachSP:
SeqLabC StockOnNoCan ZSPC RapidFC EOL
SeqLabC StockOff XOpCDC EOL { for SameTool ApproachID }
SeqLabC Feed StockOnNoCan XSPC FeedRate EOL
RETURN
FaceApproachSP:
SeqLabC StockOnNoCan XSPC RapidFC EOL { for SameTool ApproachFace }
SeqLabC StockOff ZOpCPC EOL
SeqLabC Feed StockOnNoCan ZSPC FeedRate EOL
RETURN
AppMove:
ZCP RapidF CoolOn
RETURN
Approach: { NOT FOR TAILSTOCK, .82 }
IF ApproachOD?
SeqLabC 'G01' Rapid XCP AppMove EOL
ODApproachSP
ELSE
IF ApproachID?
SeqLabC 'G01' Rapid XOpCD AppMove EOL
IDApproachSP
ELSE {ApproachFace}
SeqLabC 'G01' Rapid StockOnNoCan XSP StockOff AppMove EOL
FaceApproachSP
END
END
RETURN
CheckOffset:
DoEndOpPS
IF LAST ProgStop?
SeqLabC 'M00' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
END
IF NewToolOffset?
SeqLabC GetLOfstOff '00' EOL
SeqLabC GetOpToolID LatheOffset EOL
END
IF ConstantSurfaceFeed?
IF LAST ConstantSurfaceFeed?
SeqLabC SpeedC EOL
ELSE
SeqLabC Preset MaxRPM EOL
SeqLabC CSSOn 'G96' Speed EOL
END
ELSE
IF LAST ConstantSurfaceFeed?
SeqLabC CSSOff 'G97' Speed EOL
ELSE
SeqLabC SpeedC EOL
END
END
IF LAST ProgStop?
SeqLabC SpinOn EOL
SeqLabC CoolOn EOL
ELSE
IF NOT CoolOff? AND LAST CoolOff?
SeqLabC CoolOn EOL
END
END
DoPostScript
RETURN
FormatArc:
IF ArcCW?
'G02'
ELSE
'G03'
END
MoveXC MoveZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
RETURN
ToolPath:
EACHFeat
GetToolTip
IF LastFeat?
IF Drilling?
IF Tap?
SeqLabC SpinOff EOL
SeqLabC 'G04U2.' EOL
SeqLabC Speed InverseSpinOn EOL
ELSE
IF Dwell?
SeqLabC 'G04U' Dwell# EOL
END
END
ELSE
IF CannedCycle?
SeqLab
END
END
END
IF PointFeat?
SeqLabC MoveSXYC EOL
ELSE
IF RapidFeat?
SeqLabC RapidC MoveXC MoveZC RapidFC EOL
ELSE
IF LineFeat?
IF NOT FirstFeat? AND LAST ArcFeat?
'G01'
END
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
IF Taper?
XTapAtZ
END
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 {Start of post processing *********************}
GetLCycle
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 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
SeqLab 'G20' EOL { Sets Control into INCH System }
SeqLabC Preset Home
IF ConstantSurfaceFeed?
MaxRPM
END
EOL
SeqLabC 'G00' GetOpToolID LatheOffset EOL
IF Drilling? AND ToolOver?('9') AND NOT ToolOver?('10') { BarFeeder Station }
SetFlag('1') { Will output 'G99 M02' at end of program }
SeqLabC 'G01' Rapid XSP StockOff ZCP RapidF EOL
SeqLabC 'Z' ZDepth# EOL
SeqLabC CoolOff EOL
SeqLabC SpinOff EOL
SeqLabC 'M06' EOL { Open Chuck/Collet }
SeqLabC 'G04U.5' EOL
SeqLabC ZOpECPC 'F100.' EOL
SeqLabC 'M07' EOL { Close Chuck/Collet }
SeqLabC 'G04U.5' EOL
SeqLabC ZCPC RapidF EOL
ELSE
IF ToolOver?('12') AND NOT ToolOver?('13')
SeqLabC SpinOff EOL
SeqLabC 'M31' EOL { Advance Programmable TailStock with Parts Catcher Attachment }
END
IF ConstantSurfaceFeed?
SeqLabC CSSOff 'G97' CalcRPM1 EOL
ELSE
SeqLabC CSSOff 'G97' Speed EOL
END
SeqLabC SpinOn EOL
Approach
END
ELSE
IF NewTool?
{Finish off last Operation}
IF LAST Drilling? AND LAST ToolOver?('9') AND LAST NOT ToolOver?('10') { BarFeeder Station }
ELSE
StockOff {.62}
CheckRapid
IF LAST ApproachOD?
SeqLabC XCPC RapidFC EOL
ELSE
IF LAST ApproachID?
SeqLabC LAST XOpECDC RapidFC EOL
END
END
SeqLabC ZCPC RapidFC EOL
DoEndOpPS
IF LAST ConstantSurfaceFeed?
SeqLabC CSSOff 'G97' CalcRPM2 EOL
END
IF LAST ToolOver?('12') AND LAST NOT ToolOver?('13')
SeqLabC SpinOff EOL
SeqLabC 'M32' EOL { Retract Programmable TailStock with Parts Catcher Attachment }
END
END { Suppression of BarFeeder Station }
SeqLabC 'G28U0W0' EOL
SeqLabC 'G00' GetLOfstOff '00' EOL
IF LAST ProgStop?
SeqLabC 'M00' EOL
ELSE
SeqLabC ProgStop EOL
END
{Start new Operation}
DoOpComments
DoPostScript
SeqLab Preset Home
IF ConstantSurfaceFeed?
MaxRPM
END
EOL
SeqLabC 'G00' GetOpToolID LatheOffset EOL
IF Drilling? AND ToolOver?('9') AND NOT ToolOver?('10') { BarFeeder Station }
SetFlag('1') { Will output 'G99 M02' at end of program }
SeqLabC 'G01' Rapid XSP ZCP RapidF EOL
SeqLabC 'Z' ZDepth# EOL
SeqLabC CoolOff EOL
SeqLabC SpinOff EOL
SeqLabC 'M06' EOL { Open Chuck/Collet }
SeqLabC 'G04U.5' EOL
SeqLabC ZOpECPC 'F100.' EOL
SeqLabC 'M07' EOL { Close Chuck/Collet }
SeqLabC 'G04U.5' EOL
SeqLabC ZCPC RapidF EOL
ELSE
IF ToolOver?('12') AND NOT ToolOver?('13')
SeqLabC SpinOff EOL
SeqLabC 'M31' EOL { Advance Programmable TailStock with Parts Catcher Attachment }
END
IF ConstantSurfaceFeed?
SeqLabC CSSOff 'G97' CalcRPM1 EOL
ELSE
SeqLabC CSSOff 'G97' Speed EOL
END
SeqLabC SpinOn EOL
Approach
END
ELSE
IF SameTool? {.62}
{Start new Operation}
IF Drilling? AND ToolOver?('9') AND NOT ToolOver?('10') { BarFeeder Station }
' ' EOL
'( WARNING!!! )' EOL
'( YOU HAVE CHOSEN A SAMETOOL DRILLING OPERATION FOR THE BARFEEDER STATION #10. )' EOL
'( YOU MAY NOT GET THE DESIRED RESULTS. )' EOL
' ' EOL
ELSE
DoOpComments
StockOff
IF LAST StraightConnect?
CheckOffset
CheckRapid
SeqLabC StockOnNoCan XSPC ZSPC RapidFC EOL
ELSE
CheckRapid
IF ApproachOD?
IF LAST ApproachOD?
SeqLabC LAST XOpECDC RapidFC EOL
ELSE {around}
IF LAST ApproachID?
SeqLabC LAST XOpECDC RapidFC EOL
END
SeqLabC ZCPC RapidFC EOL
SeqLabC XCPC EOL
END
CheckOffset
ODApproachSP
ELSE
IF ApproachID?
IF LAST ApproachID?
SeqLabC LAST XOpECDC RapidFC EOL
ELSE
IF LAST ApproachOD? {around}
SeqLabC XCPC RapidFC EOL
END
SeqLabC ZCPC RapidFC EOL
SeqLabC XOpCDC EOL
END
CheckOffset
IDApproachSP
ELSE {ApproachFace}
IF LAST ApproachFace?
SeqLabC LAST ZOpECPC RapidFC EOL
ELSE
IF LAST ApproachOD? {around}
SeqLabC XCPC RapidFC EOL
ELSE {LAST ApproachID}
SeqLabC LAST XOpECDC RapidFC EOL
END
SeqLabC ZCPC EOL
END
CheckOffset
FaceApproachSP
END
END
END
END { Suppression of BarFeeder Station }
END
END
END {common point for all operations}
IF Drilling? AND ToolOver?('9') AND NOT ToolOver?('10') { BarFeeder Station }
ELSE
IF ConstantSurfaceFeed? AND NOT SameTool?
SeqLabC CSSOn 'G96' Speed EOL
END
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
SeqLab StepMove StrtPos
IF Rapid?
RapidF
END
EOL
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 RapidF 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
IF NOT ConstantVolumeCut? AND NOT SingleEdgeCut?
SeqLabC 'G92X' FirstMoveEPX# FinZ XTapAtZ ThrdLead EOL
SimpleRough
SeqLabC XatFinZ EOL
IF AutoFinish?
SeqLabC XatFinZ EOL
END
ELSE
SeqLabC LCycle XatFinZ FinZ XTapAtZ ThrdHeight CutDepth ThrdLead
IF SingleEdgeCut?
ToolAngle
ELSE
'A0'
END
EOL
IF AutoFinish?
SeqLabC 'G92' XatFinZ FinZ XTapAtZ ThrdLead EOL
END
END
IF Chamfer?
SeqLabC 'M24' EOL
END
ELSE
IF Drilling?
IF Tap?
SeqLabC LCycle ZDepth 'E' FeedIPR# EOL
SeqLabC SpinOff EOL
SeqLabC 'G04U2.' EOL
SeqLabC Speed InverseSpinOn EOL
SeqLabC ZSP EOL
ELSE
IF PeckChipBreaker?
SeqLabC LCycle ZDepth RLevel Dwell Peck Retract FeedRate EOL
SeqLabC DrillOff EOL
IF AutoFinish?
SeqLabC Feed ZDepth FeedRate EOL
IF Dwell?
SeqLabC 'G04U' Dwell# EOL
END
SeqLabC Rapid ZSP RapidF EOL
END
END
END
END
END
END
ELSE
StockOn
SetPass1
ToolPath
IF AutoFinish?
IF NOT Drilling? AND NOT Grooving?
StockOff
IF Turning?
SetPass1
ELSE
SetPass2
END
SeqLabC RapidC StrtPos RapidFC EOL
ToolPath
END
END
END
IF Drilling? AND Tap?
SeqLabC SpinOff EOL
SeqLabC 'G04U2.' EOL
SeqLabC Speed SpinOn EOL
END
END { Suppression of BarFeeder Station }
NextOp {loops back to EachOP until last Operation}
{End of program ************************************************************}
{finish last operation}
IF Drilling? AND ToolOver?('9') AND NOT ToolOver?('10') { BarFeeder Station }
ELSE
StockOff
IF CannedCycle?
Rapid
ELSE
RapidC
END
IF ApproachOD?
SeqLabC XCPC RapidFC EOL
ELSE
IF ApproachID?
SeqLabC XOpECDC RapidFC EOL
END
END
SeqLabC ZCPC RapidFC EOL
DoEndOpPS
SeqLabC CoolOff EOL
IF ConstantSurfaceFeed?
SeqLabC CSSOff 'G97S' CalcEPRPM# EOL
END
SeqLabC SpinOff EOL
IF ToolOver?('12') AND NOT ToolOver?('13')
SeqLabC 'M32' EOL { Retract Programmable TailStock with Parts Catcher Attachment }
END
END { Suppression of BarFeeder Station }
SeqLabC 'G28U0W0' EOL
SeqLabC 'G00' GetOpToolID '00' EOL
IF ProgStop?
SeqLabC 'M00' EOL
END
IF Flag?('1') { BarFeeder Station was used earlier }
SeqLabC 'M99' EOL { Tape Rewind }
SeqLabC 'M02' EOL
ELSE
SeqLabC EOP EOL
END
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 6T Mazak [JBK] L423 82 2Fanuc 6T Mazak [BEL] L288 82 1mFanuc 2000C Mazak L168 82Fanuc 6T Mazak [Mat] L393 82mFanuc 6T Tsugami 6 L199 82Fanuc 6T Tsugami 4 L198 82Fanuc 6T Mazak [LAM] L621 85 5mFanuc 6T Mazak [AE] L454 85 1Fanuc 6T Mazak [GH] L688 85 1Fanuc 6T (Anzon) L075 82Fanuc 6T Ikegai L094 82Fanuc 6T Mazak M4 L561 85Fanuc 5T Mazak [TM] L275 82 2Fanuc 5T Mazak [NM] L224 82Fanuc 6T Dainichi B70 L229 82 2Fanuc 6T MS [ BTD] L221 82Fanuc 6T Ikegai WF L123 82więcej podobnych podstron