Fadal Format 2 [GS] BT66 16 2


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

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

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

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

{11/8/94
Modified: Fadal Format 2 (FW) B611.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 SeqLab.
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 2 (FW) B611.00
1/4/95
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 2 (FW) B611.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 2 (FW) B611.00.04
For: Gibbs & Associates/Tru-Cut Machine Company
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 and Bryan Widholm of Tru-Cut Machine Company.
Changed Coolant On from M07 to M08 in Mach Spec Commands 3 dialog.
Updated to Version 4.2 per Fanuc 6M M001.81.2g Format.
Modified ckCRC 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 M611.81.7, 5/5/93.
Simplified output of Canned Drill Cycle block at IF Drilling.
DWB}

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

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

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

{6/5/98,
Initial : Fadal Format 2 (FW) B611.12
Created: Fadal Format 2 (FW) B611.12.1
Customer: Gibbs & Associates

Changes to "Prog":

1. Under toolPath IF RapidFeat, added doAbsOrInc in two places.
2. Under mP1ToollAllPXcp, added Speed in two places.
JHE}

{6/18/98,
Initial : Fadal Format2 (FW) B611.12.1
Created: Fadal Format2 (FW) B611.12.2
Customer: Gibbs & Associates

Changes to "Prog":

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

{07/09/98,
Initial: Fadal Format2 (FW) B611.12.2
Created: Fadal Format2 (FW) B611.12.3

Changes to Prog:
1) firstOp3a - Added the Plane command. This command was being skipped in
MP1ToolAllPartsXCP, and the IJK letters were not being output on arcs.
CDH}

{08/17/98,
Initial: Fadal Format 2 (FW) B611.12.3
Created: Fadal Format 2 (FW) B611.12.4

Changes to Prog:
1) Common Point/Drilling - Corrected bad Tapping output.

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

{12/16/98
Initial: Fadal Format 2 (FW) B611.12.4
Created: Fadal Format 2 [GET] Bxxx.16
ForUser: GET Systems
Develop: Compost2 1.7b13, Virtual v5.02
Comment: New processor per marked up readout and conversation with John Eichman
Changed Fadal style subroutines to Fanuc style subprograms
Deleted 'G20's
Moved WFO output to StrtPos line.
Moved start up G codes to Speed line. Added 'G9'
Changed OfstOff from G53 to G49
Deleted DrillOff from drill cycle retract line.
Updated per Fanuc 6M [FW] B001.16
Jim Radcliffe}

{01/05/98,
Initial: Fadal Format 2 [GS] BT66.16
Created: Fadal Format 2 [GS] BT66.16.1
For: Get Systems

Changes to Prog:
1) doSubComment - modified subroutine to output ProgramName$ along
with literals.
2) startSub - Moved doSubComment to same line as SubID.
CDH}

{01/08/99:
Initial: Fadal Format 2 [GS] BT66.16.1
Created: Fadal Format 2 [GS] BT66.16.2
For: Get Systems Inc.

Changes to Prog:
1) opGuts - Added 'G80' to end of Drilling.
2) firstop2/newToolOp4/sameToolOp3 - Deleted calls to csAngleA and
csAngleB.
3) end2 - commented out logic to preset A and B axis.
CDH}

{Prog Numeric Format Definitions ****}

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(CSOffsetA#,2)
FORMAT(CSOffsetB#,2)
FORMAT(SUB#,2)
FORMAT(ToolDiameter#,4)
FORMAT(CSOffsetX#,4)
FORMAT(CSOffsetY#,4)
FORMAT(CSOffsetZ#,4)
FORMAT(TrackXNO#,4)
FORMAT(TrackYNO#,4)
FORMAT(TrackZNO#,4)
FORMAT(ADD#,5)
FORMAT(CS#,5)
FORMAT(Program#,5)
FORMAT(CallMasterNum#,5)
FORMAT(CSSubID#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,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
wFO
END
ELSE
IF WFOCS?
IF ChangeCS?
IF MultipleParts?
{MP ChangeCS is handled in subCSMP and closeMP}
ELSE
cSWFO
END
END
END
END
END
SetFlagF('2') { Do not output WFO second time wFOStuff is called for MP-WFO-OTAP-ECP }
RETURN

cSG52:
SeqC 'G52X' CSOffsetX# 'Y' CSOffsetY# 'Z' CSOffsetZ# EOL
RETURN

g52Stuff:
IF NOT Flag?('7') AND NOT WFOCS?
IF FirstOperation? OR NewTool? OR ChangeCS?
IF MultipleParts?
IF WorkFixtureOffsets?
cSG52
END
ELSE
cSG52
END
END
END
RETURN

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

cSAngleA:
IF AAxisAvail?
'A'
IF WFOCS? AND Flag?('6') AND NOT Flag?('9')
'0.'
ELSE
IF NOT Flag?('9')
IF FirstOperation?
IF LessThan? CSOffsetA# Num#('0')
'-'
END
ELSE
IF LessThan? CSOffsetA# LAST CSOffsetA#
'-'
END
END
END
Save# Num#('4') TRUNC# DIV# CSOffsetA# Num#('360')
IF LessThan? CSOffsetA# Num#('0')
Save# Num#('4') SUB# Recall# Num#('4') Num#('1')
END
SUB# CSOffsetA# MUL# Recall# Num#('4') Num#('360')
END
END
RETURN

cSAngleAC:
IF AChange?
cSAngleA
END
RETURN

cSAngleB:
IF BAxisAvail?
'B'
IF WFOCS? AND Flag?('6') AND NOT Flag?('9')
'0.'
ELSE
IF NOT Flag?('9')
IF FirstOperation?
IF LessThan? CSOffsetB# Num#('0')
'-'
END
ELSE
IF LessThan? CSOffsetB# LAST CSOffsetB#
'-'
END
END
END
Save# Num#('4') TRUNC# DIV# CSOffsetB# Num#('360')
IF LessThan? CSOffsetB# Num#('0')
Save# Num#('4') SUB# Recall# Num#('4') Num#('1')
END
SUB# CSOffsetB# MUL# Recall# Num#('4') Num#('360')
END
END
RETURN

cSAngleBC:
IF BChange?
cSAngleB
END
RETURN

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

cSComments:
doCSComment
IF WFOCS? AND NOT MultipleParts?
doCSWFOComment
END
RETURN

doSubComment:
IF UseComments? AND SubComment?
SeqC '* ' ProgramName$ ' SUB PROGRAM #' Program# 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
cSComments
END
RETURN

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

pSStuff:
RETURN

doPostScript:
pSInit
EachPS
SeqC PostScript EOL
pSStuff
NextPS
RETURN

doEndOpPS:
pSInit
EachEOPS
SeqC EndOpPS EOL
pSStuff
NextPS
RETURN

entryMove:
IF FeedEntry?
SeqC Feed ZIn
IF FirstOperation? OR NewTool?
FeedEnt
ELSE
FeedEntC
END
EOL
ELSE
SeqC RapidC ZIn EOL
IF FirstOperation? OR NewTool?
RapidF# { Forces FeedRate }
END
END
RETURN

startSub:
OpenSub
SubID doSubComment EOL
RETURN

subWarning:
IF NOT FeedConnect?
IF AnyZshift?
' ' EOL
SeqC '* WARNING Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT' EOL
' ' EOL
END
END
RETURN

stdSub:
SeqC SubCall CallLab RepLab RepCycs EOL
startSub
RETURN

finishSub1: {part 1}
SeqC CRCOffC EOL
SeqC
IF NOT FeedConnect?
IF AutoCycle?
ZCP3C
ELSE
IF FIFO?
FeedC ZCP3C FeedEntC
ELSE
RapidC ZCP3C
END
END
END
EOL
RETURN

finishSubG92: {part 2}
SeqC Preset ShiftR EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshiftR EOL
RETURN

absValueC:
IF NOT AbsValue?
AbsValue
END
RETURN

incValueC:
IF AbsValue?
IncValue
END
RETURN

absOrIncC:
IF AbsoluteMoves?
absValueC
ELSE
incValueC
END
RETURN

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

doWFOOps:
IF Flag?('5')
SetFlagF('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP }
ELSE
SeqC SetWFO EOL
END
SeqC SubCall CallLab EOL
RETURN

openMP:
NewProg
IF WorkFixtureOffsets?
IF WFOCS?
startSub
SaveCSProg
SaveCSOpStart
ELSE
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP }
END
IF Flag?('3') { Incrementing WFOs in effect }
NewWFO
EachWFO {simple eachPart}
doWFOOps
IncWFO
NextWFO {simple NextPart}
DecWFO
ELSE { Decrementing WFOs in effect }
LastWFO
EachWFO {simple eachPart}
doWFOOps
DecWFO
NextPrevWFO {simple NextPart}
IncWFO
END
IF Flag?('4') { This post supports IncWFO/DecWFO }
toggleIncDecWFO
END
startSub
END
ELSE
SeqC SubCall CallLab RepLab Parts EOL
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
END
startSub
END
RETURN

doCSWFOOps:
EachCSOp
doCSWFOComment
IF Flag?('5')
SetFlagF('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP }
ELSE
SeqC cSWFO EOL
END
SeqC SubCall CallLabB CSSubID# EOL
NextCSOp
RETURN

closeMP:
IF WorkFixtureOffsets?
SeqC EndSub EOL
CloseSub
IF WFOCS?
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP }
END
IF Flag?('3') { Incrementing WFOs in effect }
NewWFO
EachWFO {simple eachPart}
doCSWFOOps
IncWFO
NextWFO {simple NextPart}
DecWFO
ELSE { Decrementing WFOs in effect }
LastWFO
EachWFO {simple eachPart}
doCSWFOOps
DecWFO
NextPrevWFO {simple NextPart}
IncWFO
END
IF Flag?('4') { This post supports IncWFO/DecWFO }
toggleIncDecWFO
END
END
ELSE
SeqC absOrIncC EOL
SeqC Preset ShiftPC EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshftPC EOL
END
RETURN

subCSMP:
IF WFOCS?
IF ChangeCS?
SeqC EndSub EOL
CloseSub
NewProg
startSub
SaveCSProg
END
END
RETURN

doAbsOrInc:
IF Flag?('1') { Milling ZShiftOnly SepSubs/DrillSubs activated }
IF ZMove?
incValueC
ELSE
absOrIncC
END
END
RETURN

doDrillAbsOrInc:
IF Flag?('1') { DrillSubs activated }
IF SPZMove?
incValueC
ELSE
absOrIncC
END
END
RETURN

restoreAbsOrInc:
IF Flag?('1') { Milling ZShiftOnly SepSubs/DrillSubs activated }
SeqC absOrIncC EOL
END
RETURN

formatArc:
doAbsOrInc
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

getACEPXY:
SetACSPCompF
Save# Num#('1') SPX# { Status Register Variable for X Axis }
Save# Num#('2') SPY# { Status Register Variable for Y Axis }
SetACSPComp
RETURN

setSRXYtoACEP:
SetPass1
SetSRXYtoEP
LoadFeat Num#('0') Num#('0') Num#('0')
TrackXNO# ADD# Recall# Num#('1') SPX# { Status Register Variable for X Axis }
TrackYNO# ADD# Recall# Num#('2') SPY# { Status Register Variable for Y Axis }
RETURN

toolPath:
ResetCRCNum
EACHFeat
IF NOT Rapid?
IF FirstFeat?
SeqC 'G8' EOL
ELSE
IF LAST Rapid?
SeqC 'G8' EOL
END
END
END
IF PointFeat?
IF AutoCycle?
IF LastFeat?
getACEPXY
END
SeqC MoveSXYC EOL
SeqC SubCall CallLab EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
SeqC doDrillAbsOrInc MoveSXYZC EOL
END
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqC doAbsOrInc ckCRC RapidC MoveXYZC ckCRCNum EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
SeqC doAbsOrInc 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 EOL
NEXTQuadrant
END
END
END
END
NEXTFeat
restoreAbsOrInc
RETURN

autoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
startSub
SetSRXYtoSP
SeqC incValueC EOL
RETURN

autoCycCutSub2: {part 2}
toolPath
SeqC absOrIncC CRCOffC
IF Repeats? AND FeedConnect? AND ZshiftOnly?
ELSE
IF FIFO?
FeedC ZCP2 FeedEntC
ELSE
RapidC ZCP2
END
END
EOL
SeqC EndSub EOL
CloseSub
SetSRSubXY {restore SR to 1st position value}
SetSRSubMove
RETURN

autoCycPat:
SetPass2 {position pattern}
toolPath {call after NewProg for correct sub calls}
SetPass1 {reset}
RETURN

milling:
IF AutoCycle?
NewProg
autoCycCutSub1
entryMove
autoCycCutSub2
autoCycPat
ELSE
entryMove
toolPath
END
RETURN

g92Sub:
subWarning
stdSub
SeqC absOrIncC Connect StrtPos EOL
milling
finishSub1
finishSubG92
RETURN

doSepSubZMoves:
IF FeedConnect?
SeqC FeedC ZInPlusInc FeedEnt EOL
ELSE
IF FeedEntry?
IF NOT FirstCycle?
SeqC RapidC ZCP2PlusInc EOL
END
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
IF FirstCycle? AND AutoCycle?
Rapid
END
SeqC RapidC ZInPlusInc EOL
END
END
SeqC SubCall CallLab EOL
IF NOT FeedConnect? AND NOT AbsValue?
TrackZNO# ZCP2PlusInc#
SeqC ZCP2C EOL
IF NOT AutoCycle?
TrackZNO# ClearancePlane3#
END
END
RETURN

setSepSubZ:
TrackZNO# ADD# FIRST SPZ# MUL# RepsLess1# RepeatZ#
RETURN

zonlyRepAutoCycle:
autoCycPat {write pattern moves and main calls}
startSub
NewProg
EachCycle
SetSRXYtoEP
IF NOT FirstCycle?
Connect
IF SPXMove? OR SPYMove?
SeqC incValueC StrtPosC EOL
absOrIncC
END
END
SetStatusOn
doSepSubZMoves
SetStatusOff
NextCycle
SetStatusOn
autoCycCutSub1 {build element sub}
TrackZNO# FIRST SPZ#
autoCycCutSub2
IF FeedConnect?
IF NOT AbsValue?
setSepSubZ
END
IF FIFO?
SeqC Feed ZCP2 FeedEnt EOL
ELSE
SeqC Rapid ZCP2 EOL
END
END
SeqC EndSub EOL
CloseSub
{Element shift, not pattern}
RETURN

zonlyRep:
EachCycle
SetSRXYtoEP
IF NOT FirstCycle?
Connect
IF SPXMove? OR SPYMove?
SeqC StrtPosC EOL
END
END
doSepSubZMoves
NextCycle
startSub
TrackZNO# FIRST SPZ#
toolPath
finishSub1
SeqC EndSub EOL
CloseSub
IF FeedConnect? AND NOT AbsValue?
setSepSubZ
END
RETURN

checkPass: {use the correct StrtPos}
IF AutoCycle?
SetPass2
ELSE
SetPass1
END
IF NOT Flag?('7')
ClearCSOffset
END
RETURN

skipToLastFeat:
EachFeat
IF LastFeat?
TrackXNO# SPX#
TrackYNO# SPY#
END
NextFeat
RETURN

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

opGuts:
IF Milling?
SeqC ZCP2C EOL
IF Repeats?
NewProg
IF ZshiftOnly?
IF AutoCycle? {incremental Autocycle sub can have Z moves}
zonlyRepAutoCycle
ELSE {Z shift only, NOT Auto Cycle}
SetFlag('1') { Milling ZShiftOnly SepSubs activated }
zonlyRep
SetFlagF('1') { Milling ZShiftOnly SepSubs deactivated }
END {end Auto Cycle IF}
ELSE {not Z only}
g92Sub
END {end Z only IF}
ELSE {no repeat OPs}
milling
END
SeqC CRCOffC EOL { Just in case }
IF AutoCycle?
SeqC ZCP3C EOL
setSRXYtoACEP
ELSE
IF FIFO?
SeqC FeedC ZCP3C FeedEntC EOL
ELSE
SeqC RapidC ZCP3C EOL
END
END
ELSE
IF Drilling?
IF PosApproach?
SeqC 'M46' EOL
END
SeqC DrillCP EOL
GetCycle
SeqC
IF RigidTap?
'G84.1'
ELSE
Cycle
END
FromCP StrtPos ZDepth RLevel Dwell Peck Retract FeedEnt
IF Tap?
Speed
END
EOL
IF CallMasterOp?
SeqC SubCall CallLabB CallMasterNum# EOL
skipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') { DrillSubs activated }
NewMasterProg
SeqC SubCall CallLab EOL
startSub
toolPath
SeqC EndSub EOL
CloseSub
SetFlagF('1') { DrillSubs deactivated }
ELSE
toolPath
END
END
setDrillEndOpZ
IF PosApproach?
SeqC 'M47' EOL
END
SeqC Rapid 'G80' ZCP3 EOL
END
END
RETURN

progStart:
InitProg
ReverseXZArcs
InitWFONum
SetFlood
SetMaxRPM('15000')
IF Metric?
SetMaxFeed('12700')
ELSE
SetMaxFeed('500')
END
Save# Num#('1') Num#('0') { Status Register Variable for X Axis }
Save# Num#('2') Num#('0') { Status Register Variable for Y Axis }
Save# Num#('3') Num#('0') { Status Register Variable for Z Axis }
Save# Num#('4') Num#('0') { cSAngleA and cSAngleB }
SetFlagF('1') { Milling ZShiftOnly SepSubs/DrillSubs deactivated }
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('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP }
SetFlag('6') { TRUE = B-Style Output, FALSE = C-Style Output }
SetFlagF('7') { TRUE = D-Style Output }
SetFlagF('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
ProgID1
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
END
OpenSub
restoreScale
RETURN

firstOp1:
IF ToolChangeAtHome?
SetHome
END
SeqC OpToolID ToolChng EOL
doOpComments
doPostScript
RETURN

firstOp2:
g52Stuff
Rapid 'G9' Plane AbsOrInc
IF Drilling? AND RigidTap?
SeqC Speed EOL
SeqC 'G84.2' EOL
ELSE
SeqC Speed SpinOn EOL
END
checkPass
SeqC wFOStuff StrtPos EOL
RETURN

firstOp3:
SeqC OfstOn CoolOn EOL
RETURN

newToolOp1:
SeqC Rapid CRCOff SpinOff CoolOff EOL
SeqC OfstOff EOL
RETURN

newToolOp2:
doEndOpPS
IF ToolChangeAtHome?
SeqC absOrIncC Rapid Home EOL
END
IF LAST ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
END
RETURN

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

newToolOp4:
g52Stuff
Rapid 'G9' Plane AbsOrInc
IF Drilling? AND RigidTap?
SeqC Speed EOL
SeqC 'G84.2' EOL
ELSE
SeqC Speed SpinOn EOL
END
checkPass
SeqC wFOStuff StrtPos EOL
RETURN

newToolOp5:
SeqC OfstOn CoolOn EOL
RETURN

sameToolOp1:
doEndOpPS
IF LAST ProgStop?
SeqC Rapid CRCOff DrillOff SpinOff CoolOff EOL
SeqC OfstOff EOL
SeqC 'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF NewToolOffset? OR AChange? OR BChange?
SeqC OfstOff EOL
END
END
RETURN

sameToolOp2: {Start new Operation}
doOpComments
doPostScript
checkPass
RETURN

sameToolOp3: {Start new Operation}
g52Stuff
Rapid PlaneC AbsOrInc
IF LAST ProgStop?
IF Drilling? AND Tap? AND OptCyc1?
SeqC SpeedC EOL
SeqC 'G84.2' EOL
ELSE
SeqC SpeedC SpinOn EOL
END
SeqC wFOStuff StrtPos EOL
SeqC OfstOn CoolOn EOL
ELSE
SeqC SpeedC EOL
SeqC wFOStuff StrtPos EOL
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 CRCOff DrillOff SpinOff CoolOff EOL
SeqC OfstOff EOL
RETURN

end2:
doEndOpPS
IF FIRST ToolChangeAtHome? {added FIRST modifier}
SeqC absOrIncC Rapid 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 'M0' EOL
END
RETURN

end3:
SeqC WFOOff 'X0.Y0.' EOL
SeqC EOP EOL
CloseSub
Post2 {organize Subs into one program}
EOR EOL
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}
EachOp {Start of post processing}
IF EquallySpacedOffsets?
SetFlag('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
END
IF FirstOperation?
openMP
firstOp1
firstOp2
firstOp3
ELSE
IF NewTool?
newToolOp1
newToolOp2 {to tool change, CS problem}
subCSMP
newToolOp3
newToolOp4
newToolOp5
ELSE {implied SameTool?}
sameToolOp1
subCSMP
sameToolOp2
sameToolOp3
END
END {common point for all operations}
opGuts
NextOp {loops back to EachOP until last Operation}
end1 {End of program}
end2
closeMP
end3
RETURN

mP1ToollAllPfu: {Multiple Parts, 1 Tool all Parts, full up}
EachOp {Start of post processing}
IF EquallySpacedOffsets?
SetFlag('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
END
IF FirstOperation?
firstOp1
openMP
firstOp2
firstOp3
ELSE
IF NewTool?
newToolOp1
closeMP
newToolOp2 {to tool change, CS problem}
newToolOp3
openMP
newToolOp4
newToolOp5
ELSE {implied SameTool?}
sameToolOp1
subCSMP
sameToolOp2
sameToolOp3
END
END {common point for all operations}
opGuts
NextOp {loops back to EachOP until last Operation}
end1 {End of program}
closeMP
end2
end3
RETURN

mP1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane}
EachOp {Start of post processing}
SetFlag('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF FirstOperation?
firstOp1
firstOp2
firstOp3
openMP
firstOp2 {need StrtPos in Sub}
ELSE
IF NewTool?
closeMP
newToolOp1
newToolOp2 {to tool change, CS problem}
newToolOp3
newToolOp4
newToolOp5
openMP
newToolOp4 {need StrtPos in Sub}
ELSE {implied SameTool?}
sameToolOp1
subCSMP
sameToolOp2
sameToolOp3
END
END {common point for all operations}
opGuts
NextOp {loops back to EachOP until last Operation}
closeMP
end1
end2
end3
RETURN

noMPs: {no multiple parts}
EachOp {Start of post processing}
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 {common point for all operations}
opGuts
NextOp {loops back to EachOP until last Operation}
end1 {End of program}
end2
end3
RETURN

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

progStart {setup and initializations}
initOp

IF MultipleParts?
IF AllToolsOnePart?
mPallTools1P
ELSE {implied OneToolAllParts?}
IF FullUp?
mP1ToollAllPfu
ELSE {implied ExitClearancePlane?}
mP1ToollAllPXcp
END
END
ELSE
noMPs
END


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 [FCM] NCT91 16 1
Fadal Format 1 [NW] D610 16 2m
Fadal Format 1 [CT] MT95 16
Fadal Format 2 [NW] D611 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