Fadal Format 2 LH WT MX53 89 4


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

{9/26/88, Added CRCOffC to rapid up and repeats, same as all other Fadal posts, WFG}
{6/5/89, Changed Maximum Spindle RPM from 10000 to 15000 in Form's 'Numbers' Dialog, JR}
{1/26/90, Updated: Fadal M003.58, to .69 format, JR}
{2/90/90, Updated: Fadal M003.69, to .70 format, JR}
{3/23/90, Changed SetMaxRPM from 10000 to 15000 in Prog, JR}

{4/6/90
Added '01' literal for looping once on CallLab line at ZonlyRepAutoCycle & ZonlyRep subs.
DWB}

{7/24/90, Added InitProg globally to posts with this remark, DWB}
{7/24/90, Replaced all occurances of SetSRXYZero with SetSRXYtoSP, DWB}
{8/10/90, Updated: Fadal M003.71 to .74 format, JR}
{3/6/91, Updated: Fadal M003.74 to .76.1 format, JR}
{4/3/91, Updated: Fadal M003.76.1, to .80 format, DWB}
{9/11/91, Updated: Fadal M003.79, to .81 format, DWB}

{* 11/3/93 [cwh]
Modeified: Fadal M003.81
To: Fadal M003.81.1
For: Gibbs and Associates

Modified the form so that it could be used with the 32MP and 32MPOL
versions of Catalyst ( Virtual ).
*}

{11/8/93
Modified: Fadal M003.81.1
For: Gibbs & Associates
Modified to get consecutive sequence numbers thru subroutines:
Changed; Seq to SeqLab, SeqC to SeqLabC and N to N? in MachSpec.
Added Retag
Jim Radcliffe}

{1/3/95
Updated: Fadal M003.81.2
For: Gibbs & Associates
Versions: ncCad 4.33/ncCAM 4.33/ncPost 4.33.04/Compost 4.21.23
Changes made per Pete Jackson
Updated to Version 4.2 per Fanuc 6M M001.81.2f Format.
Corrected FORMAT5 from '########;0' to '#######0'.
Added RestoreScale Sub per 4-Axis Post Processor.
Moved UnSkipZ from FinishSub1 to ZOnlyRep where SkipZ is set.
Changed FeedRateC to FeedEntC for FIFO Exit Moves.
Added CkCRC sub for CRCOffC per version 4.2.
CutterRadiusCompensation ExitLength will output G40 on LastFeat AND LineFeat at StdLine sub.
Changed logic to output CRCOnC in OneFeat ToolPath.
Added logic to suppress output of CRCOnC on ZMove Feature.
Added support of CRC during multiple pocket dog-bone operation.
Added condition to output CRCOnC for XMove OR YMove only at CkCRC sub.
Outputs G41/G42 on First LineFeat after Z Plunge.
Modified condition to output CRCOffC for LastFeat AND AutoCycle at ToolPath RapidFeat.
Assures that G40 is not output prior to LastFeat.
Added CRCOffC to RapidFeat at ToolPath.
Outputs G40 at all ZMoveOnly Feature Retract blocks.
Changed TrackZNO# ZDepth# to TrackZNO# FIRST SPZ# at IF Drilling.
SPZ# is affected by SetScale, whereas ZDepth# is not.
DWB}

{1/3/95
Copied: Fadal M003.81.3
Created: Fadal LongHand M728.81.3
For: Gibbs & Associates
Versions: ncCad 4.33/ncCAM 4.33/ncPost 4.33.04/Compost 4.21.23
Changes made per Pete Jackson
Updated to Version 4.2 per LongHand M001.81.3f Format.
DWB}

{9/14/95
Modified: Fadal LongHand M728.81.3
Created: Fadal LongHand M728.85
For: Gibbs & Associates
Versions: Catalyst v3.30C/ComPost2 MSL 68K
These version notes were added on 3/13/97.
Identity of developer remains unknown to me.
Added OptCyc1F at PSInit sub.
Added IF Tap? AND OptCyc1? condition at DrillStuff sub.
IF TRUE, post outputs literal 'G84.1', RigidTap Cycle Code.
IF FALSE, post outputs normal Cycle command.
Added IF Drilling? AND RigidTap? condition at MasterSub sub
IF TRUE, post outputs Speed block followed by literal 'G84.2' block.
IF FALSE, post outputs normal Speed SpinOn block.
Occurs at FirstOperation, NewTool and SameTool LAST ProgStop situations.
DWB}

{2/12/96, Updated .85 number to .86, no changes necessary, MPK}

{3/22/96, Tested ZOnlyRepAutoCycle, Changed version # to .89, MPK}

{3/18/97
Updated: Fadal LongHand M728.89
Created: Fadal LongHand M728.89.1
For: Gibbs & Associates/Acurite Injection Mold
Versions: Catalyst v3.30C/ComPost2 MSL 68K
Updated for Catalyst v3.30C per LongHand M001.89b Format.
Added SetDrillEndOpZ sub and call to same at IF Drilling.
Added IF SPXMove? OR SPYMove? 2 places at XYZRep.
Modified ZonlyRepAutoCycle to call EntryMove for all cases.
Modified logic of MultipleParts OneToolAllParts at GetToolLastOP sub.
Problem with output when there are blank operations prior to SameTool.
Minor modifications made to MPLoop and GetToolFirstOp subs.
Added Flag(2) and Flag(3).
Added .14 Additions:
Changed FORMAT#2 from ###.###;0. to #####.###;0. at Prog Numeric Format Definitions.
Changed FORMAT#3 from *###.###;0. to *#####.###;0. at Prog Numeric Format Definitions.
Deleted Flag(1) for CRCOffsetC at ckCRC and ckCRCNum subs and at setup and initializations.
Added NOT LastFeat? AND Equal? SPZ# EPZ# condition at ckCRCNum sub.
Moved contents of FormatLine back to ToolPath LineFeat.
Deleted version comments.
Simplified ExitMove sub.
Deleted OpenMP and CloseMP commands.
Simplified EndPartSub sub.
Modified WorkFixtureOffset logic.
Added Flag(1) for WFOStuff at setup and initializations.
Added WFONum sub.
Rewrote logic at WFOStuff sub.
Added EOL to NewWFO MP WFOStuff sub Warning.
Deleted SeqC and EOL at WFOStuff sub.
Added Flag(1) logic at start of EachOp/NextOp Loop.
Moved WFOStuff after MP-OTAP-FU condition at FirstOperation and NewTool.
Added WFOStuff for MP-OTAP-ECP condition at FirstOperation and NewTool.
Added AbsOrInc Rapid to StrtPos block for MP-OTAP-ECP condition at FirstOperation and NewTool.
Added SeqC and EOL at WFOStuff calls at GetStartOfSameTool, FirstOperation and NewTool.
Moved Speed SpinOn after MP-OTAP-FU condition at FirstOperation and NewTool.
Added Speed SpinOn for MP-OTAP-ECP condition at FirstOperation and NewTool.
Added SetMaxFeed(12700) for Metric VNC files.
Added LongDrillStuff.
Uses Var(8).
Deleted all occurances of TagInit, TagInc and Tag#.
Replaced with PartNum# for better WFO handling.
DWB}

{5/18/97
Updated: Fadal LongHand M728.89.1
Created: Fadal LongHand Mxxx.89.x
For: Wright Tool Co.
Versions: SolidSurfacer v4.01C/ComPost2 v1.0B11
Custom header per customer request
Combine H# and Coolant On
Change Coolant On from M7 to M8
Remove BYE after end of program
Changed to First Tool Not In Spindle
Changed Program# to forced 4 digit output
Changed Seq to SeqC All Sequence Numbers Are Now Conditional
Jeff Casto}

{5/27/97
Updated: Fadal LongHand Mxxx.89.x
Created: Fadal LongHand Mxxx.89.x
For: Wright Tool Co.
Versions: SolidSurfacer v4.01C/ComPost2 v1.0B11
Remove Retool At Program End
Moved ToolTypeComment to same line as ToolChng
Changed comment delimeter to ( )
Jeff Casto}

{7/19/97
Modified: Fadal Format 2 LH [WT] MX53.89
Created: Fadal Frmt 2 LH [WT] MX53.89.1
For: Wright Tool Co.
Added support for CRC Offset Number.
Joe Cusimano}

{7/24/97
Modified: Fadal Frmt 2 LH [WT] MX53.89.1
Created: Fadal Frmt 2 LH [WT] MX53.89.2
For: Wright Tool Co.
Padded post with spaces between commands.
Added CRC Offset warning.
Joe Cusimano}

{7/27/97
Modified: Fadal Frmt 2 LH [WT] MX53.89.2
Created: Fadal Frmt 2 LH [WT] MX53.89.3
For: Wright Tool Co.
Added GetFeedRateC and GetArcFeedC subs to implement variable contour feedrates.
The logic is as follows:
When cutting in the plus Z direction or the XY direction only, the feedrate
is set to the Contour Feed. When cutting in the minus Z direction, the
feedrate is set to the Entry Feed.
Exception: When the Entry Feedrate is HIGHER than the Contour Feedrate, then
the minus Z moves are made at the Contour Feedrate, which is the slower feed.
Joe Cusimano}

{8/10/97
Modified: Fadal Frmt 2 LH [WT] MX53.89.3
Created: Fadal Frmt 2 LH [WT] MX53.89.4
For: Wright Tool Co.
Fixed bug in Z feed logic.
Joe Cusimano}

{Prog Numeric Format Definitions ****}

#1 = '#.00'
#2 = '#####.###;0.'
#3 = '*#####.###;0.'
#4 = '####.####;0.'
#5 = '#######0'
#6 = '#####.###;0.'
#7 = '#'
#8 = 'Ä…#bbbb.bbbb#'
#9 = '0000'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ADD#,4)
FORMAT(ToolDiameter#,4)
FORMAT(TrackXNO#,4)
FORMAT(TrackYNO#,4)
FORMAT(TrackZNO#,4)
FORMAT(Recall#,5)
FORMAT(PartNum#,5)
FORMAT(Program#,9)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
FORMAT(RapidF#,7)
FORMAT(PartShiftX#,8)
FORMAT(PartShiftY#,8)
FORMAT(PartShiftZ#,8)
FORMAT(FeedEntry#,4)
FORMAT(FeedContour#,4)
FORMAT(ContourFeed2#,4)
FORMAT(ArcFeed#,4)
FORMAT(Recall#,4)

{Prog Subroutines ****}

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

WFO:
FORMAT(ADD#,5)
' E' ADD# PartNum# Num#('0')
FORMAT(ADD#,4)
RETURN

WFONum:
' E' 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?('1')
IF NOT SameTool?
IF MultipleParts?
IF WorkFixtureOffsets?
WFO
ELSE
WFONum
END
ELSE
WFONum
END
END
END
END
SetFlagF('1')
RETURN

ResetWFO:
IF WorkFixtureOffsets?
SeqC WFO1 EOL
END
RETURN

DoPartCycleComment:
IF MultipleParts? AND UseComments? AND SubComment?
SeqC ' ( PART NO. ' PartNum# ' )'EOL
END
RETURN

DoCycleComment:
IF UseComments? AND SubComment?
SeqC ' ( CYCLE START' ' )'EOL
END
RETURN

DoOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
SeqC ' ( OPERATION ' Operation# ': ' OperationType$ ' )' EOL
END
IF OperationComment?
SeqC ' ( ' OperationComment$ ' )'EOL
END
IF WorkGroupComment?
SeqC ' ( ' WorkGroupComment$ ' )'EOL
END
IF ToolComment?
SeqC ' ( ' ToolComment$ ' )'EOL
END
RestoreScale
END
RETURN

BadMPWFOReport:
SetStatusOff
' ' EOL
'Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„' EOL
'Ä„ NOTE: Even though you have elected to Ä„' EOL
'Ä„ process this file using Multiple Ä„' EOL
'Ä„ Parts with Work Fixtures, there exist Ä„' EOL
'Ä„ non-zero values in the invisible, Ä„' EOL
'Ä„ Equally SpacedÉ fields, as follows: Ä„' EOL
'Ä„ Ä„' EOL
'*****************************************' EOL
IF NotEqual? PartShiftX# Num#('0')
' X axis shift = ' PartShiftX# EOL
END
IF NotEqual? PartShiftY# Num#('0')
' Y axis shift = ' PartShiftY# EOL
END
IF NotEqual? PartShiftZ# Num#('0')
' Z axis shift = ' PartShiftZ# EOL
END
'*****************************************' EOL
'Ä„ Ä„' EOL
'Ä„ Please reset these values to zero as Ä„' EOL
'Ä„ they affect the coordinate values Ä„' EOL
'Ä„ output, starting with Part# 2. Ä„' EOL
'Ä„ Thank You. Ä„' EOL
'Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„' EOL
' ' EOL
SetStatusOn
RETURN

PSInit:
NewWFOF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN

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

DoPostScript:
PSInit
EachPS
SeqC PostScript EOL
PSStuff
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqC EndOpPS EOL
PSStuff
NextPS
RETURN

EntryMove:
Save# Num#('8') Num#('0') { initialize feedrate }
IF FeedEntry?
SeqC FeedC ZInC FeedEntC EOL
Save# Num#('8') FeedEntry#
ELSE
SeqC RapidC ZInC EOL
END
RETURN

ExitMove:
SeqC
IF FeedConnect?
IF NOT AutoCycle?
IF NOT NoZMoves?
FeedC ZInC FeedEntC
END
END
ELSE
CRCOffC
IF FIFO?
FeedC PRIME ZCP2C FeedEntC
ELSE
RapidC PRIME ZCP2C
END
END
EOL
RETURN

ExitMove2:
IF FIFO?
FeedC ZCP3C FeedEntC
ELSE
RapidC ZCP3C
END
RETURN

CycleWarning:
{ NOTE: This Post Processor takes care of Z Clearance. }
RETURN

FormatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXYZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
RETURN

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

ckCRCNum:
IF NOT LastFeat? AND Equal? SPZ# EPZ#
CRCOffsetC
END
RETURN

CalcFeedRateC:
IF Flag?('5') { blend on Feedrate has not yet been output }
IF NOT Equal? FeedEntry# FeedContour#
SetFlagF('5')
END
IF Equal? Recall# Num#('8') FeedContour#
{ suppress output }
ELSE
' F' FeedContour#
Save# Num#('8') FeedContour#
END
ELSE
IF Equal? Recall# Num#('8') ContourFeed2#
{ suppress output }
ELSE
' F' ContourFeed2#
Save# Num#('8') ContourFeed2#
END
END
RETURN

CalcFeedEntC:
IF Flag?('5') { if we are feeding down we can not be blending on }
SetFlagF('5')
END
IF Equal? Recall# Num#('8') FeedEntry#
{ suppress output }
ELSE
' F' FeedEntry#
Save# Num#('8') FeedEntry#
END
RETURN

CalcArcFeedC:
IF Flag?('5') { blend on Feedrate has not yet been output }
IF NOT Equal? FeedEntry# FeedContour#
SetFlagF('5')
END
IF Equal? Recall# Num#('8') ArcFeed#
{ suppress output }
ELSE
' F' ArcFeed#
Save# Num#('8') ArcFeed#
END
ELSE
IF Equal? Recall# Num#('8') ContourFeed2#
{ suppress output }
ELSE
' F' ContourFeed2#
Save# Num#('8') ContourFeed2#
END
END
RETURN

GetFeedRateC:
IF Equal? SPZ# EPZ# { no Z move }
CalcFeedRateC
ELSE
IF GreaterThan? SPZ# EPZ# { cutting in minus Z direction }
IF GreaterThan? FeedEntry# FeedContour#
CalcFeedRateC
ELSE
CalcFeedEntC
END
ELSE
CalcFeedRateC
END
END
RETURN

GetArcFeedC:
IF Equal? SPZ# EPZ# { no Z move }
CalcArcFeedC
ELSE
IF GreaterThan? SPZ# EPZ# { cutting in minus Z direction }
IF GreaterThan? FeedEntry# ArcFeed#
CalcArcFeedC
ELSE
CalcFeedEntC
END
ELSE
CalcArcFeedC
END
END
RETURN

ToolPath:
ResetCRCNum
SetFlag('5') { Contour Feed Flag }
EACHFeat
IF PointFeat? { Drilling Only }
SeqC MoveSXYZC EOL
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqC ckCRC RapidC MoveXYZC ckCRCNum EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqC ckCRC FeedC MoveXYZC GetFeedRateC ckCRCNum EOL
DecelMove2
END
SeqC ckCRC FeedC MoveXYZC DecelFeed ckCRCNum EOL
ELSE
SeqC ckCRC FeedC MoveXYZC GetFeedRateC 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
SeqC FormatArc GetArcFeedC EOL
DecelMove2
END
SeqC FormatArc DecelFeed EOL
ELSE
SeqC FormatArc GetArcFeedC EOL
END
NEXTQuadrant
END
END
END
IF AutoCycle?
SetAbs
Save# Num#('6') SUB# EPX# CurOriginPosX#
Save# Num#('7') SUB# EPY# CurOriginPosY#
SetInc
END
END
NEXTFeat
RETURN

AutoCycCutSub1: {part 1}
CalcACSRXY {calc tool position, CalcAutoCycleStatusRecordXY}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
SetSRXYtoSP
IF Repeats? AND ZShiftOnly?
EntryMove
END
SeqC IncValue EOL
RETURN

AutoCycCutSub2: {part 2}
SeqC AbsOrInc
IF FIFO?
FeedC ZCP2 FeedEntC
ELSE
RapidC ZCP2
END
EOL
SetSRSubXY {restore SR to 1st position value}
ReSetPass2 {restore for positioning moves}
RETURN

Milling:
EntryMove
ToolPath
RETURN

XYZRep:
CycleWarning
FindAnyZMoves
EachRep
DoCycleComment
IF FirstCycle?
EntryMove
ELSE
CRCOffC
IF FeedConnect?
IF SPXMove? OR SPYMove?
SeqC FeedC MoveSXYC FeedEntC EOL
END
IF ZShiftOnly?
EntryMove
END
ELSE
IF SPXMove? OR SPYMove?
SeqC RapidC MoveSXYC EOL
END
IF FeedEntry?
SeqC ZCP2C EOL
END
EntryMove
END
END
ToolPath
ExitMove
NextRep
RETURN

NoRepAutoCycle:
EACHFeat
DoCycleComment
IF SPXMove? OR SPYMove?
SeqC RapidC MoveSXYC EOL
END
AutoCycCutSub1
Milling
AutoCycCutSub2
NEXTFeat
RETURN

XYZRepAutoCycle:
CycleWarning
EachRep
EACHFeat
DoCycleComment
IF SPXMove? OR SPYMove?
SeqC RapidC MoveSXYC EOL
END
SetAbs
Save# Num#('4') SPX#
Save# Num#('5') SPY#
SetInc
AutoCycCutSub1
Milling
AutoCycCutSub2
SetAbs
TrackXNO# ADD# Recall# Num#('4') Recall# Num#('6')
TrackYNO# ADD# Recall# Num#('5') Recall# Num#('7')
SetAbsOrInc
NEXTFeat
NextRep
RETURN

ZonlyRepAutoCycle:
EACHFeat
DoCycleComment
IF SPXMove? OR SPYMove?
SeqC RapidC MoveSXYC EOL
END
AutoCycCutSub1
EachRep
IF NOT FirstCycle?
IF FeedConnect?
SeqC AbsOrInc EOL
DoCycleComment
IF SPXMove? OR SPYMove?
SeqC IncValue MoveSXYC EOL
AbsOrInc
END
ELSE
AbsOrInc
ExitMove
DoCycleComment
IF SPXMove? OR SPYMove?
SeqC IncValue MoveSXYC EOL
AbsOrInc
END
IF FeedEntry? AND NOT FIFO?
SeqC ZCP2 EOL
END
END
EntryMove
SeqC IncValue EOL
END
EntryMove
ToolPath
NextRep
AutoCycCutSub2
NEXTFeat
RETURN

DrillStuff:
SeqC DrillCP EOL
GetCycle
SeqC
IF RigidTap?
' G84.1'
ELSE
Cycle
END
FromCP StrtPos ZDepth RLevel Dwell Peck Retract
IF Tap?
FadalTapF FadalTapQ
ELSE
FeedEnt
END
EOL
TrackZNO# FIRST SPZ# {.81.2}
RETURN

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

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

GetStartOfSameTool:
DoPartCycleComment
DoOpComments
DoPostScript
CheckPass
SeqC WFOStuff EOL
RETURN

GetSpeed:
GetCycle
IF Drilling? AND RigidTap?
IF FirstOperation? OR NewTool? OR LAST ProgStop?
SeqC Speed EOL
ELSE
SeqC SpeedC SpinOff EOL
END
SeqC ' G84.2' EOL
ELSE
IF FirstOperation? OR NewTool? OR LAST ProgStop?
SeqC Speed SpinOn EOL
ELSE
SeqC SpeedC EOL
END
END
RETURN

MasterSub:
IF MultipleParts?
IF AllToolsOnePart?
IF FirstOperation? OR EquallySpacedOffsets?
SetFlag('1') { WFOStuff }
END
ELSE {implied OneToolAllParts?}
SetFlag('1') { WFOStuff }
END
ELSE
SetFlag('1') { WFOStuff }
END
IF FirstOperation?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
ELSE
IF ToolChangeAtHome?
SetHome
END
SeqC OpToolID ToolChng
IF UseComments?
SetScale('1')
IF ToolTypeComment?
SeqC ' ( TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
RestoreScale
END
DoPartCycleComment
DoOpComments
DoPostScript
GetSpeed
CheckPass
SeqC Plane AbsOrInc Rapid StrtPos WFOStuff EOL
SeqC OfstOn CoolOn EOL
END
ELSE
IF NewTool?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
ELSE

{Finish off last Operation}

SeqC CoolOff EOL
IF MultipleParts? AND OneToolAllParts?
ResetWFO
END
DoEndOpPS
IF ToolChangeAtHome?
SetAbs
LoadFeat
SUB# HomeX# CurOriginPosX#
SUB# HomeY# CurOriginPosY#
Num#('0') { Dummy Z }
SeqC Rapid MoveXY SpinOff EOL
ELSE
SeqC SpinOff EOL
END
IF LAST ProgStop?
SeqC ' M0' EOL
ELSE
SeqC ProgStop EOL
END

{Start new Operation}

SeqC OpToolID ToolChng
IF UseComments?
SetScale('1')
IF ToolTypeComment?
SeqC ' ( TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
RestoreScale
END
DoPartCycleComment
DoOpComments
DoPostScript
GetSpeed
CheckPass
SeqC Plane AbsOrInc Rapid StrtPos WFOStuff EOL
SeqC OfstOn CoolOn EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqC CoolOff EOL
SeqC SpinOff EOL
SeqC ' M0' EOL

{Start new Operation}

GetStartOfSameTool
GetSpeed
SeqC PlaneC AbsOrInc Rapid StrtPos EOL
SeqC OfstOn CoolOn EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF NewToolOffset?

{Start new Operation}

GetStartOfSameTool
GetSpeed
SeqC PlaneC AbsOrInc Rapid StrtPos OfstOn EOL
ELSE

{Start new Operation}

GetStartOfSameTool
GetSpeed
SeqC PlaneC AbsOrInc Rapid StrtPos EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqC CoolOn EOL
END
END
END
END
END {common point for all operations}
RapidF# { No Output }
IF Milling?
SeqC ZCP2C EOL
IF AutoCycle?
IF Repeats?
IF ZShiftOnly?
ZonlyRepAutoCycle
ELSE
XYZRepAutoCycle
END
IF NOT FeedConnect?
SeqC ExitMove2 EOL
END
ELSE
NoRepAutoCycle
SeqC ExitMove2 EOL
END
ELSE { NOT AutoCycle }
IF Repeats?
XYZRep
ELSE
Milling
END
SeqC CRCOffC ExitMove2 EOL
END
ELSE
IF Drilling?
IF Repeats?
EachRep
DoCycleComment
IF FirstCycle?
DrillStuff
END
ToolPath
NextRep
ELSE
DrillStuff
ToolPath
END
SetDrillEndOpZ
SeqC ' G80' EOL
SeqC RapidC ZCP3C EOL
END
END
RETURN

EndPartSub:
{End of program ************************************************************}

{finish last operation}
SeqC CoolOff EOL
IF MultipleParts? AND OneToolAllParts?
ResetWFO
END
DoEndOpPS
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
SetAbs
LoadFeat
SUB# FIRST HomeX# CurOriginPosX#
SUB# FIRST HomeY# CurOriginPosY#
Num#('0') { Dummy Z }
SeqC Rapid MoveXY SpinOff EOL
ELSE
SeqC SpinOff EOL
END
IF ProgStop?
SeqC ' M0' EOL
ELSE
IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart?
SeqC ProgStop EOL
END
END
RETURN

DoNewPart:
IF NOT FirstPart?

{Finish off last Part}

IF FullUp?
SeqC CoolOff EOL
END
{DoEndOpPS}

{Start new Part}

SetFlag('1') { WFOStuff }
GetStartOfSameTool
GetCycle
IF Drilling? AND RigidTap?
SeqC SpeedC SpinOff EOL
SeqC ' G84.2' EOL
ELSE
SeqC SpeedC EOL
END
SeqC PlaneC AbsOrInc Rapid StrtPos EOL
IF FullUp?
SeqC OfstOn CoolOn EOL
END
END
RETURN

DoParts:
EachPart
EachOp
IF AllToolsOnePart?
MasterSub
ELSE { OneToolAllParts }
IF GTEqual? Operation# Recall# Num#('1') { Tool First Op }
IF LTEqual? Operation# Recall# Num#('2') { Tool Last Op }
IF Equal? Operation# Recall# Num#('1') { Tool First Op }
DoNewPart
END
MasterSub
END
END
END
NextOp
IF AllToolsOnePart?
EndPartSub
END
NextPart
RETURN

GetToolFirstOp:
Save# Num#('1') Recall# Num#('3')
RETURN

GetToolLastOP:
SetFlag('3')
EachOp
IF Flag?('2')
IF Flag?('3')
IF GTEqual? Operation# Recall# Num#('1')
Save# Num#('2') Operation#
IF LastOp?
SetFlagF('2')
Save# Num#('3') Num#('0')
ELSE
IF NEXT NewTool?
SetFlagF('3')
Save# Num#('3') NEXT Operation#
END
END
END
END
END
NextOp
RETURN

MPLoop:
IF AllToolsOnePart?
DoParts
ELSE { OneToolAllParts }
IF LTEqual? Recall# Num#('1') Recall# Num#('3')
GetToolFirstOp
GetToolLastOP
DoParts
END
END
RETURN

SetCRCFlag:
SetFlagF('4')
EachOp
IF CutterRadiusCompensation?
SetFlag('4')
END
NextOp
RETURN

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

{setup and initializations}
InitProg
ReverseXZArcs
InitWFONum
SetFlood
SetMaxRPM('15000')
IF Metric?
SetMaxFeed('12700')
ELSE
SetMaxFeed('500')
END
Save# Num#('1') Num#('0') { Current Tool FirstOp# }
Save# Num#('2') Num#('0') { Current Tool LastOp# }
Save# Num#('3') Num#('0') { NewToolOp# }
Save# Num#('4') Num#('0') { XPos Status Register Updated Position for Repeated AutoCycles }
Save# Num#('5') Num#('0') { YPos Status Register Updated Position for Repeated AutoCycles }
Save# Num#('6') Num#('0') { LastFeat EPX# AbsPosValue for Repeated AutoCycles }
Save# Num#('7') Num#('0') { LastFeat EPY# AbsPosValue for Repeated AutoCycles }
Save# Num#('8') Num#('0') { Current Feedrate }
SetFlagF('1') { WFOStuff }
SetFlag('2') { MultipleParts OneToolAllParts }
SetFlag('3') { MultipleParts OneToolAllParts }
SetFlagF('4') { CRC Flag - set to true if cutter comp is used anywhere in the program }
SetFlag('5') { Contour Feed Flag }
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
' FEEDRATE NOTE -' EOL
' This post has been customized to output variable Contour Feedrates based on the' EOL
' Z cut direction.' EOL
' When cutting in the plus Z direction or the XY direction only, the feedrate' EOL
' is set to the Contour Feed. When cutting in the minus Z direction, the' EOL
' feedrate is set to the Entry Feed.' EOL
' Exception: When the Entry Feedrate is HIGHER than the Contour Feedrate, then' EOL
' the minus Z moves are made at the Contour Feedrate, which is the slower feed.' EOL
END
SetCRCFlag
EOR EOL
SeqC 'O' Program#
IF UseComments? AND ProgramNameComment?
' (' ProgramName$ ' )'
END
EOL
IF UseComments?
IF ProgramComment?
SeqC ' ( ' ProgramComment$ ' )'EOL
END
IF FormatNameComment?
SeqC ' ( FORMAT: ' FormatName$ ' )' EOL
END
IF TimeComment?
SeqC ' ( ' Date$ ' AT ' Time$ ' )'EOL
END
IF MovesComment?
SeqC ' ( OUTPUT IN ' MoveType$ ' INCHES' ' )'EOL
END
IF PartsComment?
SeqC ' ( PARTS PROGRAMMED: ' Parts# ' )'EOL
END
IF StartToolComment?
SeqC ' ( FIRST TOOL NOT IN SPINDLE' ' )'EOL
END
IF Flag?('4')
SeqC ' ( WARNING - CUTTER COMP VALUES MUST BE SET TO ZERO ! )'EOL
END
END
OpenSub
RestoreScale
IF MultipleParts?
IF WorkFixtureOffsets?
IF NotEqual? PartShiftX# Num#('0')
BadMPWFOReport
ELSE
IF NotEqual? PartShiftY# Num#('0')
BadMPWFOReport
ELSE
IF NotEqual? PartShiftZ# Num#('0')
BadMPWFOReport
END
END
END
END
IF OneToolAllParts?
EachOp
IF FirstOperation?
Save# Num#('3') Operation#
END
NextOp
MPLoop MPLoop MPLoop MPLoop MPLoop
MPLoop MPLoop MPLoop MPLoop MPLoop
MPLoop MPLoop MPLoop MPLoop MPLoop
MPLoop MPLoop MPLoop MPLoop MPLoop
MPLoop MPLoop MPLoop MPLoop MPLoop
EndPartSub
ELSE
MPLoop
ResetWFO
END
ELSE
EachOp
MasterSub
NextOp
EndPartSub
END
SeqC OfstOff ToolChng EOL
SeqC ' G0 G90 X0. Y0. E48' EOL
SeqC EOP EOL
EOR EOL
Post
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


Wyszukiwarka

Podobne podstrony:
Fadal Format 1 LH AI MV41 89 1
Fadal Format 1 LH [FC] MU73 89 1
Fadal Format 1 LH [PV] MU74 89
Fadal Format 1 LH [CC] MU17 89
Fadal Format 2 LH [Co] MW66 12m
Fadal Format 1 LH [PW] CU49 16
Fadal Format 2 LH [NM] MU20 16
Fadal Format 2 LH PTT MW94 89m
Fadal Format 2 LH [KE] MW01 12
Fadal Format 2 [MM] MW60 89
Fadal Format 2 [PEP] M116 89 1
Fadal Format 2 [HM] MV16 89 1m
Fadal Format 1 [6D] MT01 89
Fadal Format 1 [PE] NMU96 89
Fadal Format 1 [SMF] M636 89 4
Fadal Format 2 [RP] MX47 89

więcej podobnych podstron