Mit Meldas 300 [SM] NMQ41 16 1


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

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

{1/22/93
Copied & modified: Mitsubishi 320M M466.81.2
For: Paxton Engineering
Machine:
Control:
Changes made per Steve at Paxton Engineering.
Changed Sub Call Label from 'L' to 'P' in Forms Strings 2 dialog.
Changed Sub Repeat Label from 'P' to 'L' in Forms Strings 2 dialog.
Changed Program ID Label from 'L' to 'O' in Forms Strings 2 dialog.
Changed Call Sub from 'G22' to 'M98' in Forms Commands 3 dialog.
Changed Return From Sub from 'G23' to 'M99' in Forms Commands 3 dialog.
Changed End Program from 'M2' to 'M30' in Forms Commands 3 dialog.
Changed FORMAT for G Address from '00' to '#0' in Forms Default Formats dialog.
Changed FORMAT for M Address from '00' to '#0' in Forms Default Formats dialog.
Added EOR EOL at startSub.
Activated UseSeparateSubCalls and SetMaxSeparateSubCalls at setup and initializations.
Changed SetMaxRPM value from 10000 to 8000 at setup and initializations.
Added Rapid AbsOrInc 'G49G28Z0' at FirstOperation, NewTool, SameTool and end of Prog.
Deleted literal 'G28Z' at NewTool, SameTool and end of Prog.
Deleted Rapid and Moved GetSpinOn at FirstOperation, NewTool, SameTool and end of Prog.
Deleted PreTool at FirstOperation and NewTool.
Added SpinOff at NewTool, SameTool and end of Prog.
Added OpToolID at NewTool.
Modified to output CRCOff and CoolOff on separate blocks.
Changed Rapid FirstHome to literal 'G30X0Y0' at end of Prog.
DWB}

{10/4/94
Modified: Mit Meldas 300 [PE] M548.81.2
For: Paxton
Changed SpeedC in GetSpinOn sub to Speed for FirstOp and NewTool.
Changed SpeedC to Speed on Drill Cycle Tap line.
Added OptCyc1 to futher descriminate the Tap cycle for Rigid Tapping.
The E value will be the TPI value of the tap.
Added literal ',R1' to denote rigid tapping.
Jim Radcliffe}

{9/28/95, Updated Mit Meldas 300 [PE] M548.81.3 to .85 format per Fanuc 6M M001.85.01.03, JR}

{1/17/96, Updated .85 to .86 version, MPK}

{3/22/96, Tested zonlyRepAutoCycle, Changed version # to .89, MPK}

{5/21/96,
Initial: Mit Meldas 300 [PE] M548.89
Created: Mit Meldas 300 [PE] M548.89.1
Fixed Boolean Logic in SameTool, the statement IF LAST ProgStop? OR CoolOff? AND LAST NOT CoolOff?
used to determine whether or not to turn off coolonat in sametool and the equivalent statement to turn coolant on
do not evaluate properly, I broke them into an equivalent IF...ELSE statement that evaluates properly. MPK}

{02Feb99
Original: Mit Meldas 300 [PE] M548.89.1
Created: Mit Meldas 300 [SM] MT99.16
For: Special Mold
Changes made per: Dave McDonald of Special Mold and Michael Cole of Fisher/Unitech
Develop: Catalyst 5.03/ComPost2 1.7b15
Updated to.16 format per Fanuc 6M M001.16.2
NEW POST : FIRST DRAFT
Added Post Header Comment at the top of Prog.
Added Spaces between all Addresses
Changed Formatting for X,Y,Z,I,J,P,Q,R to '####0.0000;0.0000' in MachSpec.
Added Format#8 and in Prog Numeric Format Definitions and added Formatting for Dwell#
Added Support for ToolChanging using the OptCYC1 PostScript Command.
ToolChanging is de-activated by default in this post. OptCYC1 switches it back on.
Suppressed wfo when Multiple Parts is FALSE
Added Custom doToolComment and doToolTypeComment Subs.
Moved CoolOff to the End of Opguts
Added doCoolOff and ckCoolOFF Subs
Added support for coolant handling in MP_1ToollAllP_Xcp
Deleted CoolOff and SpinOff at End of Prog.
Changed CoolOff to M19
Other changes to numerous to list at this time.
Customer requires a Custom MDD for his drill cycles. ( Still to be supplied by customer)
Charles Winston}

{03Mar99
Original: Mit Meldas 300 [SM] MT99.16
Created: Mit Meldas 300 [SM] MT99.16.1
For: Special Mold
Changes made per: Dave McDonald of Special Mold and Michael Cole of Fisher/Unitech
Develop: Catalyst 5.05/ComPost2 1.7b15
Deleted G17 in MachSpec. No output for the G17 Plane.
Deleted doCoolOff and ckCoolOFF Subs.
Added doSpindleOrient Sub. Called in OpGuts.
Added Support for Customers MDD Fine Bore Cycle.
Deleted Rapid CRCOff AbsOrInc Plane in firstOp1.
Deleted Rapid AbsOrInc ' G49 G28 Z0' in firstOp1.
Added PlaneC to newToolOp4. ( G17 is not required but G18 and G19 will output.)
Added Custom code in end2 per customers requirements.
Charles Winston}

{09Mar99
Original: Mit Meldas 300 [SM] MT99.16.1
Created: Mit Meldas 300 [SM] NMQ41.16
For: Special Mold
Changes made per: Dave McDonald of Special Mold and Michael Cole of Fisher/Unitech
Develop: Catalyst 5.05/ComPost2 1.7b15
Modified Post Header Comment at the top of Prog. SUBS=F
Moved Spindle Speed from the Tap Cycle line to output in FirstOp2 and NewToolOp4.
Modified GetSpinOn Sub to accomodate.
Updated to Longhand per Fanuc 6M NMU99.16
Charles Winston}

{2Apr99
Original: Mit Meldas 300 [SM] NMQ41.16
Created: Mit Meldas 300 [SM] NMQ41.16.1
For: Special Mold
Changes made per: Dave McDonald of Special Mold and Michael Cole of Fisher/Unitech
Develop: Catalyst 5.09.39/ComPost2 1.7b15
Added Format#11 in Prog Numeric Format Definitions and Changed Formatting for Dwell#
Charles Winston}

{Prog Numeric Format Definitions ****}

#1 = '#.00'
#2 = '#####.###;0'
#3 = '*#####.###;0.'
#4 = '####.####;0'
#5 = '#######0'
#6 = '####^###0'
#7 = '#'
#8 = '####0.0000;0.0000'
#9 = '00'
#10 = '####0.00#'
#11 = '####'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ADD#,4)
FORMAT(ToolDiameter#,4)
FORMAT(TrackXNO#,4)
FORMAT(TrackYNO#,4)
FORMAT(TrackZNO#,4)
FORMAT(Recall#,5)
FORMAT(PartNum#,5)
FORMAT(Program#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Div#,5)
FORMAT(RapidF#,7)
FORMAT(Retract#,8)
FORMAT(ToolOffset#,9)
FORMAT(FeedEntry#,10)
FORMAT(DIV#,10)
FORMAT(Dwell#,11)

{Custom Subroutines ****}

GetSpinOn:
IF SameTool? AND LAST NOT ProgStop?
SpeedC
ELSE
Speed SpinOn
END
RETURN

doSpindleOrient:
IF LastOP?
' M19'
ELSE
IF NEXT SameTool?
ELSE
' M19'
END
END
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?
SetWFO
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

resetWFO:
IF WorkFixtureOffsets?
SeqC WFO1 EOL
END
RETURN

doToolComment:
' ' EOL
' ' EOL
Seq '('
IF UseComments?
SetScale('1')
IF ToolComment?
ToolComment$
ELSE
'No ToolComment$'
END
restoreScale
END
')' EOL
' ' EOL
' ' EOL
RETURN

doToolTypeComment:
IF UseComments?
IF ToolTypeComment?
SeqC '( TOOL#' Tool# ', H' ToolOffset# ' )' EOL
END
END
RETURN

doPartCycleComment:
IF MultipleParts? AND UseComments? AND SubComment?
SeqC '( PART NO. ' PartNum# ' )' EOL
END
RETURN

doCycleComment:
IF UseComments? AND SubComment?
SeqC '( CYCLE START )' EOL
END
RETURN

doOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
SeqC '( OPERATION ' Operation# ': ' OperationType$ ' )' EOL
END
IF OperationComment?
SeqC '( ' OperationComment$ ' )' EOL
END
IF WorkGroupComment?
SeqC '( ' WorkGroupComment$ ' )' EOL
END
{ ToolComment$ moved to FirstOperation and NewTool. }
restoreScale
END
RETURN

pSInit:
NewWFOF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN

pSStuff:
IF FourthCW?
FORMAT(FourthDegree#,2)
SeqC 'A' FourthDegree# EOL
FourthCWF
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
SeqC 'A' FourthDegree# EOL
FourthCCWF
END
IF FifthCW?
FORMAT(FifthDegree#,2)
SeqC 'B' FifthDegree# EOL
FifthCWF
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
SeqC 'B' FifthDegree# EOL
FifthCCWF
END
IF FirstOperation?
IF OptCyc1? { Activates the ToolChanger }
SetFlag('10')
END
END
RETURN

doPostScript:
pSInit
EachPS
SeqC PostScript EOL
pSStuff
NextPS
RETURN

doEndOpPS:
pSInit
EachEOPS
SeqC EndOpPS EOL
pSStuff
NextPS
RETURN

loadPRIMEZCP2:
LoadFeat Num#('0') Num#('0') PRIME ClearancePlane2#
RETURN

pRIMEZCP2:
PRIME ZCP2
RETURN

loadPRIMEZCP3:
LoadFeat Num#('0') Num#('0') PRIME ClearancePlane3#
RETURN

pRIMEZCP3:
PRIME ZCP3
RETURN

connectC:
IF FeedConnect?
FeedC
ELSE
RapidC
END
RETURN

absValueC:
IF NOT AbsValue?
AbsValue
END
RETURN

incValueC:
IF AbsValue?
IncValue
END
RETURN

absOrIncC:
IF AbsoluteMoves?
absValueC
ELSE
incValueC
END
RETURN

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

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

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

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

formatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXYZC
IF ArcIJFormat?
ArcIJ
ELSE
ArcR
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

doPeck: { longDrillStuff }
{ not supported }
RETURN

drillFeature: { longDrillStuff }
{ not supported }
RETURN

toolPath:
ResetCRCNum
EACHFeat
IF PointFeat? { Drilling Only }
SeqC MoveSXYZC EOL
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqC ckCRC ckCRCNum RapidC MoveXYZC EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
SeqC ckCRC ckCRCNum FeedC MoveXYZC FeedRateC 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
RETURN

autoCycCutSub1: {part 1}
CalcACSRXY {calc tool position, CalcAutoCycleStatusRecordXY}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
SetSRXYtoSP
IF Repeats? AND ZShiftOnly?
entryMove
END
SeqC incValueC EOL
RETURN

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

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

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

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

drilling:
SeqC DrillCP EOL
GetCycle
IF FIStopOffWallRO? {Fine Bore}
SeqC ' G76'
ELSE
IF BackBore?
SeqC ' G87'
ELSE
SeqC Cycle
END
END
FromCP StrtPos ZDepth RLevel Dwell Peck
IF FIStopOffWallRO? {Fine Bore}
' Q' Retract#
ELSE
Retract
END
IF Tap?
IF RigidTap?
' F' DIV# Num#('1') FeedTapIPR#('1')
ELSE
' F' FeedEntry#
END
ELSE
FeedEnt
END
EOL
TrackZNO# FIRST SPZ# {.81.2}
toolPath
setDrillEndOpZ
SeqC DrillOff ZCP3C doSpindleOrient EOL
RETURN

longDrilling:
SeqC DrillCP EOL
GetCycle
SeqC StrtPosC EOL
toolPath
LoadFeat Num#('0') Num#('0') ClearancePlane3#
IF ZMove?
SeqC RapidC ZCP3C EOL
END
RETURN

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

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

progStart:
InitProg
ReverseXZArcs
InitWFONum
SetFlood
SetMaxRPM('8000')
IF Metric?
SetMaxFeed('12700')
ELSE
SetMaxFeed('500')
END
Save# Num#('1') Num#('0') { MultipleParts Current Tool FirstOp# }
Save# Num#('2') Num#('0') { MultipleParts ToolOp# Counter }
Save# Num#('3') Num#('0') { LongHand PeckCycle }
SetFlagF('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
SetFlagF('10') { De-activate the Tool Changer }
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
' 4thAxisCW(12.5), 4ACW(12.5) -' EOL
' generates a + A move of the value you specify' EOL
' 4thAxisCCW(22.5), 4ACCW(22.5) -' EOL
' generates a - A move of the value you specify' 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
' ' EOL
' The OPTCYC1 command' EOL
' ===================' EOL
' This will cause the Post to output The Next Tool Number Followed by a Tool Change ( M06 )' EOL
' ToolChanging is de-activated by default in this post.' EOL
' OptCYC1 switches it back on.' EOL
' NOTE: This command Works in the First Operation Utility Data box ONLY.' EOL
END
RETURN

initOp:
EOR EOL
ProgID1
IF UseComments?
'('
IF ProgramNameComment?
ProgramName$
END
')'
END
EOL
EachOp
IF FirstOperation?
IF ToolChangeAtHome?
SetHome
END
END
NextOp
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 IN SPINDLE )' EOL
END
END
restoreScale
RETURN

firstOp1:
SeqC OpToolID EOL
SeqC AbsOrInc EOL
doPostScript
doPartCycleComment
doToolComment
doOpComments
doToolTypeComment
RETURN

firstOp2:
CheckPass
SeqC Plane Rapid WFOStuff StrtPos GetSpinOn EOL
RETURN

firstOp3:
SeqC CoolOn EOL
SeqC OfstOn EOL
RETURN

newToolOp1:
SeqC ' M00' EOL
SeqC RapidC ' G28' Rapid ' Z' EOL { Clear Offsets }
SeqC ' X0 Y0' EOL
SeqC AbsOrInc EOL
RETURN

newToolOp2:
doEndOpPS
RETURN

newToolOp3: {Start new Operation}
SeqC PlaneC EOL
doPostScript
doPartCycleComment
doToolComment
doOpComments
doToolTypeComment
IF Flag?('10')
SeqC OpToolID ToolChng EOL
END
RETURN

newToolOp4:
checkPass
SeqC PlaneC Rapid WFOStuff StrtPos GetSpinOn EOL
RETURN

newToolOp5:
SeqC CoolOn EOL
SeqC Rapid OfstOn EOL
RETURN

sameToolOp1:
doEndOpPS
IF LAST ProgStop?
SeqC ' M19' EOL
SeqC ' M00' EOL
SeqC RapidC ' G28' Rapid ' Z' EOL { Clear Offsets }
SeqC ' X0 Y0' EOL
SeqC AbsOrInc EOL
' ' EOL
' ' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF NewToolOffset?
SeqC RapidC ' G28' Rapid ' Z' EOL { Clear Offsets }
END
END
RETURN

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

sameToolOp3: {Start new Operation}
IF LAST ProgStop?
SeqC PlaneC RapidC WFOStuff StrtPos GetSpinOn EOL
SeqC OfstOn EOL
SeqC CoolOn EOL
ELSE
SeqC PlaneC RapidC WFOStuff StrtPos GetSpinOn EOL
IF NewToolOffset?
SeqC OfstOn EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqC CoolOn EOL
END
END
RETURN

end1:
RETURN

end2:
SeqC ' M00' EOL
SeqC RapidC ' G28' Rapid ' Z' EOL { Clear Offsets }
doEndOpPS
SeqC ' X0 Y0' EOL
SeqC AbsOrInc EOL
IF Flag?('10')
SeqC OpToolID ToolChng EOL
END
RETURN

end3:
SeqC EOP EOL
EOR EOL
Close
IF UseComments?
SetScale('1') {restore scale for comments}
Reopen
IF FileBytesComment?
SeqC '( FILE LENGTH: ' FileBytes# ' CHARACTERS )' EOL
END
IF FileFeetComment?
SeqC '( FILE LENGTH: ' FileFeet# ' FEET )' EOL
END
IF FileMetersComment?
SeqC '( FILE LENGTH: ' FileMeters# ' METERS )' EOL
END
Close
END
RETURN

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

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

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

noMPs: {no multiple parts}
SetFlag('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF FirstOperation?
firstOp1
firstOp2
firstOp3
ELSE
IF NewTool?
newToolOp1
newToolOp2
newToolOp3
newToolOp4
newToolOp5
ELSE {implied SameTool?}
sameToolOp1
sameToolOp2
sameToolOp3
END
END
opGuts
RETURN

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

endPartSub:
{End of program ************************************************************}

{finish last operation}
end1
IF MultipleParts? AND OneToolAllParts?
resetWFO
END
end2
RETURN

newPart1: {Finish off last Part}
IF FullUp?
SeqC ' M00' EOL
SeqC RapidC ' G28' Rapid ' Z' EOL { Clear Offsets }
SeqC ' X0 Y0' EOL
SeqC AbsOrInc EOL
END
{doEndOpPS}
RETURN

newPart2: {Start new Part}
sameToolOp2
RETURN

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

mPLoop:
Save# Num#('2') Recall# Num#('1')
IF WorkFixtureOffsets?
NewWFO
EachWFO
ELSE
EachPart
END
IF AllToolsOnePart?
EachOp
masterSub
NextOp
endPartSub
ELSE { OneToolAllParts }
EachOp
IF Equal? Operation# Recall# Num#('2') { Valid Tool Op }
IF FirstOperation? OR NewTool?
IF FirstPart?
masterSub
ELSE
newPart1
newPart2
newPart3
opGuts
END
ELSE
masterSub
END
IF LastOp?
IF LastPart?
Save# Num#('1') Num#('0')
END
Save# Num#('2') Recall# Num#('1')
ELSE
IF NEXT SameTool?
Save# Num#('2') NEXT Operation#
ELSE
IF LastPart?
Save# Num#('1') NEXT Operation#
Save# Num#('2') Num#('0')
ELSE
Save# Num#('2') Recall# Num#('1')
END
END
END
END
NextOp
END
IF WorkFixtureOffsets?
IncWFO
NextWFO
ELSE
NextPart
END
RETURN

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

progStart {setup and initializations}
initOp

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


Wyszukiwarka

Podobne podstrony:
Mit Meldas 300 [SM] MT99 16 1
Mit Meldas 300 [PE] M548 89 1
Mit Meldas 520M [SP] MT48 16
Mit Meldas 3 [SM] C044 13 1
Mit Meldas 320M [SAV] MY34 89 1
Mit Meldas 320M [SI] PMY34 17 4
Mit Meldas 50M [DC] MU33 89 2
Mit Meldas 50M LW M134 89 2
Mit Meldas M520 MZ72 89 5m
Fanuc 15M Mon [SM] MT98 16 1
Mit Meldas 520L DP [IP] L669 85
Mit Meldas L3 [SSD] L489 85

więcej podobnych podstron