Fadal Format 1 [FCM] NCT91 16 1


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

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

{ 10/24/94 [cwh]
C610.81.5 ( from C610.81.4 )

Made changes to zonlyRep and finishSub1 subs to properly handle
Feed connects and clearance moves. }

{11/8/94
Modified: Fadal Format 1 (PW) C610.81.5
For: Gibbs & Associates
Versions: Catalyst v2.14.12C/Compost 4.21.23
Changes made per Pete Jackson
Changed all occurances of SeqC to SeqC.
Charles reported a problem involving operations that do not change coordinate systems from
previous operations.
Added ClearCSOffset at NotSameToolWFO and SameToolWFO subs.
DWB}

{11/16/94 Fixed Program Stop bug in newToolOp2. Tom Hubina}

{ Format: Fadal Format 1 (PW) C610.00
12/22/94
Changed version number to .00 from .81.7 per Fanuc 6M (PW) C001.00.03
Changed all cSAngleAC and cSAngleBC calls to cSAngleA and cSAngleB to output the A and B
commands at the start of every operation.
Added AAxisAvail? and BAxisAvail? checks to cSAngleA and cSAngleB subs
Added return to CS1 moves to end2
Added G92 reset of A and/or B axis to end2
Changed NotSameTool wfo so it would restate the current wfo if no change in CS
Added ClearCSOffset to openMP: closeMP: and subCSMP:
Added if AChange? OR BChange? to home postition call-out in sameToolOp1
Replaced SetZRepInc and restoreAbsOrInc with one sub called doAbsOrInc. Any line with SetZRepInc now
has doAbsOrInc as the first command after the SeqC.
TH}

{ Format: Fadal Format 1 (PW) C610.00.01
1/13/95
Formatted TrackZNO# to #4 }

{ Added ClearCSOffset to subCSMP TH}

{ Changed SeqC's to SeqLabs
4/21/95
TH}

{ Fixed unwind code in end2:
5/25/95
TH}

{6/9/95
Fixed CRC so it won't output on a helix
TH}

{7/10/95
Updated: Fadal Format 1 (PW) C610.00.04
For: Gibbs & Associates
Versions: ncCad 4.33.01/ncCAM 4.33.01/ncPost 4.33.06/Catalyst v2.14.40/Compost 4.21.30/1.0a
Changes made per Pete Jackson
Updated to Version 4.2 per Fanuc 6M M001.81.2g Format.
Added CkCRC sub for CRCOffC per version 4.2.
CutterRadiusCompensation ExitLength will output G40 on LastFeat AND LineFeat at StdLine sub.
Added logic to suppress output of CRCOnC on ZMove Feature.
Added logic to suppress output of CRCOnC in OneFeat toolPath.
Moved ResetCRCNum at start of toolPath to CkCRC sub.
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 ZMoveOnly Feature at toolPath RapidFeat.
Outputs G40 at all Z Retract blocks.
Deleted DoArcCRC sub.
CkCRC sub now also called at formatArc sub.
Deletes use of Flag(8)
Deleted CRCValue sub.
Not needed because problem has been resolved, see CNCVIS1 M610.81.7, 5/5/93.
Moved SetFlag(4) from initOp and newToolOp1 to start of toolPath.
Simplified output of Canned Drill Cycle block at IF Drilling.
DWB}

{8/23/95 - Updated to .10 format TH}

{ 12/15/95
Added cSAngleA cSAngleB to mP1ToollAllPXcp
TH}

{1/17/96, Updated .10 to .11 version, MPK}

{3/25/96, Tested zonlyRepAutoCycle, Changed version # to .12, MPK}

{4/11/97
Updated: Fadal Format 1 (PW) C610.12
Created: Fadal Format 1 (PW) C610.15
For: Gibbs & Associates/Precision Products
Versions: Catalyst v3.33C/ComPost2 MSL 68K
Changes made per Pete Jackson/David Davis of Precision Products
Updated for Catalyst v3.33C per Fanuc 6M (NW) D001.15 Format
Changed FORMAT#2 from ###.###;0. to #####.###;0. at Prog Numeric Format Definitions.
Changed FORMAT#3 from *###.###;0. to *#####.###;0. at Prog Numeric Format Definitions.
Added NOT LastFeat? AND Equal? SPZ# EPZ# condition at ckCRCNum sub.
Moved contents of StdLine back to toolPath LineFeat.
Modified WorkFixtureOffset logic.
Added Flag(2) for wfoStuff at setup and initializations.
Added SetFlag(2) for EquallySpacedOffsets at openMP sub.
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(2) 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.
Added SetMaxFeed(12700) for Metric VNC files.
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 Flag(5) to Suppress Redundant wfo for MultipleParts WorkFixtureOffsets programs.
Only concerns OneToolAllParts ExitClearancePlane situations.
Corrected problem with output of literal 'G8' 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.
IF LAST Rapid? Boolean is an incorrect use of a non-toolPath command.
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 G8 blocks.
DWB}

{6/16/98,
Initial : Fadal Format 1 (PW) C610.15
Created: Fadal Format 1 (PW) C610.15.1
Customer: Gibbs & Associates

Changes to "Prog":

1. Added G20 (inch output) block to be the first block in the main program.
JHE}

{08/17/98,
Initial: Fadal Format 1 (PW) C610.15.1
Created: Fadal Format 1 (PW) C610.15.2

Changes to Prog:
1) opGuts - Corrected bad Tapping output. Changed FadalTapF to 'F' SpeedRPM#.
2) FORMATs - Added SpeedRPM# to FORMATs (#4).

** For future reference: All Fadal Format 1 posts need to have an F and Q word in the
cycle definition lines for Compression and Rigid Tapping. The F and S word need
to be identical. The F word needs to have a decimal point. A .2 for high range
is not necessary but often used. **
CDH}

{27Jan99
Original: Fadal Format 1 (PW) C610.15.2
Created: Fadal Format 1 [FCM] NCT91.16
For: Florida Custom Mold
Changes made per: Chinh Pham
Develop: Catalyst 5.03/ComPost2 1.7b13
Added Post Header Comment at the top of Prog.
Added Plane CRCOff DrillOff wfoStuff in firstOp2 and newToolOp4
Added PlaneC wfoStuff in sameToolOp3 and newPart3
Changed 'G53' to 'G28' in newToolOp1, newToolOp2, End1 and newPart1
Deleted 'X0Y0Z0E0H0' in end3
Updated to C_Style Longhand Advanced Mill Post Per Fanuc 6M [PW] NCU99.16
Charles Winston}

{02Feb99
Original: Fadal Format 1 [FCM] NCT91.16
Created: Fadal Format 1 [FCM] NCT91.16.1
For: Florida Custom Mold
Changes made per: Chinh Pham
Develop: Catalyst 5.03/ComPost2 1.7b13
Changed Coolant M7 to M8 in MachSpec.
Charles Winston}

{Prog Numeric Format Definitions ****}

#1 = '#.00'
#2 = '#####.###;0.'
#3 = '*#####.###;0.'
#4 = '####.####;0.'
#5 = '#######0'
#6 = '00'
#7 = '#'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(SUB#,2)
FORMAT(CSOffsetA#,2)
FORMAT(CSOffsetB#,2)
FORMAT(Dwell#,2)
FORMAT(ToolDiameter#,4)
FORMAT(CSOffsetX#,4)
FORMAT(CSOffsetY#,4)
FORMAT(CSOffsetZ#,4)
FORMAT(TrackXNO#,4)
FORMAT(TrackYNO#,4)
FORMAT(TrackZNO#,4)
FORMAT(TrackZ#,4)
FORMAT(SpeedRPM#,4)
FORMAT(ADD#,5)
FORMAT(CS#,5)
FORMAT(PartNum#,5)
FORMAT(Program#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Recall#,6)
FORMAT(RapidF#,7)

{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

cSPartNum#:
ADD# CS# MUL# NumOfCS# SUB# PartNum# Num#('1')
RETURN

cSWFO:
'E' ADD# cSPartNum# Num#('0')
RETURN

wFO:
'E' ADD# PartNum# Num#('0')
RETURN

wFOStuff:
IF Flag?('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF NOT SameTool?
IF WFOCS?
cSWFO
ELSE
IF MultipleParts? AND WorkFixtureOffsets?
wFO
ELSE
WFO1
END
END
ELSE
IF WFOCS?
IF ChangeCS?
cSWFO
END
END
END
END
SetFlagF('2') { Do not output WFO second time wFOStuff is called for MP-WFO-OTAP-ECP }
RETURN

cSG52:
{Not Supported}
RETURN

g52Stuff:
{Not Supported}
RETURN

doCSComment:
SeqC '* CS#' CS# ' - ' CSComment$ EOL
RETURN

ModCSOffsetA:
IF NOT Flag?('9')
IF FirstOperation?
IF LessThan? CSOffsetA# Num#('0')
'-'
END
ELSE
IF LessThan? CSOffsetA# LAST CSOffsetA#
'-'
END
END
END
Save# Num#('11') TRUNC# DIV# CSOffsetA# Num#('360')
IF LessThan? CSOffsetA# Num#('0')
Save# Num#('11') SUB# Recall# Num#('11') Num#('1')
END
SUB# CSOffsetA# MUL# Recall# Num#('11') Num#('360')
RETURN

ModCSOffsetB:
IF NOT Flag?('9')
IF FirstOperation?
IF LessThan? CSOffsetB# Num#('0')
'-'
END
ELSE
IF LessThan? CSOffsetB# LAST CSOffsetB#
'-'
END
END
END
Save# Num#('11') TRUNC# DIV# CSOffsetB# Num#('360')
IF LessThan? CSOffsetB# Num#('0')
Save# Num#('11') SUB# Recall# Num#('11') Num#('1')
END
SUB# CSOffsetB# MUL# Recall# Num#('11') Num#('360')
RETURN

doCSWFOComment:
IF FirstOperation? OR NewTool? OR ChangeCS?
SetFlag('9')
SeqC '* ' cSWFO ' = X' CSOffsetX# ' Y' CSOffsetY# ' Z' CSOffsetZ#
IF Flag?('6') { TRUE = B-Style Output, FALSE = C-Style Output }
IF AAxisAvail?
' A' ModCSOffsetA { CSOffsetA# }
END
IF BAxisAvail?
' B' ModCSOffsetB { CSOffsetB# }
END
END
EOL
SetFlagF('9')
END
RETURN

cSComments:
doCSComment
IF WFOCS?
doCSWFOComment
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')
SeqC '* OPERATION ' Operation#
IF OperationIDComment?
': ' OperationType$
END
EOL
IF OperationComment?
SeqC '* ' OperationComment$ EOL
END
IF WorkGroupComment?
SeqC '* ' WorkGroupComment$ EOL
END
SeqC '* TOOL ' Tool#
IF ToolTypeComment?
': ' ToolDiameter# ' ' ToolType$
END
EOL
IF ToolComment?
SeqC '* ' ToolComment$ EOL
END
restoreScale
cSComments
END
RETURN

cSAngleA:
IF AAxisAvail?
IF Flag?('6') AND WFOCS? { TRUE = B-Style Output, FALSE = C-Style Output }
'A0.'
ELSE
'A' ModCSOffsetA
END
END
RETURN

cSAngleAC:
IF AChange?
cSAngleA
END
RETURN

cSAngleB:
IF BAxisAvail?
IF Flag?('6') AND WFOCS? { TRUE = B-Style Output, FALSE = C-Style Output }
'B0.'
ELSE
'B' ModCSOffsetB
END
END
RETURN

cSAngleBC:
IF BChange?
cSAngleB
END
RETURN

psInit:
NewWFOF
FourthCWF
FourthCCWF
FifthCWF
FifthCCWF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN

pSStuff:
{ not supported }
RETURN

doPostScript:
psInit
EachPS
SeqC PostScript EOL
pSStuff
NextPS
RETURN

doEndOpPS:
psInit
EachEOPS
SeqC EndOpPS EOL
pSStuff
NextPS
RETURN

loadPRIMEZCP2:
IF NOT Flag?('7')
LoadFeat Num#('0') Num#('0') PRIME ClearancePlane2#
ELSE
LoadFeat Num#('0') Num#('0') ADD# CSOffsetZ# PRIME ClearancePlane2#
END
RETURN

pRIMEZCP2:
IF NOT Flag?('7')
PRIME ZCP2
ELSE
'Z' TrackZ# ADD# CSOffsetZ# PRIME ClearancePlane2#
END
RETURN

loadPRIMEZCP3:
IF NOT Flag?('7')
LoadFeat Num#('0') Num#('0') PRIME ClearancePlane3#
ELSE
LoadFeat Num#('0') Num#('0') ADD# CSOffsetZ# PRIME ClearancePlane3#
END
RETURN

pRIMEZCP3:
IF NOT Flag?('7')
PRIME ZCP3
ELSE
'Z' TrackZ# ADD# CSOffsetZ# PRIME ClearancePlane3#
END
RETURN

connectC:
IF FeedConnect?
FeedC
ELSE
RapidC
END
RETURN

absValueC:
IF NOT AbsValue?
AbsValue
END
RETURN

incValueC:
IF AbsValue?
IncValue
END
RETURN

absOrIncC:
IF AbsoluteMoves?
absValueC
ELSE
incValueC
END
RETURN

entryMove:
IF Repeats? AND ZShiftOnly? AND FeedConnect?
SeqC FeedC ZInC
IF NOT EmptyLine?
FeedEntC
END
EOL
ELSE
IF FeedEntry?
SeqC FeedC ZInC
IF NOT EmptyLine?
FeedEntC
END
EOL
ELSE
SeqC RapidC ZInC EOL
END
END
RETURN

autoCycExitMove:
SeqC absOrIncC CRCOffC
IF FIFO?
FeedC pRIMEZCP2 FeedEntC
ELSE
RapidC pRIMEZCP2
END
EOL
RETURN

exitMove:
IF AutoCycle?
SeqC CRCOffC ZCP3C EOL
ELSE
IF FIFO?
SeqC CRCOffC FeedC ZCP3C FeedEntC EOL
ELSE
SeqC CRCOffC RapidC ZCP3C EOL
END
END
RETURN

finishSub1:
SeqC CRCOffC
IF NOT FeedConnect?
loadPRIMEZCP3
IF ZMove?
IF AutoCycle?
pRIMEZCP3
ELSE
IF FIFO?
FeedC pRIMEZCP3 FeedEntC
ELSE
RapidC pRIMEZCP3
END
END
END
END
EOL
RETURN

CkCRC:
IF XMove? OR YMove? { Approach Length Feature and Multiple Pockets }
IF NOT ZMove? AND NOT LastFeat?
CRCOnC
IF NOT EmptyLine?
ResetCRCNum
END
END
END
IF LastFeat? AND EmptyLine? AND NOT ArcFeat? { Exit Length Feature }
CRCOffC
END
RETURN

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

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

doPeck: { longDrillStuff }
{ not supported }
RETURN

drillFeature: { longDrillStuff }
{ not supported }
RETURN

toolPath:
EACHFeat
IF PointFeat? { Drilling Only }
SeqC MoveSXYZC EOL
ELSE
IF FirstFeat?
SeqC 'G8' 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?
SeqC ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL
END
ELSE
IF ArcFeat?
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
SeqC formatArc ArcFeedC ckCRCNum EOL
NEXTQuadrant
IF LastFeat?
SeqC CRCOffC EOL
END
END
END
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 incValueC EOL
RETURN

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

cutAutoCycle:
IF Repeats? AND NOT ZShiftOnly?
EachRep
IF NOT FirstCycle?
IF FIFO?
Rapid
END
SeqC RapidC StrtPos EOL
IF NOT FeedConnect?
SeqC ZCP2C EOL
END
END
END
EACHFeat
doCycleComment
IF SPXMove? OR SPYMove?
IF FIFO?
Rapid
END
SeqC RapidC MoveSXYC EOL
END
autoCycCutSub1
IF Repeats? AND ZShiftOnly?
EachRep
IF NOT FirstCycle?
doCycleComment
IF SPXMove? OR SPYMove?
SeqC connectC incValueC MoveSXYC EOL
END
absOrIncC
IF FeedConnect?
entryMove
ELSE
IF FeedEntry?
SeqC RapidC ZCP2C EOL
END
entryMove
END
SeqC incValueC EOL
END
toolPath
IF NOT FeedConnect?
autoCycExitMove
END
NextRep
ELSE
entryMove
toolPath
END
autoCycCutSub2
NEXTFeat
IF Repeats? AND NOT ZShiftOnly?
finishSub1
NextRep
END
SetPass1
RETURN

milling:
IF Repeats?
EachRep
doCycleComment
IF SPXMove? OR SPYMove?
SeqC connectC MoveSXYC EOL
END
IF FeedConnect?
entryMove
ELSE
IF FeedEntry?
SeqC RapidC ZCP2C EOL
END
entryMove
END
toolPath
finishSub1
NextRep
ELSE
entryMove
toolPath
END
RETURN

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

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

drilling:
IF Pulse? { Positive Approach On }
SeqC 'M46' EOL
END
SeqC DrillCP EOL
GetCycle
SeqC
IF RigidTap?
'G84.1'
ELSE
Cycle
END
FromCP StrtPos ZDepth RLevel Dwell Peck Retract
IF Tap?
'F' SpeedRPM# FadalTapQ
ELSE
FeedEnt
END
EOL
TrackZNO# FIRST SPZ# {.81.2}
toolPath
setDrillEndOpZ
IF Pulse? { Positive Approach Off }
SeqC 'M47' EOL
ResetCool
END
SeqC Rapid DrillOff ZCP3 EOL
RETURN

longDrilling:
{ not supported }
RETURN

checkPass: {use the correct StrtPos}
IF AutoCycle?
SetPass2
ELSE
SetPass1
END
IF NOT Flag?('7') { TRUE = Local wfo Coordinates, FALSE = D-Style Output }
ClearCSOffset
END
RETURN

opGuts:
ResetCRCNum
IF FirstOperation? OR NewTool?
RapidF# { Forces FeedEntC/FeedRateC }
END
IF Milling?
SeqC ZCP2C EOL
IF AutoCycle?
cutAutoCycle
ELSE
milling
END
exitMove
ELSE
IF Drilling?
drilling
END
END
RETURN

progStart:
InitProg
ReverseXZArcs
InitWFONum
SetFlood
SetMaxRPM('15000')
IF Metric?
SetMaxFeed('12700')
ELSE
SetMaxFeed('500')
END
Save# Num#('1') Num#('0') { MultipleParts Current Tool FirstOp# }
Save# Num#('2') Num#('0') { MultipleParts ToolOp# Counter }
Save# Num#('3') Num#('0') { LongHand PeckCycle }
Save# Num#('11') Num#('0') { cSAngleA and cSAngleB }
SetFlagF('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
SetFlag('3') { Incrementing WFOs in effect }
SetFlag('4') { This post supports IncWFO/DecWFO }
SetFlagF('6') { TRUE = B-Style Output, FALSE = C-Style Output }
SetFlagF('7') { TRUE = D-Style Output }
SetFlag('8') { TRUE = D-Style Output, FALSE = Local G52-WFO Coordinates }
SetFlagF('9') { cSAngleA, cSAngleB and doCSWFOComment }
IF PSComment? AND UseComments?
'Utility Data:' EOL
' At Op Start: All literals and commands will appear at the beginning of the operation.' EOL
' At Op End: All literals and commands will appear at the end of the operation.' 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
END

IF NOT Flag?('7')
IF Equal? NumOfCS# Num#('1') { 3 Axis Part - Output M-Style }
SetFlag('7')
ELSE
IF MultipleParts?
IF WorkFixtureOffsets?
IF LTEqual? MUL# Parts# NumOfCS# Num#('40')
SetWFOCS { use wfo for CS changes }
ELSE
IF Flag?('8')
SetFlag('7')
END
IF UseComments?
'( Not enough Work Fixture Offsets to handle this part. )' EOL
'( Number of parts [ ' Parts# ' ] times CSs [ ' NumOfCS# ' ] )' EOL
'( exceeds the machine limit. Switching to '
IF Flag?('7')
'non'
ELSE
'G52'
END
'-wfo style output. )' EOL
END
END
ELSE
SetFlag('7')
END
ELSE
IF LTEqual? NumOfCS# Num#('40') {****}
SetWFOCS { use wfo for CS changes }
ELSE
IF Flag?('8')
SetFlag('7')
END
IF UseComments?
'( Not enough Work Fixture Offsets to handle this part. )' EOL
'( Number of CSs [ ' NumOfCS# ' ] exceeds the machine limit. )' EOL
'( Switching to '
IF Flag?('7')
'non'
ELSE
'G52'
END
'-wfo style output. )' EOL
END
END
END
END
END
RETURN

initOp:
EOR EOL
SeqC 'O' Program#
IF UseComments? AND ProgramNameComment?
'*' ProgramName$
END
EOL
SetProgNum('0')
EachOp
IF FirstOperation?
IF ToolChangeAtHome?
SetHome
END
END
NextOp
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
END
restoreScale
RETURN

firstOp1:
SeqC 'G20' EOL
SeqC OpToolID ToolChng EOL
doPartCycleComment
doOpComments
doPostScript
RETURN

firstOp2:
SeqC Plane CRCOff DrillOff wfoStuff EOL
GetSpeed
checkPass
SeqC AbsOrInc Rapid StrtPos cSAngleA cSAngleB EOL
RETURN

firstOp3:
SeqC OfstOn CoolOn EOL
RETURN

newToolOp1:
SeqC Rapid AbsOrInc SpinOff CoolOff EOL
SeqC 'G28Z0' EOL { OfstOff }
RETURN

newToolOp2:
doEndOpPS
IF ToolChangeAtHome?
SeqC 'G28' PRIME Home EOL
END
IF LAST ProgStop?
SeqC 'M00' EOL
ELSE
SeqC ProgStop EOL
END
RETURN

newToolOp3: {Start new Operation}
SeqC OpToolID ToolChng EOL
doPartCycleComment
doOpComments
doPostScript
RETURN

newToolOp4:
SeqC Plane CRCOff DrillOff wfoStuff EOL
GetSpeed
checkPass
SeqC AbsOrInc Rapid StrtPos cSAngleA cSAngleB EOL
RETURN

newToolOp5:
SeqC OfstOn CoolOn EOL
RETURN

sameToolOp1:
doEndOpPS
IF LAST ProgStop?
SeqC 'G0H0Z0' CoolOff SpinOff 'M00' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF NewToolOffset? OR AChange? OR BChange?
SeqC 'G0H0Z0' EOL
END
END
RETURN

sameToolOp2: {Start new Operation}
doPartCycleComment
doOpComments
doPostScript
checkPass
RETURN

sameToolOp3: {Start new Operation}
SeqC PlaneC wfoStuff EOL
GetSpeed
SeqC AbsOrInc Rapid StrtPos cSAngleA cSAngleB EOL
IF LAST ProgStop?
SeqC OfstOn CoolOn EOL
ELSE
IF NewToolOffset? OR AChange? OR BChange?
SeqC OfstOn EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqC CoolOn EOL
END
END
RETURN

end1:
SeqC Rapid AbsOrInc SpinOff CoolOff EOL { 'G0G90M5M9' }
SeqC 'G28Z0' EOL { OfstOff }
RETURN

end2:
doEndOpPS
IF FIRST ToolChangeAtHome? {added FIRST modifier}
SeqC AbsOrInc Rapid PRIME FirstHome EOL
END
IF Equal? CSOffsetA# Num#('0') AND Equal? CSOffsetB# Num#('0')
ELSE
SeqC absOrIncC
IF AAxisAvail?
cSAngleA
END
IF BAxisAvail?
cSAngleB
END
EOL
SeqC Preset
IF AAxisAvail?
'A0'
END
IF BAxisAvail?
'B0'
END
EOL
END
IF ProgStop?
SeqC 'M00' EOL
ELSE
IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart?
SeqC ProgStop EOL
END
END
RETURN

end3:
SeqC EOP EOL
EOR EOL
Close
{ File Length Comments deleted 2/16/93 }
RETURN

mPallTools1P: {Multiple Parts, All Tools 1 Part}
IF FirstOperation? OR EquallySpacedOffsets?
SetFlag('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
END
IF FirstOperation?
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}
SetFlag('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF FirstOperation?
firstOp1
firstOp2
firstOp3
ELSE
IF NewTool?
newToolOp1
newToolOp2
newToolOp3
newToolOp4
newToolOp5
ELSE {implied SameTool?}
sameToolOp1
sameToolOp2
sameToolOp3
END
END
opGuts
RETURN

mP1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane}
SetFlag('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF FirstOperation?
firstOp1
firstOp2
firstOp3
ELSE
IF NewTool?
newToolOp1
newToolOp2
newToolOp3
newToolOp4
newToolOp5
ELSE {implied SameTool?}
sameToolOp1
sameToolOp2
sameToolOp3
END
END
opGuts
RETURN

noMPs: {no multiple parts}
SetFlag('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF FirstOperation?
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}
end1
end2
RETURN

newPart1: {Finish off last Part}
IF FullUp?
SeqC Rapid AbsOrInc SpinOff CoolOff EOL
SeqC 'G28Z0' EOL { OfstOff }
END
{doEndOpPS}
RETURN

newPart2: {Start new Part}
sameToolOp2
RETURN

newPart3: {Start new Part}
SetFlag('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
SeqC PlaneC wfoStuff EOL
GetSpeed
SeqC AbsOrInc Rapid StrtPos cSAngleA cSAngleB EOL
IF FullUp?
SeqC OfstOn CoolOn EOL
END
RETURN

toggleIncDecWFO:
IF Flag?('3') { Incrementing WFOs in effect }
SetFlagF('3')
ELSE { Decrementing WFOs in effect }
SetFlag('3')
END
RETURN

mPLoop:
Save# Num#('2') Recall# Num#('1')
IF WorkFixtureOffsets?
IF Flag?('3') { Incrementing WFOs in effect }
NewWFO
ELSE
LastWFO
END
EachWFO
ELSE
EachPart
END
IF AllToolsOnePart?
EachOp
masterSub
NextOp
endPartSub
ELSE { OneToolAllParts }
EachOp
IF Equal? Operation# Recall# Num#('2') { Valid Tool Op }
IF FirstOperation? OR NewTool?
IF FirstPart? AND Flag?('3') { Incrementing WFOs in effect }
masterSub
ELSE
IF LastPart? AND NOT Flag?('3') { Decrementing WFOs in effect }
masterSub
ELSE
newPart1
newPart2
newPart3
opGuts
END
END
ELSE
masterSub
END
IF LastOp?
IF LastPart? AND Flag?('3') { Incrementing WFOs in effect }
Save# Num#('1') Num#('0')
ELSE
IF FirstPart? AND NOT Flag?('3') { Decrementing WFOs in effect }
Save# Num#('1') Num#('0')
END
END
Save# Num#('2') Recall# Num#('1')
ELSE
IF NEXT SameTool?
Save# Num#('2') NEXT Operation#
ELSE
IF LastPart? AND Flag?('3') { Incrementing WFOs in effect }
Save# Num#('1') NEXT Operation#
Save# Num#('2') Num#('0')
ELSE
IF FirstPart? AND NOT Flag?('3') { Decrementing WFOs in effect }
Save# Num#('1') NEXT Operation#
Save# Num#('2') Num#('0')
ELSE
Save# Num#('2') Recall# Num#('1')
END
END
END
END
END
NextOp
END
IF WorkFixtureOffsets?
IF Flag?('3') { Incrementing WFOs in effect }
IncWFO
NextWFO
DecWFO
ELSE { Decrementing WFOs in effect }
DecWFO
NextPrevWFO
IncWFO
END
IF Flag?('4') { This post supports IncWFO/DecWFO }
toggleIncDecWFO
END
ELSE
NextPart
END
RETURN

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

progStart {setup and initializations}
initOp

IF MultipleParts?
IF WorkFixtureOffsets?
{'NOTE: This Post Processor does not support Work Fixture Offsets for Multiple Parts.' EOL
'It is recommended that you change your selection to Equally Spaced Offsets.' EOL}
END
IF AllToolsOnePart?
mPLoop
ELSE
EachOp
IF FirstOperation?
Save# Num#('1') 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
END
ELSE
EachOp
masterSub
NextOp
endPartSub
END
end3


Wyszukiwarka

Podobne podstrony:
Fadal Format 2 [NW] D611 16 2m
Fadal Format 2 [FW] B611 16 2
Fadal Format 1 [PW] C610 16 2m
Fadal Format 1 [NW] D610 16 2m
Fadal Format 1 [CT] MT95 16
Fadal Format 2 [NW] D611 16 2
Fadal Format 2 [GS] BT66 16 2
Fadal Format 1 [FW] B610 16 2
Fadal Format 1 [BA] D161 16 3
Fadal Format 2 [PW] C611 16 2
Fadal Format 2 [FW] B611 16 2m
Fadal Format 1 [BCM] BX97 16
Fadal Format 2 NDT70 16
Fadal Format 1 LH [PW] CU49 16

więcej podobnych podstron