Fadal Format 2 LH [NM] MU20 16


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

{3/1/90, Updated to Version 3.2 per Fanuc 6M M001.70 Format, DWB}

{4/23/90
Copied & modified: Fanuc 10M Kit M028.70
For: Graziano Machining
Use operation numbers for min seq numbers in main and in sub.
Change colon to dash in comments.
CoolOn on same line as OfstOn.
Added to SpinOff line.
ProgStop and UnTool at end of prog.
Added FIRST modifier to end of prog for home position.
Fix connect to StrPos in ZonlyRep
Jim Radcliffe}

{7/24/90, Added InitProg globally to posts with this remark, DWB}
{7/24/90, Replaced all occurances of SetSRXYZero with SetSRXYtoSP, DWB}
{9/28/90, Changed CRCOffC to CRCOff in NewTool.
Add CheckSeq call in SameTool if MultipleParts to get # before comments, JR}

{6/14/91
Modified: Fanuc 10M Kit [GM] M303.72
Modified SameTool ops to output CheckSeq reqardless of MP condition
Updated to Version 4.0 per Fanuc 6M M001.80 Format
KLM}

{03/26/92
Modified: Fanuc 10M Kit [GM] M303.73
Changed the form/prog number to M303.80 (miss numbered)
Minor changes.
Kim Michelman}

{03/26/92
Modified: Fanuc 10M Kit [GM] M303.80
For: Graziano
Added the PreTool after the ToolChng.
Deleted the CheckSeq and replaced with SeqC.
Added AbsOrInc Rapid to the SpinOff line in the ELSE in the IF ToolChangeAtHome? boolean
per version .72 for Ricardo. Changed to SpinOff on a line by itself in update, and prefers to
call the AbsOrInc Rapid with the Spinoff if not going home. *Do not change back in future updates.
Moved the Seq Plane 'G80' CRCOffC EOL after the comments in NewTool.
Kim Michelman}

{09/05/92
Copied Fanuc 10M Kit [GM] M303.73
Renamed to Fadal Format 2 [BM] M510.81.3 and modified to ReSequence.
Minor changes to start up and end arrangements.
KC}

{01/27/93
Corrected, AbsValue at two places in WFOStuff.
KC}

{04/23/93
Changed Retag command to Reseq.
KC}

{07/22/93
Copied Fadal Format 2 [GM] M510.81.3
Renamed to Fadal Format 2 [E] M585.81.2
Add G8 to milling ops.
Change fixture offsets from G54/G59 to E1/E24.
Cancel CRC in XY plane. [ckCRC]
KC}

{09/07/93
Copied Fadal Format 2 [E] M585.81.2
Renamed to Fadal Format 2 [G85E] M---.--.-
Uses G85 as tapping cycle together with M49 [Pots disabled] & M48 [Pots enabled]
Feeds down and up with speed and feed override switches disabled. Used with Tapmatic NCR series.
Removed 'DrillCP' and 'RapidC ZCP3C' from the 'IF Drilling?' commands.
Add SpinOff to IncValue OfstOff blocks.
Changed #6 format to add trailing 0's.
KC}

{* 11/3/93 [cwh]
Modeified: Fadal 2 [G85E] M602.81.6
To: Fadal 2 [G85E] M602.81.7
For: Gibbs and Associates

Modified the form so that it could be used with the 32MP and 32MPOL
versions of Catalyst ( Virtual ).
*}

{3/3/94
Add SeqLab to PostSDcript line in 'DoPostScript'.
KC}

{4/12/94
Minor clean up. Move Rapid, Abs., WFO's to Plane line.
KC}

{4/15/94
Uncheck 'Allow R-Format Arcs' boolean. (Caused mixed output in programs input in metric).
KC}

{1/17/96, Updated .85 to .86 version, MPK}

{3/22/96, Tested ZOnlyRepAutoCycle, Changed version # to .89, MPK}

{12/11/97
Initial: Fadal 2 [G85E] M602.89
Created: Fadal 2 [G85E] M602.89.1
ForUser: Lopardo Mfg Co
Develop: ComPost2 1.1b3, Virtual 4.21.21
Comment: Added Rigid tapping per fax and conversation with Robert Shoemaker.
Jim Radcliffe}

{02/13/98,
Initial: Fadal 2 [G85E] M602.89.1
Created: Fadal 2 [G85E] M602.89.2
For: Lopardo Mfg Co
Changed Sub output to Lxxx calls instead of M98P calls.
In Form: Moved Sub-routines to beginning of program.
In Form: Changed M30 at end of program to M2.
Added line numbers to sub comments.
Moved SpinOff from OfstOff line to CoolOff line in NewTool and End of Prog.
Changed End of All Subs in form to M30. Changed Return from Sub in form to M17.
Added the sub-routine doEndSubs. This sub-routine will create the last sub-program
in the program, output a literal M30, and then close the sub-routine. It will
only create this sub-program if one sub-program has already been created, using Flag('4').
Changed all occurances of OnePart to '01'.
Deleted CRCOffC in IF LineFeat? and IF RapidFeat? in ToolPath.
Added boolean to WFOStuff so it will output a WFO if the previous operation had a progstop.
Deleted WFOStuff from GetStartOfSameTool.
Added WFOStuff to StartPos lines in SameTool.
Added ckCRC to ZonlyRep, ZonlyRepAutoCycle, and Milling sub-routines so that 'G1F43F50.D' will be
output before Z depth at beginning toolpath.
Moved SpinOn and Speed to line before StartPos in SameTool.
CDH}

{02/24/98,
Initial: Fadal Format 2 [LM] MV11.89.1
Created: Fadal Format 2 [LM] MV11.89.2
For: Lopardo Mfg.
Deleted Drill sub-routine calls.
Moved literal 'G84.2' call from IF Drilling to FirstOp, NewTool, and SameTool before OfstOn call.
CDH}

{04/09/98,
Initial: Fadal Format 2 [LM] MV11.89.2
Created: Fadal Format 2 [LM] MV11.89.3
For: Lopardo Mfg.

Changes to Prog:
1) doEndSub: Made sequence number non-conditional.
2) IF Drilling: Added IF PosApproach boolean to output 'M46' and 'M47'.
CDH}

{5/27/98
Initial: Fadal Format 2 [LM] MV11.89.3
Created: Fadal Format 2 [NM] Mxxx.89
ForUser: Norco Mfg
Control: Fadal
Machine: Fadal
Develop: ComPost2 1.1b3, Virtual Gibbs 4.24
Comment: New processor per marked up readout and conversation with Kurtis Hess 253-872-3634
Changed to R format arcs up 180 degrees then R- to 359 degrees.
Changed SubComment to ToolTypeComment and moved to same sine as Sub ID.
Changed IncValue OfstOff (G91G20Z0) to OfstOff (G49Z0).
Added empty line to begin tools and subs.
Added empty line to end tools and subs.
Deleted G8 from milling ops.
Changed CRC handling to standard stuff.
Deleted ckCRC sub and calls.
Added CRC handling per Fanuc 6M M001ż
updated ToolPath, FinishSub1, AutoCycCutSub2 & IF Milling?
calling CRCOffC after Z out move
Moved StrtPos to WFOStuff line.
Added optional stop, move to machine home and UnTool to end of program.
Comment: Other changes to correct or clean up.
Cleaned up 'G84.2' calls.
Cleaned Up WFOStuff sub and calls.
Changed output of EndSub from M30 to M17.
Changed output of EndSubs from M17 to M30.
Deleted doEndSub sub and replaced doEndSub call with EndSubs.
Jim Radcliffe}

{4Aug98
Original: Fadal Format 2 [NM] MV97.89
Created: Fadal Format 2 LH [NM] MV97.16
For: Norco Mfg
Created Longhand Post per Fanuc 6M LH MV83ż2
Charles Winston}

{Prog Numeric Format Definitions ****}

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ADD#,4)
FORMAT(ToolDiameter#,4)
FORMAT(TrackXNO#,4)
FORMAT(TrackYNO#,4)
FORMAT(TrackZNO#,4)
FORMAT(Program#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
FORMAT(Recall#,7)
FORMAT(RapidF#,8)

{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

WFO:
'E' NewWFO#
RETURN

WFOStuff:
IF NewWFO?
IF MultipleParts? AND WorkFixtureOffsets?
EOL
'*** WARNING *** DO NOT USE NEWWFO() WITH MULTIPLE PARTS AND WORK FIXTURE OFFSETS' EOL
ELSE
WFO
END
ELSE
IF Flag?('2') { Need to output WFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF NOT SameTool?
IF MultipleParts?
IF WorkFixtureOffsets?
SetWFO
ELSE
WFO
END
ELSE
WFO
END
END
END
END
SetFlagF('2') { Do not output WFO second time WFOStuff is called for MP-WFO-OTAP-ECP }
RETURN

ResetWFO:
IF WorkFixtureOffsets?
SeqLab WFO1 EOL
END
RETURN

DoPartCycleComment:
IF MultipleParts? AND UseComments? AND SubComment?
SeqLab '( PART NO. ' PartNum# ' )' EOL
END
RETURN

DoCycleComment:
IF UseComments? AND SubComment?
SeqLab '( CYCLE START )' EOL
END
RETURN

DoOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
SeqLab '( OPERATION ' Operation# '- ' OperationType$ ' )' EOL
END
IF OperationComment?
SeqLab '( ' OperationComment$ ' )' EOL
END
IF WorkGroupComment?
SeqLab '( ' WorkGroupComment$ ' )' EOL
END
IF ToolTypeComment?
SeqLab '( TOOL ' Tool# '- ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
IF ToolComment?
SeqLab '( ' ToolComment$ ' )' EOL
END
RestoreScale
END
RETURN

PSInit:
NewWFOF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN

PSStuff:
IF FourthCW?
FORMAT(FourthDegree#,2)
SeqLab 'A' FourthDegree# EOL
FourthCWF
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
SeqLab 'A' FourthDegree# EOL
FourthCCWF
END
IF FifthCW?
FORMAT(FifthDegree#,2)
SeqLab 'B' FifthDegree# EOL
FifthCWF
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
SeqLab 'B' FifthDegree# EOL
FifthCCWF
END
RETURN

DoPostScript:
PSInit
EachPS
SeqLab PostScript EOL
PSStuff
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqLab EndOpPS EOL
PSStuff
NextPS
RETURN

EntryMove:
IF FeedEntry?
SeqLab FeedC ZInC
IF NOT EmptyLine? { Mostly for FeedConnect ZShiftOnly with ZMove }
FeedEntC
END
EOL
ELSE
SeqLab RapidC ZIn RapidF# EOL { RapidF# Forces FeedRate }
END
RETURN

ExitMove:
IF NOT FeedConnect?
CRCOffC
IF FIFO?
FeedC PRIME ZCP2C FeedEntC
ELSE
RapidC PRIME ZCP2C
END
END
RETURN

ExitMove2:
LoadFeat Num#('0') Num#('0') ClearancePlane3#
IF ZMove?
IF FIFO?
FeedC ZCP3C FeedEntC
ELSE
RapidC ZCP3C
END
END
RETURN

AbsValueC:
IF NOT AbsValue?
AbsValue
END
RETURN

IncValueC:
IF AbsValue?
IncValue
END
RETURN

AbsOrIncC:
IF AbsoluteMoves?
AbsValueC
ELSE
IncValueC
END
RETURN

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

ckCRC:
IF LastFeat?
CRCOffC
ELSE
IF NOT ZMove?
CRCOnC
END
END
RETURN

ckCRCNum:
IF NOT LastFeat? AND Equal? SPZ# EPZ#
CRCOffsetC
END
RETURN

DoPeck: { LongDrillStuff }
{ Not Supported }
RETURN

DrillFeature: { LongDrillStuff }
{ Not Supported }
RETURN

ToolPath:
EACHFeat
IF PointFeat? { Drilling Only }
SeqLab MoveSXYZC EOL
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqLab ckCRC RapidC MoveXYZC ckCRCNum EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqLab ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL
DecelMove2
END
SeqLab ckCRC FeedC MoveXYZC DecelFeed ckCRCNum EOL
ELSE
SeqLab ckCRC FeedC MoveXYZC 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
SeqLab FormatArc ArcFeedC EOL
DecelMove2
END
SeqLab FormatArc DecelFeed EOL
ELSE
SeqLab FormatArc ArcFeedC EOL
END
NEXTQuadrant
END
END
END
END
NEXTFeat
RETURN

AutoCycCutSub1: {part 1}
CalcACSRXY {calc tool position, CalcAutoCycleStatusRecordXY}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
SetSRXYtoSP
IF Repeats? AND ZShiftOnly?
EntryMove
END
SeqLab IncValue EOL
RETURN

AutoCycCutSub2: {part 2}
SeqLab AbsOrInc CRCOffC
IF FIFO?
FeedC ZCP2 FeedEntC
ELSE
RapidC ZCP2
END
EOL
SetSRSubXY {restore SR to 1st position value}
ReSetPass2 {restore for positioning moves}
RETURN

Milling:
EntryMove
ToolPath
RETURN

CutAutoCycle:
EACHFeat
DoCycleComment
IF SPXMove? OR SPYMove?
IF FIFO?
Rapid
END
SeqLab RapidC MoveSXYC EOL
END
AutoCycCutSub1
IF Repeats?
IF ZShiftOnly?
EachRep
IF NOT FirstCycle?
IF FeedConnect?
DoCycleComment
IF SPXMove? OR SPYMove?
SeqLab FeedC MoveSXYC FeedEntC EOL
END
AbsOrInc
ELSE
SeqLab AbsOrInc ExitMove EOL
DoCycleComment
IF SPXMove? OR SPYMove?
SeqLab IncValue RapidC MoveSXYC EOL
AbsOrInc
END
IF FeedEntry? AND NOT FIFO?
SeqLab RapidC ZCP2 EOL
END
END
EntryMove
SeqLab IncValue EOL
END
ToolPath
NextRep
END
ELSE
Milling
END
AutoCycCutSub2
NEXTFeat
RETURN

ZonlyRep:
{ NOTE: This Post Processor takes care of Z Clearance. }
EachRep
DoCycleComment
IF NOT FirstCycle?
CRCOffC
IF SPXMove? OR SPYMove?
IF FeedConnect?
FeedC
ELSE
RapidC
END
SeqLab MoveSXYC EOL
END
IF FeedEntry? AND NOT FeedConnect?
SeqLab ZCP2C EOL
END
END
EntryMove
ToolPath
SeqLab ExitMove EOL
NextRep
RETURN

LongDrillStuff:
SeqLab DrillCP EOL
GetCycle
SeqLab StrtPosC EOL
ToolPath
LoadFeat Num#('0') Num#('0') ClearancePlane3#
IF ZMove?
SeqLab RapidC ZCP3C EOL
END
RETURN

DrillStuff:
IF PosApproach?
SeqLab 'M46' EOL
END
GetCycle
IF Tap? AND NOT RigidTap?
SeqLab 'M49' EOL
END
SeqLab
IF RigidTap?
'G84.1'
ELSE
Cycle
END
FromCP StrtPos ZDepth RLevel Dwell Peck Retract
IF RigidTap?
Speed
END
FeedEnt EOL
TrackZNO# FIRST SPZ# {.81.2}
RETURN

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

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

OpGuts:
ResetCRCNum
RapidF# { No Output }
IF Milling?
SeqLab ZCP2C EOL
IF AutoCycle?
CutAutoCycle
IF Repeats? AND FeedConnect?
ELSE
SeqLab ExitMove2 EOL
END
SetPass1
ELSE { NOT AutoCycle }
IF Repeats? AND ZShiftOnly?
ZonlyRep
ELSE
Milling
END
SeqLab CRCOffC ExitMove2 EOL
END
ELSE
IF Drilling?
DrillStuff
ToolPath
IF Tap? AND NOT RigidTap?
SeqLab 'G80M48' EOL
ELSE
SeqLab 'G80' EOL
END
IF PosApproach?
SeqLab 'M47' EOL
END
SetDrillEndOpZ
SeqLab RapidC ZCP3C EOL
END
END
RETURN

ProgStart:
InitProg
ReverseXZArcs
InitWFONum
SetFlood
SetMaxRPM('10000')
IF Metric?
SetMaxFeed('12700')
ELSE
SetMaxFeed('500')
END
Save# Num#('1') Num#('0') { MultipleParts Current Tool FirstOp# }
Save# Num#('2') Num#('0') { MultipleParts ToolOp# Counter }
Save# Num#('3') Num#('0') { LongHand PeckCycle }
SetFlagF('2') { Need to output WFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF PSComment? AND UseComments?
'Utility Data:' EOL
' At Op Start: All literals and commands will appear at the beginning of the operation.' EOL
' At Op End: All literals and commands will appear at the end of the operation.' 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
' 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
RETURN

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

FirstOp1:
SeqLab ' ' EOL
SeqLab OpToolID ToolChng EOL
DoPartCycleComment
DoOpComments
DoPostScript
RETURN

FirstOp2:
CheckPass
SeqLab Rapid Plane CRCOff DrillOff AbsOrInc StrtPos WFOStuff EOL
IF Drilling? AND RigidTap?
SeqLab 'G84.2' EOL
ELSE
SeqLab Speed SpinOn EOL
END
RETURN

FirstOp3:
SeqLab OfstOn CoolOn EOL
RETURN

NewToolOp1:
SeqLab CoolOff SpinOff EOL
SeqLab OfstOff EOL
RETURN

NewToolOp2:
DoEndOpPS
IF ToolChangeAtHome?
SeqLab AbsOrIncC Rapid PRIME Home EOL
END
IF LAST ProgStop?
SeqLab 'M00' EOL
ELSE
SeqLab ProgStop EOL
END
RETURN

NewToolOp3: {Start new Operation}
SeqLab ' ' EOL
SeqLab ' ' EOL
SeqLab OpToolID ToolChng EOL
DoPartCycleComment
DoOpComments
DoPostScript
RETURN

NewToolOp4:
CheckPass
SeqLab Rapid Plane CRCOff DrillOff AbsOrInc StrtPos WFOStuff EOL
IF Drilling? AND RigidTap?
SeqLab 'G84.2' EOL
ELSE
SeqLab Speed SpinOn EOL
END
RETURN

NewToolOp5:
SeqLab OfstOn CoolOn EOL
RETURN

SameToolOp1:
DoEndOpPS
IF LAST ProgStop?
SeqLab CoolOff EOL
SeqLab OfstOff SpinOff EOL
SeqLab 'M00' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLab CoolOff EOL
END
IF NewToolOffset?
SeqLab OfstOff SpinOff EOL
END
END
RETURN

SameToolOp2: {Start new Operation}
DoPartCycleComment
DoOpComments
DoPostScript
CheckPass
RETURN

SameToolOp3: {Start new Operation}
IF LAST ProgStop?
IF Drilling? AND RigidTap?
SeqLab 'G84.2' EOL
ELSE
SeqLab Speed SpinOn EOL
END
SeqLab Rapid PlaneC StrtPos WFOStuff EOL
SeqLab OfstOn CoolOn EOL
ELSE
IF Drilling? AND RigidTap?
SeqLab 'G84.2' EOL
ELSE
SeqLab SpeedC EOL
END
SeqLab Rapid PlaneC StrtPos WFOStuff EOL
IF NewToolOffset?
SeqLab OfstOn EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqLab CoolOn EOL
END
END
RETURN

End1:
SeqLab CoolOff SpinOff EOL
SeqLab OfstOff EOL
RETURN

End2:
DoEndOpPS
IF FIRST ToolChangeAtHome? {added FIRST modifier}
SeqLab AbsOrIncC Rapid PRIME FirstHome EOL
END
IF ProgStop?
SeqLab 'M00' EOL
ELSE
IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart?
SeqLab ProgStop EOL
END
END
SeqLab ' ' EOL
SeqLab Rapid AbsValue 'X0.Y0.E0' EOL
SeqLab UnTool ToolChng EOL
RETURN

End3:
SeqLab EOP EOL
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
Retag
RETURN

MPallTools1P: {Multiple Parts, All Tools 1 Part}
IF FirstOperation? OR EquallySpacedOffsets?
SetFlag('2') { Need to output WFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
END
IF FirstOperation?
FirstOp1
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
NewToolOp2
NewToolOp3
NewToolOp4
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3
END
END
OpGuts
RETURN

MP1ToollAllPfu: {Multiple Parts, 1 Tool all Parts, full up}
SetFlag('2') { Need to output WFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF FirstOperation?
FirstOp1
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
ResetWFO
NewToolOp2
NewToolOp3
NewToolOp4
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3
END
END
OpGuts
RETURN

MP1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane}
SetFlag('2') { Need to output WFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF FirstOperation?
FirstOp1
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
ResetWFO
NewToolOp2
NewToolOp3
NewToolOp4
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3
END
END
OpGuts
RETURN

NoMPs: {no multiple parts}
SetFlag('2') { Need to output WFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF FirstOperation?
FirstOp1
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
NewToolOp2
NewToolOp3
NewToolOp4
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3
END
END
OpGuts
RETURN

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

EndPartSub:
{End of program ************************************************************}

{finish last operation}
End1
IF MultipleParts? AND OneToolAllParts?
ResetWFO
END
End2
RETURN

NewPart1: {Finish off last Part}
IF FullUp?
SeqLab CoolOff EOL
SeqLab IncValueC OfstOff EOL
END
{DoEndOpPS}
RETURN

NewPart2: {Start new Part}
SameToolOp2
RETURN

NewPart3: {Start new Part}
SetFlag('2') { Need to output WFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
SeqLab WFOStuff EOL
SeqLab PlaneC AbsOrInc Rapid StrtPos Speed EOL
IF FullUp?
SeqLab OfstOn EOL
SeqLab CoolOn EOL
END
RETURN

MPLoop:
Save# Num#('2') Recall# Num#('1')
IF WorkFixtureOffsets?
NewWFO
EachWFO
ELSE
EachPart
END
IF AllToolsOnePart?
EachOp
MasterSub
NextOp
EndPartSub
ELSE { OneToolAllParts }
EachOp
IF Equal? Operation# Recall# Num#('2') { Valid Tool Op }
IF FirstOperation? OR NewTool?
IF FirstPart?
MasterSub
ELSE
NewPart1
NewPart2
NewPart3
OpGuts
END
ELSE
MasterSub
END
IF LastOp?
IF LastPart?
Save# Num#('1') Num#('0')
END
Save# Num#('2') Recall# Num#('1')
ELSE
IF NEXT SameTool?
Save# Num#('2') NEXT Operation#
ELSE
IF LastPart?
Save# Num#('1') NEXT Operation#
Save# Num#('2') Num#('0')
ELSE
Save# Num#('2') Recall# Num#('1')
END
END
END
END
NextOp
END
IF WorkFixtureOffsets?
IncWFO
NextWFO
ELSE
NextPart
END
RETURN

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

ProgStart {setup and initializations}
InitOp

IF MultipleParts?
IF WorkFixtureOffsets?
{'NOTE: This Post Processor does not support Work Fixture Offsets for Multiple Parts.' EOL
'It is recommended that you change your selection to Equally Spaced Offsets.' EOL}
END
IF AllToolsOnePart?
MPLoop
ResetWFO
ELSE
EachOp
IF FirstOperation?
Save# Num#('1') Operation#
END
NextOp
MPLoop MPLoop MPLoop MPLoop MPLoop
MPLoop MPLoop MPLoop MPLoop MPLoop
MPLoop MPLoop MPLoop MPLoop MPLoop
MPLoop MPLoop MPLoop MPLoop MPLoop
MPLoop MPLoop MPLoop MPLoop MPLoop
EndPartSub
END
ELSE
EachOp
MasterSub
NextOp
EndPartSub
END
End3


Wyszukiwarka