{
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 ***********************************************************}
{8/11/89, Updated processor JR}
{8/31/89, Added PostScript, JR}
{12/1/89, Updated: Fanuc 11M M007.61, JR}
{2/7/90, Updated to Version 3.2 per Fanuc 6M M001.70 Format, DWB}
{7/24/90, Added InitProg globally to posts with this remark, DWB}
{7/24/90, Replaced all occurances of SetSRXYZero with SetSRXYtoSP, DWB}
{9/28/90, Updated: Fanuc 11M M007.71 to .76.1 format, JR}
{12/13/90
Copied & modified: Fanuc 11M M007.76.1
For: DARMARK INC
Machine:
Control: Fanuc 11M
Changes following made per customer request:
Deleted all occurances of SpinOff (M5) command.
Added 'M19' to all occurances of IncValue OfstOff commands.
SK}
{2/22/91
Copied & modified: Fanuc 11M M007.76.2
For: Gibbs & Associates
Machine:
Control: Fanuc 11M
Updated to Version 3.4 per Fanuc 6M M001.76.3 Format.
DWB}
{4/02/91
Modified: Fanuc 11M M007.76.3
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 6M M001.80 Format.
Kim Michelman}
{9/30/91
Modified: Fanuc 11M M007.79
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 6M M001.81 Format.
Kim Michelman}
{7/21/95, Updated Fanuc 11M M007.81 to .85 format per Fanuc 6M M001.85.01, JR}
{1/17/96, Updated .85 to .86 version, MPK}
{3/22/96, Tested zonlyRepAutoCycle, Changed version # to .89, MPK}
{11Nov98
Original: Fanuc 11M M007.89
Created: Fanuc 11M Toyoda [CGB] MT37.89
For: C G Brettings
Changes made per: Gerry Beebe
Added Post Header Comment at the top of Prog.
Deleted old version numbers and comments e.g. {.62}, {commands}, {literals}, etc
Changed to First Tool in Spindle
Added Pre-Tooling
Replaced all occurences of Plane 'G70G80' CRCOff with 'M98P8111'
Deleted Plane in MachSpec. ( The Plane Command is called in FirstOperation but there is no output. )
Moved Speed SpinOn to the StartPos Line in FirstOperation and NewTool
Added a blank line after the ToolChange Line in NewTool and After the ProgStop in SameTool
Deleted SpinOff in SameTool
Added Untool at End of Prog
Charles Winston}
{3Dec98
Original: Fanuc 11M Toyoda [CGB] MT37.89
Created: Fanuc 11M Toy [CGB] MT37.89.1
For: C G Brettings
Changes made per: Gerry Beebe
Deleted UnTool at End of Prog
Deleted StdLine Sub and updated toolPath Per Fanuc 6M M001.89
Charles Winston}
{29Dec98
Original: Fanuc 11M Toy [CGB] MT37.89.1
Created: Fanuc 11M Toy [CGB] Bxxx.16
For: C G Brettings
Changes made per: Gerry Beebe
Changed Post Header Comment at the top of Prog.
Updated to B_Style Advanced Mill Post per Fanuc 6M (FW) B001.16.1
Charles Winston}
{29Dec98
Created: Fanuc 11M Toy [CGB] CT37.16, C_Style Advanced Mill Post Per Fanuc 6M (PW) C001.16.1
Charles Winston }
{19Jan99
Original: Fanuc 11M Toy [CGB] CT37.16
Created: Fanuc 11M Toy [CGB] CT37.16.1
For: GC Bretting
Changes made per: Gerry Beebe
Develop: Catalyst 5.03/ComPost2 1.7b13
Added Formatting for ContourFeed2# and FeedEntry# in Prog Numeric Format Definitions
Changed CWArcC to CWArc and CCWArcC to CCWArc in formatArc
Changed MoveXYC to MoveXY in toolPath at RapidFeat and LineFeat. Forces all G0, G1,G2 and G3 co-ordinates to be output.
Moved the OperationType$ Comment onto the ToolTypeComment$ Line in doOpComments.
Added Custom FeedRates in toolPath.
*** NOTE ***
This Post outputs a CUSTOMISED FEEDRATE in Toolpath which distinguishes between ENTRY Feedrates and CONTOUR FeedRates
In Particular the ContourFeedrate is output immediately following each Z Move.
Virtual v5.0 now permits editing of toolPath Feedrates. This post DOES NOT fully Support this feature.
Added doEntryFeedRate, doContourFeedRate and doFeedRate Subs
Added Flag('9'), Flag('10') and Flag('11') to keep track of Feedrate Status.
Created a 3-Axis and 4-Axis VM and HM Mill MDDs and Added support for Customers G86 Bore Cycle ( FI-Stop-RO )
Added Support for Rigid Tap Cycle at Drilling in opGuts.
Added Support for Bore Cycle at Drilling in opGuts. Uses Custom MDDs
Moved wfoStuff into the StartPos Line in firstOp2, newToolOp4 and sameToolOp3
Moved PreTooling onto a Seperate line in firstOp2 and newToolOp4
Charles Winston}
{17Feb99
Original: Fanuc 11M Toy [CGB] CT37.16
Created: Fanuc 11M Toy [CGB] CT37.16.2
For: GC Bretting
Changes made per: Gerry Beebe
Develop: Catalyst 5.03/ComPost2 1.7b15
Changed Flag('8') to Flag('11') in ToolPath.
Changed MoveXYZC to MoveXY MoveZC in ToolPath
Added Support for Operator Instructions to be output using PostScript PIN commands.
Supported by doKeyWords, 1stKeyword, 2ndKeyword, 3rdKeyword and 4thKeyword Subs.
Added PalletInF and SetPalletIn('0') at pSInit. PIN commands are NON-MODAL
Added Utility Data Instructions at ProgStart.
Added doKeyWords in newToolOp2 and sameToolOp1.
Added Custom Calls for Drilling Subs.
Drilling Subs are created only when there are more than 11 items in ToolPath.
This is equivalent to 10 Holes or more. ( Because the First hole position is usually supressesed )
Drilling is output in the main program when there are 9 holes or less. i.e. No subs are created.
Charles Winston}
{13Mar99
Original: Fanuc 11M Toy [CGB] CT37.16.2
Created: Fanuc 11M Toy [CGB] CT37.16.3
For: GC Bretting
Changes made per: Gerry Beebe
Develop: Catalyst 5.05/ComPost2 1.7b15
Added Post Header Comment at the top of Prog.
Added OperationComment line after SubID in StartSub.
Changed MoveXYC to MoveXY in FormatArc.
Added logic to force Feed, ( G01) onto each line that contains G40, G41 or G42
Modified ckCRC Sub and ToolPath Subs and added doFeedC Sub.
Added Boolean IF SPXMove? OR SPYMove? and changed MoveSXYC to MoveSX MoveSY
in ToolPath Autocycles.
Deleted Custom FeedRates in ToolPath. Post now supports Virtaul v5.0 Utility Markers.
Added NewMasterProg Boolean in Drilling.
Virtual requires NewMasterProg to be called even if a Drill Sub is not being Created.
Deleted EOR at the start of InitOp.
Moved the ProgramComment onto the same line as ProgID1 in InitOp.
Charles Winston}
{5Apr99
Original: Fanuc 11M Toy [CGB] CT37.16.3
Created: Fanuc 11M Toy [CGB] CT37.16.4
For: GC Bretting
Changes made per: Gerry Beebe
Develop: Catalyst 5.09.39/ComPost2 1.7b15
Added additional Logic in doKeyWords Subs.
NewTool, SameTool and End of Prog now handle Coolant Off.
Added Boolean to Output Z Co-ordinate when doing Helix moves.
Charles Winston}
{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(ContourFeed2#,4)
FORMAT(FeedEntry#,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(Pallet#,5)
FORMAT(Num#,5)
FORMAT(Dwell#,6)
FORMAT(RapidF#,7)
{Keyword Subroutines *****************}
ckPinNumber: { Sets Flag True if a valid PIN Number is Used }
SetFlagF('23')
IF NotEqual? Pallet# Num#('0')
IF GTEqual? Pallet# Num#('5')
{ Invalid PIN Number }
ELSE
IF LessThan? Pallet# Num#('1')
{ Invalid PIN Number }
ELSE
SetFlag('23')
END
END
END
RETURN
KeyWordProgStop:
SeqC 'M0' EOL
' ' EOL
RETURN
1stKeyword:
KeyWordProgStop
'( CHECK SIZE )' EOL
'( BDS DOWN TO REPEAT FINISH CUT )' EOL
'( UP TO CONT )' EOL
'/1 M99 P0000' EOL
RETURN
2ndKeyword:
KeyWordProgStop
'( CHANGE PARTS )' EOL
'( BDS DOWN TO REPEAT THIS SETUP )' EOL
'( UP TO CONT )' EOL
'/ M99 P0000' EOL
RETURN
3rdKeyword:
KeyWordProgStop
'( MOVE CLAMPS )' EOL
RETURN
4thKeyword:
KeyWordProgStop
'( REMOVE CLAMPS )' EOL
'( BOLT THRU MOUNTING HOLES )' EOL
RETURN
doKeyWords:
IF Equal? Pallet# Num#('1')
1stKeyword
ELSE
IF Equal? Pallet# Num#('2')
2ndKeyword
ELSE
IF Equal? Pallet# Num#('3')
3rdKeyword
ELSE
IF Equal? Pallet# Num#('4')
4thKeyword
ELSE { ProgStop is Executed }
IF Flag?('22') {End of Prog}
IF ProgStop?
KeyWordProgStop
END
ELSE
IF SameTool?
IF LAST ProgStop?
KeyWordProgStop
END
ELSE
IF LAST ProgStop?
KeyWordProgStop
ELSE
SeqC ProgStop EOL
END
END
END
END
END
END
END
RETURN
{Prog Subroutine *****************}
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:
'G' ADD# cSPartNum# Num#('53')
RETURN
wfo:
'G' ADD# PartNum# Num#('53')
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
c52Stuff:
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
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?
' A' CSOffsetA#
END
IF BAxisAvail?
' B' CSOffsetB#
END
END
' )' EOL
END
RETURN
cSComments:
doCSComment
IF WFOCS? AND NOT MultipleParts?
doCSWFOComment
END
RETURN
doSubComment:
IF UseComments? AND SubComment?
'( SUB NUMBER: ' Program# ' )' EOL
END
RETURN
doOpComments:
IF UseComments?
SetScale('1')
IF OperationComment?
'( ' OperationComment$ ' )' EOL
END
IF WorkGroupComment?
'( ' WorkGroupComment$ ' )' EOL
END
IF ToolTypeComment?
'( TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' ) ' '( OPERATION ' Operation# ': ' OperationType$ ' )' EOL
END
IF ToolComment?
'( ' 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' 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 }
'B0.'
ELSE
'B' CSOffsetB#
END
END
RETURN
cSAngleBC:
IF BChange?
cSAngleB
END
RETURN
pSInit:
NewWFOF
FourthCWF
FourthCCWF
FifthCWF
FifthCCWF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
PalletInF
SetPalletIn('0')
RETURN
pSStuff:
IF FirstOperation?
IF OptCyc1?
SetFlagF('20') { Suppress Rotation Moves }
END
END
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 EOL
IF OperationComment?
'( ' OperationComment$ ' )' EOL
END
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?
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 SetWFO 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?
CWArc
ELSE
CCWArc
END
MoveXY
IF ZMove?
MoveZ
END
IF ArcIJFormat?
ArcIJ
ELSE
ArcR
END
RETURN
doFeedC:
IF Flag?('21')
Feed
SetFlagF('21')
ELSE
FeedC
END
RETURN
ckCRC:
IF LastFeat?
CRCOffC
IF NOT EmptyLine?
Feed
END
ELSE
IF NOT ZMove?
CRCOnC
END
IF NOT EmptyLine?
SetFlag('21') { CRC Flag }
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
IF SPXMove? OR SPYMove?
SeqC MoveSX MoveSY EOL
END
SeqC SubCall CallLab EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
IF SPXMove? OR SPYMove? OR SPZMove?
SeqC doDrillAbsOrInc MoveSX MoveSY MoveSZC EOL
END
END
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqC ckCRC doAbsOrInc RapidC MoveXY MoveZC ckCRCNum EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
SeqC ckCRC doAbsOrInc doFeedC MoveXY MoveZC 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 FeedC CRCOffC ZCP3C FeedEntC EOL
ELSE
SeqC RapidC CRCOffC ZCP3C EOL
END
END
ELSE
IF Drilling?
SeqC DrillCP EOL
IF RigidTap?
SeqC FromCP EOL
SeqC 'M29' Speed EOL
END
GetCycle
SeqC
IF FIStopRO? {FI-Stop-RO}
'G86'
ELSE
Cycle
END
IF NOT RigidTap?
FromCP
END
ZDepth RLevel Dwell Peck Retract FeedEnt
IF RigidTap?
Speed
END
EOL
Save# Num#('50') Num#('0')
EACHFeat
Save# NUM#('50') ADD# Recall# NUM#('50') NUM#('1') { Increment counter by 1 }
NextFeat
IF LessThan? Recall# Num#('50') Num#('11')
IF MasterOp?
NewMasterProg
END
TrackZNO# FIRST SPZ#
ToolPath
ELSE { Only output a Drill Sub if there are 11 OR MORE items in ToolPath }
IF CallMasterOp?
SeqC SubCall 'P' 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
END
setDrillEndOpZ
TrackZNO# ClearancePlane3#
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 }
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 }
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 }
SetFlag('20') { Used with OptCyc1. Default : TRUE = Output Rotation Moves }
SetFlagF('22') { Used in End3. }
SetFlagF('23') { Valid Pin NUmber in Used }
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
' ' EOL
' The OPTCYC1 command' EOL
' ===================' EOL
' This will cause the Post to Suppress the output of All Rotaion Moves' EOL
' The Command is Modal.' EOL
' NOTE: This command Works in the First Operation Utility Data box ONLY.' EOL
' ' EOL
' Using the PIN() PostScript Command' EOL
' ==============================' EOL
' The Command PIN(x) should be entered in the Operation Data, At Op END Box.' EOL
' The Value, X, must be a positive Integer between One and Four.' EOL
' The Command is NON-Modal.' EOL
' The Following Code is output with each PIN command.' EOL
' ' EOL
' PIN (1)' EOL
' =======' EOL
' M9' EOL
' M98P8111' EOL
' N10 M0' EOL
' -BLANK LINE-' EOL
' ( CHECK SIZE )' EOL
' ( BDS DOWN TO REPEAT FINISH CUT )' EOL
' ( UP TO CONT )' EOL
' / M99 P0000' EOL
' ' EOL
' PIN (2)' EOL
' =======' EOL
' M9' EOL
' M98P8111' EOL
' N10 M0' EOL
' -BLANK LINE-' EOL
' ( CHANGE PARTS )' EOL
' ( BDS DOWN TO REPEAT THIS SETUP )' EOL
' ( UP TO CONT )' EOL
' / M99 P0000' EOL
' ' EOL
' PIN (3)' EOL
' =======' EOL
' M9' EOL
' M98P8111' EOL
' N10 M0' EOL
' -BLANK LINE-' EOL
' ( MOVE CLAMPS )' EOL
' ' EOL
' PIN (4)' EOL
' =======' EOL
' M9' EOL
' M98P8111' EOL
' N10 M0' EOL
' -BLANK LINE-' EOL
' ( REMOVE CLAMPS )' EOL
' ( BOLT THRU MOUNTING HOLES )' EOL
' ' 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#('6')
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#('6') {****}
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:
ProgID1
IF UseComments? AND ProgramComment?
' ( ' ProgramComment$ ' )'
END
EOL
IF UseComments?
IF ProgramNameComment?
'( ' ProgramName$ ' )' 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 IN SPINDLE )' EOL
END
END
OpenSub
restoreScale
RETURN
firstOp1:
IF ToolChangeAtHome?
SetHome
END
Seq Plane 'M98P8111' EOL
doOpComments
doPostScript
RETURN
firstOp2:
c52Stuff
IF NOT LastTool?
SeqC PreTool EOL
END
checkPass
SeqC Rapid AbsOrInc wfoStuff StrtPos cSAngleA cSAngleB Speed SpinOn EOL
RETURN
firstOp3:
SeqC OfstOn EOL
SeqC CoolOn EOL
RETURN
newToolOp1:
SeqC CoolOff EOL
Seq 'M98P8111' EOL
RETURN
newToolOp2:
doEndOpPS
ckPinNumber
IF ToolChangeAtHome?
SeqC AbsOrInc Rapid Home EOL
END
doKeyWords
RETURN
newToolOp3: {Start new Operation}
SeqC ToolChng EOL
' ' EOL
doOpComments
doPostScript
RETURN
newToolOp4:
c52Stuff
SeqC PreTool EOL
checkPass
SeqC Rapid AbsOrInc wfoStuff StrtPos cSAngleA cSAngleB Speed SpinOn EOL
RETURN
newToolOp5:
SeqC OfstOn EOL
SeqC CoolOn EOL
RETURN
sameToolOp1:
doEndOpPS
ckPinNumber
IF Flag?('23') OR LAST ProgStop?
SeqC CoolOff EOL
Seq 'M98P8111' EOL
doKeyWords
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF NewToolOffset? OR AChange? OR BChange?
Seq 'M98P8111' EOL
END
END
RETURN
sameToolOp2: {Start new Operation}
doOpComments
doPostScript
checkPass
RETURN
sameToolOp3: {Start new Operation}
c52Stuff
IF Flag?('23') OR LAST ProgStop?
SeqC PlaneC Rapid AbsOrInc wfoStuff StrtPos cSAngleA cSAngleB SpeedC SpinOn EOL
SeqC OfstOn EOL
SeqC CoolOn EOL
ELSE
SeqC PlaneC Rapid AbsOrInc wfoStuff StrtPos cSAngleA cSAngleB SpeedC 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 CoolOff EOL
SeqC 'M98P8111' EOL
END
RETURN
end2:
doEndOpPS
ckPinNumber
IF FIRST ToolChangeAtHome? {added FIRST modifier}
SeqC AbsOrInc 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 Flag?('23') OR ProgStop?
SetFlag('22')
doKeyWords
END
IF NOT FirstTool?
SeqC ToolChng 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:
Fanuc 11M Mat [AM] C820 16Fanuc 11M MS [EE] NMT57 16 2Fanuc 11M MS [EE] NMT57 16 2mFanuc 11M Toy [CGB] MT37 89 1Fanuc 11M LH [RM] CU59 16 1Fanuc 11M Mazak [PSI] CT77 16Fanuc 11M [TM] CQ07 16 2Fanuc 11M D007 16Fanuc 11M B007 16Fanuc 11M [BC] MT27 16 1Fanuc 11M C007 16Fanuc 11M [BC] NMT28 16 1Fanuc 11M [TM] BQ07 16 2Fanuc 15M MTS [CP] NDU66 16 2mFanuc 15T Dianichi CGB L754 85 2Fanuc 11M MS [HM] M433 80Fanuc 0M LH P&W [SP] CV84 16 3Fanuc 11M Okuma M124 87Fanuc 18M MS [CST] NCT81 16więcej podobnych podstron