BP EZ Trak M025 15 2


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

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

{7/7/95, Updated for Catalyst v2.20 per Fanuc 6M M001.10 Format, DWB}
{7/18/95, Added IF NOT LastFeat? at CkCRC sub, DWB}

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

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

{
Format: BP EZ-Trak Mxxx.12
5/7/96
Created new post based on sample ouptut from customer
This post currently does not support multiple parts
TH}

{
Format: BP EZ-Trak M025.12.1
5/21/96
Removed sequence numbers from comment lines
Added semi-colon to EOB
Removed StarPos line from G92Sub
Set Arc Centers to Absolute
Changed drill points to be rapid moves
Added ToolDiameter# to G105 sub calls
Reversed TC1 and TC2 for CRC
TH}

{
Format: BP EZ-Trak M025.12.2
5/29/96
Changed Arcs to stop on quads
TH}

{
Format: BP EZ-Trak M025.12.3
6/3/96
Added missing EACHQuadrant NEXTQuadrant
TH}

{7/9/96
Initial: BP EZ-Trak M025.12.3
Created: BP EZ-Trak M025.12.4
Added CloseMPa sub to Correctly output Tool# in last operation, formatted PartShiftX# and PartShiftY# to format#4,
changed RapidFeat to be identical to LineFeat, but with a FeedRate of 99.9, added support for tool changes at home, MPK}

{8/8/96
Initial: BP EZ-Trak M025.12.4
Created: BP EZ-Trak M025.12.5
Modified RapidFeat to not output when OptCyc1 is true (customer needs this feature for engraving)
Added TrackXNO# andd TrackYNO# to Rapidfeat in order to output proper start pos
Added OptCyc1F to PSInit
Changed DoCR to output CR- when OptCyc1? is true and the next feature is a Rapid.
MPK}

{2/26/97,
Initial: BP EZ-Trak M025.12.5
Created: BP EZ-Trak M025.12.6
For: Packard-Hughes
Added move to home position at end of program,
Added IF XMove OR YMove? condition to ArcFeat to prevent output of zero length moves,
restuctured handling of autocycles, the repeat command (G105) takes a X and Y parameter that
is the incremental distance from the first contour to the next contour. Modified the output of
the first contour to be in absolute, then output the inc X and Y distance for the G105 repeats,
added missing END command in DoCR, MPK}

{3/31/97,
Initial: BP EZ-Trak M025.12.6
Created: BP EZ-Trak M025.12.7
For: Packard-Hughes
Added IF ArcFeat? at DoCR.
TRUE tests IF LastQuadrant?.
TRUE outputs ' CR-'.
FALSE outputs ' CR0'.
FALSE outputs ' CR0'.
Changed SUB# Var(3) SPX# to SUB# SPX# Var(3) at ToolPath PointFeat AutoCycle.
Changed SUB# Var(4) SPY# to SUB# SPY# Var(4) at ToolPath PointFeat AutoCycle.
Added IF AutoCycle? AND FirstFeat? at ToolPath RapidFeat.
TRUE outputs Absolute DoStartX DoStartY SetInc DoEndX DoEndY.
FALSE outputs SetInc DoStartX DoStartY DoEndX DoEndY.
Added IF AutoCycle? AND FirstFeat? at ToolPath LineFeat.
TRUE outputs Absolute DoStartX DoStartY SetInc DoEndX DoEndY.
FALSE outputs SetInc DoStartX DoStartY DoEndX DoEndY.
Changed SetAbs to AbsOrInc at AutoCycCutSub2.
MPK}

{7/25/97
Updated & Modified: BP EZ-Trak M025.12.7
Created: BP EZ-Trak M025.15
For: Packard Hughes
Versions: Catalyst v3.35C/ComPost2 MSL 68K
Changes made per Mike Quinter of Packard Hughes, phone call, sample printouts and faxes.
Updated for Catalyst v3.35C per NoNest IncSubs M001.12.
Complete rewrite.
Some problems were resolved by observing certain rules:
4 place decimals must end in either a 5 or 0.
Trailing zero suppression causes a 4 place decimal ending in 0 to be output as a 3 place decimal.
Full Arcs are broken up into two Half Arcs.
Post does not stop on Quadrants.
Previous versions tested for NEXT RapidFeat during EachQuad/NextQuad Loop.
This broke a basic rule and caused CWArc to be CCWArc and zeroed out ArcIJ values.
FIRST, NEXT and LAST modifiers can be used only IF LastQuadrant? returns TRUE.
Non AutoCycle Subs are output in Absolute.
This is because SubCalls are controlled by an Incremental Origin Shift.
Flag(1) is used for outputting Absolute Coordinate of AutoCycle StrtPos.
Flag(2) is used for handling Engraving Retract Moves.
Flag(3) is used for control of CONRAD during FullArc.
Vars(4) and (5) are used for SubRoutine#s.
Vars(6) and (7) are used for AutoCycle SetPass2 StrtPos during Flag(1).
Vars(8), (9), (10) and (11) are used for FullArc routines.
DWB}

{8/9/97
Updated & Modified: BP EZ-Trak M025.15
Created: BP EZ-Trak M025.15.1
For: Packard Hughes
Versions: Catalyst v3.35C/ComPost2 MSL 68K
Updated for Catalyst v3.35C per NoNest IncSubs M001.12.
Changes made per Mike Quinter of Packard Hughes, phone calls.
Customer reported that Incremental Arc Centers is calculated distance from EndPoint to CenterPoint.
According to pages 22 and 32 of manual, Incremental X Center dimension is from X END and
Incremental Y Center dimension is from Y END.
Added IncValue Condition for ArcIJ at FormatMove.
Added FORMAT of SUB# at FormatFullArc1.
Moved TrackXYNO# from FormatFullArc1 to ArcFeat.
Deleted FORMAT of ArcIJ# at FormatFullArc2.
Deleted FORMAT of ArcIJ# at ArcFeat.
DWB}

{12Feb99
Original: BP EZ-Trak M025.15.1
Created: BP EZ-Trak M025.15.2
For: Packard Hughes
Changes made per: Mike Quinter
Develop: Catalyst 5.03/ComPost2 1.7b15
Added Post Header Comment at the top of Prog.
Updated to handle v5.0 Utility FeedRate Markers.
Changed ' F' ContourFeed2# to FeedRate in ToolPath at LineFeat and ArcFeat.
Post was only outputting the Contour FeedRate.
Added support for the post to output a rapid move connecting the exit move
of a milling operation, to the start position of the next operation.
( NOTE: This post does not support Z-moves )
Linked operations must both be Milling Operations. Repeats and Autocycles are not suported.
Uses OptCyc1, Flag('9') and Variables 21 thru 26.
The LinkMove Sub checks to ensure that both operations are performed at the same Z-depth.
Modified CONRAD and ToolPath subs. Added endMillPos, startMillPos, doLinkMove subs
Added SetFlagF('9') in ProgStart.
Added Utility Data Instructions at InitProg.
Charles Winston}

{Prog Numeric Format Definitions ****}

#1 = '#.00'
#2 = '####0.0##;0'
#3 = '*####0.0##;0'
#4 = '###0.0###;0:5'
#5 = '#######0'
#6 = '*###0.0###;0:5' { For Full Arcs }
#7 = '###.#'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(Recall#,4)
FORMAT(ADD#,4)
FORMAT(SUB#,4)
FORMAT(MUL#,4)
FORMAT(SPX#,4)
FORMAT(SPY#,4)
FORMAT(EPX#,4)
FORMAT(EPY#,4)
FORMAT(ArcI#,4)
FORMAT(ArcJ#,4)
FORMAT(CurOriginPosX#,4)
FORMAT(CurOriginPosY#,4)
FORMAT(ToolDiameter#,4)
FORMAT(TrackXNO#,4)
FORMAT(TrackYNO#,4)
FORMAT(Tag#,5)
FORMAT(PartNum#,5)
FORMAT(Program#,5)
FORMAT(CallMasterNum#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(RepsLess1#,5)
FORMAT(PartsLess1#,5)
FORMAT(RapidF#,7)
FORMAT(ContourFeed2#,7)

{Added Subroutines ***}

AorI:
IF AbsValue?
'A'
ELSE
'I'
END
RETURN

FormatMove:
IF PointFeat?
IF AutoCycle?
IF Repeats? AND NOT ZShiftOnly?
' XO' SUB# SPX# Recall# Num#('6')
' YO' SUB# SPY# Recall# Num#('7')
ELSE
' XO' ADD# CurOriginPosX# SUB# SPX# Recall# Num#('6')
' YO' ADD# CurOriginPosY# SUB# SPY# Recall# Num#('7')
END
ELSE
' X' SPX# AorI ' Y' SPY# AorI
END
ELSE
IF Flag?('1') { FIRST AutoCycle XYMove }
SetFlagF('1')
SetAbs
' XB' Recall# Num#('6') AorI
' YB' Recall# Num#('7') AorI
TrackXNO# SPX#
TrackYNO# SPY#
SetInc
ELSE
IF Flag?('3') { First Half of FullArc }
' XB' Recall# Num#('8') AorI
' YB' Recall# Num#('9') AorI
ELSE
' XB' SPX# AorI ' YB' SPY# AorI
END
END
IF Flag?('3') { First Half of FullArc }
' XE' Recall# Num#('10') AorI
' YE' Recall# Num#('11') AorI
ELSE
' XE' EPX# AorI ' YE' EPY# AorI
END
IF ArcFeat?
IF AbsValue?
' XC' ArcI# AorI ' YC' ArcJ# AorI
ELSE
SetAbs
' XC' SUB# ArcI# EPX# 'I YC' SUB# ArcJ# EPY# 'I'
SetInc
END
END
END
RETURN

CONRAD: { Corner Radius }
IF Flag?('3') { First Half of FullArc }
' CR0'
ELSE
IF LastFeat?
IF OptCyc1? NOT LastOp? AND NEXT Milling? AND NOT AutoCycle? AND NOT Repeats?
' CR0'
ELSE
' CR-'
END
ELSE
IF NotEqual? NEXT SPZ# NEXT EPZ#
IF Equal? NEXT SPX# NEXT EPX#
IF Equal? NEXT SPY# NEXT EPY#
IF NEXT NOT ArcFeat? { FullHelixArc }
SetFlag('2')
END
END
END
END
IF Flag?('2') { NextFeat Tool Retract }
' CR-'
ELSE
' CR0'
END
END
END
RETURN

ToolDia:
' D' ToolDiameter#
RETURN

LineRep:
FORMAT(Recall#,5)
' FEÅ‚'
IF Milling?
Recall# Num#('4')
ELSE
IF CallMasterOp?
'10' CallMasterNum#
ELSE
IF MasterOp?
'10' Tag#
ELSE
Recall# Num#('4')
END
END
END
' LE²'
IF Milling?
Recall# Num#('4')
ELSE
IF CallMasterOp?
'10' CallMasterNum#
ELSE
IF MasterOp?
'10' Tag#
ELSE
Recall# Num#('4')
END
END
END
FORMAT(Recall#,4)
RETURN

CallAC:
SeqLab ' G105' LineRep FormatMove ' RE1' ToolDia OpToolID EOL
RETURN

CallDrillCycle:
SeqLab ' G105' LineRep
' XO' CurOriginPosX#
' YO' CurOriginPosY#
' RE1' ToolDia OpToolID EOL
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

WFONum:
{ Not Supported }
RETURN

WFOStuff:
{ Not Supported }
RETURN

ResetWFO:
{ Not Supported }
RETURN

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

DoSubComment:
{ Not Supported }
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

PSInit:
NewWFOF
RotateF
FourthCWF
FourthCCWF
FifthCWF
FifthCCWF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN

PSStuff:
RETURN

DoPostScript:
PSInit
EachPS
SeqLab PostScript EOL
PSStuff
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqLab EndOpPS EOL
PSStuff
NextPS
RETURN

EntryMove:
{ Not Supported }
RETURN

ExitMove:
IF FirstPart?
IF NOT AutoCycle?
AbsOrInc
END
END
RETURN

ExitMove2:
{ Not Supported }
RETURN

StartSub:
FORMAT(Recall#,5)
'>'
IF Milling?
Recall# Num#('4')
ELSE
IF CallMasterOp?
'10' CallMasterNum#
ELSE
IF MasterOp?
'10' Tag#
ELSE
Recall# Num#('4')
END
END
END
EOL
FORMAT(Recall#,4)
RETURN

SubWarning:
{ Not Supported }
RETURN

FinishSub:
FORMAT(Recall#,5)
'<'
IF Milling?
Recall# Num#('4')
ELSE
IF CallMasterOp?
'10' CallMasterNum#
ELSE
IF MasterOp?
'10' Tag#
ELSE
Recall# Num#('4')
END
END
END
EOL
FORMAT(Recall#,4)
RETURN

ckCRC:
IF CutterRadiusCompensation?
IF CutterLeft?
' TC2'
ELSE
IF CutterCenter?
' TC0'
ELSE { CutterRight }
' TC1'
END
END
ELSE
' TC0'
END
RETURN

ckCRCNum:
{ Not Supported }
RETURN

FormatArc:
IF ArcCW?
CWArc
ELSE
CCWArc
END
RETURN

FormatFullArc1: { First Half of Full Arc }
IF AbsValue?
Save# Num#('8') SPX#
Save# Num#('9') SPY#
SetInc
Save# Num#('10') MUL# ArcI# Num#('2')
Save# Num#('11') MUL# ArcJ# Num#('2')
SetAbs
Save# Num#('10') ADD# SPX# Recall# Num#('10')
Save# Num#('11') ADD# SPY# Recall# Num#('11')
ELSE
Save# Num#('8') Num#('0')
Save# Num#('9') Num#('0')
Save# Num#('10') MUL# ArcI# Num#('2')
Save# Num#('11') MUL# ArcJ# Num#('2')
FORMAT(SUB#,6)
END
RETURN

FormatFullArc2: { Second Half of Full Arc }
IF AbsValue?
Save# Num#('8') Recall# Num#('10')
Save# Num#('9') Recall# Num#('11')
Save# Num#('10') EPX#
Save# Num#('11') EPY#
ELSE
Save# Num#('10') MUL# Recall# Num#('10') Num#('-1')
Save# Num#('11') MUL# Recall# Num#('11') Num#('-1')
FORMAT(SUB#,4)
END
RETURN

doLinkMove:
' XB' Recall# Num#('21') AorI ' YB' Recall# Num#('22') AorI ' XE' Recall# Num#('24') AorI ' YE' Recall# Num#('25') AorI
IF AbsValue?
TrackXNO# Recall# Num#('24')
TrackYNO# Recall# Num#('25')
ELSE
SetAbs
TrackXNO# Recall# Num#('24')
TrackYNO# Recall# Num#('25')
SetInc
END
RETURN

LinkMove:
SeqLab Feed doLinkMove ' TC0 F99.9' ToolDia CONRAD OpToolID EOL
RETURN

endMillPos:
IF OptCyc1? NOT LastOp? AND NEXT Milling? AND NOT AutoCycle? AND NOT Repeats?
SetFlag('9')
IF AbsValue?
Save# Num#('21') EPX#
Save# Num#('22') EPY#
Save# Num#('23') EPZ#
ELSE
SetAbs
Save# Num#('21') EPX#
Save# Num#('22') EPY#
Save# Num#('23') EPZ#
SetInc
END
END
RETURN

startMillPos:
IF Flag?('9') AND NOT AutoCycle? AND NOT Repeats?
IF AbsValue?
Save# Num#('24') SPX#
Save# Num#('25') SPY#
Save# Num#('26') SPZ#
ELSE
SetAbs
Save# Num#('24') SPX#
Save# Num#('25') SPY#
Save# Num#('26') SPZ#
SetInc
END
IF Equal? Recall# Num#('23') Recall# Num#('26')
LinkMove
END
SetFlagF('9')
END
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
IF FirstPart? AND FirstFeat?
ELSE
IF Repeats? AND ZShiftOnly?
EachCycle
CallAC
NextCycle
ELSE
CallAC
END
END
TrackXNO# SPX#
TrackYNO# SPY#
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
SeqLab Rapid FormatMove OpToolID EOL
END
ELSE
IF RapidFeat?
IF XMove? OR YMove?
IF NOT Flag?('2') { Tool Retract followed by XY Position }
SeqLab Feed FormatMove ckCRC RapidF ToolDia CONRAD OpToolID EOL
END
END
ELSE
IF FirstFeat?
startMillPos
END
IF LineFeat?
IF XMove? OR YMove?
IF Flag?('2') { XY Position Move Following Tool Retract }
SetFlagF('2')
IF AbsValue?
TrackXNO# EPX#
TrackYNO# EPY#
ELSE
SetAbs
TrackXNO# EPX#
TrackYNO# EPY#
SetInc
END
ELSE
SeqLab Feed FormatMove ckCRC FeedRate ToolDia CONRAD OpToolID EOL
END
END
ELSE
IF ArcFeat?
IF XMove? OR YMove?
SeqLab FormatArc FormatMove ckCRC FeedRate ToolDia CONRAD OpToolID EOL
ELSE { FullArc }
SetFlag('3') { First Half of FullArc CONRAD = CR0 }
FormatFullArc1
SeqLab FormatArc FormatMove ckCRC FeedRate ToolDia CONRAD OpToolID EOL
FormatFullArc2
SeqLab FormatArc FormatMove ckCRC FeedRate ToolDia
SetFlagF('3')
CONRAD OpToolID EOL
END
IF AbsValue?
TrackXNO# EPX#
TrackYNO# EPY#
ELSE
SetAbs
TrackXNO# EPX#
TrackYNO# EPY#
SetInc
END
END
END
END
IF LastFeat?
endMillPos
END
END
NEXTFeat
RETURN

AutoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
SetSRXYtoSP
SetInc
RETURN

AutoCycCutSub2: {part 2}
StartSub
ToolPath {call after TagInc for correct sub calls}
FinishSub
SetAbs
SetSRSubXY {restore SR to 1st position value}
SetSRSubMove
RETURN

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

Milling:
IF FirstPart?
IF AutoCycle?
AutoCycCutSub1
AutoCycCutSub2
AutoCycPat
ELSE
IF MultipleParts? OR Repeats?
StartSub
ToolPath
FinishSub
ELSE
ToolPath
END
END
ELSE
IF AutoCycle?
AutoCycPat
ELSE
EachFeat
IF LastFeat?
TrackXNO# EPX#
TrackYNO# EPY#
END
NextFeat
END
END
RETURN

GetNewProg:
IF FirstOperation?
Save# Num#('4') Recall# Num#('5')
ELSE
IF MultipleParts? AND EquallySpacedOffsets? AND OneToolAllParts? AND NewTool?
Save# Num#('4') Recall# Num#('5')
END
END
Save# Num#('4') ADD# Recall# Num#('4') Num#('1')
IF Drilling? AND MasterOp?
NewMasterTag
END
RETURN

CallProg:
SeqLab ' G105' LineRep
' XO' CurOriginPosX# ' YO' CurOriginPosY#
' RE1' ToolDia OpToolID EOL
RETURN

MPNoRepOp:
GetNewProg
Milling
IF NOT FirstPart?
CallProg
END
RETURN

XYZRep:
GetNewProg
EachRep
IF FirstPart?
IF FirstCycle?
Milling
IF ZShiftOnly?
SeqLab ' G105' LineRep
' XO' CurOriginPosX# ' YO' CurOriginPosY#
' RE' RepsLess1# ToolDia OpToolID EOL
END
ELSE
IF NOT ZShiftOnly?
CallProg
END
END
ELSE
CallProg
END
NextRep
RETURN

NoRepAutoCycle:
GetNewProg
Milling
RETURN

XYZRepAutoCycle:
GetNewProg
Milling
SetPass2
EachRep
IF NOT FirstCycle?
EACHFeat
CallAC
NEXTFeat
END
NextRep
RETURN

ZonlyRepAutoCycle:
GetNewProg
IF FirstPart?
AutoCycCutSub1
AutoCycCutSub2
SeqLab ' G105' LineRep ' XO' CurOriginPosX# ' YO' CurOriginPosY#
' RE' RepsLess1# ToolDia OpToolID EOL
END
AutoCycPat
RETURN

LongDrillStuff:
{ Not Supported }
RETURN

DrillStuff:
{ Not Supported }
RETURN

CheckPass:
SetFlagF('1') { FIRST AutoCycle XYMove }
IF AutoCycle? {use the correct StrtPos}
IF FirstPart?
SetFlag('1')
END
SetPass2
Save# Num#('6') StartPosX#
Save# Num#('7') StartPosY#
IF Repeats? AND NOT ZShiftOnly?
Save# Num#('6') SUB# StartPosX# CurOriginPosX#
Save# Num#('7') SUB# StartPosY# CurOriginPosY#
END
ELSE
SetPass1
END
TrackXNO# StartPosX#
TrackYNO# StartPosY#
RETURN

ProgStart:
InitProg
TagInit
SetAbs
SkipZ
ReverseXZArcs
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 }
Save# Num#('4') Num#('0') { SubRoutine#s }
Save# Num#('5') Num#('0') { SubRoutine#s }
Save# Num#('6') Num#('0') { AutoCycle SetPass2 SPX# }
Save# Num#('7') Num#('0') { AutoCycle SetPass2 SPY# }
Save# Num#('8') Num#('0') { FullArc SPX# }
Save# Num#('9') Num#('0') { FullArc SPY# }
Save# Num#('10') Num#('0') { FullArc EPX# }
Save# Num#('11') Num#('0') { FullArc EPY# }
SetFlagF('1') { FIRST AutoCycle XYMove }
SetFlagF('2') { Engraving Tool Position Moves }
SetFlagF('3') { First Half of FullArc CONRAD = CR0 }
SetFlagF('9') { ToolPath and LinkMove Sub }
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
' ' EOL
' The OPTCYC1 command can be entered in the Utility Data At Op Start BOX.' EOL
' This will cause the Post to output a rapid move to the start position of the next milling operation' EOL
END
RETURN

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

SetDrillEndOpZ:
{ Not Supported }
RETURN

OpGuts:
IF Milling?
IF AutoCycle?
IF Repeats?
IF ZShiftOnly?
ZonlyRepAutoCycle
ELSE
XYZRepAutoCycle
END
ELSE
NoRepAutoCycle
END
SetPass1
ELSE { NOT AutoCycle }
IF Repeats?
XYZRep
ELSE
IF MultipleParts?
MPNoRepOp
ELSE
Milling
END
END
END
ELSE
IF Drilling?
IF CallMasterOp? OR MasterOp? OR Repeats? OR MultipleParts?
GetNewProg
END
IF FirstPart?
IF CallMasterOp?
CallDrillCycle
ELSE
IF MasterOp? OR Repeats? OR MultipleParts?
StartSub
ToolPath
FinishSub
IF Repeats?
EachRep
IF NOT FirstCycle?
CallDrillCycle
END
NextRep
END
ELSE
ToolPath
END
END
ELSE
IF CallMasterOp? OR MasterOp?
CallDrillCycle
ELSE
IF Repeats?
EachRep
CallDrillCycle
NextRep
ELSE
CallDrillCycle
END
END
END
END
END
RETURN

InitOp:
'PN' Program# ' G20' EOL
EachOp
IF FirstOperation?
IF ToolChangeAtHome?
SetHome
END
END
NextOp
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 ABSOLUTE INCHES )' EOL
END
IF PartsComment?
'( PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
'( FIRST TOOL NOT IN SPINDLE )' EOL
END
END
RestoreScale
RETURN

FirstOp1:
Plane { No Output }
DoPartCycleComment
DoOpComments
DoPostScript
RETURN

FirstOp2:
CheckPass
RETURN

FirstOp3:
RETURN

NewToolOp1:
RETURN

NewToolOp2:
DoEndOpPS
IF ToolChangeAtHome?
SetAbs
LoadFeat
SUB# HomeX# CurOriginPosX#
SUB# HomeY# CurOriginPosY#
Num#('0') { Dummy Z }
SeqLab Rapid ' X' EPX# AorI ' Y' EPY# AorI LAST OpToolID EOL
END
RETURN

NewToolOp3: {Start new Operation}
PlaneC { No Output }
DoPartCycleComment
DoOpComments
DoPostScript
RETURN

NewToolOp4:
CheckPass
RETURN

NewToolOp5:
RETURN

SameToolOp1:
DoEndOpPS
RETURN

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

SameToolOp3: {Start new Operation}
PlaneC { No Output }
RETURN

End1:
RETURN

End2:
DoEndOpPS
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
SetAbs
LoadFeat
SUB# FIRST HomeX# CurOriginPosX#
SUB# FIRST HomeY# CurOriginPosY#
Num#('0') { Dummy Z }
SeqLab Rapid ' X' EPX# AorI ' Y' EPY# AorI OpToolID EOL
END
RETURN

End3:
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
RETURN

MPallTools1P: {Multiple Parts, All Tools 1 Part}
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}
IF FirstOperation?
IF FirstPart?
FirstOp1
FirstOp2
FirstOp3
END
ELSE
IF NewTool?
IF FirstPart?
NewToolOp1
NewToolOp2
NewToolOp3
NewToolOp4
NewToolOp5
END
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3
END
END
OpGuts
RETURN

MP1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane}
IF FirstOperation?
IF FirstPart?
FirstOp1
FirstOp2
FirstOp3
END
ELSE
IF NewTool?
IF FirstPart?
NewToolOp1
NewToolOp2
NewToolOp3
NewToolOp4
NewToolOp5
END
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3
END
END
OpGuts
RETURN

NoMPs: {no multiple parts}
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
End2
RETURN

DoNewPart:

{Finish off last Part}

{DoEndOpPS}

{Start new Part}

SameToolOp2
PlaneC { No Output }
RETURN

MPLoop: { EquallySpacedOffsets }
Save# Num#('2') Recall# Num#('1')
IF WorkFixtureOffsets?
{ Not Supported }
ELSE
EachPart
END
IF AllToolsOnePart?
Save# Num#('5') Num#('0')
EachOp
MasterSub
NextOp
EndPartSub
ELSE { OneToolAllParts }
EachOp
IF Equal? Operation# Recall# Num#('2') { Tool First Op }
IF FirstOperation? OR NewTool?
IF FirstPart?
IF FirstOperation?
Save# Num#('5') Num#('0')
ELSE
Save# Num#('5') Recall# Num#('4')
END
ELSE
DoNewPart
END
END
MasterSub
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?
{ Not Supported }
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
EachOp
NoMPs
NextOp
EndPartSub
ELSE
IF AllToolsOnePart?
MPLoop
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
END
ELSE
EachOp
MasterSub
NextOp
EndPartSub
END
End3


Wyszukiwarka