Fanuc 21T MS0 [ ] L477 85m


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

{2/21/90, Updated: Fanuc 10T MS [+] L004.53 to .69.3 format, JR}
{7/18/90, Updated: Fanuc 10T MS [+] L004.69 to .69.7 format, JR}
{7/24/90, Added InitProg globally to posts with this remark, DWB}
{9/25/90, Updated to Version 3.2 per Fanuc 10T MS [-] L001.71.1 Format, DWB}
{10/2/90, Added StockOff globally at FirstOperation, DWB}
{10/8/90, Replace CalcRPM2 globally with CalcEPRPM# at end of prog, DWB}

{3/28/91
Modified: Fanuc 10T MS [+] L004.71.3
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 10T MS [-] L001.80 Format.
All normal Fanuc Canned Cycles are supported.
DWB}

{8/5/91
Updated: Fanuc 10T MS [+] L004.80
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 6M M001.82 Format.
KM}

{2/25/92
Copied & modified: Fanuc 10T MS [+] L004.82
For: Gibbs & Associates
Created Metric version for Terry @ Millipart per Joe Cusimano's request.
DWB}

{7/11/95, Updated Fanuc 10T MS [+] L004.82m to .85 format, JR}

{6/20/96
Copied & modified: Fanuc 10T MS [+] L004.85m
For: Mori Seiki USA
Machine: Frontier - L2 (uses direct transmission)
LEVEL 0 APPROVED ONLY - This post isn't test for Level 1 features
Test1 - 6/20/96
added ToolChangeBlock
added hard coded move to "G0X8.Z8." to toolchange and end of program blocks
removed Sequence Labels except for ToolChangeBlock
hardcoded M01 optional stop before tool change
changed MaxRPM to be 3500
changed arc format to output radius value instead of IK value
at end of program hard coded G28U0W0 move to machine zero point
added coolant on to Approach Sub
Test2 - 6/24/96
changed hard coded move from "G0X8.Z8." to "G0X12.Z8." for toolchange and end of program blocks
Test3 - 6/24/96
fixed so tool change block appears before a G97 block
commented out canned cycle since it is an option for the Frontier machine and not available with Level 0.
Test4 - 6/28/96
changed INCHES TO MILLIMETERS for type of output.
Test6 - 7/03/96
Updated post to have same changes as Test6 English
Changed Tap cycle - uses G32 instead of G1
Changed Rigid Tap to be the same as the Tap Cycle.
Changed Threading cycle Feedrate so it uses a F-word instead of an E-word.
Changed Threading cycle by adding M24 - Thread Chamfer off before threading cycle.
Changed Threading cycle to use G92 instead of G32 by adding G92Threading function.
Changed ToolChangeBlock so Tool on line by itself.
removed the extra reverse spindle block at the end of the operation.
forces G0 to cancel G92 cycle in CheckRapid function.
fixed double M-code problem, M8M24, for threading cycle by putting M8 on a line by itself for threading only.
WS}

{7/11/96
Copied & modified: Fanuc 21T MS [+] L471.85m
For: Mori Seiki USA
Machine: Frontier - L2 (uses direct transmission)
LEVEL 0 APPROVED ONLY - This post isn't test for Level 1 features
Test1 - 7/11/96
changed to be a negative side lathe
changed hardcoded x-values to be negative
WS}

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

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(MUL#,2) { Non-Canned Threading AutoFinish }
FORMAT(FirstMoveEPZ#,2)
FORMAT(Operation#,3) {.72}
FORMAT(Tool#,3) {.72}
FORMAT(Dwell#,4) {.72}
FORMAT(FeedIPR#,5)
FORMAT(CalcEPRPM#,6)
FORMAT(RapidF#,7)
FORMAT(Program#,8)

{Mori Seiki USA Specific Prog Subroutines **********************************}

ToolChangeBlock:
SeqLab ' ' EOL
IF ConstantSurfaceFeed? AND NOT Threading?
Rapid Preset MaxRPM EOL
OpToolID LatheOffset EOL
ELSE
Rapid OpToolID LatheOffset EOL
END

IF ConstantSurfaceFeed?
CSSOn 'G96' Speed SpinOn
ELSE
CSSOff 'G97' Speed SpinOn
END
EOL
RETURN

G92Threading:
IF ThreadFeat?
IF Flag?('1')
SetFlagF('1')
'G92' MoveXC MoveZC 'F' FeedIPR# EOL
ELSE
MoveXC EOL
END
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
PostScript EOL {literals}
PSStuff {commands}
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
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?
FeedC
END
RETURN

FeedRateNoCan:
IF NOT CannedCycle?
FeedRateC
END
RETURN

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

AppMove:
ThisOpEntryZCP
RETURN

Approach: { NOT FOR TAILSTOCK, .82 }
IF Threading?
CoolOn EOL
END
Rapid RapidF# { RapidF# Forces FeedRate }
IF ApproachOD?
ThisOpEntryXCP AppMove
ELSE
IF ApproachID?
StockOff XOpCD AppMove
ELSE {ApproachFace}
StockOnNoCan XSP AppMove
END
END
IF Threading?
'M24' EOL
ELSE
CoolOn EOL
END
ApproachSP
RETURN

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

FormatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXC MoveZC ArcRC
RETURN

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

ToolPath:
SetFlag('1')
EACHFeat
GetToolTip
IF Threading?
G92Threading
ELSE
IF LastFeat?
IF Drilling?
IF Tap?
SpinOff EOL
'G4P2000' EOL
Speed InverseSpinOn EOL
ELSE
IF Dwell?
'G4P' Dwell# EOL
END
END
END
END
IF PointFeat?
MoveSXYC EOL
ELSE
IF RapidFeat?
RapidC MoveXC MoveZC EOL
ELSE
IF LineFeat?
IF Tap?
'G32' MoveZC FeedRateC EOL
ELSE
CkCRC FeedC MoveXC MoveZC FeedRateC EOL
END
ELSE
IF ArcFeat?
EACHQuadrant { Do not use NOT, LAST, FIRST or NEXT modifiers in this loop }
FormatArc FeedRateC EOL
NEXTQuadrant
END
END
END
END
END
NEXTFeat
RETURN

CheckRapid:
CRCOffC
IF LAST CannedCycle? OR LAST Threading?
Rapid {This will cancel the G92 threading cycle}
ELSE
RapidC
END
RETURN

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

{setup and initializations}
InitProg
SetAbs
NegSideLathe
SetMaxRPM('3500')
SetMaxFeed('500')
{Flags used in this program}
SetFlagF('1') {used in the G92Threading function to allow G92 be output only once}
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 MILLIMETERS )' EOL
END
END
RestoreScale
OpenSub
StockOff {.71.2}
SetHome
DoOpComments
DoPostScript
Plane
ToolChangeBlock
Approach
ELSE
IF NewTool?

{Finish off last Operation}

StockOff {.62}
CheckRapid
IF LAST ApproachOD?
LAST OpExitXCPC EOL
ELSE
IF LAST ApproachID?
LAST XOpECDC EOL
END
END
LAST OpExitZCPC EOL
DoEndOpPS
'G0X-12.Z8.' EOL
ProgStop EOL

{Start new Operation}

DoOpComments
DoPostScript
ToolChangeBlock
Approach
ELSE
IF SameTool? {.62}

{Start new Operation}

StockOff
DoOpComments
IF LAST StraightConnect?
CheckOffset
CheckRapid
StockOnNoCan XSPC ZSPC EOL
ELSE
CheckRapid
IF ApproachOD?
IF LAST ApproachOD?
LAST XOpECDC EOL
ELSE {around}
IF LAST ApproachID?
LAST XOpECDC EOL
END
LAST OpExitZCPC EOL
LAST OpExitXCPC EOL
END
ELSE
IF ApproachID?
IF LAST ApproachID?
LAST XOpECDC EOL
ELSE
IF LAST ApproachOD? {around}
LAST OpExitXCPC EOL
END
LAST OpExitZCPC EOL
XOpCDC EOL
END
ELSE {ApproachFace}
IF LAST ApproachFace?
LAST ZOpECPC EOL
ELSE
IF LAST ApproachOD? {around}
LAST OpExitXCPC EOL
ELSE {LAST ApproachID}
LAST XOpECDC EOL
END
LAST OpExitZCPC EOL
END
END
END
CheckOffset
ApproachSP
END
END
END
END {common point for all operations}

StockOn
SetPass1
ToolPath
IF AutoFinish? { .82.1c }
StockOff
IF Turning?
IF ApproachFace?
RapidC ZOpECPC EOL
ELSE
RapidC XOpECDC EOL
END
ApproachSP
StockOff StrtPosC EOL
ToolPath
ELSE
IF Roughing? AND NOT RoughSimple?
SetPass2
RapidC XSPC ZSPC EOL
StockOff StrtPosC EOL
ToolPath
SetPass1
END
END
END
NextOp {loops back to EachOP until last Operation}

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

{finish last operation}
StockOff
CRCOffC
Rapid
IF ApproachOD?
OpExitXCPC EOL
ELSE
IF ApproachID?
XOpECDC EOL
END
END
OpExitZCPC CoolOff EOL
'G0X-12.Z8.' EOL
'G28U0W0' EOL
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

{END OF PROGRAM}

{**** >>>>>> Canned Cycle commented out for Level 0 Post <<<<<< *****
IF CannedCycle?
StockOff
IF Roughing?
IF RoughSimple?
StockOn
SetPass1
LCycle
IF ApproachFace?
'Z' FirstMoveEPZ# XatFinZ
ELSE
XatFinZ FinZ
END
XTapAtZ FeedRate EOL
SimpleRough
ELSE
TagInc
SetPass2
IF RoughContour?
LCycle 'PÅ‚' Tag# 'Q²' Tag# XStkLeft ZStkLeft CutDepth FeedRate EOL
'>' Tag# EOL
StepMove StrtPos EOL
ELSE
IF RoughPatternShift?
LCycle 'PÅ‚' Tag# 'Q²' Tag# XStkLeft ZStkLeft XminusU ZminusW NumCuts FeedRate EOL
'>' Tag# EOL
Rapid StrtPos EOL
END
END
ToolPath
'<' Tag# EOL
IF AutoFinish?
'G70' 'PÅ‚' Tag# 'Q²' Tag# EOL
END
SetPass1
TrackXNO# CycleStartX#
TrackZNO# CycleStartZ#
END
ELSE
IF Threading?
IF Chamfer?
'M23' EOL
END
LCycle XatFinZ FinZ XTapAtZ CutMethod ThrdHeight CutDepth ThrdLead ToolAngle EOL
IF AutoFinish?
'G92' XatFinZ FinZ XTapAtZ ThrdLead EOL
END
IF Chamfer?
'M24' EOL
END
ELSE
IF Drilling?
IF Tap?
LCycle ZDepth 'E' FeedIPR# EOL
SpinOff EOL
'G4P2000' EOL
Speed InverseSpinOn EOL
ZSP EOL
ELSE
IF PeckChipBreaker?
LCycle ZDepth RLevel Dwell Peck Retract FeedRate EOL
DrillOff EOL
IF AutoFinish?
Feed ZDepth EOL
IF Dwell?
'G4P' Dwell# EOL
END
Rapid ZSP EOL
END
END
END
ELSE
IF Grooving?
StockOn
SetPass1
StrtPos EOL
ToolPath
END
END
END
END
ELSE
***** >>>>>> Canned Cycle commented out for Level 0 Post <<<<<< *****}


Wyszukiwarka

Podobne podstrony:
Fanuc 21T MS0 [ ] L471 85m
Fanuc 21T MS0 [ ] L471 85
Fanuc 21T MS0 M42 [ ] L476 85
Fanuc 21T MS [ EMT] L642 85m
Fanuc 21T [MPG] L733 85 2
Fanuc 6T MS ( ) L005 85m
Fanuc 6T MS [ ] L016 85m
Fanuc 11T Nakamura L187 85m
Fanuc 15T MS [ ] L166 85m
Fanuc 0TC [CG] L320 85m
Fanuc 21T MS [WIKA] L837 85
Fanuc 16T MS [ ] L314 85m
Fanuc 0T [FRM] L680 85m
Fanuc 0T Topper L371 85m
Fanuc 21T MS [CST] L799 85 1

więcej podobnych podstron