Dynapath Tree 10M K&M BX57 15 1


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

{9/22/95, Updated Dynapath Delta 20 MT M779.81.3 to .85 format per Dynapath 20M Conv[RB] M617.85, JR}

{11/2/95
Modified: Dynapath Delta 20 MT M779.85
For: Gibbs & Associates
Versions: ncCad 4.33.01/ncCAM 4.33.01/ncPost 4.33.08/Catalyst v2.28.04/Compost 4.21.33/1.0a
Various necessary minor changes, too numerous to list due to time constraints.
DWB}

{20Jun97
Original: Dynapath Delta 20 MT M779.85
Created: Dynapath Tree 10M [K&M] BX57.12
For: K&M Tool & Die
Changes made per: Jimmy Dickard
Created B style Post
Modified processor per marked up readout.
Created a ToolList at InitOp
Added Literal 'Automatic Index' IF AAxisAvail in InitOp
Added Literal 'M12' index command in DoCSComment
Added RigidTap cycle at IF Drilling
Added CoolOff and SpinOff at End2
Various minor changes, too numerous to list due to time constraints.
Charles Winston}

{9Oct97
Original: Dynapath Tree 10M [K&M] BX57.12
Created: Dynapath Tree 10M [K&M] BX57.12.1
For: K&M Tool & Die
Changes made per: Jimmy Dickard
Added customized Line numbering system where each Tool starts a fresh block of numbers
begining at the next whole hundred number. This is supported by the following subs:
DoEOL, AvoidDuplicates and IncrementSequenceNumber
The DoEOL Sub replaces all occurences of EOL throughout the Prog and keeps track of the current line number.
IncrementSequenceNumber is called at each NewTool (including the FIRST Tool)
AvoidDuplicates is called to ensure that the next line number block is greater than the last line number used.
Note: MinimizeSequencing is not supported in this Post
Added formatting for FeedTapIPR# in Prog Numeric Format Definitions
Deleted all spacing between the Dynapath 'bracket' code and the first command on each line.
Added a boolean which supresses all SameTool comments.
Added a blank line before each NewTool Block and before each Subroutine
Deleted FourthCWF, FifthCCWF etc at PSInit
Deleted old version numbers and comments e.g. {.62}, {commands}, {literals}, etc
Deleted RLevel from Toolpath before calling a DrillCycle
Added IF TAP? boolean in DrillCycle Sub
Moved ZDepth to follow the StrtPos at IF Drilling
Changed to FeedTapIPR#('1') when tapping at IF Drilling
Deleted incremental IF PeckChipBreaker? boolean at IF Drilling
Added Start values for Num#('5') and Num#('6') for Line Numbering at ProgStart
Added ReTag literal 'Åš1' at ProgStart
Added '573 Autoclip' Literal to the ToolList when using a 4 or 5 Axis MDD at InitOp
Added WFOStuff to FirstOp2, NewToolOp4 and SameToolOp3
Added Literal 'END' at End of Prog and Deleted EOR
Charles Winston}

{12/11/97
Updated & Modified: Dynapath Tree 10M [K&M] BX57.12.1
Created: Dynapath Tree 10M [K&M] BX57.12.2
For: K&M Tool & Die
Versions: Catalyst v4.21.16(mac)/ComPost2 MSL 68K
Changes made per Gary Lance of K&M Tool & Die, phone call and faxes.
Updated for Catalyst v3.35C per Fanuc 6M (FW) B001.15 Format.
Customer requested modification to CutterRadiusCompensation.
Customer stated that control does not allow for negative offset numbers.
Standard practice of programming with one size Tool when actual Tool is usually smaller results
in a negative Offset value.
Only way to get a positive number is to either program ToolEdge coordinates or program a smaller
Tool than that actually used.
The customer prefers to use ToolEdge coordinates.
Due to method employed in this and other Dynapath Post processors, i.e. dummy move prior to
CRCOn and immediatly following CRCOff, it is necessary to control CRC at the ClearancePlane.
Customer requested deletion of the first ToolChng block at NewTool.
Deleted the ToolChng block at NewToolOp1.
DWB}

{1/29/98
Updated & Modified: Dynapath Tree 10M [K&M] BX57.12.2
Created: Dynapath Tree 10M [K&M] BX57.15
For: K&M Tool & Die
Versions: Catalyst v4.21.30(mac)/ComPost2 1.1b3
Changes made per Gary Lance of K&M Tool & Die, phone call, faxes and Circle Test.VNC.
Updated for Catalyst v3.35C per Fanuc 6M (FW) B001.15 Format.
Changed FORMATs for Addresses A and B from #####.###;0. to #####.###;0 in ComPost2 Default Formats
Dialog.
Changed FORMATs for Address F from ###.#;0. to ###.#;0 in ComPost2 Default Formats Dialog.
Changed FORMATs for Addresses I, J, K, Q, R, W, X, Y and Z from ####.####;0. to ####.####;0 in
ComPost2 Default Formats Dialog.
Added P0 to Select XY Plane Edit Field of Compost2 Work Planes Dialog.
Added P1 to Select XZ Plane Edit Field of Compost2 Work Planes Dialog.
Added P2 to Select YZ Plane Edit Field of Compost2 Work Planes Dialog.
Changed FORMAT#2 from #####.###;0. to #####.###;0 at Prog Numeric Format Definitions.
Changed FORMAT#3 from *#####.###;0. to *#####.###;0 at Prog Numeric Format Definitions.
Changed FORMAT#4 from ####.####;0. to ####.####;0 at Prog Numeric Format Definitions.
Added FORMAT#8, 'Ä…#bbb.00000; 0. ' for special CRCPosition Calculation Report at Prog
Numeric Format Definitions.
Added SUB#, MUL#, DIV#, SIN#, COS#, StartPosX#, StartPosY#, SPMoveAngle#, EPX#, EPY#,
EPMoveAngle#, TrackX#, TrackY#, TrackXNO# and TrackYNO# to FORMAT#4 at Prog Numeric Format Definitions.
Increased Variable Nubmers used for calculating new Line Number Blocks.
Refer to Developer Notes of 9 Oct97.
Var(5) is now Var(7).
Var(6) is now Var(8).
This was done because I needed Vars(1) to (6) for calculating special CRCStartPos and CRCEndPos
Coordinates.
Added special calculations for positioning Tool for CutterRadiusCompensation.
Refer to developer notes of 12/11/97 for information regarding this.
Customer requested that CRCStartPos for Tool be positioned above the part at ZCP2, parallel to
FirstFeat, a distance equal to Radius of Tool.
Customer requested that CRCEndPos for Tool be positioned above the part at ZCP3, parallel to
LastFeat, a distance equal to Radius of Tool.
Calculations could basically be referred to as FirstFeatExtend for CRCStartPos and LastFeatExtend
for CRCEndPos.
Added following Variables and Flags to accomplish this.
Var(1) = SPMoveAngle/EPMoveAngle.
Var(2) = StartPosX#/EPX#
Var(3) = StartPosY#/EPY#
Var(4) = AutoCycle SetPass2 SPX#
Var(5) = AutoCycle SetPass2 SPY#
Var(6) = Legal FirstFeat condition/CRCEndPosX/CRCEndPosY
Flag(6) = CRCStartPos/CRCEndPos Toggle
FALSE = CRCOff condition and is used for Calculating CRCStartPos.
TRUE = CRCOn condition and is used for Calculating CRCEndPos.
Added CRCReport sub.
Outputs in Report FORMAT, various Formulas involved in calculations for the purpose of tracking
and verifying Calculations used.
This sub is called at CalcCRCPos sub based on Boolean Test of Operation#s.
Currently the test is based on Operation# being equal to zero to avoid output by customer.
Developer only need supply the range of Operation#s desired to call this sub.
Added CalcCRCPos sub.
Contains that necessary calculations.
Added CRCStrtPos sub.
Stores the Values needed for CalcCRCPos sub.
This sub is called at normal StrtPos block at FirstOp2, FirstOp2a, NewToolOp4 and NewToolOp4a.
Non-CutterRadiusCompensation Operations output StrtPos.
CutterRadiusCompensation Operations cause Post Processor to proceed with Calculations.
Scans the ToolPath to obtain the TRUE FirstFeat output.
A situation arose during my testing where the FirstFeat was an Arc so small that the Start and
End points were identicle and thus suppressed via MoveXYC during ToolPath.
Asking for FIRST SPMoveAngle# outside of ToolPath output the value for this suppressed feature
which did not agree with the SPMoveAngle# value of the following Feature.
To obtain the correct SPMoveAngle# value of the following Feature, a scan of the ToolPath via
an EachFeat/NextFeat loop was required.
Added CRCEndPos sub.
Stores the Values needed for CalcCRCPos sub.
This sub is called for CutterRadiusCompensation Operations LastFeat at end of ToolPath.
Modified CRCDummyMove sub.
Added Plane StrtPosC RapidF CRCOn block following CRCDummyMove for activating
CutterRadiusCompensation.
Added CalcCRCPos block prior to CRCDummyMove for cancelling CutterRadiusCompensation.
Deleted GetPlane sub.
Plane is now output at CRCStrtPos for Non-CutterRadiusCompensation Operations and at
CRCDummyMove for CutterRadiusCompensation Operations.
This sub output literals based on XYPlane?, XZPlane? and YZPlane? Booleans.
Post now retrieves correct Parameter from FORM.
Deleted call of this sub at FormatArc sub and ToolPath RapidFeat and LineFeat blocks.
Deleted contents of ckCRC sub.
CRCOnC is now handled at CRCStrtPos sub.
Deleted call of this sub at ToolPath RapidFeat and LineFeat blocks.
Deleted literal '(1)' 'P0X0./Y0./' block at AutoCycCutSub1.
This is now handled at CRCDummyMove sub.
Customer requested unconditional EndPoints for ArcFeatures.
Added this at CheckMove sub.
Deleted non-outputting Plane command at FirstOp1, NewToolOp3 and SameToolOp3.
DWB}

{2/10/98
Modified: Dynapath Tree 10M [K&M] BX57.15
Created: Dynapath Tree 10M K&M BX57.15.1
For: K&M Tool & Die
Versions: Catalyst v4.21.30(mac)/ComPost2 1.1b3
Changes made per Gary Lance of K&M Tool & Die, phone call and fax.
Modified customized Line numbering system created on 9Oct97.
Post now uses only one variable, Var(7), as a counter, incremented by one at DoEOL sub.
At IncrementSequenceNumber DoEOL, Var(7) is incremented by 100, divided by 100, truncated and multiplied by 100
resulting in the next, even 100 starting value for a fresh block of numbers.
Deleted AvoidDuplicates sub as a result.
Added additional Increment value for customized Sub Line Numbering system at End3 sub.
Var(7) is incremented by 1000, divided by 100, truncated and multiplied by 100 resulting in the next, even 1000
starting value above final Line Number output in Main Program.
This is accomplished by adding 900 to Var(7), and then calling IncrementSequenceNumber whichs adds and
additional 100 to Var(7).
Added condition to output NumOfThreads for RigidTap Cycle at DrillCycle sub.
Outputs 'F' DIV# Num#(1) FeedTapIPR#(1)
Deleted SpinOff block at End2.
Moved EOP block from End2 to End3.
DWB}

{Prog Numeric Format Definitions ****}

#1 = '#.00'
#2 = '#####.###;0'
#3 = '*#####.###;0'
#4 = '####.####;0'
#5 = '#######0'
#6 = '###.#;0'
#7 = '00'
#8 = 'Ä…#bbb.00000; 0. ' { For CRCReport }

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(FeedTapIPR#,2)
FORMAT(CSOffsetA#,3)
FORMAT(CSOffsetB#,3)
FORMAT(SUB#,4)
FORMAT(MUL#,4)
FORMAT(DIV#,4)
FORMAT(SIN#,4)
FORMAT(COS#,4)
FORMAT(StartPosX#,4)
FORMAT(StartPosY#,4)
FORMAT(SPMoveAngle#,4)
FORMAT(EPX#,4)
FORMAT(EPY#,4)
FORMAT(EPMoveAngle#,4)
FORMAT(Retract#,4)
FORMAT(ToolDiameter#,4)
FORMAT(CSOffsetX#,4)
FORMAT(CSOffsetY#,4)
FORMAT(CSOffsetZ#,4)
FORMAT(TrackX#,4)
FORMAT(TrackY#,4)
FORMAT(TrackXNO#,4)
FORMAT(TrackYNO#,4)
FORMAT(TrackZNO#,4)
FORMAT(CS#,5)
FORMAT(Recall#,5)
FORMAT(Tag#,5)
FORMAT(Program#,5)
FORMAT(CallMasterNum#,5)
FORMAT(CSSubID#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(Parts#,5)
FORMAT(RapidF#,6)
FORMAT(Dwell#,6)
FORMAT(ADD#,7)
FORMAT(NewWFO#,7)
FORMAT(ToolOffset#,7)

{Custom Subroutines **********************************************************}

DoEOL:
IF NOT EmptyLine?
Save# Num#('7') ADD# Recall# Num#('7') Num#('1')
END
EOL
RETURN

IncrementSequenceNumber:
Save# Num#('7') MUL# Num#('100') TRUNC# MUL# Num#('.01') ADD# Recall# Num#('7') Num#('100')
'Åš' Recall# Num#('7') EOL
RETURN

CustomizeSequenceNumber:
IF MinimizeSequencing?
IncrementSequenceNumber
END
RETURN

Get$: { For conversational output }
IF NOT EmptyLine?
'$'
END
RETURN

CRCReport:
FORMAT(ADD#,8)
FORMAT(SUB#,8)
FORMAT(MUL#,8)
FORMAT(DIV#,8)
FORMAT(SIN#,8)
FORMAT(COS#,8)
FORMAT(SPMoveAngle#,8)
FORMAT(EPMoveAngle#,8)
FORMAT(ToolDiameter#,8)
FORMAT(Recall#,8)
' ' EOL
IF Flag?('6') { CRCOn }
' [ EPMoveAngle = ' Recall# Num#('1') ' ]' EOL
' ' EOL
' [ COS EPMoveAngle = ' COS# Recall# Num#('1') ' ]' EOL
' [ x ToolRadius = ' DIV# ToolDiameter# Num#('2') ' ]' EOL
' [ __________________________________ ]' EOL
' [ X Exit Length = ' MUL# DIV# ToolDiameter# Num#('2') COS# Recall# Num#('1') ' ]' EOL
IF AutoCycle?
' [ Pattern X CenterPoint = ' Recall# Num#('4') ' ]' EOL
' [ Pattern X EndPoint = ' SUB# Recall# Num#('2') Recall# Num#('4') ' ]' EOL
END
' [ ToolPath X EndPoint = ' Recall# Num#('2') ' ]' EOL
' [ __________________________________ ]' EOL
' [ CRC X EndPoint = ' ADD# Recall# Num#('2') MUL# DIV# ToolDiameter# Num#('2') COS# Recall# Num#('1') ' ]' EOL
' ' EOL
' [ SIN EPMoveAngle = ' SIN# Recall# Num#('1') ' ]' EOL
' [ x ToolRadius = ' DIV# ToolDiameter# Num#('2') ' ]' EOL
' [ __________________________________ ]' EOL
' [ Y Exit Length = ' MUL# DIV# ToolDiameter# Num#('2') SIN# Recall# Num#('1') ' ]' EOL
IF AutoCycle?
' [ Pattern Y CenterPoint = ' Recall# Num#('5') ' ]' EOL
' [ Pattern Y EndPoint = ' SUB# Recall# Num#('3') Recall# Num#('5') ' ]' EOL
END
' [ ToolPath Y EndPoint = ' Recall# Num#('3') ' ]' EOL
' [ __________________________________ ]' EOL
' [ CRC Y EndPoint = ' ADD# Recall# Num#('3') MUL# DIV# ToolDiameter# Num#('2') SIN# Recall# Num#('1') ' ]' EOL
ELSE { CRCOff }
' [ SPMoveAngle = ' Recall# Num#('1') ' ]' EOL
' ' EOL
' [ COS SPMoveAngle = ' COS# Recall# Num#('1') ' ]' EOL
' [ x ToolRadius = ' DIV# ToolDiameter# Num#('2') ' ]' EOL
' [ __________________________________ ]' EOL
' [ X Approach Length = ' MUL# DIV# ToolDiameter# Num#('2') COS# Recall# Num#('1') ' ]' EOL
' [ ToolPath X StartPoint = ' Recall# Num#('2') ' ]' EOL
' [ __________________________________ ]' EOL
' [ CRC X StartPos = ' SUB# Recall# Num#('2') MUL# DIV# ToolDiameter# Num#('2') COS# Recall# Num#('1') ' ]' EOL
' ' EOL
' [ SIN SPMoveAngle = ' SIN# Recall# Num#('1') ' ]' EOL
' [ x ToolRadius = ' DIV# ToolDiameter# Num#('2') ' ]' EOL
' [ __________________________________ ]' EOL
' [ Y Approach Length = ' MUL# DIV# ToolDiameter# Num#('2') SIN# Recall# Num#('1') ' ]' EOL
' [ ToolPath Y StartPoint = ' Recall# Num#('3') ' ]' EOL
' [ __________________________________ ]' EOL
' [ CRC Y StartPos = ' SUB# Recall# Num#('3') MUL# DIV# ToolDiameter# Num#('2') SIN# Recall# Num#('1') ' ]' EOL
END
' ' EOL
FORMAT(ADD#,7)
FORMAT(SUB#,4)
FORMAT(MUL#,4)
FORMAT(DIV#,4)
FORMAT(SIN#,4)
FORMAT(COS#,4)
FORMAT(SPMoveAngle#,4)
FORMAT(EPMoveAngle#,4)
FORMAT(ToolDiameter#,4)
FORMAT(Recall#,5)
RETURN

CalcCRCPos:
FORMAT(Recall#,4)
FORMAT(ADD#,4)
IF Flag?('6') { CRCOn }
IF AutoCycle? {use the correct SPMoveAngle}
Save# Num#('2') ADD# Recall# Num#('2') Recall# Num#('4')
Save# Num#('3') ADD# Recall# Num#('3') Recall# Num#('5')
END
Save# Num#('6') ADD# Recall# Num#('2') MUL# DIV# ToolDiameter# Num#('2') COS# Recall# Num#('1')
IF NotEqual? Recall# Num#('6') Recall# Num#('2')
'X' TrackX# Recall# Num#('6')
ELSE
TrackXNO# Recall# Num#('6')
END
Save# Num#('6') ADD# Recall# Num#('3') MUL# DIV# ToolDiameter# Num#('2') SIN# Recall# Num#('1')
IF NotEqual? Recall# Num#('6') Recall# Num#('3')
'Y' TrackY# Recall# Num#('6')
ELSE
TrackYNO# Recall# Num#('6')
END
ELSE { CRCOff }
'X' TrackX# SUB# Recall# Num#('2') MUL# DIV# ToolDiameter# Num#('2') COS# Recall# Num#('1')
'Y' TrackY# SUB# Recall# Num#('3') MUL# DIV# ToolDiameter# Num#('2') SIN# Recall# Num#('1')
END
IF GTEqual? Operation# Num#('0')
IF LTEqual? Operation# Num#('0')
CRCReport
END
END
FORMAT(Recall#,5)
FORMAT(ADD#,7)
RETURN

CRCStrtPos:
IF CutterRadiusCompensation?
Save# Num#('2') StartPosX#
Save# Num#('3') StartPosY#
SetFlagF('6')
SetPass1
EachFeat
IF NOT Flag?('6')
IF NotEqual? SPX# EPX#
SetFlag('6')
Save# Num#('1') SPMoveAngle#
ELSE
IF NotEqual? SPY# EPY#
SetFlag('6')
Save# Num#('1') SPMoveAngle#
ELSE
IF ArcFeat?
IF NotEqual? SPZ# EPZ#
SetFlag('6')
Save# Num#('1') SPMoveAngle#
ELSE
IF FullArc?
SetFlag('6')
Save# Num#('1') SPMoveAngle#
END
END
END
END
END
END
NextFeat
IF AutoCycle? {use the correct SPMoveAngle}
SetPass2
END
SetFlagF('6')
CalcCRCPos
ELSE
IF Milling?
Plane
END
StrtPos
END
RETURN

CRCEndPos:
IF AbsValue?
IF PointFeat? { AutoCycPat position pattern }
SetACSPCompF
Save# Num#('4') SPX#
Save# Num#('5') SPY#
SetACSPComp
ELSE
Save# Num#('2') EPX#
Save# Num#('3') EPY#
Save# Num#('1') EPMoveAngle#
END
ELSE
SetAbs
Save# Num#('2') EPX#
Save# Num#('3') EPY#
Save# Num#('1') EPMoveAngle#
SetInc
END
RETURN

CRCDummyMove:
IF CutterRadiusCompensation?
IF Flag?('6') { CRCOn }
SeqLabC '(1)' CalcCRCPos Get$ DoEOL
SeqLabC '(1)' 'X0/Y0/' CRCOff Get$ DoEOL
SetFlagF('6')
ELSE { CRCOff }
SeqLabC '(1)' 'X0/Y0/' CRCOff Get$ DoEOL
SeqLabC '(1)' Plane StrtPosC RapidF CRCOn Get$ DoEOL
SetFlag('6')
END
END
RETURN

ckRapid:
IF Flag?('6') { CutterRadiusCompensation = True }
'(1)'
ELSE
'(0)'
END
RETURN

ckRapidFC:
IF Flag?('6') { CutterRadiusCompensation = True }
RapidFC
END
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

CSPartNum#:
ADD# CS# MUL# NumOfCS# SUB# PartNum# Num#('1')
RETURN

CSWFO:
'E' ADD# CSPartNum# Num#('0')
RETURN

WFO:
'E' ADD# PartNum# Num#('0')
RETURN

WFOStuff:
IF Flag?('2')
IF NOT SameTool?
IF WFOCS?
CSWFO
ELSE
WFO
END
ELSE
IF WFOCS?
IF ChangeCS?
IF MultipleParts?
{MP ChangeCS is handled in SubCSMP and CloseMP}
ELSE
CSWFO
END
END
END
END
END
SetFlagF('2')
RETURN

CSG52:
IF FirstOperation? OR NewTool? OR ChangeCS?
SeqLabC 'G52X' CSOffsetX# 'Y' CSOffsetY# 'Z' CSOffsetZ# DoEOL
END
ClearCSOffset
RETURN

G52Stuff:
IF AAxisAvail? OR BAxisAvail?
IF NOT WFOCS?
IF MultipleParts?
IF WorkFixtureOffsets?
CSG52
END
ELSE
CSG52
END
END
END
RETURN

DoSubComment:
IF UseComments? AND SubComment?
' ' EOL
SeqLabC '(T)SUB NUMBER ' Tag# Get$ DoEOL
END
RETURN

DoCSComment:
IF AAxisAvail? OR BAxisAvail?
IF AChange?
IF UseComments?
SeqLabC '(9)M12' Get$ DoEOL
SeqLabC '(T) INDEX TO ' CSOffsetA# ' DEG. ' Get$ DoEOL
END
ELSE
IF FirstOperation?
IF UseComments?
SeqLabC '(T) Start ON 0 DEG.' Get$ DoEOL
END
END
END
END
RETURN

DoCSWFOComment:
IF AAxisAvail? OR BAxisAvail?
{IF FirstOperation? OR NewTool? OR ChangeCS?
SeqLabC '(T)' CSWFO ' = X' CSOffsetX# ' Y' CSOffsetY# ' Z' CSOffsetZ#
IF AAxisAvail?
' A' CSOffsetA#
END
IF BAxisAvail?
' B' CSOffsetB#
END
EOL
END}
ClearCSOffset
END
RETURN

CSComments:
IF WFOCS?
IF MultipleParts?
IF OneToolAllParts? AND ExitClearancePlane?
ClearCSOffset { Necessary for correct StrtPos in Main }
END
ELSE
DoCSComment
DoCSWFOComment
END
ELSE
DoCSComment
END
RETURN

DoOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
SeqLabC '(T) OPERATION ' Operation# ' ' OperationType$ Get$ DoEOL
END
IF OperationComment?
SeqLabC '(T) ' OperationComment$ Get$ DoEOL
END
IF WorkGroupComment?
SeqLabC '(T) ' WorkGroupComment$ Get$ DoEOL
END
IF NOT SameTool?
' ' DoEOL
IncrementSequenceNumber
IF ToolTypeComment?
SeqLabC '(T) T' Tool# ' ' ToolDiameter# ' ' ToolType$ Get$ DoEOL
END
IF ToolComment?
SeqLabC '(T) ' ToolComment$ Get$ DoEOL
END
END
RestoreScale
END
CSComments
RETURN

CSAngleA:
IF AAxisAvail?
IF WFOCS?
'A0.'
ELSE
'A' CSOffsetA#
END
END
RETURN

CSAngleAC:
IF AChange?
CSAngleA
END
RETURN

CSAngleB:
IF BAxisAvail?
IF WFOCS?
'B0.'
ELSE
'B' CSOffsetB#
END
END
RETURN

CSAngleBC:
IF BChange?
CSAngleB
END
RETURN

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

PSStuff:
RETURN

DoPostScript:
PSInit
EachPS
SeqLabC PostScript Get$ DoEOL
PSStuff
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqLabC EndOpPS Get$ DoEOL
PSStuff
NextPS
RETURN

EntryMove:
SeqLabC
IF FeedEntry?
'(1)'
ELSE
ckRapid
END
ZIn
IF NOT AbsValue?
'/'
END
IF FeedEntry?
FeedEnt
ELSE
ckRapidFC
END
Get$ DoEOL
RETURN

StartSub:
SetFlag('7') { SubPrograms require 2nd M30 at end }
OpenSub
DoSubComment
'>' Tag# DoEOL
RETURN

SubWarning:
IF NOT FeedConnect?
IF AnyZshift?
SeqLabC '(T) ' Get$ DoEOL
SeqLabC '(T) *** WARNING ***' Get$ DoEOL
SeqLabC '(T) Z CLEARANCE WILL' Get$ DoEOL
SeqLabC '(T) CHANGE WITH EACH' Get$ DoEOL
SeqLabC '(T) CYCLE OF SUB!' Get$ DoEOL
SeqLabC '(T) ' Get$ DoEOL
END
END
RETURN

StdSub:
'È' Tag# DoEOL
SeqLabC '(7) FÅ‚' Tag# 'L²' Tag# Get$ DoEOL
SeqLabC '(6) FÇ' Tag# 'T' RepsLess1 Get$ DoEOL
StartSub
RETURN

FinishSub1: {part 1}
IF NOT FeedConnect?
SeqLabC
IF AutoCycle?
ckRapid ZCP3 ckRapidFC
ELSE
IF FIFO? {.81}
'(1)' ZCP3 FeedEntC
ELSE
ckRapid ZCP3 ckRapidFC
END
END
Get$ DoEOL
END
RETURN

FinishSubG92: {part 2}
SeqLabC ckRapid ShiftRC Preset ckRapidFC Get$ DoEOL
'<' Tag# DoEOL
TagDown
CloseSub
SeqLabC ckRapid UnshftRC Preset ckRapidFC Get$ DoEOL
RETURN

ToggleIncDecWFO:
IF Flag?('3')
SetFlagF('3')
ELSE
SetFlag('3')
END
RETURN

DoCSG52Ops:
IF Flag?('5')
SetFlagF('5') { Suppress Redundant WFO for MP-OTAP-ECP }
ELSE
SeqLabC '(9)' SetWFO Get$ DoEOL
END
SeqLabC '(7)FÅ‚' Tag# 'L²' Tag# Get$ DoEOL
RETURN

OpenMP:
TagUp TagInc
IF WorkFixtureOffsets?
IF WFOCS?
StartSub
SaveCSProg
SaveCSOpStart
ClearCSOffset
ELSE
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('5') { Suppress Redundant WFO for MP-OTAP-ECP }
END
IF Flag?('3')
NewWFO
EachWFO {simple eachPart}
DoCSG52Ops
IncWFO
NextWFO {simple NextPart}
DecWFO
ELSE
LastWFO
EachWFO {simple eachPart}
DoCSG52Ops
DecWFO
NextPrevWFO {simple NextPart}
IncWFO
END
IF Flag?('4')
ToggleIncDecWFO
END
StartSub
END
ELSE
'È' Tag# DoEOL
SeqLabC '(7)FÅ‚' Tag# 'L²' Tag# Get$ DoEOL
SeqLabC '(6)FÇ' Tag# 'T' PartsLess1 Get$ DoEOL
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('2') { WFOStuff }
END
StartSub
END
RETURN

DoCSWFOOps:
EachCSOp
DoCSComment
DoCSWFOComment
IF Flag?('5')
SetFlagF('5') { Suppress Redundant WFO for MP-OTAP-ECP }
ELSE
SeqLabC '(9)' CSWFO Get$ DoEOL
END
SeqLabC '(7)FÅ‚' Tag# 'L²' Tag# Get$ DoEOL
NextCSOp
RETURN

CloseMP:
IF WorkFixtureOffsets?
SeqLabC EndSub DoEOL
'<' Tag# DoEOL
CloseSub
IF WFOCS?
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('5') { Suppress Redundant WFO for MP-OTAP-ECP }
END
IF Flag?('3')
NewWFO
EachWFO {simple eachPart}
DoCSWFOOps
IncWFO
NextWFO {simple NextPart}
DecWFO
ELSE
LastWFO
EachWFO {simple eachPart}
DoCSWFOOps
DecWFO
NextPrevWFO {simple NextPart}
IncWFO
END
IF Flag?('4')
ToggleIncDecWFO
END
END
ELSE
SeqLabC '(0)' ShiftPC Preset Get$ DoEOL
'<' Tag# DoEOL
TagDown
CloseSub
SeqLabC '(0)' UnshftPC Preset Get$ DoEOL
END
RETURN

SubCSMP:
IF WFOCS?
IF ChangeCS?
SeqLabC EndSub DoEOL
CloseSub
NewProg
StartSub
SaveCSProg
END
ClearCSOffset
END
RETURN

DoAbsOrInc:
IF Flag?('1') { AbsoluteMoves? = TRUE }
IF ZMove? AND AbsValue?
SetInc
ELSE
IF NOT ZMove? AND NOT AbsValue?
SetAbs
END
END
END
RETURN

DoDrillAbsOrInc:
IF Flag?('1') { AbsoluteMoves? = TRUE }
IF SPZMove? AND AbsValue?
SetInc
ELSE
IF NOT SPZMove? AND NOT AbsValue?
SetAbs
END
END
END
RETURN

RestoreAbsOrInc:
IF Flag?('1') AND NOT AbsValue? { AbsoluteMoves? = TRUE }
SetAbs
END
RETURN

CheckMove:
IF Drilling?
IF NOT AbsValue?
IF XMove?
MoveSX '/'
END
IF YMove?
MoveSY '/'
END
IF ZMove?
MoveSZ '/' {.80.01}
END
ELSE
MoveSXYZC {.80.01}
END
ELSE
IF NOT AbsValue?
IF ArcFeat?
MoveX '/' MoveY '/'
ELSE
IF XMove?
MoveX '/'
END
IF YMove?
MoveY '/'
END
END
IF ZMove?
MoveZ '/'
END
ELSE
IF ArcFeat?
MoveXY MoveZC
ELSE
MoveXYZC
END
END
END
RETURN

FormatArc:
DoAbsOrInc
CheckMove
IF NOT AbsValue?
ArcI '/' ArcJ '/'
ELSE
ArcIJ
END
IF ArcCW?
CWArc
ELSE
CCWArc
END
RETURN

ckCRC:
{ Activated at StrtPos and ZCP2 }
RETURN

ckCRCNum:
{ Not supported }
RETURN

DrillCycle:
IF Tap?
'F'
IF RigidTap?
DIV# Num#('1')
END
FeedTapIPR#('1') 'G8' RLevel
ELSE
FeedEnt Cycle RLevel Dwell Peck
IF Peck?
'Q' Retract#
END
END
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
IF NOT FirstFeat?
SeqLabC '(0)' MoveSXYC Get$ DoEOL
END
SeqLabC '(7)FÅ‚' Tag# 'L²' Tag# Get$ DoEOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
IF NOT FirstFeat?
IF RetractToCP1?
SeqLabC '(0)' ZCP1 Rapid Get$ DoEOL
SeqLabC '(0)' MoveSXYC MoveSZ DrillCycle Get$ DoEOL
ELSE
SeqLabC '(0)' DoDrillAbsOrInc CheckMove Get$ DoEOL
END
END
END
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqLabC ckRapid DoAbsOrInc CheckMove ckRapidFC Get$ DoEOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqLabC '(1)' DoAbsOrInc CheckMove FeedRateC Get$ DoEOL
DecelMove2
END
SeqLabC '(1)' DoAbsOrInc CheckMove DecelFeed Get$ DoEOL
ELSE
SeqLabC '(1)' DoAbsOrInc CheckMove FeedRateC Get$ DoEOL
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
SeqLabC '(2)' FormatArc ArcFeedC Get$ DoEOL
DecelMove2
END
SeqLabC '(2)' FormatArc DecelFeed Get$ DoEOL
ELSE
SeqLabC '(2)' FormatArc ArcFeedC Get$ DoEOL
END
NEXTQuadrant
END
END
END
END
IF LastFeat? AND CutterRadiusCompensation?
CRCEndPos
END
NEXTFeat
RestoreAbsOrInc
RETURN

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

AutoCycCutSub2: {part 2}
ToolPath
SetAbs
SeqLabC
IF Repeats? AND FeedConnect? AND ZshiftOnly?
ELSE
IF FIFO?
'(1)' ZCP2 FeedEntC
ELSE
ckRapid ZCP2 ckRapidFC
END
END
Get$ DoEOL
'<' Tag# DoEOL
CloseSub
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 AutoCycle?
TagUp TagInc
AutoCycCutSub1
EntryMove
AutoCycCutSub2
AutoCycPat
TagDown
ELSE
EntryMove
ToolPath
END
RETURN

G92Sub:
SubWarning
StdSub
SetAbs
IF FeedConnect?
'(1)'
ELSE
ckRapid
END
SeqLabC StrtPos ckRapidFC Get$ DoEOL
Milling
FinishSub1
FinishSubG92
RETURN

ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
TagUp TagInc
EachCycle
SetSRXYtoEP
IF FeedConnect?
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SetInc
SeqLabC '(1)' 'X' StartPosX# '/' 'Y' StartPosY# '/' Get$ DoEOL
SetAbs
END
END
SeqLabC '(1)' ZInPlusInc FeedEnt Get$ DoEOL
ELSE
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SetInc
SeqLabC ckRapid 'X' StartPosX# '/' 'Y' StartPosY# '/' ckRapidFC Get$ DoEOL
SetAbs
END
IF FeedEntry?
SeqLabC ckRapid ZCP2PlusInc ckRapidFC Get$ DoEOL
END
END
IF FeedEntry?
SeqLabC '(1)' ZInPlusInc FeedEnt Get$ DoEOL
ELSE
SeqLabC ckRapid ZInPlusInc ckRapidFC Get$ DoEOL
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
SeqLabC '(7)FÅ‚' Tag# 'L²' Tag# Get$ DoEOL
NextCycle
SetStatusOn
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
IF FeedConnect? {there is no Z up in the sub}
IF FIFO?
SeqLabC '(1)' ZCP2 FeedEnt Get$ DoEOL
ELSE
SeqLabC ckRapid ZCP2 ckRapidFC Get$ DoEOL
END
END
TagDown
'<' Tag# DoEOL
CloseSub
{Element shift, not pattern}
TagDown
RETURN

ZonlyRep:
EachCycle
IF NOT FirstCycle?
IF FeedConnect?
'(1)'
ELSE
ckRapid
END
SeqLabC StrtPos ckRapidFC Get$ DoEOL
END
IF FeedConnect?
SeqLabC '(1)' ZInPlusInc FeedEnt Get$ DoEOL {.71.2, changed to FeedC}
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqLabC ckRapid ZCP2PlusInc ckRapidFC Get$ DoEOL
END
SeqLabC '(1)' ZInPlusInc FeedEnt Get$ DoEOL
ELSE
SeqLabC ckRapid ZInPlusInc ckRapidFC Get$ DoEOL
END
END
SeqLabC '(7)FÅ‚' Tag# 'L²' Tag# Get$ DoEOL
NextCycle
StartSub
TrackZNO# FIRST SPZ#
ToolPath
FinishSub1
'<' Tag# DoEOL
TagDown
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?
SeqLabC '(0)' ZCP2 Get$ DoEOL
END
CRCDummyMove
IF Repeats?
TagUp TagInc
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?
SeqLabC ckRapid ZCP3 ckRapidFC Get$ DoEOL
ELSE
IF FIFO? {.81}
SeqLabC '(1)' ZCP3 FeedEntC Get$ DoEOL
ELSE
SeqLabC ckRapid ZCP3 ckRapidFC Get$ DoEOL
END
END
END
CRCDummyMove
ELSE
IF Drilling?
IF Repeats?
TagUp TagInc
StdSub
SetAbs
SeqLabC '(0)' StrtPos Get$ DoEOL
END
GetCycle
SeqLabC '(0)' StrtPos ZDepth DrillCycle Get$ DoEOL
IF RetractToCP1?
TrackZNO# FIRST SPZ#
ToolPath
ELSE
IF CallMasterOp?
SeqLabC '(7)' 'FÅ‚' CallMasterNum# 'L²' CallMasterNum# Get$ DoEOL
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') {std sep sub Zreps in effect}
TagUp
NewMasterTag
SeqLabC '(7)FÅ‚' Tag# 'L²' Tag# Get$ DoEOL
StartSub
ToolPath
'<' Tag# DoEOL
TagDown
CloseSub
SetFlagF('1') {not std sep sub Zreps in effect}
ELSE
ToolPath
END
END
END
SetDrillEndOpZ
SeqLabC '(0)' ZCP3 Rapid Get$ DoEOL
IF Repeats?
FinishSubG92
END
END
END
RETURN

ProgStart:
InitProg
TagInit
SetAbs
ReverseXZArcs
InitWFONum
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('10000')
IF Metric?
SetMaxFeed('12700')
ELSE
SetMaxFeed('500')
END
SetFlagF('1') { Milling ZShiftOnly SepSubs }
SetFlagF('2') { WFOStuff }
SetFlag('3') { True = incrementing WFO numbers for MP. False = decrementing WFO numebrs for MP }
SetFlag('4') { True = toggle between incrementing/decrementing WFO's }
SetFlagF('5') { Suppress Redundant WFO for MP-OTAP-ECP }
SetFlagF('6') { CRCStartPos/CRCEndPos Toggle for CutterRadiusCompensation }
SetFlagF('7') { SubPrograms require 2nd M30 at end }
Save# Num#('1') Num#('0') { SPMoveAngle/EPMoveAngle for CutterRadiusCompensation }
Save# Num#('2') Num#('0') { StartPosX#/EPX# for CutterRadiusCompensation }
Save# Num#('3') Num#('0') { StartPosY#/EPY# for CutterRadiusCompensation }
Save# Num#('4') Num#('0') { AutoCycle SetPass2 SPX# for CutterRadiusCompensation }
Save# Num#('5') Num#('0') { AutoCycle SetPass2 SPY# for CutterRadiusCompensation }
Save# Num#('6') Num#('0') { Legal FirstFeat condition/CRCEndPosX/CRCEndPosY for CutterRadiusCompensation }
Save# Num#('7') Num#('1') { Line numbering }
'Åš1'
IF PSComment? AND UseComments?
SeqLabC '(T) PostScript:' Get$ DoEOL
SeqLabC '(T) Literals: put between single or double quotes.' Get$ DoEOL
SeqLabC '(T) Separate commands and literals with at least one space.' Get$ DoEOL
SeqLabC '(T) A CR ( RETURN key ) will start a new line.' Get$ DoEOL
SeqLabC '(T) Commands: may be capital and/or lower case letters. Separate commands with a space.' Get$ DoEOL
SeqLabC '(T) EndOP -' Get$ DoEOL
SeqLabC '(T) all literals and commands before an ENDOP command' Get$ DoEOL
SeqLabC '(T) will appear at the beginning of the operation. All' Get$ DoEOL
SeqLabC '(T) literals and commands after an ENDOP command will appear' Get$ DoEOL
SeqLabC '(T) at the end of the operation.' Get$ DoEOL
END

IF MultipleParts?
IF WorkFixtureOffsets?
IF LTEqual? MUL# Parts# NumOfCS# Num#('14') {control has E1 thru E13}
SetWFOCS { use WFO for CS changes }
ELSE
IF UseComments?
SeqLabC '(T) Not enough Work Fixture Offsets to handle this part.' Get$ DoEOL
SeqLabC '(T) Number of parts [ ' Parts# ' ] times CSs [ ' NumOfCS# ' ]' Get$ DoEOL
SeqLabC '(T) exceeds the machine limit. Switching to non-WFO output.' Get$ DoEOL
END
END
END
ELSE
IF LTEqual? NumOfCS# Num#('14')
SetWFOCS { use WFO for CS changes }
ELSE
IF UseComments?
SeqLabC '(T) Not enough Work Fixture Offsets to handle this part.' Get$ DoEOL
SeqLabC '(T) Number of CSs [ ' NumOfCS# ' ] exceeds the machine limit.' Get$ DoEOL
SeqLabC '(T) Switching to non-WFO output.' Get$ DoEOL
END
END
END
RETURN

InitOp:
EOR DoEOL
SeqLabC '(T)' ProgramComment$ Get$ DoEOL
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
IF AAxisAvail? OR BAxisAvail?
SeqLabC '(T) 573 Autoclip' Get$ DoEOL
END
EachTool {tool loop to give a list of tools in program header}
SeqLabC '(T)T' TLNum# ' ' TLToolComment$ ' ' Get$ DoEOL
NextTool
IF ProgramNameComment?
SeqLabC '(T) PROGRAM ' ProgramName$ Get$ DoEOL
END
IF FormatNameComment?
SeqLabC '(T) FORMAT ' FormatName$ Get$ DoEOL
END
IF TimeComment?
SeqLabC '(T) ' Date$ ' AT ' Time$ Get$ DoEOL
END
IF MovesComment?
SeqLabC '(T) OUTPUT IN ABSOLUTE INCHES' Get$ DoEOL
END
IF PartsComment?
SeqLabC '(T) PARTS PROGRAMMED ' Parts# Get$ DoEOL
END
IF StartToolComment?
SeqLabC '(T) FIRST TOOL IN SPINDLE' Get$ DoEOL
END
END
OpenSub
RestoreScale
RETURN

FirstOp1:
DoOpComments
DoPostScript
SeqLabC '(9)' ToolChng OpToolID Get$ DoEOL
RETURN

FirstOp2:
SeqLabC '(9)' SpinOn WFOStuff Speed Get$ DoEOL
IF NOT CoolOff?
SeqLabC '(9)' CoolOn Get$ DoEOL
END
CheckPass
IF Milling?
SeqLabC '(0)' CRCStrtPos Rapid Get$ DoEOL
END
RETURN

FirstOp2a: {for MP_1_T_A_P_Xcp only}
SeqLabC '(9)' SpinOn WFOStuff Speed Get$ DoEOL
CheckPass
IF Milling?
SeqLabC '(0)' CRCStrtPos Rapid Get$ DoEOL
END
RETURN

FirstOp3:
IF Milling?
SeqLabC '(0)' ZCP1 Get$ DoEOL
END
RETURN

NewToolOp1:
RETURN

NewToolOp2:
DoEndOpPS
RETURN

NewToolOp3: {Start new Operation}
DoOpComments
DoPostScript
SeqLabC '(9)' ToolChng OpToolID Get$ DoEOL
RETURN

NewToolOp4:
SeqLabC '(9)' SpinOn WFOStuff Speed Get$ DoEOL
IF NOT CoolOff?
SeqLabC '(9)' CoolOn Get$ DoEOL
END
CheckPass
IF Milling?
SeqLabC '(0)' CRCStrtPos Rapid Get$ DoEOL
END
RETURN

NewToolOp4a: {for MP_1_T_A_P_Xcp only}
SeqLabC '(9)' SpinOn WFOStuff Speed Get$ DoEOL
CheckPass
IF Milling?
SeqLabC '(0)' CRCStrtPos Rapid Get$ DoEOL
END
RETURN

NewToolOp5:
IF Milling?
SeqLabC '(0)' ZCP1 Get$ DoEOL
END
RETURN

SameToolOp1:
DoEndOpPS
IF ChangeCS?
SeqLabC '(0)' LAST ZCP1 Get$ DoEOL
END
IF LAST ProgStop?
SeqLabC '(9)' SpinOff Get$ DoEOL
SeqLabC '(9)' 'M00' Get$ DoEOL
END
RETURN

SameToolOp2: {Start new Operation}
DoOpComments
DoPostScript
CheckPass
RETURN

SameToolOp3: {Start new Operation}
IF LAST ProgStop?
SeqLabC '(9)' SpinOn OpToolID WFOStuff Speed Get$ DoEOL
IF Milling?
SeqLabC '(0)' CRCStrtPos Rapid Get$ DoEOL
SeqLabC '(0)' ZCP1 Get$ DoEOL
END
ELSE
IF NewToolOffset?
SeqLabC '(9)' OpToolID WFOStuff
IF NotEqual? SpeedRPM# LAST SpeedRPM#
Speed
END
Get$ DoEOL
IF Milling?
SeqLabC '(0)' CRCStrtPos Rapid Get$ DoEOL
SeqLabC '(0)' ZCP1 Get$ DoEOL
END
ELSE
IF ChangeCS? AND WFOCS?
SeqLabC '(9)' WFOStuff
IF NotEqual? SpeedRPM# LAST SpeedRPM#
Speed
END
Get$ DoEOL
ELSE
IF NotEqual? SpeedRPM# LAST SpeedRPM#
SeqLabC '(9)' Speed Get$ DoEOL
END
END
IF Milling?
SeqLabC '(0)' CRCStrtPos Rapid Get$ DoEOL
END
END
END
RETURN

End1:
RETURN

End2:
DoEndOpPS
SeqLabC '(9)' CoolOff Get$ DoEOL
IF ProgStop?
SeqLabC '(9)' 'M00' Get$ DoEOL
END
RETURN

End3:
SeqLabC '(9)' EOP Get$ DoEOL
IF Flag?('7') { SubPrograms exist }
Save# Num#('7') ADD# Recall# Num#('7') Num#('900') { Line thousands for subs }
IncrementSequenceNumber
END
CloseSub
Post2 {organize Subs into one program}
IF Flag?('7') { SubPrograms exist }
SetFlagF('7')
SeqLabC '(9)' EOP Get$ DoEOL { This is required a second time, at end of all subs }
END
'END' EOL
Close
ReTag
IF UseComments?
SetScale('1') {restore scale for comments}
Reopen
IF FileBytesComment?
'N9997(T)FILE LENGTH: ' FileBytes# ' CHARACTERS' Get$ DoEOL
END
IF FileFeetComment?
'N9998(T)FILE LENGTH: ' FileFeet# ' FEET' Get$ DoEOL
END
IF FileMetersComment?
'N9999(T)FILE LENGTH: ' FileMeters# ' METERS' Get$ DoEOL
END
Close
END
RETURN

MPallTools1P: {Multiple Parts, All Tools 1 Part}
EachOp {Start of post processing}
IF EquallySpacedOffsets?
SetFlag('2')
END
IF FirstOperation?
InitOp
OpenMP
FirstOp1
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
NewToolOp2 {to tool change, CS problem}
SubCSMP
NewToolOp3
NewToolOp4
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SubCSMP
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 EquallySpacedOffsets?
SetFlag('2')
END
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
SubCSMP
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}
SetFlag('2')
IF FirstOperation?
InitOp
FirstOp1
FirstOp2
FirstOp3
OpenMP
FirstOp2a {need StrtPos in Sub}
ELSE
IF NewTool?
CloseMP
NewToolOp1
NewToolOp2 {to tool change, CS problem}
NewToolOp3
NewToolOp4
NewToolOp5
OpenMP
NewToolOp4a {need StrtPos in Sub}
ELSE {implied SameTool?}
SameToolOp1
SubCSMP
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}
SetFlag('2') { WFOStuff }
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:
Dynapath 5M [NRC] M190 15 3
package tree (15)
Dynapath 10M [GM] M449 80 1
Dynapath 10M [LD] M546 89
Dynapath 10M QMC M224 85
Dynapath 10M [NSN] MY70 89
Dynapath 10M [CM] M715 85 1
Dynapath 30 Tree M804 89
Dynapath 10M (CDS) M922 89
Dynapath 10M QMC M224 80
Fanuc 10M [LAM] CW65 15 2
Dynapath 20M Tree [PN] M851 89
Dynapath 10M M078 89
Dynapath 10M [AM] M906 85 2
Dynapath 10M [CC] M795 80

więcej podobnych podstron