Fanuc 0T MS L579 82m


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


{7/17/93
Modified: Fanuc 0T MS L233.82.7.6
For: Superior Screw Products
Modifications made per conversations with Geoffrey Gens @ Superior Screw Products.
Updated to most recent version of Numbers Lathe L001.82 again.
Corrected rounding error noted on 3/12/93.
Problem was resolved when I added FORMAT(Recall#,8) '###.#######;0'. Loading a value 7 places will
cause a 6 place decimal to round correctly. In the past I was loading a 4 place decimal. .55555
loaded as .5555. Loading this as .5555555 will output as .5556.
Deleted Report and DoReport subs and calls to same.
Deleted Flag(1), approach Flag.
Using Var(9) to store 1=OD, 2=ID and 3=Face.
Decremented Flags(2-9) by one.
DWB}

{2/12/96
Modified: Fanuc 0T MS L233.82.7.7
For: Centroid
Modifications made per fax from John Arington @ Centroid.
(L233.82.8)
removed the "/N1M00" at the beginning of the job and replaced it with "SeqLabC ProgStop EOL".
removed all "M00"
changed "G30H0" to "G28U0.0W0.0" at the beginning of the job.
changed comment start character from "/" to ":"
changed form so spindle direction "M3" is forward(cw) and "M4" is reverse(ccw)
changed GetXCP and GetZCP to use ThisOpEntry(XCP and ZCP) number commands
removed the M89 and M99 codes at the end of the program.
(Lxxx.82.8a)
removed most of the code related to have a 2nd Sub Spindle.
(Lxxx.82.8b)
changed moves to OD clearance plane to use XCP and ZCP comamnds (no GetXCP calls)
this is a temporary post until he gets the SFP Lathe Update.
WS}

{4/14/97
Modified: Fanuc 0T MS L579.82
Created: Fanuc 0T MS L579.82m
For: Centroid
Modifications made per P.O. from Dan Dillon @ Centroid.
(L579.82m) - 4/15/97
updated post to support metric
released to Centroid w/o being fully approved since they needed to send the metric post to New Zealand.
John Arrington said that he didn't have time to spend verifying any posts at this time. Will be done at a later date.
WS}

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

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(FirstMoveEPZ#,2)
FORMAT(Program#,3) {.72}
FORMAT(Operation#,3) {.72}
FORMAT(Tool#,3) {.72}
FORMAT(Dwell#,4) {.72}
FORMAT(FeedIPR#,5)
FORMAT(SUB#,6)
FORMAT(RapidF#,7)
FORMAT(Recall#,8)

{Added Subroutines *********************************************************}

GetTT:
SetStatusOff
StockOff
Save# Num#('2') SUB# SetTTOff CycleStartX# SetTTOk CycleStartX#
Save# Num#('1') SUB# SetTTOff CycleStartZ# SetTTOk CycleStartZ#
SetStatusOn
RETURN

GetExit:
SetStatusOff
IF ApproachFace?
Save# Num#('7') ClearancePlane3# { ZEOpCP }
ELSE
Save# Num#('7') MUL# ClearancePlane3# Num#('2') { XEOpCD PosSideLathe }
Save# Num#('8') SUB# Recall# Num#('7') Recall# Num#('2') { XsAreRadiiF NewTool }
END
SetStatusOn
RETURN

GetX:
Save# Num#('6') DIV# Recall# Num#('4') Num#('2') { PosSideLathe }
RETURN

GetZ:
Save# Num#('5') Recall# Num#('3')
RETURN

GetXTT:
Save# Num#('6') DIV# ADD# Recall# Num#('4') Recall# Num#('2') Num#('2') { XsAreRadiiF PosSideLathe }
RETURN

GetZTT:
Save# Num#('5') ADD# Recall# Num#('3') Recall# Num#('1')
RETURN

DoLoad:
SetTTOff
LoadFeat Recall# Num#('5') Recall# Num#('6')
SetTTOk
RETURN

LoadX:
GetX DoLoad
RETURN

LoadZ:
GetZ DoLoad
RETURN

LoadXZ:
GetX GetZ DoLoad
RETURN

LoadXTT:
GetXTT DoLoad
RETURN

LoadZTT:
GetZTT DoLoad
RETURN

LoadXTTZ:
GetXTT GetZ DoLoad
RETURN

LoadXZTT:
GetX GetZTT DoLoad
RETURN

LoadXTTZTT:
GetXTT GetZTT DoLoad
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?
SetLineStrtChr(':')
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
SetLineStrtChr('')
END
RETURN

PSInit: {reset flags from last Op, .70}
OptCyc1F { For Reporting only }
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

GetXCP:
SetStatusOff
Save# Num#('4') OpExitXCP# {XStockMax#}
SetStatusOn
RETURN

GetZCP:
SetStatusOff
Save# Num#('3') OpExitZCP# {ZStockMax#}
SetStatusOn
RETURN

GetXOpCD:
SetStatusOff
Save# Num#('4') XOpCD#
SetStatusOn
RETURN

GetZOpCP:
SetStatusOff
Save# Num#('3') ZOpCP#
SetStatusOn
RETURN

GetXSP:
SetStatusOff
StockOnNoCan
Save# Num#('4') CycleStartX#
StockOff
SetStatusOn
RETURN

GetZSP:
SetStatusOff
StockOnNoCan
Save# Num#('3') CycleStartZ#
StockOff
SetStatusOn
RETURN

GetNewToolXOpECD:
Save# Num#('4') Recall# Num#('8')
RETURN

GetSameToolXOpECD:
Save# Num#('4') Recall# Num#('7')
RETURN

GetSameToolZOpECP:
Save# Num#('3') Recall# Num#('7')
RETURN

FeedNoCan:
IF NOT CannedCycle?
FeedC
END
RETURN

FeedRateNoCan:
IF NOT CannedCycle?
FeedRateC
END
RETURN

ODApproachSP:
GetZSP LoadZTT
SeqLabC StockOff MoveZC EOL
GetXOpCD LoadXTT
SeqLabC MoveXC EOL
IF NotEqual? CycleStartX# XOpCD#
GetXSP LoadXTT
SeqLabC FeedNoCan StockOff MoveXC FeedRateNoCan EOL
END
StockOnNoCan
RETURN

IDApproachSP:
GetZSP LoadZTT
SeqLabC StockOff MoveZC EOL
GetXOpCD LoadXTT
SeqLabC MoveXC EOL
IF NotEqual? CycleStartX# XOpCD#
GetXSP LoadXTT
SeqLabC FeedNoCan StockOff MoveXC FeedRateNoCan EOL
END
StockOnNoCan
RETURN

FaceApproachSP:
GetXSP LoadXTT
SeqLabC StockOff MoveXC EOL
GetZOpCP LoadZTT
SeqLabC MoveZC EOL
IF NotEqual? CycleStartZ# ZOpCP#
GetZSP LoadZTT
SeqLabC FeedNoCan StockOff MoveZC FeedRateNoCan EOL
END
StockOnNoCan
RETURN

AppMove:
LoadXTTZTT
SeqLabC StockOff MoveX MoveZ CoolOn EOL
RETURN

AppMove2:
ZCP CoolOn
RETURN

Approach: { NOT FOR TAILSTOCK, .82 }
RapidF# { RapidF# Forces FeedRate }
GetZCP
IF ApproachOD?
SeqLabC RapidC XCP AppMove2 EOL
ODApproachSP
ELSE
IF ApproachID?
GetXOpCD AppMove
IDApproachSP
ELSE {ApproachFace}
GetXSP AppMove
FaceApproachSP
END
END
RETURN

CheckOffset:
GetExit
DoEndOpPS
IF LAST ProgStop?
{SeqLabC 'M00' EOL}
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
END
IF NewToolOffset?
SeqLabC OpToolID LatheOffset EOL
END
IF ConstantSurfaceFeed?
IF LAST 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 'G04P2000' EOL
SeqLabC Speed 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?
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
IF LastFeat?
SetStatusOff
IF CannedCycle?
Save# Num#('4') CycleStartX#
Save# Num#('3') CycleStartZ#
ELSE
Save# Num#('4') EPX#
Save# Num#('3') EPZ#
END
SetStatusOn
END
NEXTFeat
RETURN

CheckRapid:
IF Flag?('1') { CheckRapid }
SetFlagF('1')
IF Flag?('2') { LastOp CheckRapid }
IF CannedCycle?
Rapid
ELSE
RapidC
END
ELSE
IF LAST CannedCycle?
Rapid
ELSE
RapidC
END
END
END
RETURN

CheckXRapid:
IF XMove?
CheckRapid
END
RETURN

CheckZRapid:
IF ZMove?
CheckRapid
END
RETURN

CheckXZRapid:
IF NOT XMove? AND NOT ZMove?
ELSE
CheckRapid
END
RETURN

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

{setup and initializations}
InitProg
SetAbs
PosSideLathe
StandardXZArcs
SetMaxRPM('6000')
SetMaxFeed('500')
SetFlagF('1') { CheckRapid }
SetFlagF('2') { LastOp CheckRapid }
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
GetTT
IF FirstOperation?
EOR EOL
':' Program#
IF UseComments? AND ProgramNameComment?
'( ' ProgramName$ ' )'
END
EOL
IF UseComments?
SetLineStrtChr(':')
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
SetLineStrtChr('')
END
RestoreScale
OpenSub
StockOff {.71.2}
SetHome
DoOpComments
DoPostScript
Plane
GetExit
SeqLabC ProgStop EOL
SeqLabC 'G28U0.0W0.0' EOL { Send Sub Spindle to 2nd Zero }
IF ConstantSurfaceFeed?
SeqLabC Preset MaxRPM EOL
CSSOn 'G96'
ELSE
CSSOff 'G97'
END
SeqLabC Speed SpinOn EOL
SeqLabC Rapid OpToolID LatheOffset EOL
Approach
ELSE
IF NewTool?

{Finish off last Operation}

StockOff {.62}
IF LAST ApproachOD?
SeqLabC CheckXRapid XCPC EOL
ELSE
IF LAST ApproachID?
GetNewToolXOpECD LoadXTTZTT
SeqLabC CheckXRapid MoveXC EOL
END
END
SeqLabC CheckZRapid ZCPC EOL
IF LAST Drilling? { 4/22/92 }
SeqLabC CheckXRapid XCPC EOL
END
DoEndOpPS
SeqLabC CheckRapid 'G28U0.0W0.0' EOL
IF LAST ProgStop?
{SeqLabC 'M00' EOL}
ELSE
SeqLabC ProgStop EOL
END

{Start new Operation}

GetExit
DoOpComments
DoPostScript
SeqLab
IF ConstantSurfaceFeed?
SeqLabC Preset MaxRPM EOL
CSSOn 'G96'
ELSE
CSSOff 'G97'
END
SeqLabC Speed SpinOn EOL
SeqLabC Rapid OpToolID LatheOffset EOL
Approach
ELSE
IF SameTool? {.62}

{Start new Operation}

StockOff
DoOpComments
IF LAST StraightConnect?
CheckOffset
GetXSP GetZSP LoadXTTZTT
SeqLabC StockOff CheckXZRapid MoveXC MoveZC EOL
StockOnNoCan
ELSE
IF ApproachOD?
IF LAST ApproachOD?
GetSameToolXOpECD LoadXZTT
SeqLabC CheckXRapid MoveXC EOL
ELSE {around}
IF LAST ApproachID?
GetSameToolXOpECD LoadXTTZ
SeqLabC CheckXRapid MoveXC EOL
END
SeqLabC CheckZRapid ZCPC EOL
SeqLabC CheckXRapid XCPC EOL
END
CheckOffset
ODApproachSP
ELSE
IF ApproachID?
IF LAST ApproachID?
GetSameToolXOpECD LoadXZTT
SeqLabC CheckXRapid MoveXC EOL
ELSE
IF LAST ApproachOD? {around}
SeqLabC CheckXRapid XCPC EOL
END
SeqLabC CheckZRapid ZCPC EOL
GetXOpCD LoadXTTZTT
SeqLabC CheckXRapid MoveXC EOL
END
CheckOffset
IDApproachSP
ELSE {ApproachFace}
IF LAST ApproachFace?
GetSameToolZOpECP LoadXTTZ
SeqLabC CheckZRapid MoveZC EOL
ELSE
IF LAST ApproachOD? {around}
SeqLabC CheckXRapid XCPC EOL
ELSE {LAST ApproachID}
GetSameToolXOpECD LoadXTTZ
SeqLabC CheckXRapid MoveXC EOL
END
SeqLabC CheckZRapid ZCPC EOL
END
CheckOffset
FaceApproachSP
END
END
END
END
END
END {common point for all operations}
SetFlag('1') { CheckRapid }
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
IF ApproachFace?
ZSP
ELSE
XSP
END
EOL
ELSE
IF RoughPatternShift?
SeqLabC LCycle 'PÅ‚' Tag# 'Q²' Tag# XStkLeft ZStkLeft XminusU ZminusW NumCuts FeedRate EOL
'>' Tag# EOL
SeqLab Rapid 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 Chamfer?
SeqLabC 'M23' EOL
END
SeqLabC LCycle XatFinZ FinZ XTapAtZ CutMethod ThrdHeight CutDepth ThrdLead 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 'G04P2000' 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 EOL
IF Dwell?
SeqLabC 'G04P' Dwell# EOL
END
SeqLabC Rapid ZSP EOL
SetFlagF('1') { Cancel CheckRapid }
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
RapidC
IF ApproachOD?
GetSameToolXOpECD LoadXZTT
SeqLabC MoveXC EOL
ODApproachSP
ELSE
IF ApproachID?
GetSameToolXOpECD LoadXZTT
SeqLabC MoveXC EOL
IDApproachSP
ELSE {ApproachFace}
GetSameToolZOpECP LoadXTTZ
SeqLabC MoveZC EOL
FaceApproachSP
END
END
ELSE
SetPass2
SetStatusOff
Save# Num#('4') CycleStartX#
Save# Num#('3') CycleStartZ#
SetStatusOn
LoadXTTZTT
SeqLabC MoveXC MoveZC EOL
END
SeqLabC StockOff StrtPosC EOL
ToolPath
END
END
END
END
IF Drilling? AND Tap?
SeqLabC SpinOff EOL
SeqLabC 'G04P2000' EOL
SeqLabC Speed SpinOn EOL
END
NextOp {loops back to EachOP until last Operation}

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

{finish last operation}
StockOff
SetFlag('2') { LastOp CheckRapid }
IF ApproachOD?
SeqLabC CheckXRapid XCPC EOL
ELSE
IF ApproachID?
GetNewToolXOpECD LoadXTTZTT
SeqLabC CheckXRapid MoveXC EOL
END
END
SeqLabC CheckZRapid ZCPC EOL
IF Drilling? { 4/22/92 }
SeqLabC CheckXRapid XCPC EOL
END
DoEndOpPS
SeqLabC 'G28U0.0W0.0' EOL
SeqLabC SpinOff EOL
Post
EOR EOL
Close
Retag
IF UseComments?
SetLineStrtChr(':')
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
SetLineStrtChr('')
Close
END


Wyszukiwarka

Podobne podstrony:
Fanuc 0T MS [SP] L840 85
Fanuc 0T MS L233 85
Fanuc 0T MS [HA] L383 85 1
Fanuc 0T MS ( G30) L212 82 1
Fanuc 0T MS SL25A L239 82 5
Fanuc 0T MS [RL] L805 85 1
Fanuc 0T Col [MS] L577 85
Fanuc 0T Mate MS L031 85
Fanuc 0T Mate MS L031 85m
Fanuc 10T MS [2 G54] L066 82
Fanuc 0T (Anzon1) L077 82 1m
Fanuc 0T DP [TTT] L567 85
Fanuc 0T SL 25 [CS] L323 82 1

więcej podobnych podstron