Heid TNC 155 Lagun TC MT19 89m


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

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

{2/11/93
Updated: Heid TNC 155 M281.81.2m
For: Fructus
Changes made per Mikael Bagge of Fructus.
Added Program2# to Format#5.
Added SaveProgNum2 to setup and initializations.
Changed ProgramName$ to Program# at FirstOperation.
Deleted literal 'Z' from 'BLK FORM 0.1' at FirstOperation.
Added 6 blocks of Tool Change sub at FirstOperation.
Added call to Tool Change sub at NewTool and end of Prog.
Deleted ToolChangeAtHome output at end of Prog.
Changed literal ' STOP M02' to ' L R F M02' at end of Prog.
Changed ProgramName$ to Program2# at end of Prog.
Added Flag(1) to output ArcFeat as LineFeat IF LTEqual? ArcR# Num#(.002mm) at ToolPath.
DWB}

{2/23/93
Updated: Heid TNC 155 [PB] M550.81.2m
For: Fructus
Changes made per Mikael Bagge of Fructus.
Deleted SpeedRPM# from FORMAT Definitions.
Added IF UseComments? at SubWarning.
Changed SetMaxRPM from 10000 to 3000 at setup and initializations.
Added SetProgNum('1') at setup and initializations.
Changed Program# to Program2# at FirstOperation.
Added literal 'Z' to 'BLK FORM 0.1' at FirstOperation.
This was deleted per Mikaels instructions of 2/11/93, he admitted his mistake.
Deleted literal 'R F' on block following CoolOff at FirstOperation.
Changed all occurances of TABLE(4001,SpeedRPM#,1) to Speed.
Deleted Table from Form Resources.
Added literal 'ETX', End of Transmission at end of Prog.
DWB}

{3/2/93
Updated: Heid TNC 155 [PB] M550.81.3m
For: Fructus
Changes made per Mikael Bagge of Fructus.
Changed IF LTEqual? ArcR# Num#('.002') to IF LessThan? ArcR# Num#('.02') at ToolPath ArcFeat.
Changed literal 'ETX' to ASCII('3') at end of Prog.
DWB}

{3/2/93
Updated: Heid TNC 155 [PB] M550.81.4m
For: Fructus
Changes made per Mikael Bagge of Fructus.
Changed FORMAT for ClearancePlane2# from Ä…####0.000 to Ä…*####0.000.
DWB}

{12/3/93
Modified: Heid TNC 155 [PB] M550.81.5m
To: Heid TNC 155 [PB] M550.81.6m
Fixed the RestoreScale function to work with both english and metric parts. Also removed
unneeded setscale commands and replaced them with math ( number ) commands.
Forced all drilling parameter values ( depth, clearance, peck, etc. ) to be
negative.
[cwh]}

{4/4/96
Updated: Heid TNC 155 [PB] M550.81.6m
For: Fructus/Pharmacia Biosensors
Versions: ncCad 4.33.02/ncCAM 4.33.01/ncPost 4.33.09/Catalyst v3.02.07/Compost 4.21.34.1/1.0a
Changes made per Mikael Bagge of Fructus.
Updated for Catalyst v3.0 per Fanuc 6M M001.89m Format.
This post was updated using Heid TNC 155 [EMC] M612.85m.
DWB}

{8/1/97
Updated: Heid TNC 155 [PB] M550.89m
Created: Heid TNC 155 [PB] M550.89.1m
For: Gibbs & Associates/Fructus/JihÅš Plast
Versions: Catalyst v3.35C/ComPost2 MSL 68K
Updated for Catalyst v3.35C per Fanuc 6M M001.89b Format.
DWB}

{8/6/97
Copied: Heid TNC 155 [PB] M550.89.1m
Created: Heid TNC 155 [JP] MX68.89m
For: Fructus/JihÅš Plast
Versions: Catalyst v3.35C/ComPost2 MSL 68K
Changes made per Mikael Bagge of Fructus, EMail and Letco_1.vnc
Mikael stated that this control does not have a Tool Register or Tool Changer.
Deleted DIV# from FORMAT#4 at Prog Numeric Format Definitions.
Changed ' R' DIV# TLDia# NUM#('2') to ' R+0.000' at FirstOperation.
Deleted ' TOOL CALL 0 Z S 0.000' at FirstOperation.
Deleted ' L R F' SpinOff at FirstOperation.
Deleted ' L R F' CoolOff at FirstOperation.
Deleted DoL ' X+0.000 Y+0.000 Z+0.000' XYZSpace DoR0 RF ' M92' at FirstOperation.
Added IF ToolChangeAtHome? condition at FirstOperation.
IF TRUE, Post will output DoL Home ' Z+200.000' XYZSpace DoR0 RF ' M00'.
IF FALSE, Post will output DoZL ' Z+0.000 ' ZSpace DoR0 RF ' M92'.
DWB}

{11/8/97
Modified: Heid TNC 155 [JP] MX68.89m
Created: Heid TNC 155 [JP] MX68.89.1m
For: Fructus/JihÅš Plast
Versions: Catalyst v4.21.03(mac)/ComPost2 MSL 68K
Changes made per Mikael Bagge of Fructus, EMail and Posttest.vnc
Customer requested conditional FeedRates.
Added Var(1) at setup and initializations.
Added Recall# to FORMAT#7 at Prog Numeric Format Definitions.
Added RapidF# to FORMAT#7 at Prog Numeric Format Definitions.
Added FeedContour# to FORMAT#7 at Prog Numeric Format Definitions.
Added ArcFeed# to FORMAT#7 at Prog Numeric Format Definitions.
Added DecelFeed# to FORMAT#7 at Prog Numeric Format Definitions.
Added clrFeed sub to force RapidF at ToolChng.
Stores Num#(0) to Var(1).
Added call to clrFeed sub at FirstOperation and NewTool.
Modified RF sub to test for conditional output of RapidFC.
Stores RapidF# to Var(1).
Added FE sub to test for conditional output of FeedEntC.
Stores FeedEntry# to Var(1).
Changed all FeedEnt commands to call FE sub.
Added FR sub to test for conditional output of FeedRateC.
Stores FeedContour# to Var(1).
Changed all FeedRate commands to call FR sub.
Added AF sub to test for conditional output of ArcFeedC.
Stores ArcFeed# to Var(1).
Changed all ArcFeed commands to call AF sub.
Added DF sub to test for conditional output of DecelFeedC.
Stores DecelFeed# to Var(1).
Changed all DecelFeed commands to call DF sub.
Added SetMaxFeed(9999) for Metric files at setup and initializations.
Added SetMaxFeed(393.66141732283) for INCH files at setup and initializations.
Customer requested modification to Helical Arc Output.
FORMAT for Helical ArcIJ block is identicle to normal ArcIJ block.
FORMAT for Helical ArcEndPoint is defined as an Incremental Polar Angle.
ZMove in output as an Incremental value.
Block FORMAT is as follows:
CP IPA Degrees IZ IncEPZ#
Added TrackXNO# to FORMAT#4 at Prog Numeric Format Definitions.
Added TrackYNO# to FORMAT#4 at Prog Numeric Format Definitions.
Added support of Helical Arcs at CheckMove sub.
Temporary FORMAT of ABS# to FORMAT#4.
FullArc is output as literal '+360.000'.
All other values are derived via ABS# SUB# SPMoveAngle# EPMoveAngle# Formula.
Tracking EPX# and EPY# to keep Status Register up to date.
Added condition to output literal 'CP' instead of literal 'C' at FormatArc sub.
Other requested modifications:
Changed 'L' TLLength# to 'L+0' at inside EachTool/NextTool Loop at FirstOperation.
Deleted 'LBL 1' block at FirstOperation.
Deleted NOT ToolChangeAtHome output at FirstOperation.
Deleted 'LBL 0' block at FirstOperation.
Changed SpinOff to literal 'M00' at NewTool.
Deleted 'CALL LBL 1 REP' block at NewTool and end of Prog.
Changed OfstOff block at NewTool.
Added OfstOff block at end of Prog.
DWB}

{5/21/98
Initial: Heid TNC 155 [JP] MX68.89.1m
Created: Heid 155 [Lagun] Mxxx.89m
ForUser: Gimbel
Control: Heidenhain TNC 155
Machine: ????
Develop: ComPost2 1.1b3, Virtual Gibbs 4.24
Comment: New processor per marked up readout.
Removed 'TOOL DEF' lines.
Changed Tool call lines
from:
SeqLab ' TOOL CALL ' Tool# ' Z ' Speed EOL
to:
SeqLab ' CYCL DEF 69.0 AUTOMATISK VAERKTOEJSSKIFT' EOL
SeqLab ' CYCL DEF 69.1 Q51=+' Tool# ' Q52=+' SpeedRPM# EOL
Changed Rapid feed rate from F9999 to FMAX.
Jim Radcliffe}

{21 Oct98
Original: Heid TNC 155 [Lagun] MV91.89m
Created: Heid TNC 155 Lagun TC Mxxx.89m
For: Trier Christensen Maskinfabrik
Changes made per: Kim Vind Andersen of Maskinteknik, Denmark
Added Post Header Comment at the top of Prog.
Deleted redundant 'F' in RF Sub.
RF Sub now outputs ' FMAX' on all Rapid Moves
Added CYCL DEF 69 at the End of Prog enable Pretool
Charles Winston}

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

#1 = '####0.000'
#2 = '#####.###;0.'
#3 = '*#####.###;0.'
#4 = 'Ä…####0.000'
#5 = '#######0'
#6 = 'Ä…*####0.000'
#7 = '###0'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(Dwell#,1)
FORMAT(TrackXNO#,4)
FORMAT(TrackYNO#,4)
FORMAT(TrackZNO#,4)
FORMAT(XStockMin#,4)
FORMAT(XStockMax#,4)
FORMAT(YStockMin#,4)
FORMAT(YStockMax#,4)
FORMAT(ZStockMin#,4)
FORMAT(ZStockMax#,4)
FORMAT(HomeX#,4)
FORMAT(HomeY#,4)
FORMAT(SPX#,4)
FORMAT(SPY#,4)
FORMAT(SPZ#,4)
FORMAT(EPX#,4)
FORMAT(EPY#,4)
FORMAT(EPZ#,4)
FORMAT(ArcI#,4)
FORMAT(ArcJ#,4)
FORMAT(ZDepth#,4)
FORMAT(RepeatX#,4)
FORMAT(RepeatY#,4)
FORMAT(RepeatZ#,4)
FORMAT(PartShiftX#,4)
FORMAT(PartShiftY#,4)
FORMAT(PartShiftZ#,4)
FORMAT(OriginUnShiftPX#,4)
FORMAT(OriginUnShiftPY#,4)
FORMAT(OriginUnShiftPZ#,4)
FORMAT(OriginUnShiftRX#,4)
FORMAT(OriginUnShiftRY#,4)
FORMAT(OriginUnShiftRZ#,4)
FORMAT(Peck#,4)
FORMAT(ToolDiameter#,4)
FORMAT(TLDia#,4)
FORMAT(TLLength#,4)
FORMAT(TLNum#,5)
FORMAT(Program#,5)
FORMAT(CallMasterNum#,5)
FORMAT(Program2#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(RepsLess1#,5)
FORMAT(PartsLess1#,5)
FORMAT(Parts#,5)
FORMAT(SpeedRPM#,5)
FORMAT(ABS#,6)
FORMAT(ClearancePlane2#,6)
FORMAT(Recall#,7)
FORMAT(RapidF#,7)
FORMAT(FeedEntry#,7)
FORMAT(FeedContour#,7)
FORMAT(ArcFeed#,7)
FORMAT(DecelFeed#,7)

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

DoL:
' L '
RETURN

DoZL:
DoL
RETURN

Space: { 10 Spaces }
' '
RETURN

XYZSpace:
' ' Space
RETURN

XYSpace:
Space Space
RETURN

ZSpace:
Space Space Space
RETURN

IXYZSpace:
Space
RETURN

IXYSpace:
Space Space
RETURN

IZSpace:
Space Space Space
RETURN

DoR0:
IF NOT Flag?('3') { ArcFeat }
' '
END
IF Flag?('2') { CutterRadiusCompensation }
IF CRCleft?
' RL'
ELSE
' RR'
END
ELSE
' R0'
END
RETURN

clrFeed: { Initialize Current FeedRate Value }
Save# Num#('1') Num#('0')
RETURN

RF: { RapidF }
IF NotEqual? Recall# Num#('1') RapidF#
Save# Num#('1') RapidF# { Current FeedRate Value }
END
' FMAX'
RETURN

FE: { FeedEnt }
IF NotEqual? Recall# Num#('1') FeedEntry#
Save# Num#('1') FeedEntry# { Current FeedRate Value }
FeedEnt
ELSE
' F'
END
RETURN

FR: { FeedRate }
IF NotEqual? Recall# Num#('1') FeedContour#
Save# Num#('1') FeedContour# { Current FeedRate Value }
FeedRate
ELSE
' F'
END
RETURN

AF: { ArcFeed }
IF NotEqual? Recall# Num#('1') ArcFeed#
Save# Num#('1') ArcFeed# { Current FeedRate Value }
ArcFeed
ELSE
' F'
END
RETURN

DF: { DecelFeed }
IF NotEqual? Recall# Num#('1') DecelFeed#
Save# Num#('1') DecelFeed# { Current FeedRate Value }
DecelFeed
ELSE
' F'
END
RETURN

DoM:
' M'
RETURN

ckCRCOff:
IF Flag?('2') { CRCOn }
SetFlagF('2')
SeqLab DoL ' IX+0.000 IY+0.000' IXYSpace DoR0 RF DoM EOL
END
RETURN

CheckCoolOn:
IF CoolOff?
DoM
ELSE
CoolOn
END
RETURN

CheckCoolOff:
IF CoolOff?
DoM
ELSE
CoolOff
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 a Metric post }
ELSE
SetScale('1')
END
RETURN

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

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

PSInit:
NewWFOF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN

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

DoPostScript:
PSInit
EachPS
SeqLab PostScript EOL
PSStuff
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqLab EndOpPS EOL
PSStuff
NextPS
RETURN

EntryMove:
SeqLab DoZL
IF NOT AbsValue?
' IZ' SPZ# IZSpace
ELSE
ZIn ZSpace
END
DoR0
IF FeedEntry?
Feed {no output}
FE
ELSE
Rapid {no output}
RF
END
DoM EOL
RETURN

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

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

StdSub:
SeqLab ' CALL LBL ' Program# ' REP ' Repeats# ' / ' Repeats# EOL
StartSub
RETURN

FinishSub1: {part 1}
IF NOT FeedConnect?
SeqLab DoZL ZCP3 ZSpace
IF Flag?('2') { CRCOn }
SetFlagF('2')
DoR0
SetFlag('2')
ELSE
DoR0
END
IF AutoCycle?
Rapid {no output}
RF
ELSE
IF FIFO?
Feed {no output}
FE
ELSE
Rapid {no output}
RF
END
END
DoM EOL
END
ckCRCOff
RETURN

FinishSubG92: {part 2}
SeqLab ' CYCL DEF 7.0 NOLLPUNKT' 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 NOLLPUNKT' 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:
IF EquallySpacedOffsets?
NewProg
SeqLab ' CALL LBL ' Program# ' REP ' Parts# ' / ' Parts# EOL
StartSub
END
RETURN

CloseMP:
IF EquallySpacedOffsets?
SeqLab ' CYCL DEF 7.0 NOLLPUNKT' 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 NOLLPUNKT' 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

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

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

CheckMove:
IF ArcFeat? AND ZMove? { Helical Arc }
' IPA' { Incremental Polar Angle }
IF XMove? OR YMove?
FORMAT(ABS#,4)
ABS# SUB# SPMoveAngle# EPMoveAngle#
FORMAT(ABS#,6)
ELSE
'+360.000'
END
' IZ'
IF AbsValue?
TrackXNO# EPX#
TrackYNO# EPY#
SetInc
EPZ#
SetAbs
ELSE
SetAbs
TrackXNO# EPX#
TrackYNO# EPY#
SetInc
EPZ#
END
' ' IXYZSpace
ELSE
IF NOT AbsValue?
IF XMove? OR YMove? OR ArcFeat?
' IX' EPX# ' IY' EPY#
IF ZMove?
' IZ' EPZ# IXYZSpace
ELSE
IXYSpace
END
ELSE
IF ZMove?
' IZ' EPZ# IZSpace
END
END
ELSE
IF XMove? OR YMove? OR ArcFeat?
MoveX MoveY
IF ZMove?
MoveZC XYZSpace
ELSE
XYSpace
END
ELSE
IF ZMove?
MoveZC ZSpace
END
END
END
END
RETURN

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

ckCRC:
IF CutterRadiusCompensation?
IF LastFeat?
SetFlagF('2') { CRCOff }
ELSE
IF NOT ZMove?
SetFlag('2') { CRCOn }
END
END
END
RETURN

ckCRCNum:
{ Not Supported }
RETURN

FormatLine:
IF ZMove? AND NOT XMove? AND NOT YMove?
DoZL
ELSE
DoL
END
DoAbsOrInc CkCRC CheckMove DoR0
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
IF NOT FirstFeat?
SeqLab DoL MoveSX MoveSY XYSpace DoR0 RF ' M99' EOL
END
SeqLab ' CALL LBL ' Program# ' REP' EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
IF FirstFeat?
SeqLab ' CYCL CALL ' XYZSpace ZSpace DoM EOL
ELSE
SeqLab DoL DoDrillAbsOrInc
IF AbsValue?
MoveSX MoveSY
IF SPZMove?
MoveSZ XYZSpace
ELSE
XYSpace
END
ELSE
' IX' SPX# ' IY' SPY# ' IZ' SPZ# IXYZSpace
END
DoR0 RF ' M99' EOL
END
END
ELSE
IF RapidFeat?
Rapid {no output}
IF XMove? OR YMove? OR ZMove?
SeqLab FormatLine RF DoM EOL
END
ELSE
IF LineFeat?
Feed {no output}
IF XMove? OR YMove? OR ZMove?
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqLab FormatLine FR DoM EOL
DecelMove2
END
SeqLab FormatLine DF DoM EOL
ELSE
SeqLab FormatLine FR DoM EOL
END
END
ELSE
IF ArcFeat?
SetStatusOff
IF Metric? AND LessThan? ABS# ArcR# Num#('.02')
SetFlag('4')
ELSE
IF NOT Metric? AND LessThan? ABS# ArcR# Num#('.0007874015748031') { .02 Ö 25.4 }
SetFlag('4')
END
END
SetStatusOn
IF Flag?('4')
Feed {no output}
SeqLab FormatLine FR DoM EOL { StdLine }
ELSE
EACHQuadrant
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
FormatArc AF DoM EOL
DecelMove2
END
FormatArc DF DoM EOL
ELSE
FormatArc AF DoM EOL
END
NEXTQuadrant
END
SetFlagF('4')
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?
ELSE
SeqLab DoZL ZCP2 ZSpace DoR0
IF FIFO?
Feed {no output}
FE
ELSE
Rapid {no output}
RF
END
DoM EOL
END
SeqLab ' LBL 0' EOL
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
SetAbs
SeqLab DoL StrtPos XYSpace DoR0
IF FeedConnect?
Feed {no output}
FE
ELSE
Rapid {no output}
RF
END
DoM EOL
Milling
FinishSub1
FinishSubG92
RETURN

ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
NewProg
EachCycle
SetSRXYtoEP
IF FeedConnect?
Feed {no output}
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SetInc
SeqLab DoL ' IX' SPX# ' IY' SPY# IXYSpace DoR0 FE DoM EOL
SetAbs
END
END
SeqLab DoZL ZInPlusInc ZSpace DoR0 FE DoM EOL
ELSE
IF NOT FirstCycle?
Rapid {no output}
IF SPXMove? OR SPYMove?
SetInc
SeqLab DoL ' IX' SPX# ' IY' SPY# IXYSpace DoR0 FE DoM EOL
SetAbs
END
IF FeedEntry?
SeqLab DoZL ZCP2PlusInc ZSpace DoR0 RF DoM EOL
END
END
IF FeedEntry?
Feed {no output}
SeqLab DoZL ZInPlusInc ZSpace DoR0 FE DoM EOL
ELSE
Rapid {no output}
SeqLab DoZL ZInPlusInc ZSpace DoR0 RF DoM EOL
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
SeqLab ' CALL LBL ' Program# ' REP' EOL
NextCycle
SetStatusOn
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
IF FeedConnect? {there is no Z up in the sub}
SeqLab DoZL ZCP2 ZSpace DoR0
IF FIFO?
Feed {no output}
FE
ELSE
Rapid {no output}
RF
END
DoM EOL
END
SeqLab ' LBL 0' EOL
CloseSub
{Element shift, not pattern}
RETURN

ZonlyRep:
EachCycle
IF NOT FirstCycle?
SeqLab DoL StrtPos XYSpace DoR0
IF FeedConnect?
Feed {no output}
FE
ELSE
Rapid {no output}
RF
END
DoM EOL
END
IF FeedConnect?
Feed {no output}
SeqLab DoZL ZInPlusInc ZSpace DoR0 FE DoM EOL
ELSE
IF FeedEntry?
IF NOT FirstCycle?
Rapid {no output}
SeqLab DoZL ZCP2PlusIncC ZSpace DoR0 RF DoM EOL
END
Feed {no output}
SeqLab DoZL ZInPlusInc ZSpace DoR0 FE DoM EOL
ELSE
Rapid {no output}
SeqLab DoZL ZInPlusInc ZSpace DoR0 RF DoM EOL
END
END
SeqLab ' CALL LBL ' Program# ' REP' 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

GetStartOfSameTool:
DoOpComments
DoPostScript
CheckPass
RETURN

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

{setup and initializations}
InitProg
ReverseXZArcs
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('3000')
IF Metric?
SetMaxFeed('9999')
ELSE
SetMaxFeed('393.66141732283')
END
SaveProgNum2
SetProgNum('1')
Save# Num#('1') Num#('0') { Current FeedRate Value }
SetFlagF('1') { Milling ZShiftOnly SepSubs }
SetFlagF('2') { CRCOff }
SetFlagF('3') { ArcFeat }
SetFlagF('4') { OutPut ArcFeat as StdLine when ArcR# LessThan Num#('.02mm') }
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
' 5thAxisCCW(22.5), 5ACCW(22.5) -' EOL
' generates a - B move of the value you specify' EOL
END

IF MultipleParts? AND WorkFixtureOffsets?
'( *** WARNING *** )' EOL
'( THIS POST PROCESSOR DOES NOT SUPPORT WORKFIXTURE OFFSETS. )' EOL
'( PLEASE SELECT EQUALLY SPACED OFFSETS. )' EOL
'( *** WARNING *** )' EOL
END

EachOp {Start of post processing *********************}
IF FirstOperation?
SeqLab ' BEGIN PGM ' Program2# ' MM' 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?
'( PROGRAM: ' ProgramName$ ' )' EOL
END
IF ProgramComment?
'( ' ProgramComment$ ' )' EOL
END
IF FormatNameComment?
'( FORMAT: ' FormatName$ ' )' EOL
END
IF TimeComment?
'( ' Date$ ' AT ' Time$ ' )' EOL
END
IF MovesComment?
'( OUTPUT IN ABSOLUTE METERS )' EOL
END
IF PartsComment?
'( PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
'( FIRST TOOL NOT IN SPINDLE )' EOL
END
END
SetAbs
Plane {no output}
OpenSub
RestoreScale
IF ToolChangeAtHome?
SeqLab DoL Home ' Z+200.000' XYZSpace DoR0 RF ' M00' EOL
END
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
DoOpComments
DoPostScript
SeqLab ' CYCL DEF 69.0 AUTOMATISK VAERKTOEJSSKIFT' EOL
SeqLab ' CYCL DEF 69.1 Q51=+' Tool# ' Q52=+' SpeedRPM# EOL
Save# Num#('9') Tool#
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
clrFeed { Force RapidF on StrtPos block }
SeqLab DoL StrtPos XYSpace DoR0 RF SpinOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
IF EquallySpacedOffsets?
SeqLab DoL StrtPos XYSpace DoR0 RF DoM EOL
END
END
ELSE
IF NewTool?

{Finish off last Operation}

IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
SeqLab DoL ZCP1 ZSpace DoR0 RF ' M00' EOL { OfstOff }
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF LAST ProgStop?
SeqLab ' STOP M02' EOL
END

{Start new Operation}

SetAbs
Plane {no output}
DoOpComments
DoPostScript
SeqLab ' CYCL DEF 69.0 AUTOMATISK VAERKTOEJSSKIFT' EOL
SeqLab ' CYCL DEF 69.1 Q51=+' Tool# ' Q52=+' SpeedRPM# EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
clrFeed { Force RapidF on StrtPos block }
SeqLab DoL StrtPos XYSpace DoR0 RF SpinOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
IF EquallySpacedOffsets?
SeqLab DoL StrtPos XYSpace DoR0 RF DoM EOL
END
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqLab ' STOP M02' EOL
END

{Start new Operation}

GetStartOfSameTool
SetAbs
Plane {no output}
SeqLab DoL StrtPos XYSpace DoR0 RF DoM EOL
END
END
END {common point for all operations}
IF Milling?
SeqLab DoZL ZCP2 ZSpace DoR0 RF CheckCoolOn 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
SeqLab DoZL ZCP3 ZSpace
IF Flag?('2') { CRCOn }
SetFlagF('2')
DoR0
SetFlag('2')
ELSE
DoR0
END
IF AutoCycle?
Rapid {no output}
RF
ELSE
IF FIFO?
Feed {no output}
FE
ELSE
Rapid {no output}
RF
END
END
CheckCoolOff EOL
ckCRCOff
ELSE
IF Drilling?
IF Repeats?
NewProg
StdSub
SeqLab DoL StrtPos XYSpace DoR0 RF DoM EOL
END
SeqLab DoZL ZCP2 ZSpace DoR0 RF CheckCoolOn EOL
GetCycle
IF Tap?
SeqLab ' CYCL DEF 2.0 G€NGBORRNING' EOL
SeqLab ' CYCL DEF 2.1 AVST ' ABS# ClearancePlane2# EOL
SeqLab ' CYCL DEF 2.2 DJUP ' ABS# ZDepth# EOL
SeqLab ' CYCL DEF 2.3 V.TID 0' EOL
SeqLab ' CYCL DEF 2.4' FE EOL
ELSE
SeqLab ' CYCL DEF 1.0 DJUPBORRNING' EOL
SeqLab ' CYCL DEF 1.1 AVST ' ABS# ClearancePlane2# EOL
SeqLab ' CYCL DEF 1.2 DJUP ' ABS# ZDepth# EOL
SeqLab ' CYCL DEF 1.3 INSTICK '
IF Peck?
ABS# Peck#
ELSE
SetInc ABS# ZDepth# SetAbs
END
EOL
SeqLab ' CYCL DEF 1.4 V.TID '
IF Dwell?
Dwell#
ELSE
'0'
END
EOL
SeqLab ' CYCL DEF 1.5' FE EOL
END
IF CallMasterOp?
SeqLab ' CALL LBL ' CallMasterNum# ' REP' EOL
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') {std sep sub Zreps in effect}
NewMasterProg
SeqLab ' CALL LBL ' Program# ' REP' EOL
StartSub
ToolPath
SeqLab ' LBL 0' EOL
CloseSub
SetFlagF('1') {not std sep sub Zreps in effect}
ELSE
ToolPath
END
END
SetDrillEndOpZ
Rapid {no output}
SeqLab DoZL ZCP3 ZSpace DoR0 RF CheckCoolOff EOL
IF Repeats?
FinishSubG92
END
END
END
NextOp {loops back to EachOP until last Operation}

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

{finish last operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
SeqLab DoL ZCP1 ZSpace DoR0 RF SpinOff EOL { OfstOff }
SeqLab ' CYCL DEF 69.0 AUTOMATISK VAERKTOEJSSKIFT' EOL
SeqLab ' CYCL DEF 69.1 Q51=+' Recall# Num#('9') ' Q52=+1000 ' EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
Rapid {no output}
SeqLab ' L R F M02' EOL
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
Post
SeqLab ' END PGM ' Program2# ' MM' EOL
ASCII('3') EOL { ETX - End of Transmission }
Close
Retag
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


Wyszukiwarka

Podobne podstrony:
Heid TNC 155 Mikron TC MT20 89m
Heid TNC 155 [EMC] M612 89m
Heid TNC 155 [Mikron] MV92 89m
Heid TNC 155 Hkrt Z M614 89m
Heid TNC 155 [FLV] MW06 89m
Heid TNC 155 Hkrt Y M613 89m
Heid TNC 155 [ESS] M980 15
Heid TNC 151A S1[NM] M711 89m
Heid TNC 155 [PB] M550 89 1m
Heid TNC 155 [FMI] M816 81 2
Heid TNC 155 [JP] MX68 89 4m
Heid TNC 155 [P&A] M694 81 10m
Heid TNC 155 [KP] MV27 89 1m
Heid TNC 155 [HM] M654 85m
Heid TNC 155 Sajo 450 M030 89
Heid TNC 155 Hkrt Z M614 89
Heid TNC 155 [FS] MY83 89 3m

więcej podobnych podstron