{
MILL=T
LATHE=F
SIMPLE_ROT_POS=F
ROTARY_MILL=F
ADV_MILL=T
SUBS=T
MILLTURN_POLAR-SEG=F
MILLTURN_Y-AXIS=F
METRIC=F
}
{Change Comments ***********************************************************}
{added separate sub call code and warning for not separate, 7/5/88 WFG}
{separate sub calls turned off in this post- 'UseSeparateSubCalls' commented out}
{ncPost3ż24 or better}
{added IF ToolChangeAtHome?, & SetHome 9/26/88 WFG}
{added PostScript commands 3/11/89 WFG}
{added PostScript command comments 5/9/89, WFG, use ncPost 3.10Ś9 or better}
{removed run time comments, 5/9/89, WFG}
{added "must be all capital letters when typed in" to Postscript Command comment, 5/17/89, JR}
{added metric, 6/5/89, WFG}
{suppressed first cycle StrtPos for sep subs,7/17/89 WFG}
{last tool now goes to FirstHome when finished, 7/26/89, WFG}
{changed to Sep Sub standard}
{.65, corrected Sep sub problem if 1st cut <> Z step, 9/14/89 WFG, requires ncPost 3.19Ś5}
{.66, added name comment to Prog ID # line, 10/30/89, WFG}
{.67, new prog commands, 11/20/89, WFG}
{*.68, AutoCycles and 3.2 support, 12/4/89, WFG (Good luck on the upgrades to other posts)}
{.69, corrected 2 repeat op/autocycle problems, 12/21/89, WFG}
{1/8/90-2/7/90
Changes to M001.69
Moved doPostScript command to very beginning of NewTool & SameTool op's, same as FirstOp.
Deleted last line of NewWFO PostScript comment, it no longer applies.
Move doEndOpPS command in NewTool & end of prog to end of operation outside of Full-up MP.
Restucture to have M01 or M00 in New Tool.
Deleted ProgStop? from end of prog, not neccesary.
Check for ProgStop at beginning AND end of operation does not work, it comes out both places,
only using for end of operation. Reflected in PSComments.
Deleted StopProg sub.
Re-wrote SameTool section for many reasons.
Deleted ClearancePlane3# prog format it is no longer needed.
New sub checkPass to replace statement in main for SetPass.
Modified wFOStuff sub to include SameTool.
Deleted StrtPos from openMP sub and added to main where needed.
Updated to .70 format.
Jim Radcliffe}
{.71.1, added InitProg, 4/11/90, JR}
{.71.2, FIRST modifier, no CRCOffC in autoCycCutSub2, add Connect for zonlyRep, 4/23/90, JR}
{.71.2.NoNest, modified for example of no nesting subroutines, 5/22/90, JR}
{.72.1.NoNest, Updated to .72.1 format & minor corrections, 6/6/90, JR}
{.76.1.NoNest, Updated to .76.1 format, 7/18/91, JR}
{.80.NoNest, Updated to .80 format, 9/10/91, JR}
{.81.NoNest, Updated to .81 format, 4/17/92, JR}
{.81.2.NoNest, Updated to .81.2 format, 6/3/93, JR}
{.81.3.NoNest, StdRapid & StdArc subs, 12/6/93, JR}
{.81.4.NoNest, Minor layout improvments & Update stuff, 6/1/94, JR}
{9/28/94
Copied & modified: Fanuc 6M NoNest M001.81.4
For: Walker
Control: Fanuc 15M
Machine: Matsuura Horizontal MC-700H-50-PC25
Custom Processor per Sample Readouts and verbal instructions.
Jim Radcliffe}
{12/14/94
Modified: Fanuc 15M Matsuura M695.81.4
For: Walker
Added SpinOff between tools.
All output is output as MultipleParts ExitClearancePlane WorkFixtureOffsets.
Added logic to handle if MultipleParts was not selected.
Corrected NoNest checks so everything else is output long hand.
Jim Radcliffe}
{
Format: Fanuc 15M Matsuura M695.81.4
Upgraded to C Style post per C001.05
TH}
{ Added ClearCSOffset to subCSMP TH}
{8/23/95 - Updated to .10 format TH}
{2/12/96, Updated .85 number to .86, no changes necessary, MPK}
{2/16/96 - Modified: Fanuc 15M Matsuura B695.11
Changet to Fanuc 15M Matsuura B695.11.1
Set max RPM to 14000 & max feed to 1500
JM}
{3/25/96, Tested zonlyRepAutoCycle, Changed version # to .12, MPK}
{23Mar99
Original: Fanuc 15M Mat [IH] B958.12
Created: Haas HS-1RP [IH] B958.16
For: ITW Heartland
Changes made per: Marv Hoffman
Develop: Catalyst 5.05/ComPost2 1.7b15
Added Post Header Comment at the top of Prog.
Updated to B_Style Advanced Mill Post per Fanuc 6M (FW) B001.16.1
Modified wfo Output. WOF1 is now output as #501, #502 etc.
Added doMakro sub to output Custom Makro code for all rotations other than CS#1.
Added support for ThruSpindle Coolant.
Added setLastThruSpin Sub because "LAST ThruSpin?" boolean does not work. Uses Flag(19).
Created a Custom MDD for cutomers coolant options.
Flood Coolant is always on when ThruSpindle Coolant is used.
Switched the A and B axis Lables. Customers Horizontal Machine has an an A-Axis.
Added a CS list in ProgStart.
Added 'M10' code to support Clamping.
Output before Tool Length Offset Line in firstOp3 and newToolOp5 and SameToolOp3.
Moved SpinOff on the ToolOffset Cancel Line in newToolOp1 and SameToolOp1.
Added a blank line after all M1's.
Charles Winston}
{4/1/99
Initial: Haas [IH] BQ55.16
Created: Haas [IH] BQ55.16.1
Changed OfstOn to 'G43Z' TrackZ# Num#('2')
Formatted TrackZ# to format 4
added a 'G' before ouput of WFOs,
changed output of all FIFO cycles to G76,
added literal 'Q.01' to all FIFO drill cycles
MPK}
{04/02/99,
Initial: Haas [IH] BQ55.16.1
Created: Haas [IH] BQ55.16.2
For: ITW Heartland
Changes to Prog:
1) csWFO/wfo/wfoStuff - Deleted literal 'G' in csWFO and wfo. Put literal 'G' in
wfoStuff before calls to csWFO and wfo. This is so that the doMakro sub does
not get the 'G's when calling csWFO.
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#,3)
FORMAT(CSOffsetB#,3)
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(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:
'#' ADD# cSPartNum# Num#('500')
RETURN
wFO:
'G#' ADD# PartNum# Num#('500')
RETURN
wFOStuff:
IF Flag?('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF NOT SameTool?
IF WFOCS?
'G' cSWFO
ELSE
'G' 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:
'( CS#' CS# ' - ' CSComment$ ' )' EOL
RETURN
doMakro:
IF FirstOperation? OR ChangeCS?
IF NotEqual? CS# Num#('1')
FORMAT(CSOffsetA#,2)
FORMAT(CSOffsetB#,2)
'G65P9300E' cSWFO 'X' CSOffsetX# 'Y' CSOffsetY# 'Z' CSOffsetZ#
IF Flag?('6') { TRUE = B-Style Output, FALSE = C-Style Output }
IF AAxisAvail?
'B' CSOffsetA#
END
IF BAxisAvail?
'A' CSOffsetB#
END
END
EOL
FORMAT(CSOffsetA#,3)
FORMAT(CSOffsetB#,3)
END
END
RETURN
doCSWFOComment:
IF FirstOperation? OR NewTool? OR ChangeCS?
'( ' cSWFO ' = X' CSOffsetX# ' Y' CSOffsetY# ' Z' CSOffsetZ#
IF Flag?('6') { TRUE = B-Style Output, FALSE = C-Style Output }
IF AAxisAvail?
' B' CSOffsetA#
END
IF BAxisAvail?
' A' CSOffsetB#
END
END
' )' EOL
END
doMakro
RETURN
cSComments:
doCSComment
IF WFOCS? AND NOT MultipleParts?
doCSWFOComment
END
RETURN
doSubComment:
IF UseComments? AND SubComment?
'( SUB NUMBER: ' Program# ' )' EOL
END
RETURN
DoToolComment:
IF UseComments? AND ToolComment?
'( ' ToolComment$ ' )'
END
RETURN
setLastThruSpin: { NOTE: LAST ThruSpin, does not work. Use Flag(19) instead }
SetFlagF('19')
IF ThruSpin?
SetFlag('19') { used in SameToolop3 }
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 SameTool? { it is called on OpToolID line for FirstOperation and NewTool }
DoToolComment EOL
END
IF ToolTypeComment?
'( TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
restoreScale
cSComments
END
RETURN
cSAngleA:
IF AAxisAvail?
IF Flag?('6') AND WFOCS? { TRUE = B-Style Output, FALSE = C-Style Output }
'B0.'
ELSE
'B' CSOffsetA#
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 }
'A0.'
ELSE
'A' CSOffsetB#
END
END
RETURN
cSAngleBC:
IF BChange?
cSAngleB
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
' ' EOL
SubID DoToolComment EOL
doSubComment
IF UseComments? { output the operation comments of the first operation used in the sub }
IF OperationIDComment?
'( OPERATION ' Operation# ': ' OperationType$ ' )' EOL
END
IF OperationComment?
'( ' OperationComment$ ' )' EOL
END
END
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?
IF AutoCycle?
ZCP3C
ELSE
IF FIFO?
FeedC ZCP3C FeedEntC
ELSE
RapidC ZCP3C
END
END
END
EOL
RETURN
finishSubG92: {part 2}
SeqC Preset ShiftRC EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshftRC 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 WFO EOL
END
SeqC SubCall CallLab RepLab OnePart 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
ELSE
NewWFO {reset to WFO1}
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# RepLab OnePart 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
ELSE
NewWFO {reset to WFO1}
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 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
IF AutoCycle?
SeqC CRCOffC ZCP3C EOL
setSRXYtoACEP
ELSE
IF FIFO?
SeqC CRCOffC FeedC ZCP3C FeedEntC EOL
ELSE
SeqC CRCOffC RapidC ZCP3C EOL
END
END
ELSE
IF Drilling?
GetCycle
SeqC
IF Tap? AND NOT CWSpindle?
'G74'
ELSE
Cycle
END
FromCP StrtPos ZDepth RLevel Dwell Peck Retract
IF FIFO?
'Q.01'
END
FeedEnt 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
SeqC DrillOff Rapid ZCP3 EOL
END
END
setLastThruSpin
RETURN
CSdata:
IF LTEqual? Recall# NUM#('50') NumOFCS#
Save# NUM#('50') ADD# Recall# NUM#('50') NUM#('1') {counter}
IF GreaterThan? Recall# Recall# NUM#('50') NUM#('0')
EachOp
IF Equal? Operation# Recall# Recall# NUM#('50')
'#' Add# Num#('500') CS# ' = ' CS# ' ( CS#' CS# ' - ' CSComment$ ' )' EOL
END
NextOp
END
END
RETURN
DoTheListOfCS:
Save# Num#('50') NUM#('0') { Setup the Op Number to be examined, (Initialized to zero) }
CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata
CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata
CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata
CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata
CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata { Limit of 48 CSs because Num#('50') and Num#('49') are in use}
RETURN
SetZero:
Save# NUM#('50') ADD# Recall# NUM#('50') NUM#('1')
Save# Recall# NUM#('50') NUM#('0')
RETURN
Call_SetZero:
Save# Num#('50') NUM#('0') { Setup the Op Number to be examined, (Initialized to zero) }
SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero
SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero
SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero
SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero
SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero {Call 49 times}
Save# Num#('50') NUM#('0')
RETURN
progStart:
InitProg
ReverseXZArcs
InitWFONum
SetFlood
SetMaxRPM('14000')
IF Metric?
SetMaxFeed('38100')
ELSE
SetMaxFeed('1500')
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 }
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 }
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#('60')
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#('60') {****}
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
EOR EOL
ProgID1
IF UseComments? AND ProgramNameComment?
'( ' ProgramName$ ' )'
END
EOL
Call_SetZero
EachOp
IF Equal? Recall# CS# NUM#('0')
Save# CS# Operation# { Save the NUMBER of the First Operation in which each Co-Ordinate Machining System is used }
END
NextOp
DoTheListOfCS
Call_SetZero
RETURN
initOp:
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 OpToolID ToolChng DoToolComment EOL
doOpComments
doPostScript
RETURN
firstOp2:
IF ThruSpin?
SeqC 'M88' EOL
END
SeqC 'M31' EOL
checkPass
SeqC AbsOrInc wFOStuff Plane Rapid StrtPos cSAngleA cSAngleB Speed SpinOn EOL
RETURN
firstOp3:
SeqC 'M10' EOL
SeqC 'G43Z' TrackZ# Num#('2') CoolOn EOL
RETURN
newToolOp1:
IF LAST NOT CoolOff?
SeqC CoolOff EOL
END
SeqC IncValue OfstOff SpinOff EOL
IF Flag?('19')
SeqC 'M89' EOL
END
RETURN
newToolOp2:
doEndOpPS
IF ToolChangeAtHome?
SeqC AbsOrInc Rapid Home EOL
END
IF LAST ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
END
' ' EOL
RETURN
newToolOp3: {Start new Operation}
Seq OpToolID ToolChng DoToolComment EOL
doOpComments
doPostScript
RETURN
newToolOp4:
IF ThruSpin?
SeqC 'M88' EOL
END
IF ChangeCS?
SeqC 'M31' EOL
END
checkPass
SeqC AbsOrInc wFOStuff Plane Rapid StrtPos cSAngleA cSAngleB Speed SpinOn EOL
RETURN
newToolOp5:
SeqC 'M10' EOL
SeqC 'G43Z' TrackZ# Num#('2') CoolOn EOL
RETURN
sameToolOp1:
doEndOpPS
IF LAST ProgStop?
SeqC CoolOff EOL
SeqC IncValue OfstOff SpinOff EOL
IF ThruSpin?
SeqC 'M89' EOL
END
IF ToolChangeAtHome?
SeqC AbsOrInc Rapid Home EOL
END
SeqC 'M00' EOL
' ' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF NewToolOffset? or ChangeCS?
IF ChangeCS?
IF AChange? OR BChange?
SeqC IncValue OfstOff EOL
END
ELSE
SeqC IncValue OfstOff EOL
END
END
IF NOT ThruSpin? AND Flag?('19')
SeqC 'M89' EOL
END
END
RETURN
sameToolOp2: {Start new Operation}
doOpComments
doPostScript
checkPass
RETURN
sameToolOp3: {Start new Operation}
IF LAST ProgStop?
IF ThruSpin?
SeqC 'M88' EOL
END
SeqC AbsOrInc
IF ChangeCS?
wFOStuff
END
EOL
PlaneC Rapid StrtPos cSAngleA cSAngleB SpeedC SpinOn EOL
SeqC 'M10' EOL
SeqC OfstOn CoolOn EOL
ELSE
IF ThruSpin? AND NOT Flag?('19')
SeqC 'M88' EOL
END
SeqC AbsOrInc
IF ChangeCS?
wFOStuff
END
EOL
IF ChangeCS?
SeqC 'M31' EOL
END
PlaneC Rapid StrtPos cSAngleA cSAngleB SpeedC EOL
IF ChangeCS?
SeqC 'M10' EOL
END
SeqC
IF NewToolOffset? OR ChangeCS?
SeqC 'G43Z' TrackZ# Num#('2') EOL
END
IF NOT CoolOff? AND LAST CoolOff?
CoolOn
END
EOL
END
RETURN
end1:
IF NOT CoolOff?
SeqC CoolOff EOL
END
SeqC IncValue OfstOff EOL
IF ThruSpin?
SeqC 'M89' EOL
END
RETURN
end2:
doEndOpPS
IF FIRST ToolChangeAtHome? {added FIRST modifier}
SeqC AbsOrInc Rapid FirstHome EOL
END
IF NOT Equal? CSOffsetA# Num#('0') OR NOT Equal? CSOffsetB# Num#('0')
IF AAxisAvail?
SeqC cSAngleA
END
IF BAxisAvail?
SeqC cSAngleB
END
EOL
SeqC 'G92'
IF AAxisAvail?
'B0'
END
IF BAxisAvail?
'A0'
END
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}
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:
Haas [VM] NMX60 16 1Haas [GE] MY08 16Haas [HTP] NMU13 16Scenariusz 16 Rowerem do szkołyr 1 nr 16 138669446416 narrator16 MISJAFakty nieznane , bo niebyłe Nasz Dziennik, 2011 03 16więcej podobnych podstron