Fanuc 6M [BW] MZ45 15


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

{9/26/96
Copied: Fanuc 6M M001.13.1
Created: Fanuc 6M [BW] MZ45.13
For: Bludworth
Machine:
Control: ATEX11.AGC CNC Trainer
Versions: Catalyst v3.06C/Compost 4.21.37/v1.0b1
Changes made per Doug Benson and Dave Mohr of Ah ha Design Group
Deleted support of WorkFixtureOffsets.
Changes made at Prog Formats, OpenMP, CloseMP, PSComment and WFOStuff.
DWB}

{10/1/96
Modified: Fanuc 6M [BW] MZ45.13
Created: Fanuc 6M [BW] MZ45.13.1
For: Bludworth
Versions: Catalyst v3.06C/Compost 4.21.37/v1.0b1
Changes made per May of Bludworth.
Control does not support Automatic Tool Changes, Spindle or Coolant commands.
Deleted OpToolID at FirstOp1 and NewToolOp3.
Deleted ToolChng at FirstOp1.
Deleted Speed SpinOn at FirstOp2, NewToolOp4 and three places at SameToolOp3.
Deleted CoolOn at FirstOp4, NewToolOp6 and two places at SameToolOp1.
Deleted CoolOff at NewToolOp1, End1 and two places at SameToolOp1.
Deleted SpinOff at NewToolOp2 and two places at SameToolOp1 and End2.
Deleted literal 'M0' at NewToolOp2.
Deleted ProgStop at NewToolOp2.
Changed ToolChng to literal 'M0' at NewToolOp3.
DWB}

{10/8/96
Modified: Fanuc 6M [BW] MZ45.13.1
Created: Fanuc 6M [BW] MZ45.13.2
For: Bludworth
Versions: Catalyst v3.06C/Compost 4.21.37/v1.0b1
Changes made per May of Bludworth.
Changed Compost General Default Formats.
Changed Addresses A, B and C from ####.###;0. to ###0.0##;0.0.
Changed Addresses G and M from #0 to 00.
Changed Addresses I, J, K, Q, R, X, Y and Z from ####.####;0. to ###0.0000
Added Address Spaces.
Deleted G17, G18 and G19.
Changed Prog Numeric Format Definitions.
Changed Format#2 from #####.###;0. to #####.0##;0.0
Changed Format#3 from *#####.###;0. to *#####.0##;0.0
Changed all Comments to be output with semi-colons, not parentheses.
Changed FourthCW and FourthCCW to output Feed 'W' FourthDegree# ' F2.0' at PSStuff.
Deleted support of FifthCW and FifthCCW at PSStuff.
Moved FifthCWF and FifthCCWF to PSInit.
Changed conditionals to unconditionals throughout Prog.
Changed numerous occurances of RapidC to Rapid.
Added LoadFeat conditions to test for ZMoves at FinishSub1 and OpGuts.
Deleted support of CRCOffsetC.
Deleted InitWFONum and SetFlood at ProgStart.
Deleted EOR and ProgID1 at InitOp.
Changed OfstOn and OfstOff to ZCP1.
DWB}

{10/11/96
Modified: Fanuc 6M [BW] MZ45.13.2
Created: Fanuc 6M [BW] MZ45.13.3
For: Bludworth
Versions: Catalyst v3.09C/Compost 4.21.37/v1.0b1
Changes made per May of Bludworth.
Deleted support of CutterRadiusCompensation.
Deleted CRCOffC at FinishSub1 sub.
Deleted contents of ckCRC sub.
Deleted Flag(5) at ProgStart sub.
Deleted CRCOffC two places at end of IF Milling at OpGuts sub.
DWB}

{10/15/96
Modified: Fanuc 6M [BW] MZ45.13.3
Created: Fanuc 6M [BW] MZ45.13.4
For: Bludworth
Versions: Catalyst v3.09C/Compost 4.21.37/v1.0b1
Changes made per May of Bludworth.
Deleted ToolChangeAtHome at NewToolOp2 and End2 subs.
DWB}

{3/20/97
Updated & Modified: Fanuc 6M [BW] MZ45.13.4
Created: Fanuc 6M [BW] MZ45.15
For: Bludworth Custom Cues
Versions: Catalyst v3.32C/ComPost2 MSL 68K
Changes made per Donald Bludworth of Bludworth Custom Cues.
Updated for Catalyst v3.32C per Fanuc 6M M001.15 Format
.14 Additions:
Moved contents of FormatLine back to ToolPath LineFeat.
Added SetMaxFeed(12700) for Metric VNC files.
Moved Speed SpinOn after MP-OTAP-FU condition at FirstOperation and NewTool.
Added Speed SpinOn for MP-OTAP-ECP condition at FirstOperation and NewTool.
Added support of W Address Index Subs.
IF FirstOperation contains 4thAxisCW PostScript Command:
Post will output Program as one or more Macro Sub Programs.
Post will output W Address Indexing with calls to Macro Sub Programs.
Post will calculate value of 360 Ö FourthDegree# to determine number of Indexes.
IF FirstOperation contains PalletIn PostScript Command:
IF Pallet# > 1, post will call Multiple Macro Sub Programs per Index.
IF any other Operation contains PalletIn PostScript Command:
IF Pallet# > 1, post will Close previous Macro Sub Program and open new Macro Sub Program.
First Index position always starts at zero.
Example:
IF FirstOperation contains 4ACW(60):
Main program will:
Index to 0 and call Macro 1
Index to 60 and call Macro 1
Index to 120 and call Macro 1
Index to 180 and call Macro 1
Index to 240 and call Macro 1
Index to 300 and call Macro 1
IF FirstOperation contains 4ACW(90) and any other Operation contains PIN(2):
Main program will:
Index to 0 and call Macro 1
Index to 90 and call Macro 2
Index to 180 and call Macro 1
Index to 270 and call Macro 2
IF FirstOperation contains 4ACW(180) and PIN(2), and any other Operation contains PIN(2):
Main program will:
Index to 0 and call Macro 1 and Macro 2
Index to 180 and call Macro 1 and Macro 2
Pallet#1 is always Optional.
Post supports indeces as low as 5 degrees.
Post supports as many macros as user desires.
User is responsible for making sure that things balance.
User is responsible for not creating more Macros than Operations.
DWB}

{Prog Numeric Format Definitions ****}

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ToolDiameter#,4)
FORMAT(TrackZNO#,4)
FORMAT(Recall#,5)
FORMAT(Program#,5)
FORMAT(CallMasterNum#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)

{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

WFOStuff:
{ NOTE: This Post Processor does not support WorkFixtureOffsets. }
RETURN

DoSubComment:
IF UseComments? AND SubComment?
'; SUB NUMBER - ' Program# 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
RestoreScale
END
RETURN

OpenIndexSub:
NewProg
OpenSub
SeqC ' O %' Recall# Num#('3') EOL
IF UseComments? AND SubComment?
'; MACRO - ' Recall# Num#('3') EOL
END
RETURN

CloseIndexSub:
SeqC EndSub EOL
CloseSub
RETURN

DoIndex:
FORMAT(Recall#,2)
SeqC Rapid ' W' Recall# Num#('2') EOL
RETURN

CallIndexSub:
FORMAT(Recall#,5)
IF GTEqual? Recall# Num#('4') Num#('2') { IndexSubCount }
Save# Num#('3') ADD# Recall# Num#('3') Num#('1') { IndexSub# }
IF GreaterThan? Recall# Num#('3') Recall# Num#('4')
Save# Num#('3') Num#('1')
END
END
SeqC ' G65 P%' Recall# Num#('3') EOL
RETURN

ckMultiIndexSubs:
IF Flag?('3') { MultiIndexSubs }
IF GTEqual? Recall# Num#('4') Num#('2')
CallIndexSub
END
IF GTEqual? Recall# Num#('4') Num#('3')
CallIndexSub
END
IF GTEqual? Recall# Num#('4') Num#('4')
CallIndexSub
END
IF GTEqual? Recall# Num#('4') Num#('5')
CallIndexSub
END
IF GTEqual? Recall# Num#('4') Num#('6')
CallIndexSub
END
END
RETURN

DoIndexSubs:
DoIndex
CallIndexSub
ckMultiIndexSubs
RETURN

IndexSubInc:
Save# Num#('2') ADD# Recall# Num#('2') Recall# Num#('1') { IndexSubAngle }
IF LessThan? ABS# Recall# Num#('2') Num#('360')
DoIndex
CallIndexSub
ckMultiIndexSubs
END
RETURN

ckIndexSubs:
IF Flag?('2')
IF GTEqual? Recall# Num#('3') Num#('2')
Save# Num#('4') Recall# Num#('3') { IndexSubCount }
END
SeqC AbsOrInc EOL
DoIndexSubs
IndexSubInc IndexSubInc IndexSubInc
IF LessThan? ABS# Recall# Num#('1') Num#('90') { IndexSubAngle }
IndexSubInc IndexSubInc IndexSubInc IndexSubInc
END
IF LessThan? ABS# Recall# Num#('1') Num#('45') { IndexSubAngle }
IndexSubInc IndexSubInc IndexSubInc IndexSubInc
END
IF LessThan? ABS# Recall# Num#('1') Num#('30') { IndexSubAngle }
IndexSubInc IndexSubInc IndexSubInc IndexSubInc
IndexSubInc IndexSubInc IndexSubInc IndexSubInc
IndexSubInc IndexSubInc IndexSubInc IndexSubInc
END
IF LessThan? ABS# Recall# Num#('1') Num#('15') { IndexSubAngle }
IndexSubInc IndexSubInc IndexSubInc IndexSubInc
IndexSubInc IndexSubInc IndexSubInc IndexSubInc
IndexSubInc IndexSubInc IndexSubInc IndexSubInc
END
IF LessThan? ABS# Recall# Num#('1') Num#('10') { IndexSubAngle }
IndexSubInc IndexSubInc IndexSubInc IndexSubInc
IndexSubInc IndexSubInc IndexSubInc IndexSubInc
IndexSubInc IndexSubInc IndexSubInc IndexSubInc
IndexSubInc IndexSubInc IndexSubInc IndexSubInc
IndexSubInc IndexSubInc IndexSubInc IndexSubInc
IndexSubInc IndexSubInc IndexSubInc IndexSubInc
IndexSubInc IndexSubInc IndexSubInc IndexSubInc
IndexSubInc IndexSubInc IndexSubInc IndexSubInc
IndexSubInc IndexSubInc IndexSubInc IndexSubInc
END
SeqC ' M02' EOL
END
RETURN

PSInit:
NewWFOF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
FourthCCWF
FifthCWF
FifthCCWF
RETURN

PSStuff:
IF FirstOperation?
IF FourthCW?
FORMAT(FourthDegree#,2)
SetFlag('2') { IndexSubs }
Save# Num#('1') FourthDegree# { IndexSubAngle }
Save# Num#('3') Num#('1') { IndexSub# }
OpenIndexSub
END
IF PalletIn?
IF Flag?('2')
IF GTEqual? Pallet# Num#('2')
SetFlag('3') { MultiIndexSubs }
END
END
END
ELSE
IF PalletIn?
IF Flag?('2')
Save# Num#('3') Pallet# { IndexSub# }
IF GTEqual? Pallet# Num#('2')
CloseIndexSub
OpenIndexSub
END
END
END
END
IF FourthCW?
FourthCWF
END
IF PalletIn?
PalletInF
END
RETURN

DoPostScript:
PSInit
EachPS
SeqC PostScript EOL
PSStuff
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqC EndOpPS EOL
PSStuff
NextPS
RETURN

EntryMove:
IF FeedEntry?
SeqC Feed ZIn FeedEnt EOL
ELSE
SeqC Rapid ZIn EOL
END
RETURN

StartSub:
OpenSub
SubID 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 CallLab RepLab RepCycs EOL
StartSub
RETURN

FinishSub1: {part 1}
SeqC
LoadFeat Num#('0') Num#('0') ClearancePlane3#
IF ZMove?
IF NOT FeedConnect?
IF AutoCycle?
Rapid ZCP3
ELSE
IF FIFO?
Feed ZCP3 FeedEntC
ELSE
Rapid ZCP3
END
END
END
END
EOL
RETURN

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

OpenMP:
IF EquallySpacedOffsets?
NewProg
SeqC SubCall CallLab RepLab Parts EOL
StartSub
END
RETURN

CloseMP:
IF EquallySpacedOffsets?
SeqC Preset ShiftPC EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshftPC EOL
END
RETURN

DoAbsOrInc:
IF Flag?('1') AND AbsoluteMoves?
IF ZMove? AND AbsValue?
IncValue
ELSE
IF NOT ZMove? AND NOT AbsValue?
AbsValue
END
END
END
RETURN

DoDrillAbsOrInc:
IF Flag?('1') AND AbsoluteMoves?
IF SPZMove? AND AbsValue?
IncValue
ELSE
IF NOT SPZMove? AND NOT AbsValue?
AbsValue
END
END
END
RETURN

RestoreAbsOrInc:
IF Flag?('1') AND AbsoluteMoves? AND NOT AbsValue?
SeqC AbsValue EOL
END
RETURN

FormatArc:
DoAbsOrInc
IF ArcCW?
CWArc
ELSE
CCWArc
END
MoveXY MoveZC ArcIJ
RETURN

ckCRC:
{ NOTE: This Post Processor does not support CutterRadiusCompensation. }
RETURN

ckCRCNum:
{ NOTE: This Post Processor does not support CRCOffset. }
RETURN

ToolPath:
ResetCRCNum
EACHFeat
IF PointFeat?
IF AutoCycle?
IF NOT FirstFeat?
SeqC Rapid MoveSX MoveSY EOL
END
SeqC SubCall CallLab EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
IF NOT FirstFeat?
SeqC DoDrillAbsOrInc MoveSX MoveSY MoveSZC EOL
END
END
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqC DoAbsOrInc ckCRC Rapid MoveXY MoveZC ckCRCNum EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqC DoAbsOrInc ckCRC Feed MoveXY MoveZC FeedRateC ckCRCNum EOL
DecelMove2
END
SeqC DoAbsOrInc ckCRC Feed MoveXY MoveZC DecelFeed ckCRCNum EOL
ELSE
SeqC DoAbsOrInc ckCRC Feed MoveXY MoveZC FeedRateC ckCRCNum EOL
END
END
ELSE
IF ArcFeat?
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
RestoreAbsOrInc
RETURN

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

AutoCycCutSub2: {part 2}
ToolPath
SeqC AbsOrInc
IF Repeats? AND FeedConnect? AND ZshiftOnly?
ELSE
IF FIFO?
Feed ZCP2 FeedEnt
ELSE
Rapid ZCP2
END
END
EOL
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?
NewProg
AutoCycCutSub1
EntryMove
AutoCycCutSub2
AutoCycPat
ELSE
EntryMove
ToolPath
END
RETURN

G92Sub:
SubWarning
StdSub
SeqC AbsOrInc Connect StrtPos EOL
Milling
FinishSub1
FinishSubG92
RETURN

ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
NewProg
EachCycle
SetSRXYtoEP
IF FeedConnect?
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqC IncValue Feed StrtPos EOL
AbsOrInc
END
END
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqC IncValue Rapid StrtPos EOL
AbsOrInc
END
IF FeedEntry?
SeqC Rapid ZCP2PlusInc EOL
END
END
IF FeedEntry?
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqC Rapid ZInPlusInc EOL
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
SeqC SubCall CallLab EOL
NextCycle
SetStatusOn
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
IF FeedConnect? {there is no Z up in the sub}
IF FIFO?
SeqC Feed ZCP2 FeedEnt EOL
ELSE
SeqC Rapid ZCP2 EOL
END
END
SeqC EndSub EOL
CloseSub
{Element shift, not pattern}
RETURN

ZonlyRep:
EachCycle
IF NOT FirstCycle?
SeqC Connect StrtPos EOL {added Connect}
END
IF FeedConnect?
SeqC Feed StrtPos ZInPlusInc FeedEnt EOL {changed to FeedC}
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
LoadFeat Num#('0') Num#('0') ZCP2PlusInc#
IF ZMove?
SeqC Rapid StrtPos ZCP2PlusIncC EOL {can't call for cycle =1} {added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
END
SeqC Feed StrtPos ZInPlusInc FeedEnt EOL
ELSE
SeqC Rapid StrtPos ZInPlusInc EOL {added Rapid, reads better} {changed to RapidC, reads better}
END
END
SeqC SubCall CallLab EOL
NextCycle
StartSub
TrackZNO# FIRST SPZ#
ToolPath
FinishSub1
SeqC EndSub EOL
CloseSub
RETURN

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

SkipToLastFeat:
EachFeat
IF LastFeat?
TrackXNO# SPX#
TrackYNO# SPY#
END
NextFeat
RETURN

SetDrillEndOpZ:
IF RetractToCP1?
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
RETURN

OpGuts:
IF Milling?
LoadFeat Num#('0') Num#('0') ClearancePlane2#
IF ZMove?
SeqC Rapid StrtPos ZCP2C EOL
END
IF Repeats?
NewProg
IF ZshiftOnly?
IF AutoCycle? {incremental Autocycle sub can have Z moves}
ZonlyRepAutoCycle
ELSE {Z shift only, NOT Auto Cycle}
IF UseSeparateSubCalls? AND CyclesLessThanMaxSubCalls?
SetFlag('1') { Milling ZShiftOnly SepSubs }
ZonlyRep
SetFlagF('1')
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
LoadFeat Num#('0') Num#('0') ClearancePlane3#
IF ZMove?
IF AutoCycle?
SeqC ZCP3C EOL
ELSE
IF FIFO?
SeqC Feed ZCP3C FeedEnt EOL
ELSE
SeqC Rapid ZCP3C EOL
END
END
END
ELSE
IF Drilling?
IF Repeats?
NewProg
StdSub
SeqC AbsOrInc Rapid StrtPos EOL
END
IF RetractToCP1? { DrillCP }
LoadFeat Num#('0') Num#('0') ClearancePlane1#
IF ZMove?
SeqC Rapid StrtPos ZCP1 EOL
END
ELSE
LoadFeat Num#('0') Num#('0') ClearancePlane2#
IF ZMove?
SeqC Rapid StrtPos ZCP2 EOL
END
END
GetCycle
SeqC Cycle FromCP StrtPos ZDepth RLevel Dwell Peck Retract FeedEnt EOL
IF CallMasterOp?
SeqC SubCall CallLabB CallMasterNum# EOL
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') {std sep sub Zreps in effect}
NewMasterProg
SeqC SubCall CallLab EOL
StartSub
ToolPath
SeqC EndSub EOL
CloseSub
SetFlagF('1') {not std sep sub Zreps in effect}
ELSE
ToolPath
END
END
SetDrillEndOpZ
SeqC Rapid ' G80' ZCP3 EOL
IF Repeats?
FinishSubG92
END
END
END
RETURN

ProgStart:
InitProg
ReverseXZArcs
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('10000')
IF Metric?
SetMaxFeed('12700')
ELSE
SetMaxFeed('500')
END
Save# Num#('1') Num#('0') { IndexSubAngle }
Save# Num#('2') Num#('0') { IndexSubs }
Save# Num#('3') Num#('0') { IndexSub# }
Save# Num#('4') Num#('0') { IndexSubCount }
SetFlagF('1') { Milling ZShiftOnly SepSubs }
SetFlagF('2') { IndexSubs }
SetFlagF('3') { MultiIndexSubs }
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
' 4thAxisCW(60), 4ACW(60) -' EOL
' generates a main program that indexes W axis and calls macro' EOL
' PalletIn(2), PIN(2) -' EOL
' creates macro called from W index main program' EOL
' If 4ACW and PIN exist in First Operation, post will call multiple macros per index' EOL
RETURN

InitOp:
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
IF ProgramNameComment?
'; PROGRAM - ' ProgramName$ EOL
END
IF ProgramComment?
'; ' ProgramComment$ EOL
END
IF FormatNameComment?
'; FORMAT - ' FormatName$ EOL
END
IF TimeComment?
'; ' Date$ ' AT ' Time$ EOL
END
IF MovesComment?
'; OUTPUT IN ' MoveType$ ' INCHES' EOL
END
IF PartsComment?
'; PARTS PROGRAMMED - ' Parts# EOL
END
IF StartToolComment?
'; FIRST TOOL NOT IN SPINDLE' EOL
END
END
OpenSub
RestoreScale
RETURN

FirstOp1:
Plane { No Output }
DoPostScript
DoOpComments
RETURN

FirstOp2:
CheckPass
Seq AbsOrInc Rapid StrtPos ZCP1 EOL
RETURN

FirstOp3:
IF MultipleParts? AND EquallySpacedOffsets? AND OneToolAllParts? AND ExitClearancePlane?
Seq AbsOrInc Rapid StrtPos EOL
END
RETURN

NewToolOp1:
SeqC Rapid LAST ZCP1 EOL
RETURN

NewToolOp2:
DoEndOpPS
RETURN

NewToolOp3: {Start new Operation}
Plane { No Output }
SeqC ' M00' EOL { ToolChng }
DoPostScript
DoOpComments
RETURN

NewToolOp4:
CheckPass
Seq AbsOrInc Rapid StrtPos ZCP1 EOL
RETURN

NewToolOp5:
IF MultipleParts? AND EquallySpacedOffsets? AND OneToolAllParts? AND ExitClearancePlane?
Seq AbsOrInc Rapid StrtPos EOL
END
RETURN

SameToolOp1:
DoEndOpPS
IF LAST ProgStop?
SeqC Rapid LAST ZCP1 EOL
SeqC ' M00' EOL
ELSE
IF NewToolOffset?
SeqC Rapid LAST ZCP1 EOL
END
END
RETURN

SameToolOp2: {Start new Operation}
DoPostScript
DoOpComments
CheckPass
RETURN

SameToolOp3: {Start new Operation}
Plane { No Output }
IF LAST ProgStop?
SeqC AbsOrInc Rapid StrtPos ZCP1 EOL
ELSE
IF NewToolOffset?
SeqC AbsOrInc Rapid StrtPos ZCP1 EOL
ELSE
SeqC AbsOrInc Rapid StrtPos EOL
END
END
RETURN

End1:
SeqC Rapid ZCP1 EOL
RETURN

End2:
DoEndOpPS
IF ProgStop?
SeqC ' M00' EOL
END
RETURN

End3:
IF Flag?('2') { IndexSubs }
CloseIndexSub
ELSE
SeqC EOP EOL
END
CloseSub
ckIndexSubs
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
RETURN

MPallTools1P: {Multiple Parts, All Tools 1 Part}
EachOp {Start of post processing}
IF FirstOperation?
InitOp
OpenMP
FirstOp1
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
NewToolOp2 {to tool change, CS problem}
NewToolOp3
NewToolOp4
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
End1 {End of program}
End2
CloseMP
End3
RETURN

MP1ToollAllPfu: {Multiple Parts, 1 Tool all Parts, full up}
EachOp {Start of post processing}
IF FirstOperation?
InitOp
FirstOp1
OpenMP
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
CloseMP
NewToolOp2 {to tool change, CS problem}
NewToolOp3
OpenMP
NewToolOp4
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
End1 {End of program}
CloseMP
End2
End3
RETURN

MP1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane}
EachOp {Start of post processing}
IF FirstOperation?
InitOp
FirstOp1
FirstOp2
{FirstOp3}
OpenMP
FirstOp3 {need StrtPos in Sub}
ELSE
IF NewTool?
CloseMP
NewToolOp1
NewToolOp2 {to tool change, CS problem}
NewToolOp3
NewToolOp4
{NewToolOp5}
OpenMP
NewToolOp5 {need StrtPos in Sub}
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
CloseMP {End of program}
End1
End2
End3
RETURN

NoMPs: {no multiple parts}
EachOp {Start of post processing}
IF FirstOperation?
InitOp
FirstOp1
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
NewToolOp2
NewToolOp3
NewToolOp4
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
End1 {End of program}
End2
End3
RETURN

{Start of executable Prog, Top Level ****}

ProgStart {setup and initializations}

IF MultipleParts?
IF AllToolsOnePart?
MPallTools1P
ELSE {implied OneToolAllParts?}
IF FullUp?
MP1ToollAllPfu
ELSE {implied ExitClearancePlane?}
MP1ToollAllPXcp
END
END
ELSE
NoMPs
END


Wyszukiwarka

Podobne podstrony:
Fanuc 6M Chiron D214 15
Fanuc 6M NoSubs D877 15 3
Fanuc 6M Chiron B214 15
Fanuc 6M NoSubs C877 15 3
Fanuc 6M [UPE] CY71 15
Fanuc 6M Chiron C214 15
Fanuc 6M Chiron M214 15
Fanuc 6M NoSubs B877 15 3
Fanuc 6M NoSubs B877 15 3
Fanuc 6M [TK] MU52 15
Fanuc 6M [JD] MV99 15
Fanuc 6M HS HA 400 DX71 15 1
Fanuc 6M HS [TC] MU34 15 1
Fanuc 6M HS [CG] MV93 15
Fanuc 6M MS [fac] D705 15
Fanuc 6M [SM] PM956 17 3
Fanuc 6M [MC] M710 87
Fanuc 6M [PMW] NDT40 16
Fanuc 6M (AGA1) M148 81 2

więcej podobnych podstron