Heid TNC 426 [RT] CV46 15 1m


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

{1/9/96
Copied: Heid TNC 155 [HM] M654.81.3m
Created: Heid TNC 415 [ABB] A022.81.3m
For: Fructus/ABB Plast
Machine:
Control: Heidenhain TNC 415B
Versions: ncCad 4.33.01/ncCAM 4.33.01/ncPost 4.33.08/Catalyst v2.28.08/Compost 4.21.34/1.0a
Changes made per Mikael Bagge of Fructus, faxes, sample part and output file.
This processor is a G-Code Heidenhain and resembles Fanuc control code.
Updated for Catalyst v2.20 per Fanuc 6M M001.85.02 Format.
Converted to 4-Axis per Fanuc 6M A001.85.02.
Numerous changes made per customer requests, including:
Modified coordinate decimal formats.
Changed basic #0.### part to #0.0##.
Deleted TLNum# at Prog Numeric Format Definitions.
Deleted DIV# at Prog Numeric Format Definitions.
Deleted ToolLength# at Prog Numeric Format Definitions.
Deleted TLLength# at Prog Numeric Format Definitions.
Added StartPosX# at Prog Numeric Format Definitions.
Added CalcZFmSurf# at Prog Numeric Format Definitions.
Added special subs to compensate Z Axis value.
For Radial Workgroups, Z value is subtracted from ZStockMax#.
Some LoadFeat for testing conditional moves.
All subs contain TrackZNO# for correct register updating.
For Flat Workgroups, no compensation is output.
Modified ToolPath PointFeat Drilling.
Post outputs move to Retract Plane between each hole for all Drilling Operations.
Added M99, Cycle Call Code to ZRetract and MoveXYC blocks.
Deleted SetUpStuff sub.
Deleted EachTool/NextTool sub.
Moved remaining contents to FirstOperation.
Added UseCommaForDecPt at setup and initializations.
Added SetLineStrtChr('/') for two block output at FirstOperation.
Added G51, PreTool, command at FirstOperation, NewTool and end of Prog.
Deleted G54 command at FirstOperation, NewTool, SameTool and end of Prog.
Changed Home command to ' X' XStockMax#, safety position, at FirstOperation, NewTool and end of
Prog.
Moved ZCP1 to StartPos block at FirstOperation, NewTool and SameTool.
Modified P02 parameter at IF Drilling.
Modified P03 parameter at IF Drilling.
Deleted literal XYZ Positioning moves at end of Prog.
Changed literal N9999 to N99999 at end of Prog.
DWB}

{5/20/96
Modified: Heid TNC 415 [ABB] A022.81.3m
Created: Heid TNC 415 [ABB] A022.81.4m
For: Fructus/ABB Plast
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 Mikael Bagge of Fructus, faxes, sample part and output file.
Added TrackZNO# to FORMAT#4 at Prog Numeric Format Definitions.
Added CallMasterNum# to FORMAT#4 at Prog Numeric Format Definitions.
Changed Program# from FORMAT#5, '#######0' to FORMAT#4, '###0.0##;0'.
Deleted support of variable Drill Depths at ToolPath PointFeat.
Deleted Rapid AbsOrInc ' X' XStockMax# block at FirstOperation.
Added ' G51' PreTool at FirstOperation and NewTool.
Deleted ' G51' OpToolID at NewTool.
Deleted Rapid ' X' XStockMax# block at NewTool.
Deleted SubCall CallLabB CallMasterNum# at IF Drilling.
DWB}

{5/21/96
Copied: Heid TNC 415 [ABB] A022.81.4m
Created: Heid TNC 415 [ABB] M054.81.4m
For: Fructus/ABB Plast
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 Mikael Bagge of Fructus, faxes, sample part and output file.
Converted to Version 4.2 per Fanuc 6M M001.81.2g Format.
DWB}

{7/2/96
Modified: Heid TNC 415 [ABB] M054.81.4m
Created: Heid TNC 415 [ABB] M054.81.5m
For: Fructus/ABB Plast
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 Mikael Bagge of Fructus, faxes, sample part and output file.
Changed Program# back from FORMAT#4, '###0.0##;0' to FORMAT#5, '#######0'.
Added literal ',0' for Loops at all occurances of SubCall blocks.
Deleted UnTool ToolChng at end of Prog.
DWB}

{12/17/96
Updated & Modified: Heid TNC 415 [ABB] M054.81.5m
Created: Heid TNC 415 [ABB] M054.81.6m
For: Fructus/ABB Plast
Versions: ncCad 4.33.02/ncCAM 4.33.01/ncPost 4.33.10/Compost 4.21.37/v1.0b3
Changes made per Mikael Bagge of Fructus, faxes, sample part and output file.
Added support of RetractToCP1 for Canned Drill Cycles at ToolPath PointFeat.
Updated for Catalyst v3.20C per Fanuc 6M M001.89a Format
Deleted version comments.
Changed CallMasterNum# to FORMAT#5 at Prog Numeric Format Definitions.
Added ',0' for CallMasterNum# at IF Drilling.
Moved contents of FormatLine back to ToolPath LineFeat.
Added SetMaxFeed(100) for English VNC files.
Added Speed block for MP-OTAP-FU condition at FirstOperation and NewTool.
Added Speed SpinOn for MP-OTAP-ECP condition at FirstOperation and NewTool.
NOTE: Commented out SetSRXYtoEP at ZonlyRepAutoCycle.
Allows easy modification to support at future date.
DWB}

{12/17/96
Copied: Heid TNC 415 [ABB] M054.81.6m
Created: Heid TNC 415 [ABB] M054.89m
For: Fructus/ABB Plast
Versions: Catalyst v3.23C/Compost 4.21.37/v1.0b1
Changes made per Mikael Bagge of Fructus, faxes, sample part and output file.
Uncommented support for SetSRXYtoEP at ZonlyRepAutoCycle.
DWB}

{09/22/97
Copied: Heid TNC 415 [ABB] M054.89m
Created: Heid TNC 426 M054.89.2
For: Rider Tool
Changed to inch format, made comments ; instead of ()

10/31/97 various format changes as per Troy Murray
Changed literal looping from L2,0 to L2.0 (comma to decimal)
drilling cycle repeats changed M98 to M89
using ProgramComment$ to insert name of program instead of Program2#
re-formatted Drilling Cycles. Deleted all ToolChg's.
Needs sequence #'s on every line except 1st and last changed all SeqC to Seq

CAP}

{3/31/98
Updated: Heid TNC 426 M054.89.2
Created: Heid TNC 426 [RT] MV46.15
For: Elliott Matsuura Canada/Rider Tool
Versions: Catalyst v4.23.13(mac)/ComPost2 1.1b3
Changes made per Clive Plummer of Elliott Matsuura Canada.
Customer requested C-Style version with WorkFixtureOffsets.
Renamed Post Processor.
Updated for Catalyst v3.35C per Fanuc 6M M001.15 Format.
Added WorkFixtureOffsets support.
DWB}

{3/31/98
Copied: Heid TNC 426 [RT] MV46.15
Created: Heid TNC 426 [RT] CV46.15
For: Elliott Matsuura Canada/Rider Tool
Versions: Catalyst v4.23.13(mac)/ComPost2 1.1b3
Changes made per Clive Plummer of Elliott Matsuura Canada.
Updated for Catalyst v3.35C per Fanuc 6M (PW) C001.15 Format.
DWB}

{4/2/98
Modified: Heid TNC 426 [RT] MV46.15
Created: Heid TNC 426 [RT] MV46.15.1
For: Elliott Matsuura Canada/Rider Tool
Versions: Catalyst v4.23.13(mac)/ComPost2 1.1b3
Changes made per Clive Plummer of Elliott Matsuura Canada.
Changed G52 to G54.
DWB}

{4/2/98
Copied: Heid TNC 426 [RT] CV46.15.1
Created: Heid TNC 426 [RT] CV46.15.1m
For: Elliott Matsuura Canada/Rider Tool
Versions: Catalyst v4.23.13(mac)/ComPost2 1.1b3
Changes made per Pete Jackson.
Created Metric version.
Changed Compost General Default Formats.
Changed Addresses I, J, K, X, Y and Z from ą####0.0###;+0 to ą####0.0##;+0
Changed RestoreScale sub.
Changed IF Metric? to IF NOT Metric?
Changed SetScale argument from .03937007874 to 25.4
Switched English and Metric words in commented stuff.
Changed literal INCHES to MILLIMETERS at FirstOperation ProgComments.
Changed literal G70 [ Inch Mode ] to G71 [ Metric Mode ] at InitOp and End3.
DWB}

{Prog Numeric Format Definitions ****}

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(CSOffsetA#,3)
FORMAT(CSOffsetB#,3)
FORMAT(ToolDiameter#,4)
FORMAT(CSOffsetX#,4)
FORMAT(CSOffsetY#,4)
FORMAT(CSOffsetZ#,4)
FORMAT(TrackZNO#,4)
FORMAT(Recall#,5)
FORMAT(ADD#,5)
FORMAT(CS#,5)
FORMAT(FeedEntry#,5)
FORMAT(Program2#,5)
FORMAT(Program#,5)
FORMAT(CallMasterNum#,5)
FORMAT(CSSubID#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
FORMAT(XStockMin#,7)
FORMAT(XStockMax#,7)
FORMAT(YStockMin#,7)
FORMAT(YStockMax#,7)
FORMAT(ZStockMin#,7)
FORMAT(ZStockMax#,7)
FORMAT(CurOriginPosZ#,7)
FORMAT(StartPosX#,7)
FORMAT(CalcCP2FmSurf#,7)
FORMAT(CalcZFmSurf#,7)
FORMAT(SUB#,8)
FORMAT(Peck#,8)

{Prog Subroutines ****}

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

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

CSWFO:
' G53 P01 ' ADD# CSPartNum# Num#('-1')
RETURN

WFO:
' G53 P01 ' ADD# PartNum# Num#('-1')
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?
Seq ' G54 X' CSOffsetX# ' Y' CSOffsetY# ' Z' CSOffsetZ# EOL
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?
Seq ' ; SUB NUMBER: ' Program# EOL
END
RETURN

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

DoCSWFOComment:
IF AAxisAvail? OR BAxisAvail?
IF FirstOperation? OR NewTool? OR ChangeCS?
Seq ' ;' CSWFO ' = X' CSOffsetX# ' Y' CSOffsetY# ' Z' CSOffsetZ# 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?
Seq ' ; OPERATION ' Operation# ': ' OperationType$ EOL
END
IF OperationComment?
Seq ' ; ' OperationComment$ EOL
END
IF WorkGroupComment?
Seq ' ; ' WorkGroupComment$ EOL
END
IF ToolTypeComment?
Seq ' ; TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ EOL
END
IF ToolComment?
Seq ' ; ' ToolComment$ EOL
END
RestoreScale
END
CSComments
RETURN

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

CSAngleAC:
IF AChange?
CSAngleA
END
RETURN

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

CSAngleBC:
IF BChange?
CSAngleB
END
RETURN

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

PSStuff:
RETURN

DoPostScript:
PSInit
EachPS
Seq PostScript EOL
PSStuff
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
Seq EndOpPS EOL
PSStuff
NextPS
RETURN

EntryMove:
IF FeedEntry?
Seq Feed ZIn FeedEnt EOL
ELSE
Seq RapidC ZIn EOL
END
RETURN

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

FinishSub1: {part 1}
Seq CRCOffC
IF NOT FeedConnect?
IF AutoCycle?
ZCP3C
ELSE
IF FIFO?
FeedC ZCP3C FeedEntC
ELSE
RapidC ZCP3C
END
END
END
EOL
RETURN

FinishSubG92: {part 2}
Seq Preset ShiftRC EOL
Seq ' G98 L0' EOL { EndSub }
CloseSub
Seq Preset UnshftRC EOL
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
Seq ' G53 P01 ' Recall# Num#('1') EOL { SetWFO }
END
Seq ' L' Program# '.0' EOL { SubCall CallLab }
RETURN

OpenMP:
NewProg
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
Save# Num#('1') Num#('0') { NewWFO }
EachWFO {simple eachPart}
DoCSG52Ops
IncWFO
Save# Num#('1') ADD# Recall# Num#('1') Num#('1') { IncWFO }
NextWFO {simple NextPart}
DecWFO
ELSE
LastWFO
Save# Num#('1') SUB# Parts# Num#('1') { LastWFO }
EachWFO {simple eachPart}
DoCSG52Ops
DecWFO
Save# Num#('1') SUB# Recall# Num#('1') Num#('1') { DecWFO }
NextPrevWFO {simple NextPart}
IncWFO
END
IF Flag?('4')
ToggleIncDecWFO
END
StartSub
END
ELSE
Save# Num#('1') Program#
Seq ' G98 L' Program# EOL { SubID }
DoSubComment
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('2') { WFOStuff }
END
END
RETURN

DoCSWFOOps:
EachCSOp
DoCSComment
DoCSWFOComment
IF Flag?('5')
SetFlagF('5') { Suppress Redundant WFO for MP-OTAP-ECP }
ELSE
Seq CSWFO EOL
END
Seq ' L' CSSubID# '.0' EOL { SubCall CallLab }
NextCSOp
RETURN

CloseMP:
IF WorkFixtureOffsets?
Seq ' G98 L0' EOL { EndSub }
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
Seq ' G98 L0' EOL { EndSub }
EachPart
IF NOT FirstPart?
Seq ' G54' AbsOrInc
IF AllToolsOnePart?
FirstHome
ELSE
LAST Home
END
IF NotEqual? PartShiftZ# Num#('0')
' Z' CurOriginPosZ#
END
' L' Recall# Num#('1') EOL { SubCall CallLab }
END
NextPart
END
RETURN

SubCSMP:
IF WFOCS?
IF ChangeCS?
Seq ' G98 L0' EOL { EndSub }
CloseSub
NewProg
StartSub
SaveCSProg
END
ClearCSOffset
END
RETURN

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

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

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

FormatArc:
DoAbsOrInc
ArcIJ
IF ArcCW?
CWArc
ELSE
CCWArc
END
MoveXY MoveZC
RETURN

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

ckCRCNum:
{ Not Supported }
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
Seq MoveSXYC EOL
Seq ' L' Program# '.0' EOL { SubCall CallLab }
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
IF RetractToCP1?
IF LAST FirstFeat?
Seq Rapid MoveSXYC ' M99' EOL
ELSE
IF NOT FirstFeat?
Seq Rapid ZCP1 EOL
Seq Rapid MoveSXYC ' M99' EOL
END
END
ELSE
IF LAST FirstFeat? AND NOT LastFeat?
Seq Rapid MoveSXYC ' M89' EOL
ELSE
IF LastFeat?
Seq Rapid MoveSXYC ' M99' EOL
ELSE
IF NOT FirstFeat?
Seq Rapid MoveSXYC EOL
END
END
END
END
TrackZNO# SPZ#
END
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
Seq DoAbsOrInc ckCRC RapidC MoveXYZC ckCRCNum EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
IF Decelerate?
IF RoomToDecel?
DecelMove1
Seq DoAbsOrInc ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL
DecelMove2
END
Seq DoAbsOrInc ckCRC FeedC MoveXYZC DecelFeed ckCRCNum EOL
ELSE
Seq DoAbsOrInc ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL
END
END
ELSE
IF ArcFeat?
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
Seq FormatArc ArcFeedC EOL
DecelMove2
END
Seq FormatArc DecelFeed EOL
ELSE
Seq FormatArc ArcFeedC EOL
END
NEXTQuadrant
END
END
END
END
NEXTFeat
RestoreAbsOrInc
RETURN

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

AutoCycCutSub2: {part 2}
ToolPath
Seq AbsOrInc
IF Repeats? AND FeedConnect? AND ZshiftOnly?
ELSE
IF FIFO?
FeedC ZCP2 FeedEntC
ELSE
RapidC ZCP2
END
END
EOL
Seq ' 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
ToolPath
END
RETURN

G92Sub:
SubWarning
StdSub
Seq AbsOrInc Connect StrtPos EOL
Milling
FinishSub1
FinishSubG92
RETURN

ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
NewProg
EachCycle
SetSRXYtoEP
IF FeedConnect?
Feed
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
Seq IncValue StrtPosC EOL
AbsOrInc
END
END
Seq ZInPlusInc FeedEnt EOL
ELSE
IF NOT FirstCycle?
Rapid
IF SPXMove? OR SPYMove?
Seq IncValue StrtPosC EOL
AbsOrInc
END
IF FeedEntry?
Seq ZCP2PlusInc EOL
END
END
IF FeedEntry?
Seq Feed ZInPlusInc FeedEnt EOL
ELSE
IF FirstCycle?
Rapid
END
Seq RapidC ZInPlusInc EOL
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
Seq ' L' Program# '.0' EOL { SubCall CallLab }
NextCycle
SetStatusOn
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
IF FeedConnect? {there is no Z up in the sub}
IF FIFO?
Seq Feed ZCP2 FeedEnt EOL
ELSE
Seq Rapid ZCP2 EOL
END
END
Seq ' G98 L0' EOL { EndSub }
CloseSub
{Element shift, not pattern}
RETURN

ZonlyRep:
EachCycle
IF NOT FirstCycle?
Seq Connect StrtPos EOL
END
IF FeedConnect?
Seq FeedC ZInPlusInc FeedEnt EOL
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
Seq RapidC ZCP2PlusIncC EOL
END
Seq Feed ZInPlusInc FeedEnt EOL
ELSE
Seq RapidC ZInPlusInc EOL
END
END
Seq ' L' Program# '.0' EOL { SubCall CallLab }
NextCycle
StartSub
TrackZNO# FIRST SPZ#
ToolPath
FinishSub1
Seq ' G98 L0' EOL { EndSub }
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?
Seq ZCP2C 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}
ELSE {no repeat OPs}
Milling
END
IF AutoCycle?
Seq ZCP3C EOL
ELSE
IF FIFO?
Seq FeedC CRCOffC ZCP3C FeedEntC EOL
ELSE
Seq RapidC CRCOffC ZCP3C EOL
END
END
ELSE
IF Drilling?
IF Repeats?
NewProg
StdSub
Seq AbsOrInc Rapid StrtPos EOL
END
Seq DrillCP EOL
GetCycle
Seq Cycle
IF Tap?
' P01' CalcCP2FmSurf#
' P02' CalcZFmSurf#
' P03'
IF Dwell?
Dwell#
ELSE
'0'
END
' P04' FeedEntry#
ELSE
' P01' CalcCP2FmSurf#
' P02' CalcZFmSurf#
' P03'
IF Peck?
Peck#
ELSE
CalcZFmSurf#
END
' P04'
IF Dwell?
Dwell#
ELSE
'0'
END
' P05' FeedEntry#
END
EOL
IF CallMasterOp?
Seq ' L' CallMasterNum# '.0' EOL { SubCall CallLab }
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') {std sep sub Zreps in effect}
NewMasterProg
Seq ' L' Program# '.0' EOL { SubCall CallLab }
StartSub
ToolPath
Seq ' G98 L0' EOL { EndSub }
CloseSub
SetFlagF('1') {not std sep sub Zreps in effect}
ELSE
ToolPath
END
END
SetDrillEndOpZ
Seq Rapid ZCP3 EOL
IF Repeats?
FinishSubG92
END
END
END
RETURN

GetCoolOn:
IF CoolOff?
SpinOn
ELSE
' M13' { CoolOn and SpinOn }
END
RETURN

ProgStart:
InitProg
{UseCommaForDecPt}
ReverseXZArcs
InitWFONum
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('10000')
IF Metric?
SetMaxFeed('1000')
ELSE
SetMaxFeed('100')
END
SaveProgNum2
SetProgNum('1')
Save# Num#('1') Num#('0') { NewWFO# }
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 }
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
END

IF MultipleParts?
IF WorkFixtureOffsets?
IF LTEqual? MUL# Parts# NumOfCS# Num#('11')
SetWFOCS { use WFO for CS changes }
ELSE
IF UseComments?
'( Not enough Work Fixture Offsets to handle this part. )' EOL
'( Number of parts [ ' Parts# ' ] times CSs [ ' NumOfCS# ' ] )' EOL
'( exceeds the machine limit. Switching to G54 style output. )' EOL
END
END
END
ELSE
IF LTEqual? NumOfCS# Num#('11') {****}
SetWFOCS { use WFO for CS changes }
ELSE
IF UseComments?
'( Not enough Work Fixture Offsets to handle this part. )' EOL
'( Number of CSs [ ' NumOfCS# ' ] exceeds the machine limit. )' EOL
'( Switching to G54 style output. )' EOL
END
END
END
RETURN

InitOp:
EOR ' ' ProgramComment$ {Program2#} ' G71' EOL { Metric }
OpenSub
Seq ' G30' Plane ' X' XStockMin# ' Y' YStockMin# ' Z' ZStockMin# EOL
Seq ' G31' AbsValue ' X' XStockMax# ' Y' YStockMax# ' Z' ZStockMax# EOL
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
IF ProgramNameComment?
Seq ' ; PROGRAM: ' ProgramName$ EOL
END
IF ProgramComment?
Seq ' ; ' ProgramComment$ EOL
END
IF FormatNameComment?
Seq ' ; FORMAT: ' FormatName$ EOL
END
IF TimeComment?
Seq ' ; ' Date$ ' AT ' Time$ EOL
END
IF MovesComment?
Seq ' ; OUTPUT IN ' MoveType$ ' MILLIMETERS ' EOL
END
IF PartsComment?
Seq ' ; PARTS PROGRAMMED: ' Parts# EOL
END
IF StartToolComment?
Seq ' ; FIRST TOOL IN SPINDLE ' EOL
END
END
{OpenSub}
RestoreScale
RETURN

FirstOp1:
DoOpComments
DoPostScript
{SetLineStrtChr('/')}
{Seq ' G51' OpToolID EOL}
{SetLineStrtChr('')}
Seq OpToolID Plane Speed {ToolChng} EOL
Seq ' M51' EOL
RETURN

FirstOp2:
IF FullUp?
Seq Speed EOL
ELSE
Seq WFOStuff EOL
Seq Rapid AbsOrInc StrtPos Speed SpinOn EOL
END
RETURN

FirstOp3:
Seq WFOStuff EOL
G52Stuff
CheckPass
Seq Rapid AbsOrInc CRCOff StrtPos ZCP1 CSAngleA CSAngleB ' W0' GetCoolOn EOL
{IF NOT LastTool?
Seq ' G51' PreTool EOL
END}
RETURN

NewToolOp1:
RETURN

NewToolOp2:
DoEndOpPS
IF LAST ProgStop?
Seq ' M00' EOL
ELSE
Seq ProgStop EOL
END
RETURN

NewToolOp3: {Start new Operation}
DoOpComments
DoPostScript
Seq OpToolID Plane Speed {ToolChng} EOL
Seq ' M51' EOL
RETURN

NewToolOp4:
IF FullUp?
Seq Speed EOL
ELSE
Seq WFOStuff EOL
Seq Rapid AbsOrInc StrtPos Speed SpinOn EOL
END
RETURN

NewToolOp5:
Seq WFOStuff EOL
G52Stuff
CheckPass
Seq Rapid AbsOrInc CRCOffC StrtPos ZCP1 CSAngleA CSAngleB ' W0' GetCoolOn EOL
{Seq ' G51' PreTool EOL}
RETURN

SameToolOp1:
DoEndOpPS
IF CoolOff? AND LAST NOT CoolOff?
Seq CoolOff EOL
END
IF LAST ProgStop?
Seq ' M00' EOL
END
IF ChangeCS?
Seq Rapid ZCP1 EOL
END
RETURN

SameToolOp2: {Start new Operation}
DoOpComments
DoPostScript
CheckPass
RETURN

SameToolOp3: {Start new Operation}
Seq WFOStuff EOL
G52Stuff
IF LAST ProgStop?
Seq ToolOfst PlaneC SpeedC EOL
Seq Rapid CRCOff AbsOrInc StrtPos ZCP1 CSAngleA CSAngleB GetCoolOn EOL
ELSE
IF NewToolOffset? OR ChangeCS?
Seq ToolOfst PlaneC SpeedC EOL
Seq Rapid CRCOff AbsOrInc StrtPos CSAngleA CSAngleB ZCP1 GetCoolOn EOL
ELSE
Seq PlaneC SpeedC EOL
Seq RapidC CRCOffC StrtPos CSAngleA CSAngleB
IF LAST CoolOff? AND NOT CoolOff?
' M13'
END
EOL
END
END
RETURN

End1:
RETURN

End2:
DoEndOpPS
Seq Rapid AbsOrInc ' X' XStockMax# EOL { Safety Position }
IF NotEqual? Tool# FIRST Tool#
{Seq UnTool ToolChng EOL}
END
IF Equal? CSOffsetA# Num#('0') AND Equal? CSOffsetB# Num#('0')
ELSE
Seq
IF AAxisAvail?
CSAngleA
END
IF BAxisAvail?
CSAngleB
END
EOL
Seq Preset
IF AAxisAvail?
' A0'
END
IF BAxisAvail?
' B0'
END
EOL
END
IF ProgStop?
Seq ' M00' EOL
END
RETURN

End3:
Seq EOP EOL
CloseSub
Post2 {organize Subs into one program}
'N999999 ' EOR ' ' ProgramComment$ {Program2#} ' G71' EOL { Metric }
Close
IF UseComments?
SetScale('1') {restore scale for comments}
Reopen
IF FileBytesComment?
' ; FILE LENGTH: ' FileBytes# ' CHARACTERS ' EOL
END
IF FileFeetComment?
' ; FILE LENGTH: ' FileFeet# ' FEET ' EOL
END
IF FileMetersComment?
' ; FILE LENGTH: ' FileMeters# ' METERS ' EOL
END
Close
END
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
FirstOp2 {need StrtPos in Sub}
ELSE
IF NewTool?
CloseMP
NewToolOp1
NewToolOp2 {to tool change, CS problem}
NewToolOp3
{NewToolOp4}
NewToolOp5
OpenMP
NewToolOp4 {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:
Heid TNC 426 [RT] CV46 15 1
Heid TNC 426 [RT] MV46 15
Heid TNC 426 [RT] MV46 15m
Heid TNC 151 BP M139 15 1m
Heid TNC 151 BP D139 15 1m
Heid TNC 155 [ESS] M980 15
Heid TNC 155 [PB] M550 89 1m
Heid TNC 151 BP M139 15
Heid TNC 407 [CM] MX19 15
Heid TNC 2500 [FMI] M815 15
Heid TNC 407 [CM] DX19 15 5m
Heid TNC 426 Hermle V DZ17 12m 5
Heid TNC 426 Hermle V DZ17 12 5
Heid TNC 155 [KP] MV27 89 1m
Heid TNC 426 Hermle H CY85 12 1
Heid TNC 426 Hermle H CY85 12m 1
Heid TNC 426B [JBM] MT22 15 4m

więcej podobnych podstron