Fadal Format 1 [PE] NMU96 89


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

{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 SeqC, SeqC to SeqCC 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}

{10Sep97
Original: Fadal LongHand M728.89.1
Created: Fadal LongHand M728.89.2
For: B. Alexander Programming
Changes made per: Barry Alexander
Deleted old version numbers and comments e.g. {.72}, {commands}, {literals}, etc
Changed Seq to SeqC for WFOStuff in FirstOperation
Added Seq OpToolID and ToolChng in FirstOperation, Customer requires Tool in Spindle
Added Literal 'G8' in FirstOperation
Charles Winston}

{09/28/98,
Initial: Fadal LongHand M728.89.2 AND CNCVIS1 M610.15.4
Created: Fadal Format 1 [M8] NMxxx.89

Changes to Form:
1) Subs - Selected Use Sub-Routines.
2) Tool Offsets - Added 'D' to CRC Offset label.
3) Spindle & Coolant - Changed Coolant On label to 8.
4) Program Stops - Changed End Program number to 30.

Changes to Prog:
1) Modified M726 to output like M610.
CDH}

{09/29/98,
Initial: Fadal Format 1 [M8] NMU95.89
Created: Fadal Format 1 [PE] NMxxx.89
For: ProtoTech Eng.

Changes to Prog:
1) FirstOp/NewTool/End - Added Rapid CRCOff DrillOff AbsValue 'H0'.
CDH}

{Prog Numeric Format Definitions ****}

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

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#,5)
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)

{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 ToolTypeComment?
SeqC '* TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ 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:
IF FeedEntry?
SeqC FeedC ZInC FeedEntC EOL
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

ToolPath:
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 FeedRateC ckCRCNum EOL
DecelMove2
END
SeqC ckCRC FeedC MoveXYZC DecelFeed ckCRCNum EOL
ELSE
SeqC 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
SeqC FormatArc ArcFeedC ckCRCNum EOL
DecelMove2
END
SeqC FormatArc DecelFeed ckCRCNum EOL
ELSE
SeqC FormatArc ArcFeedC ckCRCNum 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
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
DoPartCycleComment
SeqC 'G20' EOL
SeqC Rapid CRCOff DrillOff AbsValue 'H0' EOL
SeqC OpToolID ToolChng EOL
DoOpComments
DoPostScript
SeqC 'G8' EOL
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 Rapid AbsOrInc SpinOff CoolOff EOL
SeqC 'G53Z0' EOL { OfstOff }
IF MultipleParts? AND OneToolAllParts?
ResetWFO
END
DoEndOpPS
IF ToolChangeAtHome?
SeqC 'G53' Home EOL
END
IF LAST ProgStop?
SeqC 'M00' EOL
ELSE
SeqC ProgStop EOL
END

{Start new Operation}

SeqC Rapid CRCOff DrillOff AbsValue 'H0' EOL
SeqC OpToolID ToolChng EOL
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 'G0H0Z0' CoolOff SpinOff 'M00' EOL

{Start new Operation}

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

{Start new Operation}

GetStartOfSameTool
GetSpeed
SeqC PlaneC AbsOrInc Rapid StrtPos WFOStuff EOL
SeqC OfstOn EOL
ELSE

{Start new Operation}

GetStartOfSameTool
GetSpeed
SeqC PlaneC AbsOrInc Rapid StrtPos WFOStuff 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 Rapid AbsOrInc SpinOff CoolOff EOL { 'G0G90M5M9' }
SeqC 'G53Z0' EOL { OfstOff }
IF MultipleParts? AND OneToolAllParts?
ResetWFO
END
DoEndOpPS
IF FIRST ToolChangeAtHome? {added FIRST modifier}
SeqC AbsOrInc Rapid FirstHome EOL
END
IF ProgStop?
SeqC 'M0' EOL
ELSE
IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart?
SeqC ProgStop EOL
END
END
SeqC Rapid CRCOff DrillOff AbsValue 'H0' EOL
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 EOL
SeqC 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

{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 }
SetFlagF('1') { WFOStuff }
SetFlag('2') { MultipleParts OneToolAllParts }
SetFlag('3') { MultipleParts OneToolAllParts }
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
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 IN SPINDLE' 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 WFOOff EOL
SeqC EOP EOL
EOR EOL
'BYE' 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 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 [SMF] M636 89 4
Fadal Format 2 [RP] MX47 89
Fadal Format 1 WPG75 M986 89 1
Fadal Format 2 [LM] MV11 89 4
Fadal Format 1 [GTR] MW22 89
Fadal Format 1 [BA] M161 89 1
Fadal Format 1 [SM] MT74 89
Fadal Format 1 [M8] NMU95 89
Fadal Format 1 [CM] M712 89

więcej podobnych podstron