Heid TNC 426B [JBM] MT22 15 4m


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

{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}

{4/1/98
Copied: Heid TNC 426 [RT] MV46.15
Created: Heid TNC 426 [RT] MV46.15m
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}

{28 Oct98
Original: Heid TNC 426 [RT] MV46.15m
Created: Heid TNC 426B [JBM] MT22.15m
Control: Heidenhain 426B
For: JB Maskinteknik
Changes made per: Kim Vind Andersen
NEW POST : FIRST DRAFT
Added Post Header Comment at the top of Prog.
Added ProgramName to Header Comments
Deleted WFOStuff from FirstOperation, NewTool and SameTool
Added ToolChanging and Pre-Tooling
Added Custom Drill Cycles for 426B Control and Formatting for Drill Parameters
Moved Coolant On to before the first Z-move.
Charles Winston}

{6Nov98
Original: Heid TNC 426B [JBM] MT22.15m
Created: Heid TNC 426B [JBM] MT22.15.1m
Control: Heidenhain 426B
For: JB Maskinteknik
Changes made per: Kim Vind Andersen
Changed CalcZFmSurf# from FORMAT#11 to FORMAT#6 in Prog Numeric Format Definitions
Changed EOL from ASCII 42 13 0 0 to ASCI 13 0 0 0 in MachSpec
Added a 'G85' RigidTap Cycle
Changed PeckChipBreaker? Boolean to Peck?, Q202 Drill parameter should be Peck# value not total peck depth.
Removed Mul# Num#('-1') from the Q201 Drill Parameter. CalcZFmSurf# is already a negative value.
Removed Mul# Num#('-1') from the Q202 Drill Parameter for Non-Pecking cycles.
Replaced GetCoolOn with CoolOn in Opguts for both Milling and Drilling.
Moved SpinOn from FirstOp2 to FirstOp3 and from NewToolOp4 to NewToolOp5.
Charles Winston}

{19Nov98
Original: Heid TNC 426B [JBM] MT22.15.1m
Created: Heid TNC 426B [JBM] MT22.15.2m
Control: Heidenhain 426B
For: JB Maskinteknik
Changes made per: Kim Vind Andersen
Deleted MoveSXYC 'M99' from Toolpath Sub when RetractToCP1 is False and LastFeat is True.
Deleted P04 parameter from Tap Cycle and changed P03 to Pitch.
Deleted call to First Tool in FirstOp1. ( First Tool in the Spindle )
Saved the First Tool Number in FirstOP1. Uses Num#10.
Changed Tool Call from ' ' EOR ' ' Tool# ' H' to ' ' EOR ' ' Tool# '.H' ( i.e. added '.' before H )
Deleted saftey position Rapid AbsOrInc ' X' XStockMax# in End2
Added Untool in End2
Charles Winston}

{1Dec98
Original: Heid TNC 426B [JBM] MT22.15.2m
Created: Heid TNC 426B [JBM] MT22.15.3m
Control: Heidenhain 426B
For: JB Maskinteknik
Changes made per: Kim Vind Andersen
Added Format#11 in Prog Numeric Format Definitions and added Formatting for Abs#
Changed Q202 Drill Cycle in DrillCyc2 Sub. CalcZFmSurf# need to be output without any sign.
Changed SetMaxFeed from 1000 to 9999 for Metric Parts and 100 to 393.3 for inch parts in ProgStart.
Moved ZCP1 SpinOn to a seperate line in FirstOp3. Can t have XY and Z moves on the same line here.
Reinstated the ToolPath Booleans deleted per customers request in MT22.15.2m
Charles Winston}

{11Dec98
Original: Heid TNC 426B [JBM] MT22.15.3m
Created: Heid TNC 426B [JBM] MT22.15.4m
Control: Heidenhain 426B
For: JB Maskinteknik
Changes made per: Kim Vind Andersen
Moved ZCP1 to a seperate line in NewToolOp5 and SameToolOp3
Added Booleans in ToolPath to suppress M98/M99 output when only a single hole is drilled/tapped.
Charles Winston}

{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'
#9 = '###0^' {actualy ###^0}
#10 = '###0.###;0'
#11 = '+###0.0##;0'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ToolDiameter#,4)
FORMAT(TrackZNO#,4)
FORMAT(Recall#,5)
FORMAT(FeedEntry#,5)
FORMAT(Program2#,5)
FORMAT(Program#,5)
FORMAT(CallMasterNum#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(NumFullPecks#,5)
FORMAT(FeedTapIPR#,6)
FORMAT(Dwell#,6)
FORMAT(Peck#,6)
FORMAT(SUB#,6)
FORMAT(MUL#,6)
FORMAT(CalcZFmSurf#,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(CalcZSurf#,7)
FORMAT(CalcCP2FmSurf#,10)
FORMAT(Abs#,11)

{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

WFONum:
' G53 P01 ' NewWFO#
RETURN

WFOStuff:
IF NewWFO?
IF MultipleParts? AND WorkFixtureOffsets?
EOL
'*** WARNING *** DO NOT USE NEWWFO() WITH MULTIPLE PARTS AND WORK FIXTURE OFFSETS' EOL
ELSE
WFONum
END
ELSE
IF Flag?('2')
IF NOT SameTool?
IF MultipleParts?
IF WorkFixtureOffsets?
' G53 P01 0' { WFO1 }
ELSE
WFONum
END
ELSE
WFONum
END
END
END
END
SetFlagF('2')
RETURN

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

PSInit:
NewWFOF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN

PSStuff:
IF FourthCW?
FORMAT(FourthDegree#,2)
Seq ' A' FourthDegree# EOL
FourthCWF
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
Seq ' A' FourthDegree# EOL
FourthCCWF
END
IF FifthCW?
FORMAT(FifthDegree#,2)
Seq ' B' FifthDegree# EOL
FifthCWF
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
Seq ' B' FifthDegree# EOL
FifthCCWF
END
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

OpenMP:
NewProg
IF WorkFixtureOffsets?
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('5') { Suppress Redundant WFO for MP-OTAP-ECP }
END
NewWFO
Save# Num#('1') Num#('0') { NewWFO }
EachWFO {simple eachPart}
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 }
IncWFO
Save# Num#('1') ADD# Recall# Num#('1') Num#('1') { IncWFO }
NextWFO {simple NextPart}
StartSub
ELSE
Save# Num#('1') Program#
Seq ' G98 L' Program# EOL { SubID }
DoSubComment
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('2') { WFOStuff }
END
END
RETURN

CloseMP:
IF WorkFixtureOffsets?
Seq ' G98 L0' EOL { EndSub }
CloseSub
Seq ' G53 P01 0' EOL { WFO1 }
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

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 FirstFeat? AND LastFeat?
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
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

DrillCyc1:
' Q200=' CalcCP2FmSurf#
' Q201=' CalcZFmSurf#
' Q206=' FeedEntry#
RETURN

DrillCyc2:
IF Peck?
' Q202=' Peck#
ELSE
' Q202=' Abs# CalcZFmSurf#
END
RETURN

DrillCyc3:
' Q203=' CalcZSurf#
IF RetractToCP1?
' Q204=' SUB# ClearancePlane1# CalcZSurf#
ELSE
' Q204=' CalcCP2FmSurf#
END
RETURN

DrillCyc4:
IF Dwell?
' Q211=' Dwell#
ELSE
' Q211=0'
END
IF FIFO? OR Tap?
' Q208=' FeedEntry#
ELSE
' Q208=0'
END
RETURN

DrillCyc5:
' Q212=0'
' Q213=9999'
' Q205=0'
IF Dwell?
' Q211=' Dwell#
ELSE
' Q211=0'
END
' Q208=9999'
RETURN

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

OpGuts:
IF Milling?
Seq ZCP2C EOL
Seq CoolOn 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
GetCycle
IF Tap?
Seq DrillCP EOL
IF RigidTap?
Seq ' G85'
ELSE
Seq Cycle
END
FORMAT(CalcCP2FmSurf#,7)
' P01' CalcCP2FmSurf#
FORMAT(CalcCP2FmSurf#,10)
' P02' CalcZFmSurf#
' P03' FeedTapIPR# ('1') EOL
ELSE
Seq
IF FIRO?
' G200' DrillCyc1 DrillCyc2 ' Q210=0' DrillCyc3
ELSE
IF FIFO?
' G201' DrillCyc1 DrillCyc4 DrillCyc3
ELSE
IF Peck?
IF PeckFullRetract?
' G200' DrillCyc1 DrillCyc2 ' Q210=0' DrillCyc3
ELSE
' G203' DrillCyc1 DrillCyc2 ' Q210=0' DrillCyc3 DrillCyc5
END
END
END
END
EOL
END
Seq CoolOn EOL
Seq ' M99' 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

ProgStart:
InitProg
{UseCommaForDecPt}
ReverseXZArcs
InitWFONum
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('10000')
IF Metric?
SetMaxFeed('9999')
ELSE
SetMaxFeed('393.3')
END
SaveProgNum2
SetProgNum('1')
Save# Num#('1') Num#('0') { NewWFO# }
SetFlagF('1') { Milling ZShiftOnly SepSubs }
SetFlagF('2') { WFOStuff }
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
' NewWFO(56), NWFO(56) -' EOL
' The Work Fixture Offset # you specify will be used for all following operations.' EOL
' Do not use with the ncPost multiple part 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

InitOp:
EOR ' ' ProgramName$ {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
Seq OpToolID Plane Speed {ToolChng} EOL
Save# Num#('10') Tool#
IF NOT LastTool?
Seq ' G51' PreTool EOL
END
RETURN

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

FirstOp3:
CheckPass
Seq Rapid AbsOrInc CRCOff StrtPos EOL
Seq ZCP1 SpinOn EOL
RETURN

NewToolOp1:
RETURN

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

NewToolOp3: {Start new Operation}
DoOpComments
DoPostScript
Seq ' ' EOR ' ' Tool# '.H' EOL
Seq OpToolID Plane Speed {ToolChng} EOL
Seq ' G51' PreTool EOL
RETURN

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

NewToolOp5:
CheckPass
Seq Rapid AbsOrInc CRCOff StrtPos EOL
Seq ZCP1 SpinOn EOL
RETURN

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

SameToolOp2: {Start new Operation}
DoOpComments
DoPostScript
CheckPass
RETURN

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

End1:
RETURN

End2:
DoEndOpPS
IF NOT FirstTool?
Seq ' ' EOR ' ' Recall# Num#('10') '.H' EOL
END
IF ProgStop?
Seq ' M00' EOL
END
RETURN

End3:
Seq EOP EOL
CloseSub
Post2 {organize Subs into one program}
'N999999 ' EOR ' ' ProgramName$ {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}
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
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
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
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 155 [ESS] M980 15
Heid TNC 151 BP M139 15
Heid TNC 426 [RT] CV46 15 1m
Heid TNC 407 [CM] MX19 15
Heid TNC 426 [RT] CV46 15 1
Heid TNC 151 BP M139 15 1m
Heid TNC 2500 [FMI] M815 15
Heid TNC 407 [CM] DX19 15 5m
Heid TNC 155 [JP] MX68 89 4m
Heid TNC 151 BP D139 15 1m
Heid TNC 426 [RT] MV46 15
Heid TNC 407 [CM] DX19 15 5
Heid TNC 426 [RT] MV46 15m
Heid TNC 425 [NPP] MX02 89m
Heid TNC 351B MD M989 89 5
Heid TNC 151 155 [BS] M891 81 4
Heid TNC 151B [FE] MX96 89

więcej podobnych podstron