Fanuc 0T Miy BNC 34T L312 85


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

{11/30/88
Copied & modified: Fanuc OT-Miyano L008.51
For: AnWright
Machine: Miyano
Control: Fanuc OT
Added TurretB sub (Drilling Tools 21-26).
JR}

{7/24/90, Added InitProg globally to posts with this remark, DWB}

{2/12/91
Modified: Fanuc OT Miy BNC-T L091.56
For: Gibbs & Associates
Machine: Miyano
Control: Fanuc 0T
Updated to Version 3.2 per Fanuc 10T MS [-] L001.71.4 Format.
Replace literal 'ZCP#' with ZStockMax# because there is no such command as ZCP#.
I'm guessing that the developer wanted to output the equivalent value for ZCP.
DWB}

{3/27/91
Modified: Fanuc 0T Miy BNC-T L091.71.4
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 10T MS [-] L001.80 Format.
All Canned Cycles are supported except PeckFullRetract.
AutoFinish is not supported for Canned Drilling Cycles.
DWB}

{8/2/91
Updated: Fanuc 0T Miy BNC-T L091.80
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 10T MS [-] L001.82 Format.
KM}

{4/12/92
Updated: Fanuc 0T Miy BNC-T L091.82
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 0T/3T Miyano L008.82.1 Format.
KM}

{4/15/93
Updated: Fanuc 0T Miy BNC-T L091.82.1
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 10T MS [-] L001.82.1 Format.
DWB}

{7/13/94
Modified: Fanuc 0T Miy BNC-T L091.82.2
Corrected ToolOver? booleans, they were missing the quotes!
Corrections to TurretB sub to allow use of tool #21 as stated in warning comment.
Jim Radcliffe}

{7/13/94
Copied & modified: Fanuc 0T Miy BNC-T L091.82.3
For: Braden Engineering / O&F Machine
Call up 1st tool on each turret at beginning of program.
Using OptCyc1 to SetFlag1 which is used to decriminate the Bar Feed operation and Parts Catcher,
IF FirstOperation? AND Drilling? AND OptCyc1? AND ToolOver?('20') AND NOT ToolOver?('26')
Calling Spindle on same line as tool for main turret.
Changed MachSpec IK format arcs to use R format arcs up to 180 degrees.
Deleted G28U0W0 from end of program.
G81 drill cycle (FIRO) is not used, doen manually.
Changed literal B0 to 'B' HomeZ#
Changed NewHome and FirstHome to Home (LAST Home), as different Homes are used for Main and B turret.
Moved 'T70' to after B home.
Changed RLevel to 'R' CycleStartZ#.
Deleted move to Z stck size for B turret approach, move directly to CycleStartZ#
Changed TurretB SpinOn to 'M93'.
Changed tapping to use inches per minute feed rate.
Changed format of T to '#0' and LatheOffset to ToolOffset# to get T101 output.
Changed format of decimal output from ##.##;0. to ##.0#;0
Jim Radcliffe}

{8/16/94, .82.4, corrected output of 1st G76 Q value, JR}
{9/1/95, Updated Fanuc 0T Miy BNC-34T L312.82.4 to .85 format per Fanuc 10T MS [-] L001.85.01.01, JR}

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

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(SPX#,2)
FORMAT(SPZ#,2)
FORMAT(FirstMoveEPZ#,2)
FORMAT(EPZ#,2)
FORMAT(ZStockMax#,2)
FORMAT(CycleStartZ#,2)
FORMAT(HomeZ#,2)
FORMAT(Program#,3)
FORMAT(Operation#,3)
FORMAT(Tool#,3)
FORMAT(ADD#,3) { first tool on the each turret }
FORMAT(Dwell#,4)
FORMAT(MUL#,5) { Tapping feed rate }
FORMAT(CalcEPRPM#,6)
FORMAT(RapidF#,7)
FORMAT(ToolOffset#,8)
FORMAT(Peck#,9)
FORMAT(CutDepth#,9)

{Prog Subroutines **********************************************************}

RestoreScale:
IF Metric? {CAM file is in Metric, tools and tool path}
SetScale('.03937007874') { change to English, this is an English post}
END
RETURN

DoOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
'( OPERATION ' Operation# ': '
IF FirstOperation? AND Flag?('1')
'Bar Feeding'
ELSE
OperationType$
END
' )' EOL
END
IF OperationComment?
'( ' OperationComment$ ' )' EOL
END
IF WorkGroupComment?
'( ' WorkGroupComment$ ' )' EOL
END
IF ToolTypeComment?
'( TOOL ' Tool# ': '
IF FirstOperation? AND Flag?('1')
'Bar Feed Stop'
ELSE
ToolSize$ ' ' ToolType$
END
' )' EOL
END
IF ToolComment?
'( ' ToolComment$ ' )' EOL
END
RestoreScale
END
RETURN

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

FeedNoCan:
IF NOT CannedCycle?
FeedC
END
RETURN

FeedRateNoCan:
IF NOT CannedCycle?
FeedRateC
END
RETURN

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

AppMove:
StockOff ThisOpEntryZCP OpToolID ToolOffset# CoolOn
RETURN

Approach: { NOT FOR TAILSTOCK, .82 }
Rapid RapidF# { RapidF# Forces FeedRate }
IF ApproachOD?
SeqLabC ThisOpEntryXCP AppMove EOL
ELSE
IF ApproachID?
SeqLabC XOpCD AppMove EOL
ELSE {ApproachFace}
SeqLabC StockOnNoCan XSP AppMove EOL
END
END
ApproachSP
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 ToolOffset# EOL
END
IF ConstantSurfaceFeed?
IF LAST ConstantSurfaceFeed?
IF NotEqual? MaxRPM# LAST MaxRPM#
SeqLabC Preset MaxRPM EOL
END
IF NotEqual? SpeedRPM# LAST SpeedRPM#
SeqLabC Speed
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

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 LastOp? AND Flag?('1')
SeqLabC 'M35' EOL { Parts Catcher Advance }
END
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 Drilling?
IF RapidFeat?
SeqLabC RapidC 'B' EPZ# EOL
ELSE { LineFeat }
SeqLabC FeedC 'B' EPZ# FeedRateC EOL
END
ELSE
IF RapidFeat?
SeqLabC RapidC MoveXC MoveZC EOL
ELSE
IF LineFeat?
SeqLabC CkCRC 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
END
IF LastOp? AND LastFeat? AND Flag?('1')
SeqLabC 'M36' EOL { Parts Catcher Retract }
END
NEXTFeat
RETURN

BTool:
IF ToolOver?('25')
'M66'
ELSE
IF ToolOver?('24')
'M65'
ELSE
IF ToolOver?('23')
'M64'
ELSE
IF ToolOver?('22')
'M63'
ELSE
IF ToolOver?('21')
'M62'
ELSE
'M61'
END
END
END
END
END
RETURN

BOffset:
IF ToolOver?('25')
'T76'
ELSE
IF ToolOver?('24')
'T75'
ELSE
IF ToolOver?('23')
'T74'
ELSE
IF ToolOver?('22')
'T73'
ELSE
IF ToolOver?('21')
'T72'
ELSE
'T71'
END
END
END
END
END
RETURN

TurretB: { Turret B data }
IF ToolOver?('26') OR NOT ToolOver?('20')
' ' EOL
'( WARNING! You have chosen to use tool#' Tool# ', for this Drilling operation. )' EOL
'( This post processor is set up to output Drill Turret B data,)' EOL
'( based upon the selection of tools 22 through 26. )' EOL
'( Please modify your selection for this to work correctly. )' EOL
'( Thank you. )' EOL
' ' EOL
ELSE
IF FirstOperation? AND Flag?('1') { Bar Feed? }
{ tool is allready called }
{ spindle not needed }
SeqLabC 'G101' EOL { Begin Drill Turret Program }
SeqLabC BOffset EOL { Call Offset }
ELSE
SeqLabC BTool EOL { Call Tool }
SeqLab CSSOff 'G97' Speed 'M93' EOL { turn on spindle and coolant }
SeqLabC 'G101' EOL { Begin Drill Turret Program }
SeqLabC BOffset EOL { Call Offset }
END
END
RETURN

CheckRapid:
CRCOffC
IF LAST CannedCycle?
Rapid
ELSE
RapidC
END
RETURN

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

{setup and initializations}
InitProg
SetAbs
PosSideLathe
StandardXZArcs
SetMaxRPM('10000')
SetMaxFeed('500')
SetFlagF('1') { Bar Feed Flag }
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
' OptionalCycle1, OptCyc1 -' EOL
' When it is called in the first operation before an ENDOP, and the' EOL
' first operation is a drilling operation using a tool number' EOL
' 21 thru 26, it sets the first operation to a Bar Feed operation' EOL
' and sets the last operation to use the parts catcher.' EOL
END

{ find and save the first tool that is used on each turret }
Save# Num#('1') Num#('0')
Save# Num#('2') Num#('0')
EachOp
IF ToolOver?('20')
IF GreaterThan? Recall# Num#('2') Num#('0')
{ we allready saved the 1st tool on the B turret }
ELSE
Save# Num#('2') Tool#
END
ELSE
IF GreaterThan? Recall# Num#('1') Num#('0')
{ we allready saved the 1st tool on the main turret }
ELSE
Save# Num#('1') Tool#
END
END
NextOp

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
RestoreScale
OpenSub
StockOff SetHome Plane
SeqLabC
'T' Recall# Num#('1') '00' { first tool on main spindle }
'M' ADD# Recall# Num#('2') Num#('40') { first tool on B turret }
EOL
DoPostScript
IF Drilling? AND OptCyc1? AND ToolOver?('20') AND NOT ToolOver?('26')
SetFlag('1') { This is a Bar Feed Program }
END
DoOpComments
IF Drilling?
TurretB
ELSE
SeqLab OpToolID '00'
CSSOff 'G97'
IF ConstantSurfaceFeed?
CalcRPM1
ELSE
Speed
END
SpinOn EOL
IF ConstantSurfaceFeed?
SeqLabC Preset MaxRPM EOL
END
Approach
END
ELSE
IF NewTool?

{Finish off last Operation}

StockOff {.62}
IF LAST Drilling? { Format Not For Sync Operation }
SeqLabC Rapid 'B' LAST HomeZ# EOL { Drill Turret Retract }
SeqLabC 'T70' EOL { Cancel Offset }
SeqLabC 'M90' EOL { Waiting Command }
SeqLabC 'G100' EOL { End Drill Turret Program }
SeqLabC 'M40' EOL { Execute Drill Turret Program }
SeqLabC 'M90' EOL { Waiting Command }
ELSE
CheckRapid
IF LAST ApproachOD?
SeqLabC LAST OpExitXCPC EOL
ELSE
IF LAST ApproachID?
SeqLabC LAST XOpECDC EOL
END
END
SeqLabC LAST OpExitZCPC EOL
DoEndOpPS
IF LAST ConstantSurfaceFeed?
SeqLabC CSSOff 'G97' CalcRPM2 EOL
END
SeqLabC LAST Home LOfstOff '00' EOL
END
IF LAST ProgStop?
SeqLabC 'M0' EOL
ELSE
SeqLabC ProgStop EOL
END

{Start new Operation}

DoPostScript
DoOpComments
IF Drilling?
TurretB
ELSE
SeqLab OpToolID '00'
CSSOff 'G97'
IF ConstantSurfaceFeed?
CalcRPM1
ELSE
Speed
END
SpinOn EOL
IF ConstantSurfaceFeed?
SeqLabC Preset MaxRPM EOL
END
Approach
END
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 LAST OpExitZCPC EOL
SeqLabC LAST OpExitXCPC EOL
END
ELSE
IF ApproachID?
IF LAST ApproachID?
SeqLabC LAST XOpECDC EOL
ELSE
IF LAST ApproachOD? {around}
SeqLabC LAST OpExitXCPC EOL
END
SeqLabC LAST OpExitZCPC EOL
SeqLabC XOpCDC EOL
END
ELSE {ApproachFace}
IF LAST ApproachFace?
SeqLabC LAST ZOpECPC EOL
ELSE
IF LAST ApproachOD? {around}
SeqLabC LAST OpExitXCPC EOL
ELSE {LAST ApproachID}
SeqLabC LAST XOpECDC EOL
END
SeqLabC LAST OpExitZCPC EOL
END
END
END
CheckOffset
ApproachSP
END
END
END
END {common point for all operations}
IF ConstantSurfaceFeed? AND NOT SameTool?
SeqLabC CSSOn 'G96' Speed EOL
END
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 CutDepth EOL
SeqLabC LCycle 'PÅ‚' Tag# 'Q²' Tag# XStkLeft ZStkLeft 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
ELSE
IF RoughPatternShift?
SeqLabC LCycle XminusU ZminusW NumCuts EOL
SeqLabC LCycle 'PÅ‚' Tag# 'Q²' Tag# XStkLeft ZStkLeft 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?
SeqLabC LCycle 'P'
IF AutoFinish?
'02' {2 finish passes}
ELSE
'01'
END
IF Chamfer?
'07' {.7 thread lead distance for chamfer}
ELSE
'01' { per Mike at O&F }
END
IF SingleEdgeCut?
'60' {using 60 for standard tool angle, need ToolAnge# command}
ELSE
'00'
END
IF ConstantVolumeCut?
'Q20' {.0020 minimum cut depth}
ELSE
CutDepth {if not ConstantVolumeCut? CutDepth is min depth, volume increases with depth}
END
'R0' {using zero for no finish stock allowance, need XStckLeft# command}
EOL
SeqLabC LCycle XatFinZ FinZ XTapAtZ ThrdHeight CutDepth ThrdLead
IF Chamfer?
'M23'
ELSE
'M24'
END
EOL
ELSE
IF Drilling? { AutoFinish NOT Supported }
IF FirstOperation? AND Flag?('1') { Bar Feed Operation? }
SeqLabC Rapid ZDepth EOL
SetLineStrtChr('/')
SeqLabC 'M12' EOL { Canned Command: Open Chuck, Feed Stock, Close Chuck }
SetLineStrtChr('')
ELSE
IF FIRO?
SeqLabC Rapid 'B' CycleStartZ# EOL
SeqLabC Feed ZDepth FeedRate EOL
ELSE
IF Tap?
SeqLabC 'G98' EOL { set IPM }
SeqLabC LCycle ZDepth 'R' CycleStartZ# 'F' MUL# SpeedRPM# FeedIPR# EOL
SeqLabC 'G99' EOL { reset to IPR }
ELSE
SeqLabC LCycle ZDepth 'R' CycleStartZ# Dwell
IF Peck?
'Q' Peck#
END
FeedRate EOL
END
END
END
END
END
END
ELSE
StockOn
SetPass1
ToolPath
IF AutoFinish? { .82.1c }
StockOff
IF Turning?
IF ApproachFace?
SeqLabC RapidC ZOpECPC EOL
ELSE
SeqLabC RapidC XOpECDC EOL
END
ApproachSP
SeqLabC StockOff StrtPosC EOL
ToolPath
ELSE
IF Roughing? AND NOT RoughSimple?
SetPass2
SeqLabC RapidC XSPC ZSPC EOL
SeqLabC StockOff StrtPosC EOL
ToolPath
SetPass1
ELSE
IF Threading?
SeqLabC 'X' MUL# Num#('2') ADD# FinishXRadius# Taper# EOL
SeqLabC 'G32'
IF Taper?
XatFinZ
END
FinZ ThrdLead EOL
SeqLabC Rapid XSP EOL
SeqLabC ZSP EOL
END
END
END
END
END
IF Drilling? AND Tap? AND NOT CannedCycle?
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 Drilling? { Format Not For Sync Operation }
SeqLabC Rapid 'B' HomeZ# EOL { Drill Turret Retract }
SeqLabC 'T70' EOL { Cancel Offset }
SeqLabC 'M90' EOL { Waiting Command }
SeqLabC 'G100' EOL { End Drill Turret Program }
SeqLabC 'M40' EOL { Execute Drill Turret Program }
SeqLabC 'M90' EOL { Waiting Command }
ELSE
CRCOffC
IF CannedCycle?
Rapid
ELSE
RapidC
END
IF ApproachOD?
SeqLabC OpExitXCPC EOL
ELSE
IF ApproachID?
SeqLabC XOpECDC EOL
END
END
SeqLabC OpExitZCPC EOL
DoEndOpPS
SeqLabC CoolOff EOL
IF ConstantSurfaceFeed?
SeqLabC CSSOff 'G97S' CalcEPRPM# EOL
END
SeqLabC Home OpToolID '00' SpinOff EOL
END
IF ProgStop?
SeqLabC 'M0' EOL
END
SeqLabC 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 Miy BNC T L091 85
Fanuc 0T Miy BND 34 L313 82 2
Fanuc 0T Puma 8S [WT] L637 85
Fan 0T Miy BNC S [WB] L260 82m
Fanuc 0T Puma 8S [MA] L574 85 3
Fanuc 0T DP 6S [BC] L796 85
Fanuc 0T 3T Miy [GNR] L344 85
Fanuc 0T 3T Miy [DWA] L830 85
Fanuc 0T DP [TTT] L567 85
Fanuc 0T Nak [BMR] L767 85
Fanuc 0T DP [HP] L497 85 1
Fanuc 0T Supermax [WA] L788 85
Fanuc 0T 3T Miyano L008 85
Fanuc 0T [FA ] L485 85

więcej podobnych podstron