Fanuc 0T BNC34T [MSP] L697 85 5


{
MILL=F
LATHE=T
SIMPLE_ROT_POS=F
ROTARY_MILL=F
ADV_MILL=F
SUBS=F
MILLTURN_Y-AXIS=F
METRIC=F
}

{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}

{4/24/96
Initial: Fanuc 0T Miy BNC-34T L312.85
Created: Fanuc 0T Miy BNC-34T Lxxx.85
ForUser: Engineering Support Systems
Control: Fanuc 0T
Machine: Miyano BNC-34T
Develop: ComPost 4.21.34, Catalyst68K v3.02.13C
Comment: New Processor per marked up readout from John Fiechtner
Deleted pretooling of turrests at beginning of program.
Added move to home at beginning of program.
Changed main turret offset cancel to: T0
B Turret changes:
Resequenced order of commands for calling & retracting tool.
Added Rapid approach move
Added rapid retract move after canned cycle.
Moved T70 to before Z retract to home move at end of operation.
Jim Radcliffe}

{5/15/96
Initial: Fanuc 0T BNC-34T [ES] L446.85
Created: Fanuc 0T BNC-34T [ES] L446.85.1
ForUser: Engineering Support Systems
Control: Fanuc 0T
Machine: Miyano BNC-34T
Develop: ComPost 4.21.37PPC, Virtual Gibbs v3.04
Comment: Threading Cycle updated to use variables from Virtual.
Added: RunOutZ#, InFeedAngle#, LastCutXRadius# & SpringPasses# in place of literal P stuff.
Al Figueroa & Jim Radcliffe}

{6/12/96
Initial: Fanuc 0T BNC34T [ESS] L446.85.1
Created: Fanuc 0T BNC34T [ESS] L446.85.2
Fixed : Changed LOfstOff '00' to 'T0' at end of program.
Jim Radcliffe}

{7/29/97
Initial: Fanuc 0T BNC34T [ESS] L446.85.2
Created: Fanuc 0T BNC34T [LAM] L620.85
ForUser: CIM Solutions / LA Martin
Control: Fanuc 0T
Machine: Miyano BNC-34T
Develop: ComPost2 68K 1.0b11, Virtual Gibbs 3.35 PPC
Comment: New processor per conversation with Steve Sauve
Modified tool start up and end blocks for non B Turret tools.
All programs start with Bar Feed Routine.
Using flag 1 to descriminate between main turret and B turret.
Both turrets can do drilling. B turret only does drilling.
Jim Radcliffe}

{11/19/97
Initial: Fanuc 0T BNC34T [LAM] L620.85
Created: Fanuc 0T BNC34T [LAM] L620.85.1
Develop: ComPost2 1.1b3, Virtual 4.21.14
Comment: Added RapidF# to RoughContour to force FeedRateC output in ToolPath per Steve Sauve.
Jim Radcliffe}

{2/2/98,
Initial : Fanuc 0T BNC34T [LAM] L620.85.1
Created: Fanuc 0T BNC34T [MSP] L697.85
Customer: Midwest Screw Prod., Inc. (Chicago IL)

Changes to "Prog":

1. At FirstOperation, changed 'B0' to 'B' ZStockMax# and added / to M12.
2. Added to IF LastFeat? AND CutOff? M38 (Part Conveyor On) and M39 (Part Conveyor Off).
3. Removed G28U0W0 blocks & changed G28U0W0 block before TC to move Home.
4. Added FORMAT to HomeX#, SUB#, & FeedIPR# .
5. Added doThreadCycle, doThreadMove1, & doThreadMove2 sub-routines to support
multi starts threads with canned cycles (if more than 3 starts, swith to G32).
6. Changed G101 to be Tool# + 40 and M40 to be Tool# - 21.
JHE}

{3/6/98,
Initial : Fanuc 0T BNC34T [MSP] L697.85
Created: Fanuc 0T BNC34T [MSP] L697.85.1
Customer: Midwest Screw Prod., Inc. (Chicago IL)

Changes to "Prog":

1. Added doSyncOn sub to output G101 thru G106 and Var#1 to control the numbers.
2. Added doSyncOff sub to output M40 thru M45.
3. Added doBarFeed sub to output bar feed before any tool when OptCyc1 is true.
4. Added OptCyc1 to control the output of bar feed cycle.
5. Moved DoPostScript before OptCyc1 check.
6. In doBarFeed, changed ZStockMax# to TCZ#.
7. Added FORMAT to TCZ# and SetTCZ('8').
8. Updated PostScript Comment to reflect the new way bar feed is working.
9. In NewTool, added CoolOff to tools 60 and up.
JHE}

{3/11/98,
Initial : Fanuc 0T BNC34T [MSP] L697.85.1
Created: Fanuc 0T BNC34T [MSP] L697.85.2
Customer: Midwest Screw Prod., Inc. (Chicago IL)

Changes to "Prog":

1. Added SpinOff at start of doBarFeed sub.
2. In NewTool, removed SpinOff.
JHE}

{4/23/98,
Initial : Fanuc 0T BNC34T [MSP] L697.85.2
Created: Fanuc 0T BNC34T [MSP] L697.85.3
Customer: Midwest Screw Prod., Inc. (Chicago IL)

Changes to "Prog":

1. Changed back doSyncOn call to G101.
2. Changed back doSyncOff call to M40.
JHE}

{8/25/98,
Initial : Fanuc 0T BNC34T [MSP] L697.85.2
Created: Fanuc 0T BNC34T [MSP] L697.85.3
Customer: Midwest Screw Prod., Ken Lisowski - 773/283-6032

Changes to "Prog":

1. Added FORMAT for Tag#.
2. Added CoolOn for tools over 60 (secondary turret) and move CoolOff to be output
in a block by itself.
3. Removed calls for AppMove sub and output 2 blocks in Approach sub.
JHE}

{24Sep98
Original: Fanuc 0T BNC34T [MSP] L697.85.4
Created: Fanuc 0T BNC34T [MSP] L697.85.5
For: Midwest Screw Products
Changes made per: Ken Liskowski
Added Post Header Comment at the top of Prog.
Added Flag('1') Booleans for CoolOff in CheckOffset
Added 'M29' CoolOff command to 'B' HomeZ# in NewTool at Finish off last Operation and End of Prog
Deleted CoolOff (M9) throughout the Prog.
Deleted ToolOffset Cancel throughout the Prog.
Charles Winston}

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

#1 = '#.00'
#2 = '###.####;0'
#3 = '#######0'
#4 = '###^##0'
#5 = '##.0###'
#6 = '###0'
#7 = '#'
#8 = '00'
#9 = '####^###0'
#10 = '0^0'
#11 = '#.######;0' {Added - JHE}

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(FirstMoveEPZ#,2)
FORMAT(ZDepth#,2)
FORMAT(EPZ#,2)
FORMAT(ZStockMax#,2)
FORMAT(CycleStartZ#,2)
FORMAT(ClearancePlane3#,2)
FORMAT(HomeX#,2) {Added - JHE}
FORMAT(HomeZ#,2)
FORMAT(TCZ#,2) {Added - JHE 3/6}
FORMAT(LastCutXRadius#,2)
FORMAT(Program#,3)
FORMAT(Operation#,3)
FORMAT(Tool#,3)
FORMAT(Tag#,3) {Added - JHE 8/25}
FORMAT(Dwell#,4)
FORMAT(MUL#,5) { Tapping feed rate }
FORMAT(CalcEPRPM#,6)
FORMAT(RapidF#,7)
FORMAT(SpringPasses#,8)
FORMAT(ToolOffset#,8)
FORMAT(SUB#,8) {Added - JHE}
FORMAT(Add#,8)
FORMAT(Peck#,9)
FORMAT(CutDepth#,9)
FORMAT(Div#,10)
FORMAT(FeedIPR#,11) {Added - JHE}

{Command Subroutines *******************************************************}

DoZDepth:
IF Flag?('1')
'B' ZDepth#
ELSE
'Z' ZDepth#
END
RETURN

DoEPZ:
IF Flag?('1')
'B' EPZ#
ELSE
'Z' EPZ#
END
RETURN

doSyncOn: {Output G101 thru G106 - JHE 3/6}
FORMAT(ADD#,6)
'G' ADD# Recall# Num#('1') Num#('100')
FORMAT(ADD#,8)
RETURN

doSyncOff: {Output M40 thru M45 - JHE 3/6}
FORMAT(ADD#,6)
'M' ADD# Recall# Num#('1') Num#('39')
Save# Num#('1') ADD# Recall# Num#('1') Num#('1')
FORMAT(ADD#,8)
RETURN

doBarFeed: {Moved this sequence to a sub - JHE 3/6}
IF UseComments?
IF OperationIDComment?
'( OPERATION 0: Bar Feeding )' EOL
END
IF ToolTypeComment?
'( TOOL 61: Bar Feed Stop )' EOL
END
END
SeqLab SpinOff EOL {Added this line - JHE 3/11}
SeqLabC 'G101' {doSyncOn} EOL {Changed - JHE 4/23}{ Begin Drill Turret Program }
SeqLabC 'M61' EOL { Call tool }
SeqLabC 'T71' EOL { Call offset }
SeqLabC Rapid 'B' TCZ# EOL {Changed from ZStockMax# - JHE 3/6}{ Move to Stop position }
SeqLabC '/M12' EOL { Open Chuck, Dwell 2 sec, Close Chuck }
SeqLabC Rapid 'B' HomeZ# EOL {Added this line - JHE}{ Move Stop Away }
SeqLabC 'T70' EOL { Cancel Offset }
SeqLabC Rapid 'B0' EOL { Move Turret Home }
SeqLabC 'M90' EOL { Waiting Command }
SeqLabC 'G100' EOL { End Drill Turret Program }
SeqLabC 'M40' {doSyncOff} EOL {Changed - JHE 4/23}{ Execute Drill Turret Program }
SeqLabC 'M90' EOL { Waiting Command }
IF OptionalStops?
SeqLabC ProgStop EOL
' ' EOL
END
OptCyc1F {Added - JHE 3/6}
RETURN

{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

doThreadCycle:
SeqLabC LCycle 'P' SpringPasses#
Div# RunOutZ# Div# Num#('1') Thread# { Run out is output in units of lead }
Add# InFeedAngle# InFeedAngle#
IF ConstantVolumeCut?
'Q20' {.0020 minimum cut depth}
ELSE
CutDepth {if not ConstantVolumeCut? CutDepth is min depth, volume increases with depth}
END
'R' LastCutXRadius# EOL
SeqLabC LCycle XatFinZ FinZ XTapAtZ ThrdHeight CutDepth 'F' FeedIPR# {ThrdLead}
IF Chamfer?
'M23' EOL
ELSE
'M24' EOL
END
RETURN

doThreadMove1:
{ (FeedIPR# / ThreadStarts#) + CycleStartZ# }
FORMAT(ADD#,2)
SeqLabC Rapid 'Z' ADD# DIV# FeedIPR# ThreadStarts# CycleStartZ# EOL
FORMAT(ADD#,8)
RETURN

doThreadMove2:
{ (FeedIPR# / ThreadStarts# * 2) + CycleStartZ# }
FORMAT(ADD#,2)
SeqLabC Rapid 'Z' ADD# MUL# DIV# FeedIPR# ThreadStarts# NUM#('2') CycleStartZ# EOL
FORMAT(ADD#,8)
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}
{OptCyc1F} {Removed - JHE 3/6}
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?
SeqLabC StockOnNoCan XSPC EOL
SeqLabC StockOff ZOpCPC EOL
StockOnNoCan
IF NotEqual? CycleStartZ# ZOpCP#
SeqLabC FeedNoCan ZSPC FeedRateNoCan EOL
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

{*** Removed - JHE 8/25
AppMove:
StockOff ThisOpEntryZCP
RETURN ***}

Approach: { NOT FOR TAILSTOCK, .82 }
SeqLabC Rapid RapidF# ThisOpEntryZCP EOL {Added this line - JHE 8/25}{ RapidF# Forces FeedRate }
IF ApproachOD?
SeqLabC ThisOpEntryXCP EOL
ELSE
IF ApproachID?
SeqLabC XOpCD EOL
ELSE {ApproachFace}
SeqLabC StockOnNoCan XSP EOL
END
END
ApproachSP
RETURN

CheckOffset:
DoEndOpPS
IF LAST ProgStop?
SeqLabC 'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
IF Flag?('1')
SeqLabC 'M29' EOL
END
END
END
IF NewToolOffset?
SeqLabC 'T0' 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
IF Flag?('1')
SeqLabC 'M93' EOL
ELSE
SeqLabC CoolOn EOL
END
ELSE
SeqLabC SpeedC EOL
IF NOT CoolOff? AND LAST CoolOff?
IF Flag?('1')
SeqLabC 'M93' EOL
ELSE
SeqLabC CoolOn EOL
END
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 CutOff?
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 DoEPZ EOL
ELSE { LineFeat }
SeqLabC FeedC DoEPZ 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 LastFeat? AND CutOff?
SeqLabC 'M36' EOL { Parts Catcher Retract }
SeqLabC 'M38' EOL {Added - JHE Parts Conveyor On}
END
NEXTFeat
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') { B Turret Flag }
SetTCZ('8') {set default to bar feed stop location - JHE 3/6}
Save# Num#('1') Num#('1') {controls syncronize codes G101 & M40 - JHE 3/6}
OptCyc1F {controls output of bar feed cycle - JHE 3/6}
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 or OptCyc1 ' EOL
' Type it inside the At Op Start Box to output a Bar Feed sequence' EOL
' before the operation. Must be followed with CR (enter).' EOL
' ToolChangeZ( ) or TCZ( ) ' EOL
' Type it inside the At Op Start Box after OptCyc1. The value inside' EOL
' the parentheses is the value to be output with B before the M12 block.' EOL
' i.e. TCZ(3.25) will cause the output of G0B3.25 ' 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
RestoreScale
OpenSub
StockOff SetHome Plane
DoPostScript {Moved to here - JHE 3/6}
IF OptCyc1? { Bar Feed Routine } {Added this check - JHE 3/6}
doBarFeed {Changed bar feed as any time call - JHE 3/6}
END
IF ToolOver?('60')
SetFlag('1') { Use B Turret }
ELSE
SetFlagF('1') { Use Main Turret }
END
DoOpComments
IF Flag?('1') { Format Not For Sync Operation }
SeqLab CSSOff 'G97' Speed 'M93' EOL { Turn on spindle and coolant }
SeqLabC CoolOn EOL {Added - JHE 8/25}
SeqLabC 'G101' EOL { Begin Drill Turret Program }
SeqLabC 'M' Tool# EOL { Call Tool }
SeqLabC 'T' ToolOffset# EOL { Call Offset }
SeqLabC Rapid 'B' CycleStartZ# EOL { Approach }
ELSE
SeqLab Preset
IF ConstantSurfaceFeed?
MaxRPM
ELSE
Speed
END
CoolOn EOL
SeqLabC
IF ConstantSurfaceFeed?
CSSOn 'G96'
ELSE
CSSOff 'G97'
END
Speed EOL
SeqLabC Rapid OpToolID LatheOffset SpinOn EOL
Approach
END
ELSE
IF NewTool?

{Finish off last Operation}

StockOff {.62}
IF Flag?('1') { Format Not For Sync Operation }
SeqLabC RapidC 'B' HomeZ# 'M29' EOL {Added CoolOff M29}
SeqLabC 'T70' EOL { Cancel Offset }
SeqLabC Rapid 'B0' EOL { Drill Turret Retract - JHE}
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
SeqLabC Rapid 'X' HomeX# 'Z' HomeZ# EOL {Changed from G28U0W0 - JHE}
END
IF LAST ProgStop?
SeqLabC 'M0' EOL
' ' EOL
ELSE
IF OptionalStops?
SeqLabC ProgStop EOL
' ' EOL
END
END

{Start new Operation, SameTool}

DoPostScript {Moved to here - JHE 3/6}
IF OptCyc1? {Added this check - JHE 3/6}
doBarFeed {Added bar feed as any time call - JHE 3/6}
END
IF ToolOver?('60')
SetFlag('1') { Use B Turret }
ELSE
SetFlagF('1') { Use Main Turret }
END
DoOpComments
IF Flag?('1') { Format Not For Sync Operation }
SeqLab CSSOff 'G97' Speed 'M93' EOL { Turn on spindle and coolant }
SeqLabC CoolOn EOL {Added - JHE 8/25}
SeqLabC 'G101' EOL { Begin Drill Turret Program }
SeqLabC 'M' Tool# EOL { Call Tool }
SeqLabC 'T' ToolOffset# EOL { Call Offset }
SeqLabC Rapid 'B' CycleStartZ# EOL { Approach }
ELSE
SeqLab Preset
IF ConstantSurfaceFeed?
MaxRPM
ELSE
Speed
END
CoolOn EOL
SeqLabC
IF ConstantSurfaceFeed?
CSSOn 'G96'
ELSE
CSSOff 'G97'
END
Speed EOL
SeqLabC Rapid OpToolID LatheOffset SpinOn EOL
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 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 ZSP EOL
SeqLabC XSPC EOL
ELSE
SeqLab StepMove XSP EOL
SeqLabC ZSPC EOL
END
RapidF# { RapidF# Forces FeedRate }
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?
IF Equal? ThreadStarts# NUM#('1')
doThreadCycle
ELSE
IF Equal? ThreadStarts# NUM#('2')
doThreadCycle
doThreadMove1
doThreadCycle
ELSE
IF Equal? ThreadStarts# NUM#('3')
doThreadCycle
doThreadMove1
doThreadCycle
doThreadMove2
doThreadCycle
ELSE {implies more than 3 starts}
'(*** warning - using non-canned cycles ***)' EOL
StockOn
SetPass1
toolPath
END
END
END
ELSE
IF Drilling? { AutoFinish NOT Supported }
IF Tap?
SeqLabC 'G98' EOL { set IPM }
SeqLabC LCycle DoZDepth 'R' CycleStartZ# 'F' MUL# SpeedRPM# FeedIPR# EOL
SeqLabC 'G99' EOL { reset to IPR }
ELSE
SeqLabC LCycle DoZDepth 'R' CycleStartZ# Dwell
IF Peck?
'Q' Peck#
END
FeedRate EOL
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 Flag?('1') { Format Not For Sync Operation }
SeqLabC RapidC 'B' HomeZ# 'M29' EOL {Added CoolOff M29}
SeqLabC 'T70' EOL { Cancel Offset }
SeqLabC Rapid 'B0' EOL { Drill Turret Retract }
SeqLabC SpinOff EOL {Moved to here - JHE 8/25}
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 RapidC SpinOff EOL
SeqLabC 'X' HomeX# 'Z' HomeZ# EOL {Changed from G28U0W0 - JHE}
END
IF LastFeat? AND CutOff?
SeqLabC 'M39' EOL {Added - JHE Parts Conveyor Off}
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 BNC34T [LAM] L620 85 2
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 Miy BNC T L091 85
Fanuc 3T BNC34C [MSP] L710 85 1
Fanuc 0T TS [3GEAR] L225 85
Fanuc 0T Hard ST25 L510 85 1
Fanuc 0T Miyano [M3] L781 85
Fanuc 0T Hardinge [PHT] L753 85
Fanuc 0T Nak [LSP] L709 85
Fanuc 0T Hwacheon [JA] L715 85 1
Fanuc 0T Okuma [CM] L318 85 1
Fanuc 0T Miyano (CES) L109 85

więcej podobnych podstron