Fanuc 0M Tek [FP] PMW58 17 3


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

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

{2/26/96
Initial: Fanuc 6M (FW) B001.11
Created: Fanuc 6M (FW) B001.11.01
Develop: ComPost 4.21.34, Catalyst68K v3.02.02C
Comment: Corrections to Processor.
Corrected format of CSOffsetA# and CSOffsetB#.
To correct multiple parts output:
Added "OR Flag?('2')" to "IF WFOCS?" in "SubCSMP:".
To Simplify prog subs and correct errors in MP1ToollAllPXcp:
Changed FirstOp3a/NewToolOp5a to FirstOp4/NewToolOp6
Deleted NewToolOp5b sub and changed call to NewToolOp5 (they were identical!)
Deleted OfstOn and Cool On from FirstOp3/NewToolOp5
Added calls to FirstOp4/NewToolOp6 after calls to FirstOp3/NewToolOp5.
Changed StrtPos in MP1ToollAllPXcp to FirstOp3/NewToolOp5.
To correct a literal number 2 from being output when processing multiple parts:
Changed order of booleans from:
IF WFOCS? OR Flag?('2')
to:
IF Flag?('2') OR WFOCS?
Modified WFO Handling:
Changes:
Deleted RecallWFO sub. It was not used!
Deleted NotSameToolWFO & SameToolWFO subs.
Added WFOStuff sub.
Changed all WFO calls in main loops to WFOStuff.
Results:
Changes do not effect Multiple Parts output.
Correct WFO is output by default at the beginning of each tool.
G52, if used, is output by default at the beginning of each tool.
G52, without WFO, is output at SameTool only if there is a change.
Jim Radcliffe}

{4/17/96
Initial: Fanuc 6M (FW) B001.11.01
Created: Fanuc 6M (FW) B001.12.01
Comment: Changed version number to reflect new identification scheme.
Jim Radcliffe}

{6/14/96
Initial: Fanuc 6M (FW) B001.12.01
Created: Fanuc 6M (FW) B001.12.02
Comment: Modified CRC handling to reflect the way I do it and same as M001.89.
Jim Radcliffe}

{6/24/96
Initial: Fanuc 6M (FW) B001.12.02
Created: Fanuc 6M (FW) B001.12.03
Comment: Added Missing prog formatter for CSSubID#.
Jim Radcliffe}

{6/24/96
Initial: Fanuc 6M (FW) B001.12.03
Created: Fanuc 6M (FW) B001.12.04
Comment: In MP1ToollAllPXcp added positioning BEFORE OfstOn!
Jim Radcliffe}

{6/24/96
Initial: Fanuc 6M (FW) B001.12.04
Created: Fanuc 6M (FW) B001.12.05
Comment: Simplified
reduced nnnnOp# sub calls to reflect the MPs cut off points.
Moved WFOstuff to FirstOp1 & NewToolOp3
Jim Radcliffe}

{6/25/96
Initial: Fanuc 6M (FW) B001.12.05
Created: Fanuc 6M (FW) B001.12.06
Comment: Further simplified WFO handling.
Jim Radcliffe}

{8/10/96
Initial: Fanuc 6M (FW) B001.12.06
Created: Fanuc 6M (FW) B001.12.07
Comment: Modifications per bug reports from Aavid, myself and Danny Ball
Corrected output of MultipleParts WorkFixtureOffsets OneToolAllParts ExitClearancePlane.
Modified WFOStuff sub to allow output for MultipleParts WorkFixtureOffsets
The output was being suppressed!
I then simplified WFOStuff sub.
Added DecWFO after NextWFO and added IncWFO after NextPrevWFO.
This will leave the output of WFOStuff on the correct WFO!
In doing the above fixes, OpenMP and CloseMP were modified with no change to output.
Added 2 new Prog Subs DoCSWFOOps & DoCSG52Ops
This simplifies and shortens the prog and CloseMP
Deleted the use of Flag#2
It was just the opposite of the WFOCS boolean!
Corrected returning A and B axis in End2 per Danny Ball
Jim Radcliffe}

{8/12/96
Initial: Fanuc 6M (FW) B001.12.07
Created: Fanuc 6M (FW) B001.12.08
Develop: ComPost2 68k, Catalyst68K v3.04.10.C
Comment: Corrected output of WFOStuff & Simplified WFO subs.
Deleted the use of NeedWFO1 boolean
Added Flag #2 to control output of WFOStuff.
Jim Radcliffe}

{10/2/96,
Initial: Fanuc 6M (FW) B001.12.08
Created: Fanuc 6M (FW) B001.14
Simplified Toolpath Linefeat by the addition of CkCRC and CkCRCNum subs.
MPK}

{10/2/96,
Initial: Fanuc 6M (FW) B001.14
Created: Fanuc 6M (PW) C001.14
modified for partial WFO output, MPK}

{11/22/96
Versions: Catalyst v3.23C/Compost 4.21.37/v1.0b1
.14 Additions:
Deleted Flag(2) 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.
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.
DWB}

{2/25/97
Modified: Fanuc 6M (FW) C001.14
Created: Fanuc 6M (FW) C001.15
For: Gibbs & Associates
Versions: Catalyst v3.30C/ComPost2 MSL 68K
Corrected problem with StrtPos for MultipleParts OneToolAllParts ExitClearancePlane.
Only concerns WFOCS and G52 style programs.
Post was not outputting good position in Main Program Output for FirstOperation only.
Problem was corrected by doing ClearCSOffset prior to StrtPos.
Rewrote code at following subs:
Added ClearCSOffset at CSG52 sub.
Rewrote logic at G52Stuff sub.
Corrected problem with CS related stuff not being output.
Caused by only testing AAxisAvail.
Added BAxisAvail test at DoCSComment sub.
Added AAxisAvail test at DoCSWFOComment sub.
Added BAxisAvail test at DoCSWFOComment sub.
Changed name of OffsetComments sub to CSComments and rewrote logic.
Modified handling of G52 style output for MultipleParts WorkFixtureOffsets.
Only concerns AllToolsOnePart and OneToolAllParts FullUp situations.
Reduces length of file by eliminating redundancy of G52 blocks.
Moves G52 blocks from Main Program to Sub Programs.
Extra unnecesary sub programs are combined into fewer subs.
Returns to old M001 style of handling MultipleParts WorkFixtureOffsets.
New style only needed for WFOCS style programs.
Rewrote logic at DoCSG52Ops sub.
Rewrote logic at OpenMP sub.
Rewrote logic at DoCSWFOOps sub.
Rewrote logic at CloseMP sub.
Changed IF WorkFixtureOffsets? to IF WFOCS? at SubCSMP sub.
Added Flag(5) to Suppress Redundant WFO for MultipleParts WorkFixtureOffsets programs.
Only concerns OneToolAllParts ExitClearancePlane situations.
NOTE: I believe there is a bug with ToolChanges.
For WFOCS and G52 style programs, FirstHome command at End2 sub is outputting absolute,
unshifted CS#1 value regardless of final CSGroup.
Should be shifted value corresponding with active CSGroup consistant with NewToolOp2 sub.
For MultiplePart EquallySpacedOffsets programs, Home command at NewToolOp2 sub and FirstHome
command at End2 sub are outputting shifted values corresponding with active CSGroup.
Should be absolute, unshifted CS#1 value.
These bugs have not been verified and are only my observations while testing the Tutorial Part.
DWB}

{11/25/97,
Initial : Fanuc 6M (CW) C001.15
Created: Fanuc 0M Tek [FP] CW58.15
Customer: Fuller Precision

Changes to "Prog":

1. Moved ToolChng (M6) to OpToolID (T__) line.
2. Added /M88 (thru spindle coolant ON) before SpinOn (M3).
3. Added / befor CoolOn (M8).
4. Added M89 (thru spindle coolant OFF) before Tool Changes and at end.
5. Added G28Y0., G28A0., and M21 to tape end.
6. Changed all CSAngleB calls to CSAngleBC and in a single block.
7. Changed CSAngleA call to CSAngleAC in SameToolOp3 sub-routine.
8. Revised CSAngleB sub-routine.
9. Changed FirstHome to HomeX# in End2 sub-routine and removed 19 lines.
10. Changed moving to ZCP1 for ChangeCS in SameToolOp1 sub-routine.
11. Added SetFlag('6') for Coolants.
JHE}

{8/20/98,
Initial : Fanuc 0M Tek [FP] CW58.15
Created: Fanuc 0M Tek [FP] CW58.15.1
Customer: Fuller Precision, Mitch Collin - 256/739-4962

Changes to "Form":

1. Under Drill Cycles, changed Bore number to 76 and removed the Dwl Label (P).

Changes to "Prog":

1. Added the output of Q.01 (move off center) for FIFO cycle.
2. Changed the output at End so the rotaries will be output only if 4 or 5 axis
machine was selected.
JHE}

{1/26/99
Initial: Fanuc 0M Tek [FP] CW58.15.1
Created: Fanuc 0M Tek [FP] PMW58.17.3
Created simple 4th positioning post per Fanuc 6M PM001.17.3
MPK}

{Prog Numeric Format Definitions *******************************}

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(TrackC#,3)
FORMAT(TrackCNO#,3)
FORMAT(MoveC#,3)
FORMAT(UnitAngle#,3)
FORMAT(Recall#,4)
FORMAT(HomeX#,4)
FORMAT(ADD#,4)
FORMAT(ToolDiameter#,4)
FORMAT(TrackXNO#,4)
FORMAT(TrackYNO#,4)
FORMAT(TrackZNO#,4)
FORMAT(TRUNC#,5)
FORMAT(Program#,5)
FORMAT(Program2#,5)
FORMAT(CallMasterNum#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
FORMAT(RapidF#,7)

{Added Subroutines ****}

report:
IF PalletIn?
'------------------------------------' EOL
'Num#(1) xEP = ' Recall# Num#('1') EOL
'Num#(2) yEP = ' Recall# Num#('2') EOL
'------------------------------------' EOL
END
RETURN

resetSP: {update to the correct StartPos}
IF Rotations? OR Repeats? OR AutoCycle?
IF AbsValue?
TrackXNO# SPX#
TrackYNO# SPY#
ELSE
SetAbs
TrackXNO# SPX#
TrackYNO# SPY#
SetInc
END
END
RETURN

saveEP: {save the correct EndPos}
IF PointFeat?
IF AutoCycle?
SetACSPCompF
Save# Num#('1') ADD# Recall# Num#('1') SPX# { xOpEP }
Save# Num#('2') ADD# Recall# Num#('2') SPY# { yOpEP }
SetACSPComp
ELSE
Save# Num#('1') SPX# { xOpEP }
Save# Num#('2') SPY# { yOpEP }
END
ELSE
Save# Num#('1') EPX# { xOpEP }
Save# Num#('2') EPY# { yOpEP }
END
RETURN

getEP: {save the correct EndPos}
IF Rotations? OR Repeats? OR AutoCycle?
IF AbsValue?
saveEP
ELSE
SetAbs
saveEP
SetInc
END
report
END
RETURN

setSRXYtoACEP:
TrackXNO# Recall# Num#('1') { xOpEP }
TrackYNO# Recall# Num#('2') { yOpEP }
RETURN

{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:
'G' NewWFO#
RETURN

wfoStuff:
IF NewWFO?
IF MultipleParts? AND WorkFixtureOffsets?
EOL
'*** WARNING *** DO NOT USE NEWWFO() WITH MULTIPLE PARTS AND WORK FIXTURE OFFSETS' EOL
ELSE
wfo
END
ELSE
IF Flag?('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF NOT SameTool?
IF MultipleParts?
IF WorkFixtureOffsets?
WFO1
ELSE
wfo
END
ELSE
wfo
END
END
END
END
SetFlagF('2') { Do not output WFO second time wfoStuff is called for MP-WFO-OTAP-ECP }
RETURN

doSubComment:
IF UseComments? AND SubComment?
'( SUB NUMBER: ' Program# ' )' EOL
END
RETURN


doOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
'( OPERATION ' Operation# ': ' OperationType$ ' )' EOL
END
IF OperationComment?
'( ' OperationComment$ ' )' EOL
END
IF WorkGroupComment?
'( ' WorkGroupComment$ ' )' EOL
END
IF ToolTypeComment?
'( TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
IF ToolComment?
'( ' ToolComment$ ' )' EOL
END
restoreScale
END
RETURN

psInit:
NewWFOF
FourthCWF
FourthCCWF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
PalletInF
RETURN

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

absValueC:
IF NOT AbsValue?
AbsValue
END
RETURN

incValueC:
IF AbsValue?
IncValue
END
RETURN

absOrIncC:
IF AbsoluteMoves?
absValueC
ELSE
incValueC
END
RETURN

setAngleUnder360: {sets status register and machine to current rotary position between -360 and 360 deg}
IF AAxisAvail?
SetAbs
IF GTEqual? MoveC# Num#('360') {reset the A-axis to be between 0 and 359.999}
ResetAngle
SeqC Preset 'A' TrackC# UnitAngle# EOL
ELSE
IF LTEqual? MoveC# Num#('-360')
IF Equal? UnitAngle# Num#('0') {reset the A-axis to be 0}
ResetAngle
SeqC Preset 'A' TrackC# UnitAngle# EOL
ELSE {reset the A-axis to be between -0.001 and -359.999}
ResetAngle
SeqC Preset 'A' TrackC# SUB# UnitAngle# Num#('360') EOL
END
END
END
SetInc { Because we call setAngleUnder360 right after incValueC OfstOff }
END
RETURN

doStartPos:
StrtPos
IF AAxisAvail?
CalcSCAng MoveC
ELSE
TrackCNO# Num#('0')
END
RETURN

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

startSub:
OpenSub
SubID EOL
doSubComment
RETURN

subWarning:
IF NOT FeedConnect?
IF AnyZshift?
' ' EOL
'( 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
IF NOT FeedConnect?
RapidC ZCP3C
END
EOL
RETURN

finishSubG92: {part 2}
SeqC Preset ShiftRC EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshftRC EOL
RETURN

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

openMP:
NewProg
IF WorkFixtureOffsets?
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP }
END
NewWFO
EachWFO {simple eachPart}
doWFOOps
IncWFO
NextWFO {simple NextPart}
startSub
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

closeMP:
IF WorkFixtureOffsets?
SeqC EndSub EOL
CloseSub
SeqC WFO1 EOL
ELSE
SeqC absOrIncC EOL
SeqC Preset ShiftPC EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshftPC EOL
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

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

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

tpPointFeat:
IF AutoCycle?
SeqC MoveSXYC EOL
IF Repeats? AND ZshiftOnly?
SeqC SubCall CallLabB TRUNC# SUB# Program# Num#('1') EOL
ELSE
SeqC SubCall CallLab EOL
END
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
IF FirstFeat?
SetFlagF('9') { For valid Drill Rotation Sub }
IF Rotations?
IF NOT LastFeat?
IF NOT MasterOp?
SetFlag('9') { valid Drill Rotation Sub }
NewProg
StartSub
END
END
END
ELSE
SeqC doDrillAbsOrInc MoveSXYZC EOL
END
IF LastFeat?
IF Flag?('9') { valid Drill Rotation Sub }
restoreAbsOrInc
IF NOT MasterOp?
SeqC EndSub EOL
CloseSub
END
END
END
END
RETURN

tpRapidFeat:
IF XMove? OR YMove? OR ZMove?
SeqC doAbsOrInc ckCRC RapidC MoveXYZC ckCRCNum EOL
END
RETURN

tpLineFeat:
IF XMove? OR YMove? OR ZMove?
SeqC doAbsOrInc ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL
END
RETURN

tpArcFeat:
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
SeqC doAbsOrInc
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXYZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
ArcFeedC EOL
NEXTQuadrant
RETURN

toolPath:
ResetCRCNum
EACHFeat
IF FirstFeat?
resetSP
END
IF PointFeat?
tpPointFeat
ELSE
IF RapidFeat?
tpRapidFeat
ELSE
IF LineFeat?
tpLineFeat
ELSE
IF ArcFeat?
tpArcFeat
END
END
END
END
IF LastFeat?
getEP
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
RapidC ZCP2
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 doStartPos EOL
milling
finishSub1
finishSubG92
RETURN

doSepSubContour:
SetPass1
TrackZNO# SPZ#
startSub
RapidF#
IF AutoCycle?
NewProg
autoCycCutSub1 {build element sub}
TrackZNO# SPZ#
autoCycCutSub2
ELSE
toolPath
finishSub1
SeqC EndSub EOL
CloseSub
END
SetPass1
SetStatusRapid
RapidF#
SetSRXYtoEP
TrackZNO# ClearancePlane2#
RETURN

doSepSubFeedConnect:
IF FeedConnect?
FeedEntC
END
RETURN

doSepSubSPMove:
SetStatusOff
IF SPXMove? OR SPYMove?
IF AutoCycle?
incValueC
END
SeqC Connect StrtPosC doSepSubFeedConnect EOL
absOrIncC
ELSE
Connect
END
SetStatusOn
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:
SetAbs
TrackZNO# ADD# SPZ# MUL# RepsLess1# RepeatZ#
SetInc
RETURN

doSepSubExit:
IF NOT AbsValue?
setSepSubZ
END
IF AutoCycle?
SeqC Rapid ZCP2 EOL
ELSE
Rapid { Will be output at millingOp ZCP3 }
END
RETURN

resetSepSubSR:
SetPass1
SetStatusRapid
RapidF#
TrackXNO# Recall# Num#('1') { xOpEP }
TrackYNO# Recall# Num#('2') { yOpEP }
RETURN

zonlyRepAutoCycle:
doSepSubContour
EachCycle
IF NOT FirstCycle?
doSepSubSPMove
END
doSepSubZMoves
NextCycle
IF FeedConnect?
doSepSubExit
END
SeqC EndSub EOL
CloseSub
{Element shift, not pattern}
autoCycPat {write pattern moves and main calls}
resetSepSubSR
TrackZNO# ClearancePlane2#
RETURN

zonlyRep:
doSepSubContour
EachCycle
IF NOT FirstCycle?
doSepSubSPMove
END
doSepSubZMoves
NextCycle
resetSepSubSR
IF FeedConnect?
doSepSubExit
ELSE
TrackZNO# ClearancePlane3#
END
RETURN

millingOp:
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
IF AutoCycle?
SeqC CRCOffC ZCP3C EOL
setSRXYtoACEP
ELSE
SeqC CRCOffC RapidC ZCP3C EOL
END
RETURN

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

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

drillingOp:
SeqC DrillCP EOL
GetCycle
SeqC Cycle FromCP StrtPos ZDepth RLevel Dwell Peck Retract
IF FIFO?
'Q.01' FeedEnt EOL
ELSE
FeedEnt EOL
END
IF CallMasterOp?
SeqC SubCall CallLabB CallMasterNum# EOL
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') {std sep sub Zreps in effect}
NewMasterProg
SeqC SubCall CallLab EOL
StartSub
ToolPath
SeqC EndSub EOL
CloseSub
SetFlagF('1') {not std sep sub Zreps in effect}
ELSE
ToolPath
END
END
SetDrillEndOpZ
IF NOT Rotations?
SeqC DrillOff Rapid ZCP3 EOL
END
RETURN

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

rotateStartPosC:
TrackXNO# Recall# Num#('1') { xOpEP }
MoveSXC
TrackYNO# Recall# Num#('2') { yOpEP }
MoveSYC
CalcSCAng MoveC
RETURN

rotaryReps: {use the correct EndPos}
EachRotation
IF Milling?
IF FirstRotation?
NewProg
SaveProgNum2
StartSub
millingOp
SeqC EndSub EOL
CloseSub
checkPass
ELSE
SeqC rotateStartPosC EOL
END
SeqC SubCall CallLabB Program2# EOL
ELSE
IF Drilling?
IF FirstRotation?
drillingOp
checkPass
ELSE
IF RetractToCP1? AND Equal? ClearancePlane1# ClearancePlane3#
SeqC rotateStartPosC EOL
ELSE
IF NOT RetractToCP1? AND Equal? ClearancePlane2# ClearancePlane3#
SeqC rotateStartPosC EOL
ELSE { Need to cancel Drill Cycle between Rotations }
SeqC DrillOff Rapid ZCP3 EOL
SeqC rotateStartPosC EOL
SeqC DrillCP EOL
SeqC DrillCP EOL
GetCycle
SeqC Cycle FromCP rotateStartPosC ZDepth RLevel Dwell Peck Retract
IF FIFO?
'Q.01' FeedEnt EOL
ELSE
FeedEnt EOL
END
END
END
END
IF CallMasterOp?
IF NOT FirstRotation?
SeqC SubCall CallLabB CallMasterNum# EOL
END
ELSE
IF MasterOp?
IF NOT FirstRotation?
SeqC SubCall CallLab EOL
END
ELSE
IF Flag?('9') { valid Drill Rotation Sub }
SeqC SubCall CallLab EOL
END
END
END
IF LastRotation?
SeqC DrillOff Rapid ZCP3 EOL
END
END
END
NextRotation
TrackXNO# Recall# Num#('1') { xOpEP }
TrackYNO# Recall# Num#('2') { yOpEP }
TrackZNO# ClearancePlane3#
RETURN

opGuts:
IF Rotations?
rotaryReps
ELSE
IF Milling?
millingOp
ELSE
IF Drilling?
drillingOp
END
END
END
RETURN

ProgStart:
InitProg
ReverseXZArcs
InitWFONum
SetFlood
SetMaxRPM('10000')
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 }
SetFlagF('1') { Milling ZShiftOnly SepSubs/DrillSubs deactivated }
SetFlagF('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
SetFlagF('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP }
SetFlagF('9') { For valid Drill Rotation Sub }
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
' 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
' 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

initOp:
EOR EOL
ProgID1
IF UseComments? AND ProgramNameComment?
'( PROGRAM: ' ProgramName$ ' )'
END
EOL
IF UseComments?
IF ProgramComment?
'( ' ProgramComment$ ' )' EOL
END
IF FormatNameComment?
'( FORMAT: ' FormatName$ ' )' EOL
END
IF TimeComment?
'( ' Date$ ' AT ' Time$ ' )' EOL
END
IF MovesComment?
'( OUTPUT IN ' MoveType$ ' INCHES )' EOL
END
IF PartsComment?
'( PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
'( FIRST TOOL NOT IN SPINDLE )' EOL
END
END
OpenSub
restoreScale
RETURN

firstOp1:
IF ToolChangeAtHome?
SetHome
END
Seq Plane 'G80' CRCOff EOL
SeqC OpToolID ToolChng EOL
doOpComments
doPostScript
RETURN

firstOp2:
SeqC wfoStuff EOL
IF ThruSpin?
SetFlagF('6')
SeqC '/M88' EOL
END
SeqC Speed SpinOn EOL
CheckPass
SeqC AbsOrInc Rapid doStartPos EOL
RETURN

firstOp3:
SeqC OfstOn EOL
IF Flood?
SetFlag('6')
SeqC '/' CoolOn EOL
END
RETURN

newToolOp1:
IF Flag?('6')
SeqC CoolOff EOL
ELSE
SeqC 'M89' EOL
END
SeqC incValueC OfstOff EOL
setAngleUnder360
RETURN

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

newToolOp3: {Start new Operation}
Seq Plane DrillOff CRCOffC EOL
SeqC OpToolID ToolChng EOL
doOpComments
doPostScript
RETURN

newToolOp4:
SeqC wfoStuff EOL
IF ThruSpin?
SetFlagF('6')
SeqC '/M88' EOL
END
SeqC Speed SpinOn EOL
CheckPass
SeqC AbsOrInc Rapid doStartPos EOL
RETURN

NewToolOp5:
SeqC OfstOn EOL
IF Flood?
SetFlag('6')
SeqC '/' CoolOn EOL
END
RETURN

sameToolOp1:
doEndOpPS
IF LAST ProgStop?
IF Flag?('6')
SeqC CoolOff EOL
ELSE
SeqC 'M89' EOL
END
SeqC incValueC OfstOff EOL
SeqC SpinOff EOL
SeqC 'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
IF Flag?('6')
SeqC CoolOff EOL
ELSE
SeqC 'M89' EOL
END
END
IF NewToolOffset?
SeqC incValueC OfstOff EOL
END
END
RETURN

sameToolOp2: {Start new Operation}
DoOpComments
DoPostScript
CheckPass
RETURN

sameToolOp3: {Start new Operation}
SeqC wfoStuff EOL
IF LAST ProgStop?
SeqC PlaneC AbsOrInc Rapid doStartPos SpeedC SpinOn EOL
SeqC OfstOn EOL
IF ThruSpin?
SetFlagF('6')
SeqC '/M88' EOL
END
IF Flood?
SetFlag('6')
SeqC '/' CoolOn EOL
END
ELSE
SeqC PlaneC AbsOrInc Rapid doStartPos EOL
IF NewToolOffset?
SeqC OfstOn EOL
END
IF NOT CoolOff? AND LAST CoolOff?
IF ThruSpin?
SetFlagF('6')
SeqC '/M88' EOL
END
IF Flood?
SetFlag('6')
SeqC '/' CoolOn EOL
END
END
END
RETURN

end1:
IF ThruSpin?
SeqC 'M89' EOL
END
IF Flood?
SeqC CoolOff EOL
END
SeqC incValueC OfstOff EOL
RETURN

end2:
SeqC 'G28Y0.' EOL
IF AAxisAvail?
SeqC 'G28A0.' EOL
END
doEndOpPS
IF ToolChangeAtHome?
SeqC absOrIncC Rapid 'X' HomeX# SpinOff EOL
ELSE
SeqC SpinOff EOL
END
IF ProgStop?
SeqC 'M0' EOL
END
RETURN

end3:
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}
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
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
sameToolOp2
sameToolOp3
END
END {common point for all operations}
opGuts
NextOp {loops back to EachOP until last Operation}
end1
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
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
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:
Fanuc 0M Tek [FP] CW58 15 1
Fanuc 0M OH [KGK] PM515 17 3
Fanuc 0M Kit [YC] PMT92 17 3
Fanuc 0M Hard [GS] RM107 17 5
Fanuc 0M [NM] PMZ26 17 3
Fanuc 0M PM062 17 3
Fanuc 0M [NM] PMZ26 17 3m
Fanuc 0M Supermax PM130 17 3
Fanuc 0M LH P&W [SP] CV84 16 3
Fanuc 0M Supermax [AM] MW17 89
Fanuc 0M Wasino WM3 M525 81 2
Fanuc 0M Supermax M130 15
Fanuc 0M LW LH [RI] CU58 16
Fanuc 0M [RP] MX46 89

więcej podobnych podstron