Heid TNC 426 Hermle V DZ17 12m 5


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

{8/1/96
Initial: Heidenhain 407 SHW M060.89
Created: Heid TNC 426 Hermle V Dxxx.12
ForUser: Remmele Plant 50
Control: Heidenhain TNC 426
Machine: Hermle with Head in Vertical position.
Develop: ComPost2 68k, Catalyst68K v3.04.10.C
Comment: Created New Advanced Mill Processor
Jim Radcliffe}

{9/11/96
Initial: Heid TNC 426 Hermle V DZ17.12
Created: Heid TNC 426 Hermle V DZ17.12.1
Develop: ComPost2 68k v1.0b3, Catalyst68K v3.04.10.C
Comment: Modified per faxes from and conversations with Rudy
Corrected CRCOff. Added CRCOff to OfstOff, M92, line.
Modified Drilling Cycles.
Modified handling of looping subs.
Correct handling of EndTool2 by adding flag 3 to see if we are at the end of the program.
Jim Radcliffe}

{11/6/96
Initial: Heid TNC 426 Hermle V DZ17.12.1
Created: Heid TNC 426 Hermle V DZ17.12.2
Develop: ComPost2 68k v1.0b4, Catalyst68K v3.09.05C
Comment: Modified per marked up readout from Rudy
Moved CoolOff and SpinOff from EndTool1 to EndTool2 getting them out of the MP1ToollAllPfu subroutine.
Changed format of FeedTapIPR from #4 to #10 to show 1 leading zero.
Added CoolOff and SpeedC to SameTool.
Changed B axis label from B to C.
Jim Radcliffe}

{11/19/96
Initial: Heid TNC 426 Hermle V DZ17.12.2
Created: Heid TNC 426 Hermle V DZ17.12.3
Develop: ComPost2 68k v1.0b4, Catalyst68K v3.09.05C
Comment: Modified per marked up readouts from Rudy
Added 'M79' to beginning of program.
Added TOOL CALL line and M3 to SameTool.
Changed parameter Q202 in the universal drilling cycle
to output zero if not pecking.
Changed parameter Q204 in the universal drilling cycle
corrected output for retract to clearance plane #2.
Jim Radcliffe}

{2/7/97
Initial: Heid TNC 426 Hermle V DZ17.12.3
Created: Heid TNC 426 Hermle V DZ17.12.4
Develop: ComPost2 68K 1.0b11, Virtual Gibbs 3.23
Comment: Modified per marked up readout adn conversation with Rudy
Changed parameter Q202 in the universal drilling cycle
if not pecking we need an unsigned depth value same as Q201.
Changed location of CRCOff in a couple places
CRCOff must be output before the F command.
Added support for NewWFO & Multiple Parts with Work Fixture Offsets
using CYCL DEF 7.0 DATUM SHIFT with a table # call.
Jim Radcliffe}

{4/15/97
Initial: Heid TNC 426 Hermle V DZ17.12.4
Created: Heid TNC 426 Hermle V DZ17.12.5
Develop: ComPost2 68K 1.0b11, CatalystPPC v3.33C
Comment: Modified helix output per marked up readout from Rudy.
Jim Radcliffe}

{10/7/97, Changed to metric post. CDH}

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

#1 = '#.00'
#2 = '####.###;0'
#3 = '*####.###;0'
#4 = '####.###;0'
#5 = 'ą####.###;0'
#6 = 'ą*####.###;0'
#7 = '#######0'
#8 = '###^0'
#9 = '###0^' {actualy ###^0}
#10 = '###0.###;0'
#11 = 'ą###0.###;0'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ABS#,2)
FORMAT(CSOffsetA#,3)
FORMAT(CSOffsetB#,3)
FORMAT(ToolDiameter#,4)
FORMAT(TrackZNO#,4)
FORMAT(XStockMin#,5)
FORMAT(XStockMax#,5)
FORMAT(YStockMin#,5)
FORMAT(YStockMax#,5)
FORMAT(ZStockMin#,5)
FORMAT(ZStockMax#,5)
FORMAT(SPX#,5)
FORMAT(SPY#,5)
FORMAT(SPZ#,5)
FORMAT(EPX#,5)
FORMAT(EPY#,5)
FORMAT(EPZ#,5)
FORMAT(ArcI#,5)
FORMAT(ArcJ#,5)
FORMAT(RepeatX#,5)
FORMAT(RepeatY#,5)
FORMAT(RepeatZ#,5)
FORMAT(PartShiftX#,5)
FORMAT(PartShiftY#,5)
FORMAT(PartShiftZ#,5)
FORMAT(OriginUnShiftPX#,5)
FORMAT(OriginUnShiftPY#,5)
FORMAT(OriginUnShiftPZ#,5)
FORMAT(OriginUnShiftRX#,5)
FORMAT(OriginUnShiftRY#,5)
FORMAT(OriginUnShiftRZ#,5)
FORMAT(ADD#,7)
FORMAT(CS#,7)
FORMAT(NewWFO#,7)
FORMAT(CallMasterNum#,7)
FORMAT(Tag#,7)
FORMAT(Operation#,7)
FORMAT(Tool#,7)
FORMAT(Parts#,7)
FORMAT(NumFullPecks#,7)
FORMAT(FeedEntry#,8)
FORMAT(RapidF#,9)
FORMAT(CalcCP2FmSurf#,10)
FORMAT(Dwell#,10)
FORMAT(Peck#,10)
FORMAT(CalcZSurf#,10)
FORMAT(SUB#,10)
FORMAT(MUL#,10)
FORMAT(FeedTapIPR#,10)
FORMAT(CalcZFmSurf#,11)

{Special Subs **************************************************************}

DoL:
' L'
RETURN

ckCRCOnC:
IF CutterRadiusCompensation?
IF NOT Flag?('2')
CRCOn
IF CRCleft?
' RL'
ELSE
' RR'
END
SetFlag('2')
END
END
RETURN

ckCRCOffC:
IF Flag?('2')
CRCOff
SetFlagF('2')
END
RETURN

{Prog Subroutines **********************************************************}

RestoreScale:
IF NOT Metric? {CAM file is in English, tools and tool path}
SetScale('25.4') { change to Metric, this is an Metric post}
END
RETURN

WFO:
ADD# PartNum# Num#('-1')
RETURN

WFOStuff:
IF NewWFO?
IF MultipleParts? AND WorkFixtureOffsets?
'*** WARNING *** DO NOT USE NEWWFO() WITH MULTIPLE PARTS AND WORK FIXTURE OFFSETS' EOL
ELSE
SeqLab ' CYCL DEF 7.0 DATUM SHIFT' EOL
SeqLab ' CYCL DEF 7.1 #' NewWFO# EOL
END
END
RETURN

DoSubComment:
IF UseComments? AND SubComment?
SeqLab ' ; SUB NUMBER: ' Tag# EOL
END
RETURN

DoCSComment:
IF AAxisAvail? OR BAxisAvail?
'( CS#' CS# ' - ' CSComment$ ' )' EOL
END
RETURN

OffsetComments:
IF ChangeCS?
DoCSComment
ELSE
IF NOT SameTool?
DoCSComment
END
END
RETURN

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

CSAngleA:
IF AAxisAvail?
' A' CSOffsetA#
END
RETURN

CSAngleAC:
IF AChange?
CSAngleA
END
RETURN

CSAngleB:
IF BAxisAvail?
' C' CSOffsetB#
END
RETURN

CSAngleBC:
IF BChange?
CSAngleB
END
RETURN

PSInit: {reset flags}
NewWFOF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN

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

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

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

EntryMove:
SeqLab DoL
IF NOT AbsValue?
' IZ' SPZ#
ELSE
ZIn
END
IF FeedEntry?
FeedEnt
ELSE
RapidFC
END
EOL
RETURN

StartSub:
OpenSub
DoSubComment
SeqLab ' LBL ' Tag# EOL
RETURN

SubWarning:
IF UseComments?
IF NOT FeedConnect?
IF AnyZshift?
' ' EOL
SeqLab ' ; WARNING Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT' EOL
' ' EOL
END
END
END
RETURN

StdSub:
EachRep
SeqLab ' CALL LBL ' Tag# EOL
NextRep
StartSub
RETURN

FinishSub1: {part 1}
IF NOT FeedConnect?
SeqLab DoL ZCP3
IF AutoCycle?
RapidFC
ELSE
IF FIFO? {.81}
FeedEntC
ELSE
RapidFC
END
END
EOL
END
RETURN

FinishSubG92: {part 2}
SeqLab ' CYCL DEF 7.0 DATUM SHIFT' EOL
SeqLab ' CYCL DEF 7.1 IX' RepeatX# EOL
SeqLab ' CYCL DEF 7.2 IY' RepeatY# EOL
SeqLab ' CYCL DEF 7.3 IZ' RepeatZ# EOL
SeqLab ' LBL 0' EOL
CloseSub
SeqLab ' CYCL DEF 7.0 DATUM SHIFT' EOL
SeqLab ' CYCL DEF 7.1 IX' OriginUnShiftRX#('0') EOL
SeqLab ' CYCL DEF 7.2 IY' OriginUnShiftRY#('0') EOL
SeqLab ' CYCL DEF 7.3 IZ' OriginUnShiftRZ#('0') EOL
RETURN

OpenMP:
TagInc
IF WorkFixtureOffsets?
NewWFO
EachWFO {simple eachPart}
IF OneToolAllParts? AND ExitClearancePlane? AND FirstPart?
{ skip redundant WFO output }
ELSE
SeqLab ' CYCL DEF 7.0 DATUM SHIFT' EOL
SeqLab ' CYCL DEF 7.1 #' WFO EOL
END
SeqLab ' CALL LBL ' Tag# EOL
IncWFO
NextWFO {simple NextPart}
ELSE
EachPart
SeqLab ' CALL LBL ' Tag# EOL
NextPart
IF ExitClearancePlane?
SetFlag('4') { WFOStuff }
END
END
StartSub
RETURN

CloseMP:
IF WorkFixtureOffsets?
SeqLab ' LBL 0' EOL
CloseSub
SeqLab ' CYCL DEF 7.0 DATUM SHIFT' EOL
SeqLab ' CYCL DEF 7.1 #' NewWFO# EOL
ELSE
SeqLab ' CYCL DEF 7.0 DATUM SHIFT' EOL
SeqLab ' CYCL DEF 7.1 IX' PartShiftX# EOL
SeqLab ' CYCL DEF 7.2 IY' PartShiftY# EOL
SeqLab ' CYCL DEF 7.3 IZ' PartShiftZ# EOL
SeqLab ' LBL 0' EOL
CloseSub
SeqLab ' CYCL DEF 7.0 DATUM SHIFT' EOL
SeqLab ' CYCL DEF 7.1 IX' OriginUnShiftPX#('0') EOL
SeqLab ' CYCL DEF 7.2 IY' OriginUnShiftPY#('0') EOL
SeqLab ' CYCL DEF 7.3 IZ' OriginUnShiftPZ#('0') EOL
END
RETURN

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

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

DoHelix:
'P IPA'
IF ArcCW?
'-'
ELSE
'+'
END
IF XYPlane?
ABS# MUL# DIV# SUB# SPZ# EPZ# HelixPitch# Num#('360')
ELSE
IF XZPlane?
ABS# MUL# DIV# SUB# SPY# EPY# HelixPitch# Num#('360')
ELSE
ABS# MUL# DIV# SUB# SPX# EPX# HelixPitch# Num#('360')
END
END
RETURN

CheckMove:
IF NOT AbsValue?
IF ArcFeat?
IF ZMove?
DoHelix ' IZ' EPZ#
TrackXNO# EPX#
TrackYNO# EPY#
ELSE
' IX' EPX# ' IY' EPY#
END
ELSE
IF XMove? OR YMove?
' IX' EPX# ' IY' EPY#
END
IF ZMove?
' IZ' EPZ#
END
END
ELSE
IF ArcFeat?
IF XYPlane?
IF ZMove?
SetInc DoHelix ' IZ' EPZ# SetAbsOrInc
TrackXNO# EPX#
TrackYNO# EPY#
ELSE
MoveX MoveY
END
ELSE
IF XZPlane?
IF YMove?
SetInc DoHelix ' IY' EPY# SetAbsOrInc
TrackXNO# EPX#
TrackZNO# EPZ#
ELSE
MoveX MoveZ
END
ELSE
IF YZPlane?
IF XMove?
SetInc DoHelix ' IX' EPX# SetAbsOrInc
TrackYNO# EPY#
TrackZNO# EPZ#
ELSE
MoveY MoveZ
END
END
END
END
ELSE
MoveX MoveY MoveZC
END
END
RETURN

FormatArc:
DoAbsOrInc
' CC'
IF NOT AbsValue?
' IX' ArcI# ' IY' ArcJ#
ELSE
ArcIJ
END
EOL
SeqLab ' C' CheckMove
IF ArcCW?
' DR-' CWArc {no output}
ELSE
' DR+' CCWArc {no output}
END
RETURN

FormatLine:
DoL DoAbsOrInc CheckMove
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
IF NOT FirstFeat?
SeqLab DoL MoveSX MoveSY EOL
END
SeqLab ' CALL LBL ' Tag# EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
IF FirstFeat?
SeqLab ' CYCL CALL' EOL
ELSE
SeqLab DoL MoveSX MoveSY ' M99' EOL
END
END
ELSE
IF RapidFeat?
Rapid {no output}
IF LastFeat?
SeqLab FormatLine ckCRCOffC RapidFC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqLab FormatLine RapidFC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqLab FormatLine ckCRCOnC RapidFC EOL
END
END
END
ELSE
IF LineFeat?
Feed {no output}
IF LastFeat?
SeqLab FormatLine ckCRCOffC FeedRateC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqLab FormatLine FeedRateC EOL
ELSE
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqLab FormatLine ckCRCOnC FeedRateC EOL
DecelMove2
END
SeqLab FormatLine ckCRCOnC DecelFeed EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqLab FormatLine ckCRCOnC FeedRateC EOL
END
END
END
END
ELSE
IF ArcFeat?
IF LastFeat?
SeqLab FormatArc ckCRCOffC ArcFeedC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqLab FormatArc ArcFeedC EOL
ELSE
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqLab FormatArc ckCRCOnC ArcFeedC EOL
DecelMove2
END
SeqLab FormatArc ckCRCOnC DecelFeed EOL
ELSE
SeqLab FormatArc ckCRCOnC ArcFeedC EOL
END
END
END
END
END
END
END
NEXTFeat
RestoreAbsOrInc
RETURN

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

AutoCycCutSub2: {part 2}
ToolPath
SetAbs
IF Repeats? AND FeedConnect? AND ZshiftOnly?
{.69 removed RapidC} {.71.2 removed CRCOffC, gets turned off in ToolPath}
ELSE
SeqLab DoL ZCP2
IF FIFO? {.81}
FeedEntC
ELSE
RapidFC
END
EOL
END
SeqLab ' LBL 0' EOL
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?
TagInc
AutoCycCutSub1
EntryMove
AutoCycCutSub2
AutoCycPat
ELSE
EntryMove
ToolPath
END
RETURN

G92Sub:
SubWarning
StdSub
SetAbs
SeqLab DoL StrtPos
IF FeedConnect?
FeedEntC
ELSE
RapidFC
END
EOL
Milling
FinishSub1
FinishSubG92
RETURN

ZonlyRepAutoCycle: {.86}
AutoCycPat {write pattern moves and main calls}
StartSub
TagInc
EachCycle
SetSRXYtoEP
IF FeedConnect?
Feed {no output}
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SetInc
SeqLab DoL ' IX' SPX# ' IY' SPY# FeedEnt EOL
SetAbs
END
END
SeqLab DoL ZInPlusInc FeedEnt EOL
ELSE
IF NOT FirstCycle?
Rapid {no output}
IF SPXMove? OR SPYMove?
SetInc
SeqLab DoL ' IX' SPX# ' IY' SPY# FeedEnt EOL
SetAbs
IF FeedEntry?
SeqLab DoL ZCP2PlusInc RapidF EOL
Feed {no output}
SeqLab DoL ZInPlusInc FeedEnt EOL
ELSE
SeqLab DoL ZInPlusInc RapidF EOL
END
ELSE
IF FeedEntry?
IF NOT FirstCycle?
Rapid {no output}
SeqLab DoL ZCP2PlusInc RapidF EOL
END
Feed {no output}
SeqLab DoL ZInPlusInc FeedEnt EOL
ELSE
Rapid {no output}
SeqLab DoL ZInPlusInc RapidF EOL
END
END
ELSE
IF FeedEntry?
SeqLab DoL ZCP2PlusInc RapidF EOL
Feed {no output}
SeqLab DoL ZInPlusInc FeedEnt EOL
ELSE
SeqLab DoL ZInPlusInc RapidF EOL
END
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
SeqLab ' CALL LBL ' Tag# EOL
NextCycle
SetStatusOn
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
{.69, removed FinishSub1}
IF FeedConnect? {there is no Z up in the sub, .69}
Rapid {no output}
SeqLab DoL ZCP2
IF FIFO? {.81}
FeedEnt
ELSE
RapidFC
END
EOL {.69}
END {.69}
SeqLab ' LBL 0' EOL
CloseSub
{Element shift, not pattern}
RETURN

ZonlyRep:
EachCycle
IF NOT FirstCycle?
SeqLab DoL StrtPos
IF FeedConnect?
FeedEnt
ELSE
RapidFC
END
EOL
END
IF FeedConnect?
Feed {no output}
SeqLab DoL ZInPlusInc FeedEnt EOL
ELSE
IF FeedEntry?
IF NOT FirstCycle?
Rapid {no output}
SeqLab DoL ZCP2PlusIncC RapidFC EOL
END
Feed {no output}
SeqLab DoL ZInPlusInc FeedEnt EOL
ELSE
Rapid {no output}
SeqLab DoL ZInPlusInc RapidFC EOL
END
END
SeqLab ' CALL LBL ' Tag# EOL
NextCycle
StartSub
TrackZNO# FIRST SPZ#
ToolPath
FinishSub1
SeqLab ' LBL 0' EOL
CloseSub
RETURN

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

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

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

OpGuts:
IF Milling?
SeqLab DoL ZCP2 RapidFC EOL
IF Repeats?
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?
SeqLab DoL ZCP3
IF AutoCycle?
RapidFC
ELSE
IF FIFO? {.81}
FeedEnt
ELSE
RapidFC
END
END
EOL
END
ELSE
IF Drilling?
IF Repeats?
TagInc
StdSub
SeqLab DoL StrtPos RapidFC EOL
END
SeqLab DoL ZCP2 RapidFC EOL
GetCycle
IF RetractToCP1? OR PeckChipBreaker? OR FIFO?
SeqLab ' CYCL DEF 203 UNIVERSL DRILLING' ASCII('126') EOL
' Q200=' CalcCP2FmSurf# ' ;Set-Up Clearance' ASCII('126') EOL
' Q201=' CalcZFmSurf# ' ;Depth' ASCII('126') EOL
' Q206=' FeedEntry# ' ;Feed Rate for Plngng' ASCII('126') EOL
IF Peck?
' Q202=' Peck# ' ;Pecking Depth' ASCII('126') EOL
ELSE
' Q202=' MUL# CalcZFmSurf# Num#('-1') ' ;Pecking Depth' ASCII('126') EOL
END
' Q210=0' ' ;Dwell Time at Top' ASCII('126') EOL
' Q203=' CalcZSurf# ' ;Surface Coord' ASCII('126') EOL
IF RetractToCP1?
' Q204=' SUB# ClearancePlane1# CalcZSurf# ' ;2nd Set-Up Clearance' ASCII('126') EOL
ELSE
' Q204=' CalcCP2FmSurf# ' ;2nd Set-Up Clearance' ASCII('126') EOL
END
' Q212=0' ' ;Decrement' ASCII('126') EOL
IF PeckChipBreaker?
' Q213=' NumFullPecks# ' ;Number of Breaks' ASCII('126') EOL
ELSE
' Q213=0' ' ;Number of Breaks' ASCII('126') EOL
END
' Q205=0' ' ;Min Pecking Depth' ASCII('126') EOL
IF Dwell?
' Q211=' Dwell# ' ;Dwell Time at Depth' ASCII('126') EOL
ELSE
' Q211=0' ' ;Dwell Time at Depth' ASCII('126') EOL
END
IF FIFO? OR Tap?
' Q208=' FeedEntry# ' ;Retraction Feed Rate' EOL
ELSE
' Q208=0' ' ;Retraction Feed Rate' EOL
END
ELSE
IF RigidTap?
SeqLab ' CYCL DEF 17.0 RIGID TAPPING' EOL
SeqLab ' CYCL DEF 17.1 SET UP ' CalcCP2FmSurf# EOL
SeqLab ' CYCL DEF 17.2 DEPTH ' CalcZFmSurf# EOL
SeqLab ' CYCL DEF 17.3 PITCH ' FeedTapIPR#('1') EOL
ELSE
IF Tap?
SeqLab ' CYCL DEF 2.0 TAPPING' EOL
SeqLab ' CYCL DEF 2.1 SET UP ' CalcCP2FmSurf# EOL
SeqLab ' CYCL DEF 2.2 DEPTH ' CalcZFmSurf# EOL
SeqLab ' CYCL DEF 2.3 DWELL 0' EOL
SeqLab ' CYCL DEF 2.4' FeedEnt EOL
ELSE
SeqLab ' CYCL DEF 1.0 PECKING' EOL
SeqLab ' CYCL DEF 1.1 SET UP ' CalcCP2FmSurf# EOL
SeqLab ' CYCL DEF 1.2 DEPTH ' CalcZFmSurf# EOL
SeqLab ' CYCL DEF 1.3 PECKG '
IF Peck?
Peck#
ELSE
CalcZFmSurf#
END
EOL
SeqLab ' CYCL DEF 1.4 DWELL '
IF Dwell?
Dwell#
ELSE
'0'
END
EOL
SeqLab ' CYCL DEF 1.5' FeedEnt EOL
END
END
END
IF CallMasterOp?
SeqLab ' CALL LBL ' CallMasterNum# EOL
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
NewMasterTag
SeqLab ' CALL LBL ' Tag# EOL
StartSub
ToolPath
SeqLab ' LBL 0' EOL
CloseSub
ELSE
ToolPath
END
END
SetDrillEndOpZ
Rapid {no output}
SeqLab DoL ZCP3 RapidFC EOL
IF Repeats?
FinishSubG92
END
END
END
RETURN

ProgStart:
InitProg
TagInit
ReverseXZArcs
InitWFONum
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('5000')
SaveProgNum2
SetProgNum('10')
SetFlagF('1') { Milling ZShiftOnly SepSubs }
SetFlagF('2') { CRCOn }
SetFlagF('3') { End of program }
SetFlagF('4') { WFOStuff }
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
' NewWFO(56), NWFO(56) -' EOL
' The Work Fixture Offset # you specify will be used for all following operations.' EOL
' Do not use with the Post multiple part work fixture offset option.' EOL
' 4thAxisCW(12.5), 4ACW(12.5) -' EOL
' generates a + A move of the value you specify' EOL
' 4thAxisCCW(22.5), 4ACCW(22.5) -' EOL
' generates a - A move of the value you specify' EOL
' 5thAxisCW(30), 5ACW(30) -' EOL
' generates a + B move of the value you specify' EOL
' 5thAxisCCW(22.5), 5ACCW(22.5) -' EOL
' generates a - B move of the value you specify' EOL
END
RETURN

BeginProgram:
RestoreScale
SeqLab ' BEGIN PGM ' ProgramName$ ' MILLIMETER' EOL
IF ToolChangeAtHome?
SetHome
END
SeqLab ' BLK FORM 0.1 Z X' XStockMin# ' Y' YStockMin# ' Z' ZStockMin# EOL
SeqLab ' BLK FORM 0.2 X' XStockMax# ' Y' YStockMax# ' Z' ZStockMax# EOL
IF UseComments?
IF ProgramNameComment?
SeqLab ' ; PROGRAM: ' ProgramName$ EOL
END
IF ProgramComment?
SeqLab ' ; ' ProgramComment$ EOL
END
IF FormatNameComment?
SeqLab ' ; FORMAT: ' FormatName$ EOL
END
IF TimeComment?
SeqLab ' ; ' Date$ ' AT ' Time$ EOL
END
IF MovesComment?
SeqLab ' ; OUTPUT IN ABSOLUTE MILLIMETERS' EOL
END
IF PartsComment?
SeqLab ' ; PARTS PROGRAMMED: ' Parts# EOL
END
IF StartToolComment?
SeqLab ' ; FIRST TOOL NOT IN SPINDLE' EOL
END
END
OpenSub
RETURN

BeginTool1:
SetAbs
Plane {no output}
Rapid
SeqLab ' TOOL CALL ' Tool# ' Z ' Speed EOL
DoOpComments
SeqLab ' TOOL DEF ' SetNextToolOp Tool# EOL
SeqLab ' M79' EOL
RETURN

BeginTool2:
DoPostScript
WFOStuff
CheckPass
SeqLab DoL StrtPos CSAngleA CSAngleB CRCOff RapidF SpinOn EOL
RETURN

BeginTool2ecp:
CheckPass
SeqLab DoL StrtPos CSAngleA CSAngleB CRCOff RapidF EOL
RETURN

BeginTool3:
SeqLab DoL ZCP1 RapidFC CoolOn EOL
RETURN

SameTool:
DoEndOpPS
IF LAST ProgStop?
SeqLab CoolOff EOL
SeqLab SpinOff EOL
SeqLab DoL ' Z0' CRCOff RapidFC ' M92' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLab CoolOff EOL
END
END
IF LAST ProgStop?
SeqLab ' M00' EOL
END

{Start new Operation}

SeqLab ' TOOL CALL ' Tool# ' Z ' Speed EOL
DoOpComments
DoPostScript
WFOStuff
CheckPass
SetAbs
Plane {no output}
SeqLab DoL StrtPos CSAngleA CSAngleB CRCOff RapidF SpinOn EOL
IF LAST ProgStop?
SeqLab DoL ZCP1 RapidFC CoolOn EOL
ELSE
IF NOT CoolOff? AND LAST CoolOff?
SeqLab CoolOn EOL
END
END
RETURN

EndTool1:
DoEndOpPS
SeqLab DoL ' Z0' CRCOff RapidFC ' M92' EOL
RETURN

EndTool2:
SeqLab CoolOff EOL
SeqLab SpinOff EOL
IF Flag?('3') { end of program? }
IF FIRST ToolChangeAtHome?
SeqLab DoL FirstHome RapidFC EOL
END
IF ProgStop?
SeqLab ' M00' EOL
END
ELSE { tool change }
IF ToolChangeAtHome?
SeqLab DoL Home RapidFC EOL
END
IF LAST ProgStop?
SeqLab ' M00' EOL
END
END
RETURN

EndProgram:
SeqLab EOP EOL
CloseSub
Post2
IF UseComments?
SetScale('1') {restore scale for comments}
IF FileBytesComment?
SeqLab ' ; FILE LENGTH: ' FileBytes# ' CHARACTERS' EOL
END
IF FileFeetComment?
SeqLab ' ; FILE LENGTH: ' FileFeet# ' FEET' EOL
END
IF FileMetersComment?
SeqLab ' ; FILE LENGTH: ' FileMeters# ' METERS' EOL
END
END
SeqLab ' END PGM ' ProgramName$ ' INCH' EOL
Close
Retag
RETURN

MPallTools1P: {Multiple Parts, All Tools 1 Part}
EachOp {Start of post processing}
IF EquallySpacedOffsets?
SetFlag('4')
END
IF FirstOperation?
BeginProgram
OpenMP
BeginTool1
BeginTool2
BeginTool3
ELSE
IF NewTool?
EndTool1
EndTool2
BeginTool1
BeginTool2
BeginTool3
ELSE {implied SameTool?}
SameTool
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
SetFlag('3')
EndTool1
EndTool2
CloseMP
EndProgram
RETURN

MP1ToollAllPfu: {Multiple Parts, 1 Tool all Parts}
EachOp {Start of post processing}
IF EquallySpacedOffsets?
SetFlag('4')
END
IF FirstOperation?
BeginProgram
BeginTool1
OpenMP
BeginTool2
BeginTool3
ELSE
IF NewTool?
EndTool1
CloseMP
EndTool2
BeginTool1
OpenMP
BeginTool2
BeginTool3
ELSE {implied SameTool?}
SameTool
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
SetFlag('3')
EndTool1
CloseMP
EndTool2
EndProgram
RETURN

MP1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane}
EachOp {Start of post processing}
SetFlag('4')
IF FirstOperation?
BeginProgram
BeginTool1
BeginTool2
BeginTool3
OpenMP
BeginTool2ecp {need StrtPos in Sub}
ELSE
IF NewTool?
CloseMP
EndTool1
EndTool2
BeginTool1
BeginTool2
BeginTool3
OpenMP
BeginTool2ecp {need StrtPos in Sub}
ELSE {implied SameTool?}
SameTool
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
SetFlag('3')
CloseMP {End of program}
EndTool1
EndTool2
EndProgram
RETURN

NoMPs: {no multiple parts}
EachOp {Start of post processing}
SetFlag('4') { WFOStuff }
IF FirstOperation?
BeginProgram
BeginTool1
BeginTool2
BeginTool3
ELSE
IF NewTool?
EndTool1
EndTool2
BeginTool1
BeginTool2
BeginTool3
ELSE {implied SameTool?}
SameTool
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
SetFlag('3')
EndTool1
EndTool2
EndProgram
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