Heid TNC 351B [YC] M170 89 2


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

{5/29/96
Updated:
Modified:
Copied: Heid TNC 155 [HM] M654.85
Created: Heid TNC 351B [YC] M170.89
For: Yost Candy
Machine:
Control: Heid TNC 351B
Versions: ncCad 4.33.02/ncCAM 4.33.01/ncPost 4.33.09/Catalyst v3.04.05C/Compost 4.21.37/1.0a
Changes made per Bud Yost.
Numerous customized changes.
Post does not output standard SubPrograms.
Post outputs imbedded subroutines
MultiplePart WFOs start at 254 and decrement backwards for each additional part.
If FirstOp contains 5thAxisCW(0) PostScript, WFOs will be for Rotary Head, otherwise WFOs are
for XYZ Coordinates.
All imbedded subs start incrementing at 1.
Repeat, AutoCycle and MultipleParts output Sub in Main for FirstCall.
Additional calls jump backwards until all passes have been completed.
ZShiftOnly Cycles are Full SepSubs, no nesting.
CRC is turned on at ZCP2 for Contour Operations, normal for AutoCycles and Patterns.
Modified to output 3 spaces in front of every address excepth N.
DWB}

{6/7/96
Modified: Heid TNC 351B [YC] M170.89
Created: Heid TNC 351B [YC] M170.89.1
For: Yost Candy
Versions: ncCad 4.33.02/ncCAM 4.33.01/ncPost 4.33.09/Catalyst v3.05C/Compost 4.21.37/1.0a
Changes made per Bud Yost.
Added conditions to test for values inside of EquallySpacedOffset fields when processing
MultipleParts with WorkFixtureOffsets.
Values cause StartPos Coordinates to shift during EachPart/NextPart Loop at CloseMP sub.
CloseMP sub calls MPOTAPOps sub which contains StartPos command.
Added FORMAT#14 Ä…#bbbb.bbbb# at Prog Numeric Format Definitions.
Added PartShiftX# to FORMAT#14 at Prog Numeric Format Definitions.
Added PartShiftY# to FORMAT#14 at Prog Numeric Format Definitions.
Added PartShiftZ# to FORMAT#14 at Prog Numeric Format Definitions.
Added BadMPWFOReport sub.
Added test to scan EquallySpacedOffset fields at setup and initializations.
Changed all ASCII(13) commands to literal space EOL.
ASCII(13) was not working when Minimize Sequencing was turned off.
Moved SubComment to be output on SubID block.
Deleted EOL at DoSubComment sub.
Moved call to DoSubComment up one block to SubID.
Deleted condition to output ToolTypeComment at ToolComment sub.
Will now output even when Comments are turned off.
Added Flag(5) for MultipleParts WorkFixtureOffsets and FifthCW PostScript command.
Need to know so that post can output Rapid B+0.0 at end of Prog.
Changed all related IF FifthCW? Booleans to IF Flat?(5).
Added test for maximum program numbers allowed.
Control has limit of 254 subroutines.
Post tests 3 different conditions.
Added ProgNumWarning sub.
Tests for current Program# exceeding 254.
Tests for current Program# collision with MultipleParts WorkFixtureOffset SubNumbers.
Added test for Negative MultipleParts WorkFixtureOffset SubNumbers at SetUpStuff.
Deleted Speed and SpinOn commands at MPOTAPOps sub.
Not needed for additional parts as this is Modal at the machine.
Added condition to output OriginShift number commands for EquallySpacedOffsets at CloseMP sub.
Only happens when all 3 axis equal zero.
Changed output of G92 OriginUnShift block to G54 Origin Reset Block at CloseMP sub.
Moved OpenSub from EachOp/NextOP Loop to SetUpStuff sub.
Was causing line numbers to reset to 1.
Added 'Drawing Name:' to ProgramComment$ at SetUpStuff sub.
Changed literal 'Absolute' text to MoveType$ command at SetUpStuff sub.
Changed to First Tool Not In Spindle at SetUpStuff sub.
Deleted literal ' For' and ProgramName$ at SetUpStuff sub.
Changed all literal G90s to AbsValue command.
Changed all literal G00s to Rapid command.
Deleted FileFeetComment and FileMetersComment at end of Prog.
DWB}

{6/29/96
Modified: Heid TNC 351B [YC] M170.89.1
Created: Heid TNC 351B [YC] M170.89.2
For: Yost Candy
Versions: ncCad 4.33.02/ncCAM 4.33.01/ncPost 4.33.09/Catalyst v3.05C/Compost 4.21.37/1.0a
Changes made per Bud Yost.
Customer reported that post outputs line number only when OptionalStops is unchecked.
Control chokes if nothing contained on block.
Added IF OptionalStops? to suppress SeqC only block at NewTool.
Deleted additional CoolOn at MPOTAPOps sub.
CoolOn not needed because it is modal and does not need to be repeated for additional parts.
Deleted MultipleParts condtion at CheckSpeedC.
Speed not needed because it is modal and does not need to be repeated for additional parts.
Deleted CheckSpinOn sub and call to same at SameTool.
SpinOn not needed because it is modal and does not need to be repeated for additional parts.
Modified output of P03 Drilling Parameter for Incremental output.
Post was outputting +0 value which is against the rules.
Should output same as P02 for non-Tap and non-Peck Cycles.
When in incremental, status register was updated prior to P03 resulting in +0 value.
Added SetAbs as P02 and P03 are incremental distances from ZCP2 to ZDepth.
Added condition to suppress Rapid ZCP1 when Incremental Output selected.
Modified output of FeedRates to support XYAxis seperately from ZAxis.
Using Var(5) for FeatureType.
Using Var(6) for XYAxis.
Using Var(7) for ZAxis.
Using Var(8) for FeedRates.
Added Flag(6) for output of FeedRates.
Added Flag(7) for AbsOrInc status.
Added formula to SUB# from RepsLess1# at FinishSubG92.
Added formula to SUB# from PartsLess1# at CloseMP.
Loop value was still one too many.
Other numerous changes to support modifications yet too numerous to mention.
DWB}

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

#1 = '#.00'
#2 = 'Ä…###.###;+0.'
#3 = '*Ä…###.###;+0.'
#4 = '###.####;0.'
#5 = '#######0'
#6 = '##0.####;0.'
#7 = 'Ä…###0.####;+0.'
#8 = '*Ä…###0.####;+0.'
#9 = '###0.bbbb#;0.'
#10 = '####.0;0.'
#11 = '###^0'
#12 = '*###0.0000' { For TLLength# at SetUpStuff }
#13 = 'Ä…###0.0###;0.0' { For DIV# at SetUpStuff }
#14 = 'Ä…#bbbb.bbbb#'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(TrackZNO#,4)
FORMAT(TLNum#,5)
FORMAT(Repeats#,5)
FORMAT(RepsLess1#,5)
FORMAT(PartsLess1#,5)
FORMAT(Program2#,5)
FORMAT(Program#,5) {.72}
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(Parts#,5) {.72}
FORMAT(ToolDiameter#,6) {.72}
FORMAT(Dwell#,6) {.72}
FORMAT(XStockMin#,7)
FORMAT(XStockMax#,7)
FORMAT(YStockMin#,7)
FORMAT(YStockMax#,7)
FORMAT(ZStockMin#,7)
FORMAT(ZStockMax#,7)
FORMAT(CurOriginPosZ#,7)
FORMAT(OriginShiftRX#,7)
FORMAT(OriginShiftRY#,7)
FORMAT(OriginShiftRZ#,7)
FORMAT(OriginUSRXCTP#,7)
FORMAT(OriginUSRYCTP#,7)
FORMAT(OriginUSRZCTP#,7)
FORMAT(OriginShiftPX#,7)
FORMAT(OriginShiftPY#,7)
FORMAT(OriginShiftPZ#,7)
FORMAT(OriginUSPXCTP#,7)
FORMAT(OriginUSPYCTP#,7)
FORMAT(OriginUSPZCTP#,7)
FORMAT(ToolLength#,7)
FORMAT(StartPosX#,7)
FORMAT(StartPosY#,7)
FORMAT(EPX#,7)
FORMAT(EPY#,7)
FORMAT(EPZ#,7)
FORMAT(SUB#,8)
FORMAT(CalcCP2FmSurf#,8)
FORMAT(Peck#,8)
FORMAT(TLDia#,9)
FORMAT(TLLength#,9)
FORMAT(ADD#,10)
FORMAT(CallMasterNum#,10)
FORMAT(Recall#,11)
FORMAT(FeedEntry#,11)
FORMAT(FeedContour#,11)
FORMAT(ArcFeed#,11)
FORMAT(DIV#,13)
FORMAT(PartShiftX#,14)
FORMAT(PartShiftY#,14)
FORMAT(PartShiftZ#,14)

{Added Subroutines *********************************************************}

BadMPWFOReport:
SetStatusOff
' ' EOL
'Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„' EOL
'Ä„ NOTE: Even though you have elected to Ä„' EOL
'Ä„ process this file using Multiple Ä„' EOL
'Ä„ Parts with Work Fixtures, there exist Ä„' EOL
'Ä„ non-zero values in the invisible, Ä„' EOL
'Ä„ Equally SpacedÉ fields, as follows: Ä„' EOL
'Ä„ Ä„' EOL
'*****************************************' EOL
IF NotEqual? PartShiftX# Num#('0')
' X axis shift = ' PartShiftX# EOL
END
IF NotEqual? PartShiftY# Num#('0')
' Y axis shift = ' PartShiftY# EOL
END
IF NotEqual? PartShiftZ# Num#('0')
' Z axis shift = ' PartShiftZ# EOL
END
'*****************************************' EOL
'Ä„ Ä„' EOL
'Ä„ Please reset these values to zero as Ä„' EOL
'Ä„ they affect the coordinate values Ä„' EOL
'Ä„ output, starting with Part# 2. Ä„' EOL
'Ä„ Thank You. Ä„' EOL
'Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„' EOL
' ' EOL
SetStatusOn
RETURN

CheckPlaneC:
IF XYPlane? AND LAST NOT XYPlane?
' '
ELSE
IF YZPlane? AND LAST NOT YZPlane?
' '
ELSE
IF XZPlane? AND LAST NOT XZPlane?
' '
END
END
END
PlaneC
RETURN

CheckSpeedC:
IF NotEqual? SpeedRPM# LAST SpeedRPM#
' ' Speed
END
RETURN

XYFeedEnt:
Save# Num#('6') FeedEntry#
' ' FeedEnt
RETURN

ConnectF:
IF FeedConnect?
XYFeedEnt
END
RETURN

ZFeedEnt:
Save# Num#('7') FeedEntry#
' ' FeedEnt
RETURN

ZFeedEntC:
IF NotEqual? Recall# Num#('7') FeedEntry#
ZFeedEnt
END
RETURN

LineFeatF:
Save# Num#('8') FeedContour#
IF XMove? OR YMove?
IF NotEqual? Recall# Num#('6') FeedContour#
Save# Num#('6') FeedContour#
SetFlag('6')
END
END
IF ZMove?
IF NotEqual? Recall# Num#('7') FeedContour#
Save# Num#('7') FeedContour#
SetFlag('6')
END
END
RETURN

ArcFeatF:
Save# Num#('8') ArcFeed#
IF NotEqual? Recall# Num#('6') ArcFeed#
Save# Num#('6') ArcFeed#
SetFlag('6')
END
IF ZMove?
IF NotEqual? Recall# Num#('7') ArcFeed#
Save# Num#('7') ArcFeed#
SetFlag('6')
END
END
RETURN

DecelFeatF:
Save# Num#('8') DecelFeed#
IF XMove? OR YMove?
IF NotEqual? Recall# Num#('6') DecelFeed#
Save# Num#('6') DecelFeed#
SetFlag('6')
END
END
IF ZMove?
IF NotEqual? Recall# Num#('7') DecelFeed#
Save# Num#('7') DecelFeed#
SetFlag('6')
END
END
RETURN

DoFeedRate:
IF Flag?('6')
SetFlagF('6')
' F' Recall# Num#('8')
END
RETURN

StartPos:
' X' StartPosX# ' Y' StartPosY#
RETURN

GetMoveSXYC:
IF SPXMove?
' ' MoveSX
END
IF SPYMove?
' ' MoveSY
END
RETURN

GetZCP1:
IF AbsoluteMoves?
' ' Rapid ' ' ZCP1
ELSE
SetAbs
TrackZNO# ClearancePlane1#
SetInc
END
RETURN

GetZCP2C:
SetAbs
LoadFeat Num#('0') Num#('0') ClearancePlane2#
SetAbsOrInc
IF ZMove?
IF NOT AbsoluteMoves?
' ' Rapid
END
' ' ZCP2
END
RETURN

GetDrillCP:
SetAbs
IF RetractToCP1?
LoadFeat Num#('0') Num#('0') ClearancePlane1#
ELSE
LoadFeat Num#('0') Num#('0') ClearancePlane2#
END
SetAbsOrInc
IF ZMove?
IF NOT AbsoluteMoves?
' ' Rapid
END
' ' DrillCP
END
RETURN

GetZCP2PlusIncC:
SetAbs
LoadFeat Num#('0') Num#('0') ZCP2PlusInc#
SetAbsOrInc
IF ZMove?
' ' Rapid ' ' ZCP2PlusInc
END
RETURN

ckCRCOffC: {part 1}
IF Flag?('2') { CRCOn }
SetFlagF('2')
' ' CRCOff
END
RETURN

CycleCall:
' G79'
RETURN

P01:
' P01 ' CalcCP2FmSurf#
RETURN

DSP02: { DrillStuff P02 }
SUB# ClearancePlane2# FIRST SPZ#
RETURN

TPP02: { ToolPath P02 }
SUB# ClearancePlane2# SPZ#
RETURN

P03:
' P03 '
IF Tap?
IF Dwell?
Dwell#
ELSE
'0'
END
ELSE
IF Peck?
Peck#
END
END
RETURN

P04:
' P04 '
IF Tap?
FeedEntry#
ELSE
IF Dwell?
Dwell#
ELSE
'0'
END
END
RETURN

P05:
IF NOT Tap?
' P05 ' FeedEntry#
END
RETURN

DrillCyc1:
' ' Cycle P01
RETURN

DrillCyc2:
' P02 ' DSP02
IF Tap? OR Peck?
P03
ELSE
' P03 ' DSP02
END
RETURN

NewCyc2:
' P02 ' TPP02
IF Tap? OR Peck?
P03
ELSE
' P03 ' TPP02
END
RETURN

DrillCyc3:
FORMAT(FeedEntry#,5)
P04 P05
FORMAT(FeedEntry#,11)
RETURN

DrillStuff:
SetAbs
SeqC DrillCyc1 DrillCyc2 DrillCyc3 EOL
SetAbsOrInc
SeqC ' ' Rapid CycleCall EOL
RETURN

NewCycle:
SetAbs
SeqC DrillCyc1 NewCyc2 DrillCyc3 EOL
SetAbsOrInc
RETURN

GetSubNum:
FORMAT(Program#,10)
' L' Program# { SubCall CallLab }
FORMAT(Program#,5)
RETURN

GetSubNumLess1:
FORMAT(SUB#,10)
' L' SUB# Program# Num#('1') { SubCall CallLab }
FORMAT(SUB#,8)
RETURN

GetSubNumLess2:
FORMAT(SUB#,10)
' L' SUB# Program# Num#('2') { SubCall CallLab }
FORMAT(SUB#,8)
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 }
ELSE
SetScale('1')
END
RETURN

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

ToolComment:
' * ' ToolDiameter# ' ' ToolType$ ' *'
RETURN

PSInit: {reset flags}
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN

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

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

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

EntryMove:
LoadFeat Num#('0') Num#('0') FIRST SPZ#
IF ZMove?
IF FeedEntry?
IF Rapid?
' ' Feed
END
SeqC ' ' ZIn ZFeedEnt EOL
ELSE
IF NOT Rapid?
' ' Rapid
END
SeqC ' ' ZIn EOL
END
END
RETURN

ExitMove:
SetAbs
LoadFeat Num#('0') Num#('0') ClearancePlane3#
SetAbsOrInc
IF ZMove?
SeqC
IF AutoCycle?
' ' ZCP3
ELSE
IF FIFO? {.81}
IF Rapid?
' ' Feed
END
ckCRCOffC ' ' ZCP3 ZFeedEntC
ELSE
IF NOT Rapid?
' ' Rapid
END
ckCRCOffC ' ' ZCP3
END
END
EOL
END
RETURN

ProgNumWarning:
IF GTEqual? Program# Num#('255')
'Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„' EOL
'Ä„ NOTE: Sub Number [' Program# ']'
IF LTEqual? Program# Num#('354')
' '
IF LTEqual? Program# Num#('264')
' '
END
END
'Ä„ exceeds the number of subs allowed !!!Ä„' EOL
'Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„' EOL
ELSE
IF MultipleParts? AND WorkFixtureOffsets?
IF GTEqual? ADD# Parts# Program# Num#('255')
FORMAT(SUB#,5)
'Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„' EOL
'Ä„ NOTE: Collision of Sub Number [' Program# '] '
IF LTEqual? ADD# Parts# Program# Num#('354')
' '
IF LTEqual? ADD# Parts# Program# Num#('264')
' '
END
END
'Ä„' EOL
'Ä„ with G98 WorkFixtureOffset Subs !!! Ä„' EOL
'Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„' EOL
FORMAT(SUB#,8)
END
END
END
RETURN

StartSub:
{OpenSub}
ProgNumWarning
SeqC ' G98 L' Program# ' ' DoSubComment EOL { SubID }
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 ' L' Program# '.' Repeats# EOL}
StartSub
RETURN

FinishSub1: {part 1}
SeqC ' ' AbsOrInc ckCRCOffC
IF NOT FeedConnect?
SetAbs
LoadFeat Num#('0') Num#('0') ClearancePlane3#
SetAbsOrInc
IF ZMove?
IF AutoCycle?
' ' ZCP3
ELSE
IF FIFO? {.81}
IF Rapid?
' ' Feed
END
' ' ZCP3 ZFeedEntC
ELSE
IF NOT Rapid?
' ' Rapid
END
' ' ZCP3
END
END
END
END
EOL
RETURN

FinishSubG92: {part 2}
SeqC ' ' Preset
IF NotEqual? RepeatX# Num#('0')
' X' OriginShiftRX#
END
IF NotEqual? RepeatY# Num#('0')
' Y' OriginShiftRY#
END
IF NotEqual? RepeatZ# Num#('0')
' Z' OriginShiftRZ#
END
EOL
SeqC ' G98 L0' EOL { EndSub }
{CloseSub}
FORMAT(SUB#,5)
SeqC ' L'
IF AutoCycle?
SUB# Program# Num#('1')
ELSE
Program#
END
'.' SUB# RepsLess1# Num#('1') EOL
FORMAT(SUB#,8)
SeqC ' ' Preset
IF NotEqual? RepeatX# Num#('0')
' X' OriginUSRXCTP#('1')
END
IF NotEqual? RepeatY# Num#('0')
' Y' OriginUSRYCTP#('1')
END
IF NotEqual? RepeatZ# Num#('0')
' Z' OriginUSRZCTP#('1')
END
EOL
RETURN

ckCRC2:
IF CutterRadiusCompensation? AND NOT AutoCycle?
EachFeat
IF FirstFeat? AND NOT LastFeat? AND NOT ArcFeat?
SetFlag('2')
SeqC ' ' Rapid ' ' CRCOn ' ' MoveX ' ' MoveY EOL
END
NextFeat
END
RETURN

MPOTAPZORAC:
SetPass2
EachFeat
IF NOT FirstFeat?
SeqC GetMoveSXYC EOL
END
SeqC GetSubNumLess1 EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
NextFeat
SetPass1
RETURN

MPOTAPZOR:
EachCycle
IF NOT FirstCycle?
ckCRC2
IF NOT Flag?('2')
SeqC ' ' Connect StartPos ConnectF EOL {.71.2, added Connect}
END
END
IF FeedConnect?
SeqC ' ' Feed ' ' ZInPlusInc ZFeedEnt EOL {.71.2, changed to FeedC}
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqC GetZCP2PlusIncC EOL {can't call for cycle =1} {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
SeqC ' ' Feed ' ' ZInPlusInc ZFeedEnt EOL
ELSE
SeqC ' ' Rapid ' ' ZInPlusInc EOL {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
END
SeqC GetSubNum EOL
NextCycle
RETURN

MPOTAPG92Sub:
IF AutoCycle?
SeqC ' ' Rapid ' ' ZCP3 EOL
SeqC GetSubNumLess2 EOL
ELSE
SeqC GetSubNumLess1 EOL
END
RETURN

MPOTAPMilling:
IF AutoCycle?
SeqC ' ' Rapid ' ' ZCP2 EOL
EachFeat
IF NOT FirstFeat?
SeqC GetMoveSXYC EOL
END
SeqC GetSubNum EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
NextFeat
SetPass1
ELSE
EntryMove
SeqC GetSubNum EOL
END
RETURN

MPOTAPOps:
IF AutoCycle?
SetPass2
ELSE
SetPass1
END
SeqC ' ' Rapid ' ' AbsOrInc StartPos EOL
IF Milling?
ckCRC2
IF Repeats?
IF ZshiftOnly?
IF AutoCycle?
MPOTAPZORAC
ELSE
IF UseSeparateSubCalls? AND CyclesLessThanMaxSubCalls?
MPOTAPZOR
ELSE
MPOTAPG92Sub
END
END
ELSE
MPOTAPG92Sub
END
ELSE
MPOTAPMilling
END
SetFlagF('2')
ExitMove
ELSE
DrillStuff
SeqC GetSubNum EOL
END
RETURN

OpenMP:
IF WorkFixtureOffsets?
FORMAT(SUB#,10)
IF Flag?('4')
SetFlagF('4')
SeqC ' L' SUB# Num#('255') Parts# EOL {DecWFO}
ELSE
SetFlag('4')
SeqC ' L' SUB# Num#('255') Num#('1') EOL {IncWFO}
END
FORMAT(SUB#,8)
IF AllToolsOnePart?
NewProg
StartSub
END
ELSE { EquallySpacedOffsets }
NewProg
Save# Num#('1') Program#
StartSub
END
RETURN

CloseMP:
IF WorkFixtureOffsets?
IF AllToolsOnePart?
SeqC ' G98 L0' EOL { EndSub }
END
IF Repeats? AND NOT ZshiftOnly?
SeqC ' G98 L0' EOL { EndSub }
END
EachPart
IF NOT FirstPart?
FORMAT(SUB#,10)
IF NOT Flag?('4')
SeqC ' L' ADD# Num#('254') SUB# PartNum# Parts# EOL {IncWFO}
ELSE
SeqC ' L' SUB# Num#('255') PartNum# EOL {DecWFO}
END
FORMAT(SUB#,8)
IF AllToolsOnePart?
SeqC ' L1.0' EOL
ELSE
MPOTAPOps
END
END
NextPart
ELSE { EquallySpacedOffsets }
SeqC ' ' Preset
IF NotEqual? PartShiftX# Num#('0')
' X' OriginShiftPX#
END
IF NotEqual? PartShiftY# Num#('0')
' Y' OriginShiftPY#
END
IF NotEqual? PartShiftZ# Num#('0')
' Z' OriginShiftPZ#
END
IF Equal? PartShiftX# Num#('0')
IF Equal? PartShiftY# Num#('0')
IF Equal? PartShiftZ# Num#('0')
' X' OriginShiftPX#
' Y' OriginShiftPY#
' Z' OriginShiftPZ#
END
END
END
EOL
SeqC ' G98 L0' EOL { EndSub }
{CloseSub}
FORMAT(SUB#,5)
FORMAT(Recall#,5)
SeqC ' L' Recall# Num#('1') '.' SUB# PartsLess1# Num#('1') EOL
FORMAT(SUB#,8)
FORMAT(Recall#,11)
SeqC ' G54 ' AbsValue ' X0. Y0. ' Rapid EOL
END
RETURN

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

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

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

FeatType:
IF FirstFeat?
IF Rapid?
Save# Num#('5') Num#('0')
ELSE
Save# Num#('5') Num#('1')
END
END
IF RapidFeat?
IF NotEqual? Recall# Num#('5') Num#('0')
' ' Rapid
END
Save# Num#('5') Num#('0')
ELSE
IF LineFeat?
IF NotEqual? Recall# Num#('5') Num#('1')
' ' Feed
END
Save# Num#('5') Num#('1')
ELSE { ArcFeat }
Save# Num#('5') Num#('2')
END
END
RETURN

FormatArc:
FeatType
DoAbsOrInc
' ' ArcI ' ' ArcJ ' '
IF ArcCW?
CWArc
ELSE
CCWArc
END
' ' MoveX ' ' MoveY
IF ZMove?
' ' MoveZ
END
RETURN

CheckMove:
FeatType
IF XMove?
' '
END
MoveXC
IF YMove?
' '
END
MoveYC
IF ZMove?
' '
END
MoveZC
RETURN

ckCRC:
IF LastFeat?
IF Flag?('2')
ckCRCOffC FeatType ' ' MoveX ' ' MoveY
IF ZMove?
' '
END
MoveZC
ELSE
CheckMove
END
ELSE
IF ZMove?
CheckMove
ELSE
IF Flag?('2')
CheckMove
ELSE
SetFlag('2')
' ' CRCOnC FeatType ' ' MoveX ' ' MoveY
END
END
END
RETURN

FormatLine:
DoAbsOrInc
IF CutterRadiusCompensation?
ckCRC
ELSE
CheckMove
END
RETURN

ckCRCNum:
{ Not supported }
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
IF NOT FirstFeat?
SeqC GetMoveSXYC EOL
IF Repeats? AND ZShiftOnly?
SeqC GetSubNumLess1 EOL
ELSE
SeqC GetSubNum EOL
END
END
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
IF NOT FirstFeat?
IF NOT MasterOp?
IF RetractToCP1? {.81}
SeqC ' ' Rapid ' ' ZCP1 EOL
END
IF SPZMove? {.80.01}
NewCycle
END
END
SeqC ' ' Rapid {DoDrillAbsOrInc} ' ' MoveSX ' ' MoveSY CycleCall EOL
END
END
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqC FormatLine EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqC LineFeatF FormatLine DoFeedRate EOL
DecelMove2
END
SeqC DecelFeatF FormatLine DoFeedRate EOL
ELSE
SeqC LineFeatF FormatLine DoFeedRate 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 ArcFeatF FormatArc DoFeedRate EOL
DecelMove2
END
SeqC DecelFeatF FormatArc DoFeedRate EOL
ELSE
SeqC ArcFeatF FormatArc DoFeedRate EOL
END
NEXTQuadrant
END
END
END
END
NEXTFeat
RestoreAbsOrInc
RETURN

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

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

AutoCycCutSub2: {part 2}
ToolPath
SeqC ' ' AbsOrInc
IF Repeats? AND FeedConnect? AND ZshiftOnly?
{.69 removed RapidC} {.71.2 removed CRCOffC, gets turned off in ToolPath}
ELSE
IF FIFO? {.81}
IF Rapid?
' ' Feed
END
' ' ZCP2 ZFeedEntC
ELSE
IF NOT Rapid?
' ' Rapid
END
' ' ZCP2
END
END
EOL
SeqC ' G98 L0' EOL { EndSub }
{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
IF MultipleParts? AND WorkFixtureOffsets? AND OneToolAllParts? AND NOT Repeats?
NewProg
StartSub
ToolPath
SeqC ' ' AbsOrInc EOL
SeqC ' G98 L0' EOL { EndSub }
ELSE
ToolPath
END
END
RETURN

G92Sub:
SubWarning
StdSub
IF MultipleParts? AND WorkFixtureOffsets? AND OneToolAllParts?
NewProg
StartSub
END
SeqC ' ' AbsOrInc ' ' Connect StartPos ConnectF EOL
Milling
FinishSub1
FinishSubG92
RETURN

ZonlyRepAutoCycle: {.86}
StartSub
SetPass1 {element cut moves}
EachCycle
IF FirstCycle?
IF FeedEntry?
SeqC ' ' Feed ' ' ZInPlusInc ZFeedEnt EOL
ELSE
SeqC ' ' Rapid ' ' ZInPlusInc EOL
END
END
NextCycle
NewProg
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
SetPass1 {element cut moves}
EachCycle
SetSRXYtoEP
IF NOT FirstCycle?
IF FeedConnect?
' ' Feed
IF SPXMove? OR SPYMove?
SeqC ' ' IncValue
IF SPXMove?
' X' StartPosX#
END
IF SPYMove?
' Y' StartPosY#
END
XYFeedEnt EOL
' ' AbsOrInc
END
SeqC ' ' ZInPlusInc ZFeedEnt EOL
ELSE
' ' Rapid
IF SPXMove? OR SPYMove?
SeqC ' ' IncValue
IF SPXMove?
' X' StartPosX#
END
IF SPYMove?
' Y' StartPosY#
END
EOL
' ' AbsOrInc
END
IF FeedEntry?
SeqC ' ' ZCP2PlusInc EOL
SeqC ' ' Feed ' ' ZInPlusInc ZFeedEnt EOL
ELSE
SeqC ' ' ZInPlusInc EOL
END
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
ELSE
SeqC GetSubNum EOL
END
NextCycle
SetStatusOn
IF FeedConnect? {there is no Z up in the sub}
IF FIFO?
SeqC ' ' Feed ' ' ZCP2 ZFeedEnt EOL {.69}
ELSE
SeqC ' ' Rapid ' ' ZCP2 EOL {.69}
END
END
SeqC ' G98 L0' EOL { EndSub }
{CloseSub}
{Element shift, not pattern}
SetPass2 {element cut moves}
AutoCycPat {write pattern moves and main calls}
RETURN

ZonlyRep:
EachCycle
IF NOT FirstCycle?
ckCRC2
IF NOT Flag?('2')
SeqC ' ' Connect StartPos ConnectF EOL {.71.2, added Connect}
END
END
IF FeedConnect?
IF Rapid?
' ' Feed
END
SeqC ' ' ZInPlusInc ZFeedEnt EOL {.71.2, changed to FeedC}
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
IF NOT Rapid?
' ' Rapid
END
SeqC GetZCP2PlusIncC EOL {can't call for cycle =1} {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
SeqC ' ' Feed ' ' ZInPlusInc ZFeedEnt EOL
ELSE
IF NOT Rapid?
' ' Rapid
END
SeqC ' ' ZInPlusInc EOL {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
END
IF FirstCycle?
StartSub
TrackZNO# FIRST SPZ#
ToolPath
FinishSub1
SeqC ' G98 L0' EOL { EndSub }
{CloseSub}
ELSE
SeqC GetSubNum EOL
END
NextCycle
IF MultipleParts? AND WorkFixtureOffsets? AND OneToolAllParts?
TrackZNO# ZInPlusInc#
ELSE
IF FeedConnect?
TrackZNO# ZInPlusInc#
ELSE
TrackZNO# ClearancePlane3#
IF NOT FIFO?
SetStatusRapid
END
END
END
{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:
SetAbs
IF RetractToCP1?
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
SetAbsOrInc
RETURN

GetStartOfSameTool:
DoOpComments
DoPostScript
CheckPass
IF MultipleParts? AND WorkFixtureOffsets? AND OneToolAllParts?
OpenMP
END
RETURN

GetCoolOn:
IF NOT CoolOff?
' ' CoolOn
END
RETURN

SetUpStuff:
' ' EOL
EOR Program2# ' G70' EOL { Inch }
IF ToolChangeAtHome?
SetHome
END
OpenSub
IF UseComments?
' ' EOL
IF ProgramNameComment?
'* File Name: ' ProgramName$ ' *' EOL
END
IF ProgramComment?
'* Drawing Name: ' ProgramComment$ ' *' EOL
END
IF FormatNameComment?
'* Format: ' FormatName$ ' *' EOL
END
IF TimeComment?
'* Created: ' Date$ ' ' 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
' ' EOL
'*Tool List: *' EOL
'*=====================================================================*' EOL
'*Tool| Tool Type | Material |Theor.Dm|Comp.D.|Work.L.|Comp.L.*' EOL
'*=====================================================================*' EOL
EachTool
SetFlag('1')
EachOp
IF Equal? TLNum# Tool#
IF Flag?('1')
SetFlagF('1')
SetScale('1')
'* ' TLNum#
RestoreScale
IF ToolComment?
' |' TLToolComment$
ELSE
' | '
END
' | HSS '
' |' TLDia#
' | '
' |' TLLength#
' | *' EOL
'*---------------------------------------------------------------------*' EOL
END
END
NextOp
NextTool
END
FORMAT(TLLength#,12)
' ' EOL
EachTool
SetFlag('1')
EachOp
IF Equal? TLNum# Tool#
IF Flag?('1')
SetFlagF('1')
SetScale('1')
SeqC ' G99 T' TLNum#
RestoreScale
' L' TLLength# ' R' DIV# TLDia# Num#('2') EOL
END
END
NextOp
NextTool
IF MultipleParts? AND WorkFixtureOffsets?
EachOp
IF FirstOperation?
PSInit
EachPS
SeqC PostScript EOL {literals}
IF FifthCW?
FifthCWF {reset flag}
SetFlag('5') { MultipleParts WorkFixtureOffsets FifthCW }
END
NextPS
END
NextOp
END
' ' EOL
IF MultipleParts? AND WorkFixtureOffsets?
FORMAT(SUB#,5)
IF GTEqual? Parts# Num#('255')
'Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„' EOL
'Ä„ NOTE: You have requested [' Parts# '] Parts Ä„' EOL
'Ä„ which exceeds the number of parts Ä„' EOL
'Ä„ allowed [254] !!! This will cause Ä„' EOL
'Ä„ your G98 WorkFixtureOffset Subs to Ä„' EOL
'Ä„ start numbering from [' SUB# Num#('255') Parts# '] '
IF LTEqual? Parts# Num#('354')
' '
IF LTEqual? Parts# Num#('264')
' '
END
END
'Ä„' EOL
'Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„' EOL
END
EachPart
SeqC ' G98 L' SUB# ADD# Num#('254') PartNum# Parts# EOL
SeqC
IF Flag?('5') { MultipleParts WorkFixtureOffsets FifthCW }
' ' AbsValue ' B+0.0 ' Rapid ' * Rotation '
ELSE
' G54 ' AbsValue ' X0. Y0. ' Rapid ' * Part '
END
SUB# ADD# Num#('1') Parts# PartNum#
IF Equal? PartNum# Parts#
IF NOT Flag?('5') { MultipleParts WorkFixtureOffsets FifthCW }
' (Left Most)'
END
' Home ( Leave This Way) *'
ELSE
' Home'
IF Flag?('5') { MultipleParts WorkFixtureOffsets FifthCW }
' ( Degrees From Home 1)'
END
' *'
END
EOL
SeqC ' G98 L0' EOL
NextPart
FORMAT(SUB#,8)
' ' EOL
END
RETURN

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

{setup and initializations}
InitProg
ReverseXZArcs
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('10000')
SetMaxFeed('1000')
SaveProgNum2
SetProgNum('0')
Save# Num#('1') Num#('0') { MultipleParts EquallySpacedPffsets Program# }
Save# Num#('5') Num#('0') { ToolPath Feature Type }
Save# Num#('6') Num#('-1') { XY FeedRates }
Save# Num#('7') Num#('-1') { Z FeedRates }
Save# Num#('8') Num#('-1') { UnConditional FeedRates }
SetFlagF('1') { Milling ZShiftOnly SepSubs }
SetFlagF('2') { CRCOnC/CRCOffC }
SetFlagF('3') { CRCOnC/CRCOffC }
SetFlagF('4') { MultipleParts WorkFixtureOffsets OneToolAllParts Control }
SetFlagF('5') { MultipleParts WorkFixtureOffsets FifthCW }
SetFlagF('6') { Conditional FeedRates }
SetFlagF('7') { SepSub AbsValue }
SetLowerCaseOK
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(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
' NOTE: If FirstOperation contains 5thAxisCW(0) or 5ACW(0)' EOL
' and MultipleParts WorkFixtureOffsets are selected,' EOL
' Post will output Rotation Home Subs, otherwise, post will output' EOL
' PartNumber Subs.' EOL
' 5thAxisCCW(22.5), 5ACCW(22.5) -' EOL
' generates a - B move of the value you specify' EOL
END

IF MultipleParts? AND WorkFixtureOffsets?
IF NotEqual? PartShiftX# Num#('0')
BadMPWFOReport
ELSE
IF NotEqual? PartShiftY# Num#('0')
BadMPWFOReport
ELSE
IF NotEqual? PartShiftZ# Num#('0')
BadMPWFOReport
END
END
END
END

SetUpStuff

EachOp {Start of post processing *********************}
IF FirstOperation?
IF ToolChangeAtHome?
SetHome
END
RestoreScale
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
DoOpComments
DoPostScript
Seq ' ' OpToolID ' ' Plane ' ' ToolChng ToolComment EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
SeqC ' ' Speed ' ' Rapid ' ' AbsOrInc StartPos ' ' SpinOn EOL
SeqC GetZCP1 GetCoolOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqC ' ' AbsOrInc ' ' Rapid StartPos EOL
END
ELSE
IF NewTool?

{Finish off last Operation}

IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
IF EquallySpacedOffsets?
CloseMP
END
END
IF MultipleParts? AND OneToolAllParts? AND FullUp?
IF EquallySpacedOffsets?
CloseMP
END
END
DoEndOpPS
IF LAST ProgStop?
SeqC ' M00' EOL
ELSE
IF OptionalStops?
SeqC ' ' ProgStop EOL
END
END

{Start new Operation}

' ' EOL
DoOpComments
DoPostScript
Seq ' ' OpToolID ' ' Plane ' ' ToolChng ToolComment EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
SeqC ' ' Speed ' ' Rapid ' ' AbsOrInc StartPos ' ' SpinOn EOL
SeqC GetZCP1 GetCoolOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqC ' ' AbsOrInc ' ' Rapid StartPos EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF CoolOff? AND LAST NOT CoolOff?
SeqC ' ' CoolOff EOL
END
IF LAST ProgStop?
SeqC ' M00' EOL

{Start new Operation}

GetStartOfSameTool
SeqC ' ' ToolOfst CheckPlaneC EOL
SeqC ' ' Speed ' ' Rapid ' ' AbsOrInc StartPos ' ' SpinOn EOL
SeqC GetZCP1 GetCoolOn EOL
ELSE
IF NewToolOffset?

{Start new Operation}

GetStartOfSameTool
SeqC ' ' ToolOfst CheckPlaneC EOL
SeqC CheckSpeedC ' ' Rapid ' ' AbsOrInc StartPos EOL
GetZCP1
ELSE

{Start new Operation}

GetStartOfSameTool
SeqC CheckPlaneC EOL
SeqC CheckSpeedC ' ' Rapid ' ' AbsOrInc StartPos EOL
END
SeqC
IF LAST CoolOff? AND NOT CoolOff?
GetCoolOn
END
EOL
END
END
END
END {common point for all operations}
Save# Num#('6') Num#('0') { XYRapidF }
Save# Num#('7') Num#('0') { ZRapidF }
IF Milling?
ckCRC2
SeqC GetZCP2C EOL
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}
SetFlagF('2')
ELSE {no repeat OPs}
Milling
END
ExitMove
ELSE
IF Drilling?
IF Repeats?
NewProg
StdSub
SeqC ' ' AbsOrInc ' ' Rapid StartPos EOL
END
SeqC GetDrillCP EOL
GetCycle
DrillStuff
IF CallMasterOp?
SeqC ' L' CallMasterNum# EOL { SubCall CallLab }
SkipToLastFeat
TrackZNO# ClearancePlane3#
SetStatusRapid
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') {std sep sub Zreps in effect}
NewMasterProg
StartSub
ToolPath
SetDrillEndOpZ
SetAbs
LoadFeat Num#('0') Num#('0') ClearancePlane3#
SetAbsOrInc
IF ZMove? OR AbsoluteMoves?
SeqC ' ' Rapid ' ' AbsOrInc ' ' ZCP3 EOL
END
SeqC ' G98 L0' EOL { EndSub }
{CloseSub}
SetFlagF('1') {not std sep sub Zreps in effect}
ELSE
ToolPath
SetDrillEndOpZ
SetAbs
LoadFeat Num#('0') Num#('0') ClearancePlane3#
SetAbsOrInc
IF ZMove? OR AbsoluteMoves?
SeqC ' ' Rapid ' ' AbsOrInc ' ' ZCP3 EOL
END
END
END
IF Repeats?
FinishSubG92
END
END
END
IF MultipleParts? AND WorkFixtureOffsets? AND OneToolAllParts?
CloseMP
END
NextOp {loops back to EachOP until last Operation}

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

{finish last operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
IF EquallySpacedOffsets?
CloseMP
END
END
IF MultipleParts? AND OneToolAllParts? AND FullUp?
IF EquallySpacedOffsets?
CloseMP
END
END
DoEndOpPS
IF ProgStop?
SeqC ' M00' EOL
END
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
IF Flag?('5') { MultipleParts WorkFixtureOffsets FifthCW }
SeqC ' ' Rapid ' B+0.0' EOL
END
SeqC ' ' Rapid ' M25' EOL { FullUp }
SeqC ' ' Rapid ' ' EOP EOL
CloseSub
Post2 {organize Subs into one program}
'N9999 ' EOR Program2# ' G70' EOL { Inch }
' ' EOL
IF UseComments?
SetScale('1') {restore scale for comments}
IF FileBytesComment?
'* FILE LENGTH: ' FileBytes# ' CHARACTERS *' EOL
END
END
EOL
Close


Wyszukiwarka

Podobne podstrony:
Heid TNC 351B MD M989 89 5
Heid TNC 351B BP 412 NJ MV78 89
Heid TNC 151B [FE] MX96 89
Heid TNC 2500 [ESS] M979 89 1
Heid TNC 155 [PB] M550 89 1m
Heid TNC 2500 [MT] M754 89 3
Heid TNC 2500 [QM] MU48 89 2
Heid TNC 370 [ME] MW41 89 5m
Heid TNC 155 [JP] MX68 89 4m
Heid TNC 415[Gimbel] MZ34 89 2m
Heid TNC 155 [KP] MV27 89 1m
Heid TNC 155 Hkrt Z M614 89
Heid TNC 155 [FS] MY83 89 3m
Heid TNC 425 [RI] MT39 89 1
Heid TNC 425 [PB] M053 89 2m
Heid TNC 151A S1 [NM] M711 89 1
Heid TNC 155 Sajo 450 M030 89

więcej podobnych podstron