Fadal Format 2 LH [Co] MW66 12m


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

{3/18/97
Modified: Fadal LongHand M728.89.1
Created: Fadal 2 LH [AIM] MY42.89
For: Acurite Injection Mold
Versions: Catalyst v3.30C/ComPost2 MSL 68K
Changes made per Jim Jarrett of Acurite Injection Mold
Modified Sequence Line Numbers.
Need for SeqLab and Retag are not necessary because there is no Line Number Calling involved.
Changed Sequence Label from N? to N in Mach Spec General Info Dialog.
Changed all occurances of SeqLab to Seq in Prog.
Changed all occurances of SeqC to SeqC in Prog.
Deleted Retag at end of Prog.
Added literal 'G9' block at ToolPath.
Per CNCVIS1 M610.89.1 post change on 2/16/93.
Post outputs block on FIRST LineFeat OR ArcFeat following RapidFeat condition.
Moved WFOStuff to StrtPos block at FirstOperation, NewTool and SameTool and DoNewPart sub.
Added ToolChng OpToolID block at FirstOperation.
Moved ToolChng to OpToolID block at NewTool.
Moved SpinOff to CoolOff block at EndPartSub sub.
Added Rapid OfstOff AbsOrInc 'Z0' block at EndPartSub sub.
Deleted call to ResetWFO for MultipleParts AllToolsOnePart condition at Main.
Changed OfstOff UnTool ToolChng block to ToolChng UnTool at end of Prog.
Added literal 'X0Y0' to WFOOff block and moved in front of ToolChng UnTool at end of Prog.
DWB}

{3/18/97
Modified: Fadal 2 LH [AIM] MY42.89
Created: Fadal 2 LH [AIM] MY42.89.1
For: Acurite Injection Mold
Versions: Catalyst v3.30C/ComPost2 MSL 68K
Changes made per Jim Jarrett of Acurite Injection Mold
Modified output of literal 'G9' block at ToolPath.
Deleted IF NOT Rapid? and IF LAST Rapid? Booleans.
IF LAST Rapid? Boolean was causing post to output extra EntryFeedRates during Toolpath.
Developers original intent on 2/16/93 to block on FIRST LineFeat OR ArcFeat following RapidFeat
condition was not working as intended.
When I changed IF LAST Rapid? to IF LAST RapidFeat, the post output more 'G9' blocks and
extra EntryFeedRate problem disappeared.
Left IF FirstFeat? boolean in place.
This caused no difference in occurance of G9 blocks.
DWB}

{6/16/97,
Initial: Fadal 2 LH [AIM] MY42.89.1
Created: Fadal 2 LH Mxxx.89
For: WestStar
eliminated 'O' Program# from start of program, MPK}

{8/1/97,
Initial: Fadal 2 LH [WSM] MX32.89
Created: Fadal 2 LH [WSM] MX32.89m
Converted to Metric
JM}

{8Dec97
Original: Fadal 2 LH [WSM] MX32.89m
Created: Fadal 2 LH [Convatec] Mxxx.12m
For: ConvaTec
Changes made per: Bret Weig
Updated from .89 Longhand to .12 Fromat per LongHand M001.12
Changed M2 to M30 in MachSpec
Changed M7 to M8 in MachSpec
Replaced 'NG21' literal in InitOp with Seq '01'
Moved OpenSub up before RestoreScale in InitOp
Added support for 1ToolAllParts Full Up
Charles Winston}

{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(ToolDiameter#,4)
FORMAT(TrackXNO#,4)
FORMAT(TrackYNO#,4)
FORMAT(TrackZNO#,4)
FORMAT(Recall#,5)
FORMAT(Tag#,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)

{Testing Subroutines *}

#20 = 'Ä…0000.0000'
FORMAT(OriginShiftPX#,20)
FORMAT(OriginShiftPY#,20)
FORMAT(OriginShiftPZ#,20)
FORMAT(OriginUnshiftPX#,20)
FORMAT(OriginUnshiftPY#,20)
FORMAT(OriginUnshiftPZ#,20)
FORMAT(OriginUSPXCTP#,20)
FORMAT(OriginUSPYCTP#,20)
FORMAT(OriginUSPZCTP#,20)

Report:
IF MultipleParts? AND WorkFixtureOffsets?
SetStatusOff
' ' EOL
' PartShiftX# = ' PartShiftX# ' '
' PartShiftY# = ' PartShiftY# ' '
' PartShiftZ# = ' PartShiftZ# EOL
'OriginUnshiftPX#(0) = ' OriginUnshiftPX#('0') ' '
'OriginUnshiftPY#(0) = ' OriginUnshiftPY#('0') ' '
'OriginUnshiftPZ#(0) = ' OriginUnshiftPZ#('0') EOL
'OriginUnshiftPX#(1) = ' OriginUnshiftPX#('1') ' '
'OriginUnshiftPY#(1) = ' OriginUnshiftPY#('1') ' '
'OriginUnshiftPZ#(1) = ' OriginUnshiftPZ#('1') EOL
'OriginUnshiftPX#(2) = ' OriginUnshiftPX#('2') ' '
'OriginUnshiftPY#(2) = ' OriginUnshiftPY#('2') ' '
'OriginUnshiftPZ#(2) = ' OriginUnshiftPZ#('2') EOL
' OriginShiftPX# = ' OriginShiftPX# ' '
' OriginShiftPY# = ' OriginShiftPY# ' '
' OriginShiftPZ# = ' OriginShiftPZ# EOL
' OriginUSPXCTP#(0) = ' OriginUSPXCTP#('0') ' '
' OriginUSPYCTP#(0) = ' OriginUSPYCTP#('0') ' '
' OriginUSPZCTP#(0) = ' OriginUSPZCTP#('0') EOL
' OriginUSPXCTP#(1) = ' OriginUSPXCTP#('1') ' '
' OriginUSPYCTP#(1) = ' OriginUSPYCTP#('1') ' '
' OriginUSPZCTP#(1) = ' OriginUSPZCTP#('1') EOL
' OriginUSPXCTP#(2) = ' OriginUSPXCTP#('2') ' '
' OriginUSPYCTP#(2) = ' OriginUSPYCTP#('2') ' '
' OriginUSPZCTP#(2) = ' OriginUSPZCTP#('2') EOL
' ' EOL
SetStatusOn
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}
END
RETURN

DoPartCycleComment:
IF MultipleParts? AND UseComments? AND SubComment?
SeqC '* PART NO. ' Tag# 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

FormatLine:
ckCRC FeedC MoveXYZC
RETURN

ckCRCNum:
{ Not supported }
RETURN

ToolPath:
EACHFeat
IF PointFeat? { Drilling Only }
SeqC MoveSXYZC EOL
ELSE
IF FirstFeat?
SeqC 'G9' EOL
END
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 FormatLine FeedRateC ckCRCNum EOL
DecelMove2
END
SeqC FormatLine DecelFeed ckCRCNum EOL
ELSE
SeqC FormatLine 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 EOL
DecelMove2
END
SeqC FormatArc DecelFeed EOL
ELSE
SeqC FormatArc ArcFeedC 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

GetSpeed:
IF Drilling?
GetCycle
IF 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
ELSE
IF FirstOperation? OR NewTool? OR LAST ProgStop?
SeqC Speed SpinOn EOL
ELSE
SeqC SpeedC EOL
END
END
RETURN

ProgStart:
InitProg
TagInit
ReverseXZArcs
InitWFONum
SetFlood
SetMaxRPM('15000')
IF Metric?
SetMaxFeed('12700')
ELSE
SetMaxFeed('500')
END
Save# Num#('1') Num#('0') { This Tool FirstOp# }
Save# Num#('2') Num#('0') { This Tool LastOp# }
Save# Num#('3') Num#('0') { LastOp# }
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 }
IF PSComment? AND UseComments?
'PostScript:' EOL
' Literals: put between single or double quotes.' EOL
' Separate commands and literals with at least one space.' EOL
' A CR ( RETURN key ) will start a new line.' EOL
' Commands: may be capital and/or lower case letters. Separate commands with a space.' EOL
' EndOP -' EOL
' all literals and commands before an ENDOP command' EOL
' will appear at the beginning of the operation. All ' EOL
' literals and commands after an ENDOP command will appear' EOL
' at the end of the operation. ' EOL
' NewWFO(56), NWFO(56) -' EOL
' The Work Fixture Offset # you specify will be used for all following operations.' EOL
' Do not use with the ncPost multiple part option.' EOL
' 4thAxisCW(12.5), 4ACW(12.5) -' EOL
' generates a + A move of the value you specify' EOL
' 4thAxisCCW(22.5), 4ACCW(22.5) -' EOL
' generates a - A move of the value you specify' EOL
' 5thAxisCW(30), 5ACW(30) -' EOL
' generates a + B move of the value you specify' EOL
' 5thAxisCCW(22.5), 5ACCW(22.5) -' EOL
' generates a - B move of the value you specify' EOL
END
RETURN

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

OpGuts:
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

WFOStuff:
IF MultipleParts? AND WorkFixtureOffsets? AND NewWFO?
'*** WARNING *** DO NOT USE NEWWFO() WITH NCPOST MULTIPLE PARTS AND WORK FIXTURE OFFSETS' EOL
ELSE
IF NewWFO?
SeqC 'E' NewWFO# EOL
ELSE
IF MultipleParts? AND WorkFixtureOffsets? AND NOT SameTool?
FORMAT(ADD#,5)
SeqC 'E' ADD# NewWFO# SUB# Tag# Num#('1') EOL
FORMAT(ADD#,4)
ELSE
IF NeedWFO1? AND NOT SameTool?
SeqC 'E' NewWFO# EOL
END
END
END
END
RETURN

ResetWFO:
IF WorkFixtureOffsets?
SeqC WFO1 EOL
END
RETURN

InitOp:
EOR EOL
SeqC
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$ ' MILIMETERS' EOL
END
IF PartsComment?
SeqC '* PARTS PROGRAMMED: ' Parts# EOL
END
IF StartToolComment?
SeqC '* FIRST TOOL IN SPINDLE' EOL
END
END
OpenSub
RestoreScale
Seq '01' EOL
RETURN

FirstOp1:
IF ToolChangeAtHome?
SetHome
END
Seq ToolChng OpToolID EOL
DoPartCycleComment
DoOpComments
DoPostScript
RETURN

FirstOp2:
GetSpeed
RETURN

FirstOp3:
CheckPass
SeqC Plane AbsOrInc Rapid StrtPos WFOStuff EOL
SeqC OfstOn EOL
SeqC CoolOn EOL
RETURN

FirstOp3a: {can't XY position before WFO}
CheckPass
SeqC OfstOn EOL
SeqC CoolOn EOL
RETURN

NewToolOp1:
SeqC CoolOff EOL
RETURN

NewToolOp2:
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
RETURN

NewToolOp3: {Start new Operation}
Seq ToolChng OpToolID EOL
DoPartCycleComment
DoOpComments
DoPostScript
RETURN

NewToolOp4:
GetSpeed
RETURN

NewToolOp5:
CheckPass
SeqC Plane AbsOrInc Rapid StrtPos WFOStuff EOL
SeqC OfstOn EOL
SeqC CoolOn EOL
RETURN

NewToolOp5a:
CheckPass
SeqC OfstOn EOL
SeqC CoolOn EOL
RETURN

SameToolOp1:
DoEndOpPS
IF LAST ProgStop?
SeqC CoolOff EOL
SeqC SpinOff EOL
SeqC 'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
END
RETURN

SameToolOp2: {Start new Operation}
DoPartCycleComment
DoOpComments
DoPostScript
CheckPass
RETURN

SameToolOp3: {Start new Operation}
IF LAST ProgStop?
GetSpeed
SeqC PlaneC AbsOrInc Rapid StrtPos WFOStuff EOL
SeqC OfstOn EOL
SeqC CoolOn EOL
ELSE
GetSpeed
SeqC PlaneC AbsOrInc Rapid StrtPos WFOStuff EOL
IF NewToolOffset?
SeqC OfstOn EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqC CoolOn EOL
END
END
RETURN

End1:
SeqC SpinOff CoolOff EOL
SeqC Rapid OfstOff AbsOrInc 'Z0' EOL
RETURN

End2:
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 EOL
END
IF ProgStop?
SeqC 'M0' EOL
ELSE
IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart?
SeqC ProgStop EOL
END
END
SeqC WFOOff 'X0Y0' EOL
SeqC ToolChng UnTool EOL
RETURN

End3:
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
RETURN

MPallTools1P: {Multiple Parts, All Tools 1 Part}
IF FirstOperation?
IF FirstPart?
InitOp
END
OpenMP
FirstOp1
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
NewToolOp2
NewToolOp3
NewToolOp4
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3
END
END
OpGuts
RETURN

MP1ToollAllPfu: {Multiple Parts, 1 Tool all Parts, full up}
IF FirstOperation?
IF FirstPart?
InitOp
FirstOp1
FirstOp2
OpenMP
FirstOp3
END
ELSE
IF NewTool?
IF FirstPart?
NewToolOp1
CloseMP
ResetWFO
NewToolOp2
NewToolOp3
NewToolOp4
OpenMP
NewToolOp5
END
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3
END
END
OpGuts
RETURN

MP1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane}
IF FirstOperation?
IF FirstPart?
InitOp
FirstOp1
FirstOp2
FirstOp3
OpenMP
END
ELSE
IF NewTool?
IF FirstPart?
CloseMP
NewToolOp1
ResetWFO
NewToolOp2
NewToolOp3
NewToolOp4
NewToolOp5
OpenMP
END
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3
END
END
OpGuts
RETURN

NoMPs: {no multiple parts}
IF FirstOperation?
InitOp
FirstOp1
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
NewToolOp2
NewToolOp3
NewToolOp4
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3
END
END
OpGuts
RETURN

MasterSub:
IF MultipleParts?
IF AllToolsOnePart?
MPallTools1P
ELSE {implied OneToolAllParts?}
IF FullUp?
MP1ToollAllPfu
ELSE {implied ExitClearancePlane?}
MP1ToollAllPXcp
END
END
ELSE
NoMPs
END
RETURN

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

{finish last operation}
IF MultipleParts?
IF AllToolsOnePart?
End1
End2
CloseMP
ELSE {implied OneToolAllParts?}
IF FullUp?
End1
CloseMP
ResetWFO
End2
ELSE {implied ExitClearancePlane?}
CloseMP
End1
ResetWFO
End2
END
END
ELSE {NoMPs}
End1
End2
END
RETURN

DoNewPart:
IF NOT FirstPart?

{Finish off last Part}

IF FullUp?
SeqC CoolOff EOL
IF AbsoluteMoves?
IncValue
END
SeqC OfstOff EOL
END
{DoEndOpPS}

{Start new Part}

DoPartCycleComment
DoOpComments
DoPostScript
CheckPass
IF Drilling?
GetCycle
IF RigidTap?
SeqC SpeedC SpinOff EOL
SeqC 'G84.2' EOL
ELSE
SeqC SpeedC EOL
END
ELSE
SeqC SpeedC EOL
END
SeqC PlaneC AbsOrInc Rapid StrtPos WFOStuff EOL
IF FullUp?
SeqC OfstOn EOL
SeqC CoolOn EOL
END
END
RETURN

DoParts:
TagInit
EachPart
TagInc
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#('2') Recall# Num#('1')
RETURN

GetToolLastOP:
EachOp
IF Equal? Operation# Recall# Num#('2')
Save# Num#('2') ADD# Operation# Num#('1')
IF NewTool?
IF Equal? Recall# Num#('1') Recall# Num#('3')
Save# Num#('2') Operation#
ELSE
IF NotEqual? Recall# Num#('1') SUB# Recall# Num#('2') Num#('1')
Save# Num#('2') SUB# Operation# Num#('1')
END
END
END
END
NextOp
RETURN

MPLoop:
IF AllToolsOnePart?
DoParts
ELSE { OneToolAllParts }
GetToolFirstOp
IF LTEqual? Recall# Num#('1') Recall# Num#('3')
GetToolLastOP
DoParts
Save# Num#('1') ADD# Recall# Num#('2') Num#('1') { Next Tool First Op }
END
END
RETURN

{Start of executable Prog, Top Level ****}

ProgStart {setup and initializations}

IF MultipleParts?
IF WorkFixtureOffsets?
{'NOTE: This Post Processor does not support Work Fixture Offsets for Multiple Parts.' EOL
'Therefore, the output will be controlled by the following values that are' EOL
'already entered in Equally Spaced Offsets Edit Fields:' EOL
'X' PartShiftX# ' Y' PartShiftY# ' Z' PartShiftZ# EOL
'It is recommended that you change your selection to Equally Spaced Offsets.' EOL}
IF NotEqual? PartShiftX# Num#('0')
BadMPWFOReport
ELSE
IF NotEqual? PartShiftY# Num#('0')
BadMPWFOReport
ELSE
IF NotEqual? PartShiftZ# Num#('0')
BadMPWFOReport
END
END
END
END
EachOp
IF FirstOperation?
Save# Num#('1') Operation#
ELSE
IF LastOp?
Save# Num#('3') Operation#
END
END
NextOp
MPLoop
IF OneToolAllParts?
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
ResetWFO
END
ELSE
EachOp
MasterSub
NextOp
EndPartSub
END
End3


Wyszukiwarka

Podobne podstrony:
Fadal Format 1 LH AI MV41 89 1
Fadal Format 1 LH [PW] CU49 16
Fadal Format 1 LH [FC] MU73 89 1
Fadal Format 1 LH [PV] MU74 89
Fadal Format 2 LH [NM] MU20 16
Fadal Format 1 LH [CC] MU17 89
Fadal Format 2 LH WT MX53 89 4
Fadal Format 2 LH PTT MW94 89m
Fadal Format 2 LH [KE] MW01 12
Fadal Format 2 (AC) B807 12
Fadal Format 2 [MM] MW60 89
Fadal Format 2 [PEP] M116 89 1
Fadal Format 2 [HM] MV16 89 1m
Fadal Format 2 [NW] D611 16 2m
Fadal Format 1 [DM] M179 15 1
Fadal Format 1 [6D] MT01 89

więcej podobnych podstron