Heid TNC 2500 [QM] MU48 85 2


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

{9/23/88
Copied & Modified: Heidenhain TNC 145C M082.53
For: Galaxy Die & Engineering.
Machine:
Control: Heidenhain TNC 145C
Modified to have only 1 space between codes.
Added L address before Z moves.
Use Speed from ncCam.
Modified SpinOn to be M13 [CW] and M14 [CCW].
Added first and last lines.
Added M6 after tool call.
Deleted CoolOn and CoolOff commands.
Jim Radcliffe}

{11/15/88
Updated: Heid TNC151 Bridgeport M139.55
For: Galaxy Die & Engineering.
Changed all RapidF to 'F3999'.
Deleted LBL 1 thru LBL 0 lines, toolchange subroutine, from beginning of prog.
Moved HomePos & CP1 after M06 in FirstOp & NewTool.
Changed M05 to M25 for spindle up.
Added missing FORMAT for ZDepth#.
Changed ClearancePlane2# in Milling to ZCP2.
Added FORMAT #9 for cycle defs SETUP & PECKG that require a negative sign which is literal.
Deleted ZDepth# preceding IncValue and following AbsOrInc.
Changed ZDepth# in PECKG to ZDepthInc#, using FORMAT #9.
Changed FORMAT for ClearancePlane2# to FORMAT #9.
Changed FORMAT for Peck# to FORMAT #9.
Jim Radcliffe}

{7/24/90, Added InitProg globally to posts with this remark, DWB}

{11/29/90
Copied & Modified: Heid TNC151 Bridgeport M139.58
For: Phoenix Machine & Design
Machine: Interact 412
Control: Heidenhain TNC 151B/151Q
Updated to Version 3.2 per Fanuc 6M M001.76.1 Format.
Customer requests:
Added SaveProgNum2 and replaced ProgID1 with Program# at beginning and end becuase decimal point
is not allowed in opening statement.
Added ASCII('3') at end to cause DNC to stop sending.
Form changes:
Modified Rapid FeedRate (XXXX^X) from 0 to 3999
Modified 'F' default format from '00^0' to '###^0'
Prog changes:
Cleaned up FORMATs for better readability.
Added SPZ#, EPX#, EPY#, EPZ#, ArcI# and ArcJ# and FORMATs for same, for AutoCycle output
which requires literal 'I' before each axis address to indicate incremental moves.
Added FORMATs for RepeatX#, RepeatY#, RepeatZ#, OriginUnShiftRX#, OriginUnShiftRY# and
OriginUnShiftRZ# for correct output.
Added TLDia#, TLLength# and TLNum# and FORMATs for same, for Tool Definition Loop at beginning.
Added RapidF# and FORMAT for same, and replaced all literal 'F3999' to RapidF for ease of
future conversions.
DWB}

{6/19/92
Updated: Heid TNC 151 BP M139.76.1 to .81 format
Other changes for simplicity and ease of future updates or modifications.
Changed HomeX# & HomeY# to Home
Changed StartPosX# & StartPosY# to StrtPos
Changed all literal L to use the sub DoL
Changed all literal R0 to use the sub DoR0
Jim Radcliffe}

{6/19/92
Copied & modified: Heid TNC 151 BP M139.81
For: Belden Wire & Cable
Machine: Bridgeport Series 1 Interact
Control: Heidenhain TNC 151A
Summary of major changes per customer requests:
Added an asterisk before comments.
Deleted the Tool List from the beginning of program.
Modified layout of output at beginning and ending of operations.
Modified repeats of subs.
Do a ' STOP' before ' Tool Call'.
Jim Radcliffe}

{11/11/94
Copied & modified: Heid TNC 151A BP S1 M508.81
For: Neilson Machine
Summary of major changes per customer requests:
Removed M25 and STOP M from after every operation except last operation
Added support for Rigid Tapping
Changed Tool Change from Manual to Automatic by removing the STOP M
and adding "L R F M06" to the line after the "TOOL CALL"
Fixed the Spindle on command to output the right command if CoolOff?
and handle CW & CCW spindle directions
Added TOOL DEF lines for every tool to start of program and hardcoded
the L and R values to -1.5 and 0
Tom Hubina}

{10/4/95, Updated Heid TNC 151A S1 [NM] M711.81.1 to .85 format per v2.20 Update Instructions .01, JR}

{
Format: Heid TNC 151A S1 [NM] M711.85.1
11/10/95
Changed format of CallMasterNum# to #5
TH}

{12/12/95, M711.85.1, Updated for Catalyst v2.20 per Fanuc 6M M001.85.02 Format, DWB}

{4/12/96,
Initial: Heid TNC 151A S1 [NM] M711.85.2
Created: Heid TNC 151A S1 MXXX.85
Set tool length offsets at program beginning to 0.000, set program # to zero after it is output at
program beginning in order to # subs properly. This post uses a pecking cycle even for non-pecking drilling
operations, changed the peck depth for these operations from ZDepthInc# to ZDepth#,, changed rapid speed in RF sub to 4500, added
toolchange to Tool 1 at program end, MPK}
{5/1/96,
Initial: Heid TNC 151 [ESS] M979.85
Created: Heid TNC 2500 M979.85.1
Changed the tool list in FirstOp to output the tool radius, MPK}
{5/1/96,
Initial: Heid TNC 151 [ESS] M979.85.1
Created: Heid TNC 2500 M979.85.2
Eliminated move to ZCP1 in FirstOp and NewTool, tool positions in X & Y at full up before Z move, so there was no reason
not to move straight to ZCP2, since those lines were deleted, I added a check to the IF Drilling? section for which plane to retract
to. If rectract to ZCP1 is true, then the ZCP1 line which was removed from FirstOp and NewTool is output, added GetCoolAndSpin
sub to differentiate between M03/M13 and M04/M14 , Eliminated M25 at program end, MPK}

{5/24/96, Updated to .89 format, MPK}

{1/6/97,
Initial: Heid TNC 2500 [ESS] M979.89
Created: Heid TNC 2500 [ESS] M979.89.1
For: Engineering Support Systems
Formatted DIV# with format #7,
Formatted all positioning moves to 4 decimal places,
added DoHelix sub and modified FormatArc per Heid TNC 155 [ESS] M980.89.1, MPK}

{7/21/98
Copied: Heid TNC 2500 [ESS] M979.89.1
Created: Heid TNC 2500 [QM] MU48.85
For: Quadra Manufacturing
Machine: Bridgeport
Control: Heidenhain TNC 2500
Versions: Catalyst v4.23.13(mac)/ComPost2 1.1b3
Versions: ncCad 4.33.02/ncCAM 4.33.01/ncPost 4.33.10/ComPost2 1.1b3
Changes made per Tony Ellingson, sample parts and phone conversations.
NOTE: This post was reverted to .85 to bypass alert that occurs when post encounters SetSRXYtoEP command at ZonlyRepAutoCycle.
This was accomplished by commenting out related portions.
Customer reported problem generating XZPlane Arcs.
Control follows Gibbs System method, not Fanuc Right Hand Rule.
Changed ReverseXZArcs to StandardXZArcs at setup and initializations.
Customer requested Modal FeedRates during ToolPath.
Added Var(1) and Flag(4).
Var(1) stores FeedRate value to be checked against current value.
Flag(4) TRUE means FeedRates are same, output F Address only.
FlagF(4) FALSE means FeedRates change, output F Address with value.
Added ckFeedRate Procedure.
Called from ToolPath.
Compares current FeedRate value to Var(1).
Stores Var(1) and sets Flag(4)
NOTE: Flag(4) automatically set to FALSE during Decel routine and at RapidFeat.
Added FR Procedure.
Called from LineFeat and ArcFeat.
Other modifications per customer requests:
Changed ' F4500' to ' FMAX' at RF Procedure.
Added condition to bypass Short ArcFeat at ArcFeat.
Deleted EachTool/NextTool Loop at FirstOperation.
Changed ' M' to ' M25', FullUp command, at FirstOperation and end of Prog.
Deleted ' TOOL CALL 1 Z S1500' block at end of Prog.
Deleted ' L R F M06' block at end of Prog.
Added ' STOP M02' block at FirstOperation.
DWB}

{7/29/98
Modified: Heid TNC 2500 [QM] MU48.85
Created: Heid TNC 2500 [QM] MU48.85.1
For: Quadra Manufacturing
Versions: Catalyst v4.23.13(mac)/ComPost2 1.1b3
Changes made per Tony Ellingson and phone conversations.
Customer reported that STOP M02 command at FirstOperation causes control to rewind back to top of output.
This causes an endless loop between the first two blocks.
Changed 'STOP M02' to 'STOP M' at FirstOperation.
Modified Modal FeedRates for improved control.
Added FeedRateInit Procedure.
Saves zero to Var(1) and sets Flag(4) to FALSE.
Called from ToolPath RapidFeat, ToolPath LineFeat Decelerate, ToolPath ArcFeat Decelerate, Milling and
at Common Point.
Added Var(1) and Flag(4) to FeedEntry at EntryMove.
Deleted FirstFeat condition at ckFeedRate Procedure.
Deleted RapidFeat condition at ckFeedRate Procedure.
Moved ckFeedRate Procedure call to NOT RapidFeat at ToolPath.
Added condition to output literal ' F' for FeedConnect at ZonlyRep.
Moved ProgStop to MP-ATOP condition at end of Prog.
DWB}

{7/30/98
Modified: Heid TNC 2500 [QM] MU48.85.1
Created: Heid TNC 2500 [QM] MU48.85.2
For: Quadra Manufacturing
Versions: Catalyst v4.23.13(mac)/ComPost2 1.1b3
Changes made per Tony Ellingson, phone conversations and LEX-304 1/51 Part File.
Customer reported that FMAX does not cancel Modal FeedRates.
Modified to not unconditionally force FeedRate following RapidFeat.
Customer reported that Post needs to support Engraving Clearance FeedEntry Moves.
Engraving Clearance Move consists of Rapid ZMove followed by Rapid XYMove followed by FeedEnt
ZMove.
FeedRate outputs FeedEntry# when ZMove = TRUE and FeedEntry# is LessThan FeedContour#.
Added ckEngraveMove Procedure.
Tests for LAST Rapid ZMove AND Rapid XYMove and NEXT Line ZMove.
Saves -1 to Var(1) and SetFlagF(4).
Added condition to test Var(1) at ckFeedRate and FR Procedures.
FR Procedure tests for IF LessThan? FeedEntry# FeedContour#.
Changed FeedRateInit call to ckEngraveMove call at ToolPath RapidFeat.
Made additional modal FeedRate modifications.
Purpose was to force FeedRate at start of subs and to suppress FeedRates during Repeat
Positioning.
Added ckFeedEnt Procedure.
Called at EntryMove, FinishSub1, AutoCycCutSub2, G92Sub, three places at ZonlyRepAutoCycle, three
places at ZonlyRep and end of IF Milling.
Added call to FeedRateInit for AutoCycles at Milling, ZonlyRepAutoCycle and ZonlyRep.
Deleted call to FeedRateInit for Repeats at Milling.
DWB}

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

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ABS#,2)
FORMAT(SUB#,2)
FORMAT(ClearancePlane1#,4)
FORMAT(TrackXNO#,4)
FORMAT(TrackYNO#,4)
FORMAT(TrackZNO#,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(FeedTapIPR#,4)
FORMAT(ToolDiameter#,4)
FORMAT(TLDia#,4)
FORMAT(TLLength#,4)
FORMAT(TLNum#,5)
FORMAT(CallMasterNum#,5)
FORMAT(Program#,5)
FORMAT(Program2#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
FORMAT(ClearancePlane2#,7)
FORMAT(ZDepthInc#,7)
FORMAT(Peck#,7)
FORMAT(DIV#,7) {Tool List Tool Rad.}
FORMAT(FeedEntry#,8)
FORMAT(RapidF#,8)

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

DoL:
' L'
RETURN

DoZL:
' L'
RETURN

Space: { 0 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

RF: { RapidF }
' FMAX'
RETURN

DoM:
' M'
RETURN

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

GetCoolAndSpin: {M13 and M14 turn on both spindle and coolant}
IF CoolOff?
SpinOn
ELSE
IF CWSpindle?
' M13'
ELSE
' M14'
END
END
RETURN

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

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

DoSubComment:
IF UseComments? AND SubComment?
'*( SUB NUMBER: ' Program# ' )' 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: {reset flags}
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

FeedRateInit:
Save# Num#('1') Num#('0') { Modal FeedRate }
SetFlagF('4') { Modal FeedRate }
RETURN

ckEngraveMove:
IF NOT FirstFeat? AND NOT LastFeat?
IF LAST RapidFeat?
IF NEXT LineFeat?
IF Equal? LAST SPX# LAST EPX#
IF Equal? LAST SPY# LAST EPY#
IF NotEqual? LAST SPZ# LAST EPZ#
IF XMove? OR YMove?
IF NOT ZMove?
IF Equal? NEXT SPX# NEXT EPX#
IF Equal? NEXT SPY# NEXT EPY#
IF NotEqual? NEXT SPZ# NEXT EPZ#
Save# Num#('1') Num#('-1') { Modal FeedRate }
SetFlagF('4') { Modal FeedRate }
END
END
END
END
END
END
END
END
END
END
END
RETURN

ckFeedEnt:
IF Flag?('4')
' F' { Modal FeedRate }
ELSE
Save# Num#('1') FeedEntry# { Modal FeedRate }
SetFlag('4') { Modal FeedRate }
FeedEnt
END
RETURN

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

StartSub:
OpenSub
SeqLab ' LBL ' Program# EOL
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:
SeqLab ' CALL LBL ' Program# 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?
RF
ELSE
IF FIFO? {.81}
Feed {no output}
ckFeedEnt ''
ELSE
RF
END
END
DoM EOL
END
ckCRCOff
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 ' CALL LBL ' Program# ' REP ' RepsLess1 '/ ' RepsLess1 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:
IF EquallySpacedOffsets?
NewProg
SeqLab ' CALL LBL ' Program# EOL
StartSub
END
RETURN

CloseMP:
IF EquallySpacedOffsets?
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 ' CALL LBL ' Program# ' REP ' PartsLess1 ' / ' PartsLess1 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

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

DoHelix:
SetAbs
'P IPA'
IF ArcCW?
'-'
ELSE
'+'
END
IF Equal? EPMoveAngle# SPMoveAngle# { Full Circle }
'360.000'
ELSE
IF ArcCW? AND LessThan? SPMoveAngle# EPMoveAngle#
SUB# NUM#('360') ABS# SUB# EPMoveAngle# SPMoveAngle#
ELSE
ABS# SUB# EPMoveAngle# SPMoveAngle#
END
END
SetInc
IF XYPlane?
' IZ' EPZ#
ELSE
IF XZPlane?
' IY' EPY#
ELSE { YZPlane }
' IX' EPX#
END
END
SetAbs
TrackXNO# EPX#
TrackYNO# EPY#
TrackZNO# EPZ#
IF AutoCycle?
SetInc
ELSE
SetAbsOrInc
END
RETURN

CheckMove:
IF AutoCycle? OR NOT AbsValue?
IF XYPlane?
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 XZPlane?
IF XMove? OR ZMove? OR ArcFeat?
IF YMove?
' IX' EPX# ' IY' EPY# ' IZ' EPZ# IXYZSpace
ELSE
' IX' EPX# ' IZ' EPZ# IXYSpace
END
ELSE
IF YMove?
' IY' EPY# IZSpace
END
END
ELSE { YZPlane }
IF YMove? OR ZMove? OR ArcFeat?
IF XMove?
' IX' EPX# ' IY' EPY# ' IZ' EPZ# IXYZSpace
ELSE
' IY' EPY# ' IZ' EPZ# IXYSpace
END
ELSE
IF XMove?
' IX' EPX# IZSpace
END
END
END
END
ELSE
IF XYPlane?
IF XMove? OR YMove? OR ArcFeat?
MoveX MoveY
IF ZMove?
MoveZC XYZSpace
ELSE
XYSpace
END
ELSE
IF ZMove?
MoveZC ZSpace
END
END
ELSE
IF XZPlane?
IF XMove? OR ZMove? OR ArcFeat?
IF YMove?
MoveX MoveY MoveZ XYZSpace
ELSE
MoveX MoveZ XYSpace
END
ELSE
IF YMove?
MoveY ZSpace
END
END
ELSE { YZPlane }
IF YMove? OR ZMove? OR ArcFeat?
IF XMove?
MoveX MoveY MoveZ XYZSpace
ELSE
MoveY MoveZ XYSpace
END
ELSE
IF XMove?
MoveX ZSpace
END
END
END
END
END
RETURN

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

ckCRCNum:
{ Not Supported }
RETURN

FormatArc:
DoAbsOrInc
SeqLab ' CC'
IF AutoCycle? OR NOT AbsValue? {implies incremental}
' IX' ArcI# ' IY' ArcJ#
ELSE
ArcIJ
END
EOL
SeqLab ' C'
IF XYPlane? AND ZMove?
DoHelix
ELSE
IF XZPlane? AND YMove?
DoHelix
ELSE
IF YZPlane? AND XMove?
DoHelix
ELSE
CheckMove
END
END
END
IF ArcCW?
' DR-' CWArc {no output}
ELSE
' DR+' CCWArc {no output}
END
SetFlag('3')
DoR0
SetFlagF('3')
RETURN

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

ckFeedRate:
IF LineFeat?
IF Equal? Recall# Num#('1') FeedContour#
SetFlag('4') { Modal FeedRate }
ELSE
IF NotEqual? Recall# Num#('1') Num#('-1') { Engraving Clearance Move }
Save# Num#('1') FeedContour# { Modal FeedRate }
END
SetFlagF('4') { Modal FeedRate }
END
ELSE { ArcFeat }
IF Equal? Recall# Num#('1') ArcFeed#
SetFlag('4') { Modal FeedRate }
ELSE
Save# Num#('1') ArcFeed# { Modal FeedRate }
SetFlagF('4') { Modal FeedRate }
END
END
RETURN

FR: { FeedRate }
IF Flag?('4')
' F' { Modal FeedRate }
ELSE
IF LineFeat?
IF Equal? Recall# Num#('1') Num#('-1') { Engraving Clearance Move }
IF LessThan? FeedEntry# FeedContour#
Save# Num#('1') FeedEntry# { Modal FeedRate }
FeedEnt
ELSE
Save# Num#('1') FeedContour# { Modal FeedRate }
FeedRate
END
ELSE
FeedRate
END
ELSE { ArcFeat }
ArcFeed
END
END
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF NOT FirstFeat?
Rapid {no output}
IF AutoCycle?
SeqLab DoL MoveSX MoveSY XYSpace DoR0 RF 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
IF AutoCycle?
SeqLab ' CALL LBL ' Program# EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
END
ELSE
IF RapidFeat?
Rapid {no output}
IF XMove? OR YMove? OR ZMove?
ckEngraveMove
SeqLab FormatLine RF DoM EOL
END
ELSE
ckFeedRate
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 DecelFeed DoM EOL
FeedRateInit
ELSE
SeqLab FormatLine FR DoM EOL
END
END
ELSE
IF ArcFeat?
IF NOT XMove? AND NOT YMove? AND NOT ZMove? AND NOT FullArc?
{ NOTE: This is a short Arc, SP and EP are same due to rounding. }
TrackXNO# EPX#
TrackYNO# EPY#
TrackZNO# EPZ#
ELSE
EACHQuadrant
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
FormatArc FR '' DoM EOL
DecelMove2
END
FormatArc DecelFeed '' DoM EOL
FeedRateInit
ELSE
FormatArc FR '' DoM EOL
END
NEXTQuadrant
END
END
END
END
END
NEXTFeat
RestoreAbsOrInc
SetFlagF('4') { Modal FeedRate }
RETURN

WFOStuff:
{ NOTE: This Post Processor does not support WorkFixtureOffsets. }
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 DoZL ZCP2 ZSpace DoR0
IF FIFO? {.81}
ckFeedEnt ''
ELSE
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
FeedRateInit
EntryMove
AutoCycCutSub2
AutoCycPat
ELSE
EntryMove
ToolPath
END
RETURN

G92Sub:
SubWarning
StdSub
SetAbs
SeqLab DoL StrtPos XYSpace DoR0
IF FeedConnect?
ckFeedEnt ''
ELSE
RF
END
DoM EOL
Milling
FinishSub1
FinishSubG92
RETURN

ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
NewProg
EachCycle
FeedRateInit
{SetSRXYtoEP} { For Gibbs System Only }
IF FeedConnect?
IF NOT FirstCycle?
{IF SPXMove? OR SPYMove?
SetInc
SeqLab DoL ' IX' SPX# ' IY' SPY# IXYSpace DoR0 FeedRate '' DoM EOL
AbsOrInc
END}
END
SeqLab DoZL ZInPlusInc ZSpace DoR0 ckFeedEnt '' DoM EOL
ELSE
IF NOT FirstCycle?
{IF SPXMove? OR SPYMove?
SetInc
SeqLab DoL ' IX' SPX# ' IY' SPY# DoR0 RF DoM EOL
AbsOrInc
END}
IF FeedEntry?
SeqLab DoZL ZCP2PlusInc ZSpace DoR0 RF DoM EOL
END
END
IF FeedEntry?
SeqLab DoZL ZInPlusInc ZSpace DoR0 ckFeedEnt '' DoM EOL
ELSE
SeqLab DoZL ZInPlusInc ZSpace DoR0 RF DoM EOL
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
SeqLab ' CALL LBL ' Program# 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 DoZL ZCP2 ZSpace DoR0
IF FIFO? {.81}
ckFeedEnt ''
ELSE
RF
END
DoM EOL {.69}
END {.69}
SeqLab ' LBL 0' EOL
CloseSub
{Element shift, not pattern}
RETURN

ZonlyRep:
EachCycle
FeedRateInit
IF NOT FirstCycle?
SeqLab DoL StrtPos XYSpace DoR0
IF FeedConnect?
ckFeedEnt ''
ELSE
RF
END
DoM EOL
END
IF FeedConnect?
Feed {no output}
SeqLab DoZL ZInPlusInc ZSpace DoR0
IF FirstCycle?
ckFeedEnt
ELSE
' F'
END
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 ckFeedEnt '' DoM EOL
ELSE
Rapid {no output}
SeqLab DoZL ZInPlusInc ZSpace DoR0 RF DoM EOL
END
END
SeqLab ' CALL LBL ' Program# 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
StandardXZArcs
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('10000')
SaveProgNum2
Save# Num#('1') Num#('0') { Modal FeedRate }
SetFlagF('1') { Milling ZShiftOnly SepSubs }
SetFlagF('2') { CRCOff }
SetFlagF('3') { ArcFeat }
SetFlagF('4') { Modal FeedRate }
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 ' Program# ' INCH' EOL
SetProgNum('0')
IF ToolChangeAtHome?
SetHome
END
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 INCHES )' EOL
END
IF PartsComment?
'*( PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
'*( FIRST TOOL NOT IN SPINDLE )' EOL
END
END
OpenSub
SetAbs
Plane Rapid {no output}
RestoreScale
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
SeqLab DoL
IF ToolChangeAtHome?
Home XYSpace
END
DoR0 RF ' M25' EOL { FullUp }
SeqLab ' STOP M' EOL

DoOpComments
DoPostScript
SeqLab ' TOOL CALL ' Tool# ' Z' Speed EOL
SeqLab DoL ' R F M06' EOL
IF MultipleParts? AND OneToolAllParts?
OpenMP
END
CheckPass
SeqLab DoL StrtPos XYSpace DoR0 RF GetCoolAndSpin EOL
ELSE
IF NewTool?

{Finish off last Operation}

IF MultipleParts? AND OneToolAllParts?
CloseMP
END
DoEndOpPS
SeqLab DoL
IF ToolChangeAtHome?
Home XYSpace
END

DoR0 RF ' M' EOL

{Start new Operation}

SetAbs
Plane Rapid {no output}
DoOpComments
DoPostScript
SeqLab ' TOOL CALL ' Tool# ' Z' Speed EOL
SeqLab DoL ' R F M06' EOL
IF MultipleParts? AND OneToolAllParts?
OpenMP
END
CheckPass
SeqLab DoL StrtPos XYSpace DoR0 RF GetCoolAndSpin EOL
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqLab DoL DoR0 RF ' M' EOL
END

{Start new Operation}

GetStartOfSameTool
SetAbs
Plane Rapid {no output}
SeqLab DoL StrtPos XYSpace DoR0 RF
IF LAST ProgStop?
GetCoolAndSpin EOL
SeqLab DoZL ' Z' ClearancePlane1# ZSpace DoR0 RF DoM EOL
ELSE
DoM EOL
END
END
END
END {common point for all operations}
IF Milling?
FeedRateInit
SeqLab DoZL ZCP2 ZSpace DoR0 RF DoM 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
LoadFeat Num#('0') Num#('0') ClearancePlane3#
IF ZMove?
SeqLab DoZL ZCP3 ZSpace
IF Flag?('2') { CRCOn }
SetFlagF('2')
DoR0
SetFlag('2')
ELSE
DoR0
END
IF AutoCycle?
RF
ELSE
IF FIFO? {.81}
Feed {no output}
ckFeedEnt ''
ELSE
RF
END
END
DoM EOL
END
ckCRCOff
ELSE
IF Drilling?
IF Repeats?
NewProg
StdSub
SeqLab DoL StrtPos XYSpace DoR0 RF DoM EOL
END
IF NOT RetractToCP1?
SeqLab DoZL ZCP2 ZSpace DoR0 RF DoM EOL
ELSE
SeqLab DoZL ZCP1 ZSpace DoR0 RF DoM EOL
END
GetCycle
IF Tap?
IF OptCyc1?
SeqLab ' CYCL DEF 17.0 RIGID TAPPING' EOL
SeqLab ' CYCL DEF 17.1 SETUP -' ClearancePlane2# EOL
SeqLab ' CYCL DEF 17.2 DEPTH ' ZDepth# EOL
SeqLab ' CYCL DEF 17.3 PITCH ' FeedTapIPR# ('1') EOL
ELSE
SeqLab ' CYCL DEF 2.0 TAPPING' EOL
SeqLab ' CYCL DEF 2.1 SETUP -' ClearancePlane2# EOL
SeqLab ' CYCL DEF 2.2 DEPTH ' ZDepth# EOL
SeqLab ' CYCL DEF 2.3 DWELL 0' EOL
SeqLab ' CYCL DEF 2.4 F' FeedEntry# EOL
END
ELSE
SeqLab ' CYCL DEF 1.0 PECKING' EOL
SeqLab ' CYCL DEF 1.1 SETUP -' ClearancePlane2# EOL
SeqLab ' CYCL DEF 1.2 DEPTH ' ZDepth# EOL
SeqLab ' CYCL DEF 1.3 PECKG '
IF Peck?
'-' Peck#
ELSE
ZDepth#
END
EOL
SeqLab ' CYCL DEF 1.4 DWELL '
IF Dwell?
Dwell#
ELSE
'0'
END
EOL
SeqLab ' CYCL DEF 1.5 F' FeedEntry# EOL
END
IF CallMasterOp?
SeqLab ' CALL LBL ' CallMasterNum# EOL
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') {std sep sub Zreps in effect}
NewMasterProg
SeqLab ' CALL LBL ' Program# EOL
StartSub
SeqLab DoL StrtPos XYSpace DoR0 RF ' M99' EOL
ToolPath
SeqLab ' LBL 0' EOL
CloseSub
SetFlagF('1') {not std sep sub Zreps in effect}
ELSE
SeqLab DoL StrtPos XYSpace DoR0 RF ' M99' EOL
ToolPath
END
END
{SetDrillEndOpZ}
Rapid {no output}
SeqLab DoZL ZCP3 ZSpace DoR0 RF DoM 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?
CloseMP
END
DoEndOpPS
Rapid {no output}
SeqLab DoL
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
FirstHome XYSpace
END
DoR0 RF ' M25' EOL { FullUp }
IF MultipleParts? AND AllToolsOnePart?
IF ProgStop?
SeqLab ' STOP M02' EOL
END
CloseMP
END
SeqLab ' STOP M02' EOL
Post
Close
Reopen
IF UseComments?
SetScale('1') {restore scale for comments}
IF FileBytesComment?
'*( FILE LENGTH: ' FileBytes# ' CHARACTERS )' EOL
END
IF FileFeetComment?
'*( FILE LENGTH: ' FileFeet# ' FEET )' EOL
END
IF FileMetersComment?
'*( FILE LENGTH: ' FileMeters# ' METERS )' EOL
END
END
SeqLab ' END PGM ' Program2# ' INCH' EOL
ASCII('3') EOL
Close
Retag


Wyszukiwarka

Podobne podstrony:
Heid TNC 2500 [QM] MU48 89 2
Heid TNC 2500 [ESS] M979 89 1
Heid TNC 2500 [MT] M754 89 3
Heid TNC 2500 [FMI] M815 15
Heid TNC 155 [HM] M654 85
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
Heid TNC 155 [ESS] M980 15
Heid TNC 355 [3C] MV64 15m
Heid TNC 155 [EMC] M612 89m
Heid TNC 151A S1[NM] M711 89m
Heid TNC 155 [PB] M550 89 1m
Heid TNC 155 [FMI] M816 81 2

więcej podobnych podstron