Fanuc 10M KiaMaster M423 80 1


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

{6/7/91,
Modified: Fan 10M MV40 (AC) M334.80
For: SAC Tool & Die
Machine: KIA Master VA40
Control: Fanuc 10M Model A
Made following modifications per marked up sample and conversations with Jeff Coggeshall,
(pronounced 'Cogshaw'), the programmer/set-up man for SAC Tool & Die:
Customer requested that Non-Repeat AutoCycles be output long-hand, Incremental output can remain.
AutoCycles that Repeat will position in the main program, and call up the Subroutine that
contains the ToolPath moves.
Added DoCycleComment for AutoCycle Operations.
Added SetFlag('1') for AutoCycle Operations with Helix Entry.
This condition will output CRCOnC after EntryMove and output CRCOffc after Retract to ZCP2.
Flag('1') is turned on in ToolPath's ArcFeat.
Customer said he will always Rotate AutoCycle to 9:00 position.
Flag('1') is tested at ToolPath and AutoCycCutSub2 sections, and at Milling Sub.
Flag('1') is turned off at AutoCycCutSub2 for AutoCycles that Repeat.
Flag('1') is also turned off at Milling Sub for AutoCycles that don't Repeat.
Added SetFlag('2') if Flag('1') has been set and ArcCW? = TRUE.
This condition will add an incremental move tangent to the arc for the purpose of turning
CutterRadiusCompensation on and off, and will work as long as 9:00 position is maintained.
Flag('2') is turned on in ToolPath's ArcFeat.
Flag('2') is tested at new ACHelixCRCOff Sub.
Flag('2') is turned off at new ACHelixCRCOff Sub.
Customer also requested that when SameTool = TRUE, and Drilling Operation is the same, then
do not cancel the Drill Cycle, and don't re-output the Cycle line in the NEXT Operation.
Instead, just output the StrtPos of the Drill pattern in the SameTool operation.
This situation occurs when the User changes WorkFixtureOffsets.
Added SetFlag('3') to control this.
Flag('3') is turned on in Drilling section, after return from ToolPath.
Flag('3') is tested at SameTool AND Drilling sections.
The only time this request is not met is if any of the following Booleans = TRUE:
IF LastOp? OR NEXT NewTool? OR ProgStop? OR NEXT Repeats? OR NEXT NewToolOffset?
Flag('3') is turned off at beginning of Drilling section.
Customer also requested suppression of G98/G99 from Drill Cycle Line.
Control is initially in G98 mode at startup.
Deleted FromCP Command from Drilling Cycle Line.
Added GetDrillCycleLine sub to output Drill Cycle Line when needed.
This sub will suppress FeedEntC if SameTool? AND LAST Drilling? = TRUE.
Customer also requested that all Subs be FORMATted 'sppp' where 's' = Sub# and 'ppp' = Prog#.
Customer indicated that he does not intend to program more than 9 subroutines.
He understands it is his responsibility.
Added Program2# command.
Added SaveProgNum2 in setup and initializations section.
Added SetProgNum('0') in setup and initializations section.
Added GetProgNum Sub that contains following Math formula.
ADD# Program2# MUL# Program# Num#('1000').
Changed SubID to 'O' GetProgNum in StartSub.
Changed all occurances of CallLab to 'P' GetProgNum.
Changed ProgID1 to 'O' Program2# at FirstOperation, literal character is the uppercase letter o.
Customer also requested to turn CoolOff at move to ZCP3.
Moved CoolOn to be output after final MultipleParts Boolean in FirstOperation and NewTool.
Added logic to output CoolOff at end of Milling and Drilling sections if:
LastOp? OR NEXT NewTool? OR ProgStop? = TRUE.
Added logic to output CoolOff in NewTool if LAST FirstOperation? = TRUE.
NEXT NewTool? does not work until after a ToolChange has occurred.
Changed ZIn to ZinC in EntryMove Sub.
Added EOR EOL in StartSub, '%' is needed at begininning of all Subroutines.
Added ASCII('1') ASCII('1') in StartSub, Customer requested two blank lines between all Subroutines.
Customer has requested to control CRCOn and CRCOff features.
Added CheckCRCOnOff Sub to output CRCOffC on LastFeat of ToolPath.
Changed all occurances of CRCOnC to CheckCRCOnOff.
Forced 'G' NewWFO# in WFOStuff for FirstOperation, suppressed if NOT NewWFO in all other Operations.
Customer has requested suppression of StrtPos for SameTool Operations that don't involve
a change of WorkFixtureOffsets.
Added GetStartPos SUB to output StrtPosC for SameTool Operations that don't follow Operations
with Repeats.
Added SetFlag('4') SameTool? AND NewWFO? = TRUE.
Will output StrtPosC when SameTool? = TRUE AND ( Flag?('4') = FALSE OR LAST Repeats? = FALSE ).
Will output StrtPos at all other times.
Flag('4') is turned on at WFOStuff Sub.
Flag('4') is tested at new GetStartPos Sub.
Flag('4') is turned off at new GetStartPos Sub.
Deleted GetLastClearancePlane Sub and all reference calls to same.
GetLastClearancePlane output the following:
IF previous Operation was a non-Tapping Drilling Operation, then
output LAST ZCP1 IF LAST RetractToCP1 = TRUE, else
output LAST ZCP2 IF LAST RetractToCP1 = FALSE.
All other previous operations output LAST ZCP3.
IF LastOp = TRUE then Booleans were tested for LastOp, not previous Operation.
Deleted 'G17' from 'Select XY Plane' in Form's Commands 2 dialog.
Program will output literal 'G17' in NewTool and SameTool sections, only if current operation
is in XYPlane, and previous operation wasn't. 'G18' and 'G19 will output normally.
Added SetAbs to setup and initializations section.
Modified program comments to output 'OUTPUT IN ABSOLUTE INCHES'.
Modified program comments to output 'FIRST TOOL NOT IN SPINDLE'.
Deleted AbsOrInc from FirstOperation, NewTool and SameTool sections.
Changed all other occurances of AbsOrInc to AbsValue.
Added literal 'G53Y0Z0M19' in FirstOperation and at end of Prog.
G53 = Machine Coordinate System Selection.
M19 = Spindle Orientation
Added OpToolID ToolChng to FirstOperation, will output IF Tool is not used in LastOp.
Deleted logic that outputs Safe-Block data based on type of MultipleParts.
Modified to output normally per Fanuc 6M M001.80.
Deleted all occurances of OfstOn.
Added literal '/' (block delete) to all occurances of CoolOn.
Added OfstOff 'M19' to NewTool, SameTool and end of Prog sections.
Modified 'G28' to 'G53' in Tool Length Offset Cancel in Form's Commands 5 dialog.
Added logic to return to Home in NewTool, and FirstHome at end of Prog.
Deleted special 'G84.2' Tap Cycle from Drilling Operation.
Deleted IF ToolOver?('1') logic at end of Prog.
Moved CoolOff at end of Prog to normal position per Fanuc 6M M001.80.
Deleted Rapid 'Y7.' from end of Prog.
DWB}

{7/31/91,
Modified: Fanuc 10M KiaMaster M423.80.1
For: SAC Tool & Die
Made following modifications per conversations with Jeff Coggeshall at SAC Tool & Die:
Changed 'G85' to 'G76' Canned Bore Cycle in Form.
Added literal 'I.01J.01' to Drill Cycle line in GetDrillCycleLine sub.
These two changes are for a Bore, SpinOff, Spindle Orient, Back-out, Retract, return to XY
Coordinate type of Canned Cycle.
DWB}

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

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ToolDiameter#,4) {.72}
FORMAT(Program#,5) {.72}
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(NewWFO#,5) {.72}
FORMAT(Parts#,5) {.72}
FORMAT(Dwell#,6) {.72}
FORMAT(ADD#,7)
FORMAT(Program2#,7)

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

GetProgNum:
ADD# Program2# MUL# Program# Num#('1000')
RETURN

DoSubComment:
IF UseComments? AND SubComment?
'( SUB NUMBER: ' GetProgNum ' )' EOL
END
RETURN

DoCycleComment: { For AutoCycles }
IF UseComments? AND SubComment?
'( CYCLE START )' EOL
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# ': ' ToolDiameter# ' ' 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}
NewWFOF
RotateF
RETURN

PSStuff: {revised.72}
IF FourthCW?
FORMAT(FourthDegree#,2)
SeqC 'A' FourthDegree# EOL
FourthCWF {reset flag}
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
SeqC 'A' FourthDegree# EOL
FourthCCWF {reset flag}
END
IF FifthCW?
FORMAT(FifthDegree#,2)
SeqC 'B' FifthDegree# EOL
FifthCWF {reset flag}
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
SeqC 'B' FifthDegree# EOL
FifthCCWF {reset flag}
END
RETURN

DoPostScript:
PSInit
EachPS
SeqC PostScript EOL {literals}
PSStuff {commands}
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqC EndOpPS EOL {literals}
PSStuff {commands}
NextPS
RETURN

EntryMove:
IF FeedEntry?
SeqC Feed ZinC FeedEnt EOL
ELSE
SeqC RapidC ZinC EOL
END
RETURN

StartSub:
OpenSub
EOR EOL
ASCII('13') ASCII('13') 'O' GetProgNum EOL
DoSubComment
RETURN

SubWarning:
IF NOT FeedConnect?
IF AnyZshift?
' ' EOL
'( WARNING Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT )' EOL
' ' EOL
END
END
RETURN

StdSub:
SeqC SubCall 'P' GetProgNum RepLab RepCycs EOL
StartSub
RETURN

FinishSub1: {part 1}
UnSkipZ
SeqC CRCOffC
IF NOT FeedConnect?
RapidC ZCP3C
END
EOL
RETURN

FinishSubG92: {part 2}
SeqC Preset ShiftRC EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshftRC EOL
RETURN

OpenMP:
NewProg
IF WorkFixtureOffsets?
NewWFO
EachWFO
SeqC SetWFO EOL
SeqC SubCall 'P' GetProgNum RepLab OnePart EOL
IncWFO
NextWFO
ELSE
SeqC SubCall 'P' GetProgNum RepLab Parts EOL
END
StartSub
RETURN

CloseMP:
IF WorkFixtureOffsets?
SeqC EndSub EOL
CloseSub
SeqC WFO1 EOL
ELSE
SeqC Preset ShiftPC EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshftPC EOL
END
RETURN

CheckCRCOnOff:
IF LastFeat?
CRCOffC
ELSE
IF LineFeat?
CRCOnC
END
END
RETURN

FormatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
CheckCRCOnOff MoveXYZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
RETURN

StdLine: {enables CRC on first call, .70}
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqC FeedC CheckCRCOnOff MoveXYZC CRCOffsetC FeedRateC EOL
DecelMove2
END
SeqC FeedC CheckCRCOnOff MoveXYZC CRCOffsetC DecelFeed EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqC FeedC CheckCRCOnOff MoveXYZC CRCOffsetC FeedRateC EOL
END
END
RETURN

ToolPath:
ResetCRCNum {.72}
EACHFeat
IF PointFeat?
SeqC MoveSXYC EOL
IF AutoCycle?
SeqC SubCall 'P' GetProgNum EOL
CalcACSRXY {calc tool position after Sub call, CalcAutoCycleStatusRecordXY}
END
ELSE
IF RapidFeat?
IF LastFeat? AND AutoCycle? {.70}
IF Flag?('1') { AutoCycle has Helix Entry }
IF XMove? OR YMove? OR ZMove?
SeqC RapidC MoveXYZC EOL
END
ELSE
SeqC RapidC CRCOffC MoveXYZC EOL
END
ELSE
IF XMove? OR YMove? OR ZMove?
SeqC CheckCRCOnOff RapidC MoveXYZC EOL
END
END
ELSE
IF LineFeat?
IF AutoCycle? {.70}
IF LastFeat?
IF Flag?('1') { AutoCycle has Helix Entry }
IF XMove? OR YMove? OR ZMove?
SeqC FeedC MoveXYZC FeedRateC EOL
END
ELSE
SeqC FeedC CRCOffC MoveXYZC FeedRateC EOL
END
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqC FeedC MoveXYZC FeedRateC EOL
ELSE
StdLine {enables CRC on first call}
END
END
ELSE
StdLine
END
ELSE
IF ArcFeat?
IF AutoCycle? AND FirstFeat? AND CutterRadiusCompensation? AND ZMove?
SetFlag('1') { AutoCycle has Helix Entry }
IF ArcCW?
SetFlag('2') { AutoCycle has CW Helix Entry }
SeqC FeedC 'Y-.0001' FeedRateC EOL
SeqC CRCOnC 'Y.0001' CRCOffsetC EOL
ELSE { AutoCycle has CCW Helix Entry }
SeqC FeedC 'Y.0001' FeedRateC EOL
SeqC CRCOnC 'Y-.0001' CRCOffsetC EOL
END
END
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
SeqC FormatArc ArcFeedC EOL
DecelMove2
END
SeqC FormatArc DecelFeed EOL
ELSE
SeqC FormatArc ArcFeedC EOL
END
NEXTQuadrant
END
END
END
END
NEXTFeat
RETURN

WFOStuff:
IF NewWFO?
IF MultipleParts?
EOL
'*** WARNING *** DO NOT USE NEWWFO() WITH NCPOST MULTIPLE PARTS' EOL
SeqC
ELSE
'G' NewWFO#
IF SameTool?
SetFlag('4') { Don't output SameTool conditional StrtPos }
END
END
ELSE
IF FirstOperation?
IF NeedWFO1?
'G' NewWFO#
END
END
END
RETURN

ACHelixCRCOff:
SetFlagF('1') { AutoCycle has Helix Entry }
IF Repeats? AND FeedConnect? AND ZshiftOnly?
ELSE
SeqC AbsValue FeedC ZCP2 'F50.' EOL
SeqC IncValue
END
SeqC CRCOffC
IF Flag?('2') { AutoCycle has CW Helix Entry }
SetFlagF('2')
'Y.0001'
ELSE { AutoCycle has CCW Helix Entry }
'Y-.0001'
END
EOL
SeqC AbsValue EOL
RETURN

AutoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
StartSub
SetSRXYtoSP
SeqC IncValue EOL
RETURN

AutoCycCutSub2: {part 2}
ToolPath
IF Repeats? AND FeedConnect? AND ZshiftOnly?
IF Flag?('1') { AutoCycle has Helix Entry }
ACHelixCRCOff
ELSE
SeqC AbsOrInc EOL {.69 removed RapidC} {.71.2 removed CRCOffC, gets turned off in ToolPath}
END
ELSE
IF Flag?('1') { AutoCycle has Helix Entry }
ACHelixCRCOff
ELSE
SeqC AbsValue RapidC ZCP2 EOL {.71.2 removed CRCOffC, gets turned off in ToolPath}
END
END
SeqC EndSub EOL
CloseSub
SetSRSubXY {restore SR to 1st position value}
SetSRSubMove
RETURN

AutoCycPat:
SetPass2 {position pattern}
ToolPath {call after NewProg for correct Sub calls}
SetPass1 {reset}
RETURN

Milling:
IF AutoCycle?
IF Repeats?
EachRep
EachFeat
SeqC MoveSXYC EOL
DoCycleComment
SeqC SubCall 'P' GetProgNum EOL
CalcACSRXY {calc tool position after Sub call, CalcAutoCycleStatusRecordXY}
NextFeat
NextRep
AutoCycCutSub1
EntryMove
AutoCycCutSub2
ELSE
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
EachFeat
IF NOT FirstFeat?
SeqC MoveSXYC EOL
END
DoCycleComment
CalcACSRXY {calc tool position after Sub call, CalcAutoCycleStatusRecordXY}
ReSetPass1
SetSRXYtoSP
SeqC IncValue EOL
EntryMove
ToolPath
IF Flag?('1') { AutoCycle has Helix Entry }
ACHelixCRCOff
ELSE
SeqC AbsValue RapidC ZCP2 EOL
END
ReSetPass2
NextFeat
END
ELSE
EntryMove
ToolPath
END
RETURN

G92Sub:
NewProg
IF AutoCycle?
Milling
ELSE
SubWarning
StdSub
SeqC AbsValue Connect StrtPos EOL
Milling
FinishSub1
FinishSubG92
END
RETURN

ZOnlyRepAutoCycle:
NewProg
EachFeat
SeqC MoveSXYC EOL
CalcACSRXY {calc tool position, CalcAutoCycleStatusRecordXY}
DoCycleComment
SetPass1 {element cut moves}
EachRep
IF FeedConnect?
SeqC Feed ZIn FeedEnt EOL
ELSE
IF FeedEntry?
IF NOT FirstCycle?
SeqC RapidC ZCP2C EOL {.69 added Rapid, reads better}
{can't call for cycle = 1, .69 changed to ZCP2PlusInc}
END
SeqC Feed ZIn FeedEnt EOL
ELSE
SeqC RapidC ZIn EOL {.69 added Rapid, reads better}
END
END
SeqC SubCall 'P' GetProgNum EOL
IF FirstCycle?
SaveSubStatus {save tool position}
END
NextRep
IF FeedConnect?
SeqC RapidC ZCP2 EOL
END
ReSetPass2 {restore for positioning moves}
NextFeat
SetSRSubMove
SetSRSubZ {restore SR to 1st position value}
AutoCycCutSub1 {build element Sub}
IF NOT FeedConnect?
SetStatusRapid
END
AutoCycCutSub2
SetStatusRapid
RETURN

ZonlyRep:
NewProg
EachCycle
IF NOT FirstCycle?
SeqC Connect StrtPos EOL {.71.2, added Connect}
END
IF FeedConnect?
SeqC FeedC ZInPlusInc FeedEnt EOL {.71.2, changed to FeedC}
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqC RapidC ZCP2PlusIncC EOL {can't call for cycle =1} {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqC RapidC ZInPlusInc EOL {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
END
SeqC SubCall 'P' GetProgNum EOL
NextCycle
StartSub
SkipZ
ToolPath
FinishSub1
SeqC EndSub EOL
CloseSub
RETURN

GetStartPos:
IF Flag?('4') OR LAST Repeats? { Don't output SameTool conditional StrtPos }
SetFlagF('4')
StrtPos
ELSE
StrtPosC
END
RETURN

GetDrillCycleLine:
SeqC Cycle
IF FIFO?
'I.01J.01' { Incremental XY- retract for Spindle Orient type Boring Cycle }
END
ZDepth RLevel Dwell Peck Retract
IF NOT FirstOperation? AND LAST Drilling? AND NOT Repeats? AND LAST NOT Repeats?
FeedEntC
ELSE
FeedEnt
END
EOL
RETURN

CheckPass:
IF AutoCycle? {use the correct StrtPos}
SetPass2
ELSE
SetPass1
END
RETURN

GetStartOfSameTool:
DoOpComments
DoPostScript
IF XYPlane? AND LAST NOT XYPlane?
SeqC 'G17' EOL
ELSE
SeqC PlaneC EOL
END
CheckPass
RETURN

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

{setup and initializations}
InitProg
ReverseXZArcs
InitWFONum
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls ('50')
SetMaxRPM('10000')
SetMaxFeed('500')
SetAbs
SaveProgNum2
SetProgNum('0')
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: may be capital and/or lower case letters. Separate commands with a space.' 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
' NewWFO(56), NWFO(56) -' EOL
' The Work Fixture Offset # you specify will be used for all following operations.' EOL
' Do not use with the ncPost multiple part option.' EOL
' 4thAxisCW(12.5), 4ACW(12.5) -' EOL
' generates a + A move of the value you specify' EOL
' 4thAxisCCW(22.5), 4ACCW(22.5) -' EOL
' generates a - A move of the value you specify' EOL
' 5thAxisCW(30), 5ACW(30) -' EOL
' generates a + B move of the value you specify' EOL
' 5thAxisCCW(22.5), 5ACCW(22.5) -' EOL
' generates a - B move of the value you specify' EOL
END
EachOp {Start of post processing *********************}
IF FirstOperation?
EOR EOL
'O' Program2#
IF UseComments? AND ProgramNameComment?
'( ' ProgramName$ ' )'
END
EOL
IF ToolChangeAtHome?
SetHome
END
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
IF PartsComment?
'( PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
'( FIRST TOOL NOT IN SPINDLE )' EOL
END
END
OpenSub
IF Metric? {CAM file is in metric, tools and tool path}
SetScale('.03937007874') { change to English, this is an English post}
END
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
Seq 'G53Y0Z0M19' EOL { G53 = Machine Coordinate System Selection; M19 = Spindle Orientation }
IF NOT LastTool?
SeqC OpToolID ToolChng EOL
END
DoOpComments
DoPostScript
SeqC Plane EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
SeqC ToolOfst WFOStuff StrtPos ZCP1
IF NOT LastTool?
PreTool
END
Speed SpinOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqC StrtPos EOL
END
IF NOT CoolOff?
SeqC '/' CoolOn EOL
END
ELSE
IF NewTool?

{Finish off last Operation}

IF LAST FirstOperation? { NEXT NewTool doesn't work during FirstOperation. }
IF LAST Drilling?
SeqC 'G80' LAST ZCP3C CoolOff EOL
ELSE
SeqC CoolOff EOL
END
END

IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
SeqC OfstOff 'M19' EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF ToolChangeAtHome?
SeqC RapidC Home EOL
END
IF LAST ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
END

{Start new Operation}

Seq ToolChng EOL
DoOpComments
DoPostScript
IF XYPlane? AND LAST NOT XYPlane?
SeqC 'G17' EOL
ELSE
SeqC PlaneC EOL
END
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
SeqC RapidC ToolOfst WFOStuff StrtPos ZCP1 PreTool Speed SpinOn EOL
IF NOT CoolOff?
SeqC '/' CoolOn EOL
END
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqC StrtPos EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqC OfstOff 'M19' EOL
SeqC 'M0' EOL

{Start new Operation}

GetStartOfSameTool
SeqC RapidC ToolOfst WFOStuff GetStartPos ZCP1 SpeedC SpinOn EOL
IF NOT CoolOff?
SeqC '/' CoolOn EOL
END
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
ELSE
EOL { EOL will be output here if it hasn't already }
END
IF NewToolOffset?
SeqC OfstOff 'M19' EOL

{Start new Operation}

GetStartOfSameTool
SeqC RapidC ToolOfst WFOStuff GetStartPos ZCP1 SpeedC EOL
ELSE

{Start new Operation}

GetStartOfSameTool
SeqC RapidC WFOStuff GetStartPos
IF Drilling?
IF Flag?('3') { SameTool Drill Cycle is same as LAST Drill Cycle }
ZDepth RLevel FeedEntC
ELSE
DrillCP
END
END
SpeedC EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqC '/' CoolOn EOL
END
END
END
END
END {common point for all operations}
IF Milling?
SeqC ZCP2C EOL
IF Repeats?
IF ZshiftOnly?
IF AutoCycle? {incremental Autocycle Sub can have Z moves}
ZonlyRepAutoCycle
ELSE {Z shift only, NOT Auto Cycle}
IF UseSeparateSubCalls? AND CyclesLessThanMaxSubCalls?
FindAnyZMoves {for normal abs Subroutine}
IF NoZMoves?
ZonlyRep
ELSE
G92Sub {pattern shift, not element}
END
ELSE {no sep Subs desired}
G92Sub
END
END {end Auto Cycle IF}
ELSE {not Z only}
G92Sub
END {end Z only IF}
ELSE {no repeat OPs}
Milling
END
SeqC
IF Repeats? AND ZshiftOnly? AND AutoCycle?
{ 'RapidC ZCP3C' Handled in ZonlyRepAutoCycle Sub }
ELSE
RapidC ZCP3C
END
IF LastOp? OR NEXT NewTool? OR ProgStop?
CoolOff
END
EOL
ELSE
IF Drilling?
GetCycle
IF Repeats?
NewProg
StdSub
IF Flag?('3') { SameTool Drill Cycle is same as LAST Drill Cycle }
SetFlagF('3')
ELSE
SeqC DrillCP EOL
END
GetDrillCycleLine
ToolPath
SeqC 'G80' EOL
FinishSubG92
SeqC RapidC ZCP3C
IF LastOp? OR NEXT NewTool? OR ProgStop?
CoolOff
END
EOL
ELSE
IF Flag?('3') { SameTool Drill Cycle is same as LAST Drill Cycle }
SetFlagF('3')
ELSE
SeqC DrillCP EOL
END
IF NOT SameTool?
GetDrillCycleLine
ELSE
IF LAST Repeats? OR LAST ProgStop? OR NewToolOffset?
GetDrillCycleLine
ELSE
IF FIRO? AND LAST FIRO?
ELSE
IF FIRO? AND Dwell? AND LAST FIRO? AND LAST Dwell?
ELSE
IF FIFO? AND LAST FIFO?
ELSE
IF Tap? AND LAST Tap?
ELSE
IF PeckFullRetract? AND LAST PeckFullRetract?
ELSE
IF PeckChipBreaker? AND LAST PeckChipBreaker?
ELSE
GetDrillCycleLine
END {PeckChipBreaker}
END {PeckFullRetract}
END {Tap}
END {FIFO}
END {FIRO AND Dwell}
END {FIRO}
END {LAST Repeats OR LAST ProgStop OR NewToolOffset}
END {NOT SameTool}
ToolPath
IF LastOp? OR NEXT NewTool? OR ProgStop?
SeqC 'G80' ZCP3C CoolOff EOL
ELSE
IF NEXT Repeats? OR NEXT NewToolOffset?
SeqC 'G80' ZCP3C EOL
ELSE
SetFlag('3') { Set if NEXT SameTool Drill Cycle is same as current Drill Cycle }
IF FIRO? AND NEXT FIRO?
ELSE
IF FIRO? AND Dwell? AND NEXT FIRO? AND NEXT Dwell?
ELSE
IF FIFO? AND NEXT FIFO?
ELSE
IF Tap? AND NEXT Tap?
ELSE
IF PeckFullRetract? AND NEXT PeckFullRetract?
ELSE
IF PeckChipBreaker? AND NEXT PeckChipBreaker?
ELSE
SetFlagF('3')
{ NEXT SameTool Drill Cycle is not the same as current Drill Cycle }
SeqC 'G80' ZCP3C EOL
END {PeckChipBreaker}
END {PeckFullRetract}
END {Tap}
END {FIFO}
END {FIRO AND Dwell}
END {FIRO}
END {NEXT Repeats? OR NEXT NewToolOffset}
END {LastOp OR NEXT NewTool OR ProgStop}
END {Repeats}
END {Drilling}
END {Milling}
NextOp {loops back to EachOP until last Operation}

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

{finish last operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
SeqC 'G53Y0Z0M19' EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
SeqC Rapid FirstHome EOL
END
IF ProgStop?
SeqC 'M0' EOL
END
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
SeqC EOP EOL
CloseSub
Post2 {organize Subs into one program}
EOR EOL
Close
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 10M [CRC] M607 80
Fanuc 10M Okada [BM] M467 80
Fanuc 10M Kit [HD] M424 80
Fanuc 10M (AGA) M147 81 2
Fanuc 10M MVJr[G43r] M192 87
Fanuc 10M MVJR [DM] M740 89
Fanuc 10M (JT) M828 14
Fanuc 10M Kit PM028 17 3
Fanuc 10M Takasawa RM365 17 5
Fanuc 10M Kit [LM] M904 89
Fanuc 10M MS M031 89
Fanuc 10M Kit C028 12
Fanuc 10M Kit M028 89 1
Dynapath 10M [GM] M449 80 1
Fanuc 10M MV40 [KC] M668 81 2

więcej podobnych podstron