Mlds 5000C OKK [VT] PM952 17 3


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

{10/2/89
This prog incorporates the new vectoring commands per
Post Note 10 and also has the format changes originally
made by Stan Lytle.
J. Cusimano}

{11/3/89
Copied & modified: Meldas 5000C OKK M241.61
For: Seibens
Added Zeros to G92 line.
Deleted G99 & M05 from MachSpec.
Jim Radcliffe}

{7/24/90, Added InitProg globally to posts with this remark, DWB}
{12/12/90, Updated: Meldas 5000C OKK M241.63 to .76.1 format, JR}

{4/03/91
Modified: Meldas 5000C OKK M241.76.1
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 6M M001.80 Format.
DWB}

{4/28/95
Modified: Meldas 5000C OKK M241.79
For: Vitols Tool & Machine
Moved CoolOn to line by itself.
Made all coords decimal point output.
Sub call changed. sample: G22L2, not M98H2.
Start of sub is L, sub number has no decimal pt.
End of sub is G23, not M99.
No % sign at Sub Call line.
Added IF Tap? 'F' FeedTapIPR#('1') lines in IF Drilling? area.
Dan Pilone}

{9/12/95
Modified: Meldas 5000C OKK M241.79
For: Vitols Tool & Machine
Changed SetMaxRPM to 8000.
Dan Pilone}

{10/25/95
Initial: Meldas 5000C OKK M241.79.2 (from Dan Pilone)
Created: Meldas 5000C OKK [VT] Mxxx.86
ForUser: Vitols
Control: ????
Machine: ????
Develop: ComPost 4.21.34, Catalyst68K v3.02.02C
Comment: Modified per marked up readout.
Updated to .86 format per Meldas 5000C OKK M241.86
Deleted G28 line from beginning of program.
Changed 'G44Z-1.' to 'G60Z0'
Deleted 'G28Z0'
Fixed up tapping cycles.
Deleted Home from end of program.
Changed 'G28X0Y0Z0' to 'G60X0Y0' at end of program.
Jim Radcliffe}

{10/25/95
Initial: Meldas 5000C OKK [VT] M952.86
Created: Meldas 5000C OKK [VT] M952.86.1
ForUser: Vitols
Develop: ComPost 4.21.34, Catalyst68K v3.02.02C
Comment: Added ToolChng to 1st operation. Removed Drill Subs.
Jim Radcliffe}

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

{1/29/97, created .14 advanced mill post per Fanuc 6M (NW) D001.14, MPK}

{7Jul97
Original: Meldas 5000C OKK [VT] D952.14
Created: Meldas 5000C OKK [VT] D952.14.1
For: Vitols
Changes made per: Joe Sczesny
Added FORMAT#9 for CSOffsetA# and B
Set FourthDegree# and FifthDegree to FORMAT#9
Deleted Formatting in psStuff
Added doCoolOn sub for Mist and Pulse for use with postscript Commands and MDD?
Changed SeqC CoolOn to doCoolOn throughout prog
Added doHighSpeed sub for HighSpeed machining of Lines and Arcsfor use with Postscript OptCyc1
Changed nextVector sub to output offsets only on the first line with CRCOn
Added doHighSpeed to Lines and Arc in Toolpath
Added SetFlag('3') at progStart, nextVector and Toolpath
Added Utility data for OpCyC1, FCool, PCool and MColl commands
Deleted PreSet 'Z0' at firstOP, newToolOp3 and sameToolOp3
Charles Winston}

{3/12/99
Intial: Meldas 5000C OKK [VT] D952.14.1
Created: Meldas 5000C OKK [VT] PM952.17.3
made simple 4th axis post per Fanuc 6M PM001.17.3,
MPK
}

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

#1 = '0.00'
#2 = '#####.###;0.'
#3 = '*#####.###;0.'
#4 = '####.####;0.'
#5 = '#######0'
#6 = '####^##0'
#7 = '*###.####;0' { used for CRC vectors}
#8 = '#'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(TrackC#,3)
FORMAT(TrackCNO#,3)
FORMAT(MoveC#,3)
FORMAT(EPX#,4)
FORMAT(EPY#,4)
FORMAT(UnitAngle#,3)
FORMAT(Recall#,4)
FORMAT(ADD#,4)
FORMAT(ToolDiameter#,4)
FORMAT(TrackXNO#,4)
FORMAT(TrackYNO#,4)
FORMAT(TrackZNO#,4)
FORMAT(FeedTapIPR#,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#,8)

{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:
{This post does not support WFOs}
RETURN

wfoStuff:
{This post does not support WFOs}
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 FeedEntry?
SeqC Feed ZIn FeedEnt EOL
ELSE
SeqC RapidC ZIn EOL
END
RETURN

startSub:
OpenSub
'L' Program# 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
NullFoot EOL
CloseSub
SeqC Preset UnshftRC EOL
RETURN

openMP:
IF WorkFixtureOffsets?
'***THIS POST PROCESSOR DOES NOT SUPPORT WORK FIXTURE OFFSETS***' EOL
'***********SWITCH TO EQUALLY SPACED AND REPOST FILE************' EOL
ELSE
NewProg
SeqC SubCall CallLab RepLab Parts EOL
startSub
END
RETURN

closeMP:
IF WorkFixtureOffsets?
ELSE
SeqC Preset ShiftPC EOL
SeqC EndSub EOL
NullFoot 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

doCoolOn:
IF Mist?
IF NOT CoolOff? AND NOT Mist? { Is the coolant already on and set to Flood? or Pulse? }
SeqC 'M9' EOL { CoolOff }
END
SeqC 'M7' EOL
ELSE
IF Pulse? { used for AIR BLOW }
IF NOT CoolOff? AND NOT Pulse? { CoolOn and Flood or Mist }
SeqC 'M9' EOL
END
SeqC 'M50' EOL
ELSE
IF NOT CoolOff? AND NOT Flood? { CoolOn and Pulse or Mist }
SeqC 'M9' EOL
END
SeqC CoolOn EOL { =Flood, M8}
END
END
RETURN

doHighSpeed: { for High Speed Machining }
IF OptCyc1?
'G09'
END
RETURN

nextVector: {only called for this feat a line}
IF NOT LastFeat? AND CutterRadiusCompensation? AND NOT Flag?('22')
SetFlag('22') { only output once for each Toolpath }
IF AbsValue?
SetFlag('21')
SetInc
END
IF NEXT LineFeat?
SetStatusOff
'I' NEXT EPX# 'J' NEXT EPY#
SetStatusOn
ELSE
IF NEXT ArcFeat?
IF NEXT ArcCW?
FORMAT(ArcJ#,7)
FORMAT(ArcI#,4)
'I' NEXT ArcJ# 'J' NEXT ArcI#
ELSE
FORMAT(ArcJ#,4)
FORMAT(ArcI#,7)
'I' NEXT ArcJ# 'J' NEXT ArcI#
END
END
END
IF Flag?('21')
SetFlagF('21')
SetAbs
END
END
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
SeqC doDrillAbsOrInc MoveSXYZC EOL
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 doHighSpeed doAbsOrInc ckCRC FeedC MoveXYZC nextVector FeedRateC ckCRCNum EOL
END
RETURN

tpArcFeat:
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
SeqC doHighSpeed 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
SetFlagF('22')
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
NullFoot 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 AbsOrInc Connect StrtPos 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
NullFoot 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
NullFoot 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
IF RigidTap?
SeqC 'M19' EOL
END
SeqC Cycle FromCP doStartPos ZDepth RLevel Dwell Peck Retract
IF RigidTap?
'F' FeedTapIPR#('1') Speed
ELSE
FeedEnt
END
EOL
TrackZNO# FIRST SPZ#
toolPath
setDrillEndOpZ
IF NOT Rotations?
SeqC 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
NullFoot 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 Cycle FromCP rotateStartPosC ZDepth RLevel Dwell Peck Retract FeedEnt EOL
END
END
END
SeqC SubCall CallLab EOL
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
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('8000')
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('21') { nextVector AbsValue maintanance }
SetFlagF('22') { Used for nextVector I & J CRC }
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:
'%' EOL
IF UseComments?
IF ProgramNameComment?
'( PROGRAM: ' ProgramName$ ' )' EOL
END
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
OpenSub
restoreScale
Seq PreSet 'X0Y0Z0' EOL
RETURN

firstOp1:
IF ToolChangeAtHome?
SetHome
END
SeqC ToolChng ASCII('13') EOL
doOpComments
doPostScript
RETURN

firstOp2:
checkPass
SeqC AbsValue Plane Rapid doStartPos Speed SpinOn EOL
RETURN

firstOp3:
SeqC OfstOn
IF NOT LastTool?
PreTool
END
EOL
doCoolOn
RETURN

newToolOp1:
SeqC CoolOff EOL
SeqC 'G60Z0' EOL
setAngleUnder360
RETURN

newToolOp2:
SeqC SpinOff EOL
doEndOpPS
IF ToolChangeAtHome?
SeqC AbsOrInc Rapid Home EOL
END
IF LAST ProgStop?
SeqC 'M00' EOL
ELSE
SeqC ProgStop EOL
END
Seq ToolChng ASCII('13') EOL
RETURN

newToolOp3: {Start new Operation}
doOpComments
doPostScript
RETURN

newToolOp4:
checkPass
SeqC AbsValue Plane Rapid doStartPos Speed SpinOn EOL
RETURN

newToolOp5:
SeqC OfstOn PreTool EOL
doCoolOn
RETURN

sameToolOp1:
IF LAST ProgStop? OR CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
SeqC
IF LAST ProgStop? OR NewToolOffset?
'G60Z0'
END
IF LAST ProgStop?
SpinOff
END
EOL
doEndOpPS
IF LAST ProgStop?
SeqC 'M00' EOL
END
' ' EOL
setAngleUnder360
RETURN

sameToolOp2: {Start new Operation}
doOpComments
doPostScript
checkPass
RETURN

sameToolOp3: {Start new Operation}
IF LAST ProgStop? OR NewToolOffset?
END
SeqC AbsOrInc PlaneC Rapid doStartPos SpeedC
IF LAST ProgStop?
SpinOn
END
EOL
IF LAST ProgStop? OR NewToolOffset?
SeqC OfstOn EOL
END
IF LAST ProgStop? OR NOT CoolOff? AND LAST CoolOff?
doCoolOn
END
RETURN

end1:
SeqC CoolOff EOL
SeqC 'G60Z0' EOL
setAngleUnder360
IF NotEqual? UnitAngle# Num#('0')
SeqC absOrIncC RapidC 'A' TrackC# Num#('0') EOL
END
RETURN

end2:
SeqC SpinOff EOL
doEndOpPS
IF ProgStop?
SeqC 'M00' EOL
END
RETURN

end3:
SeqC 'G60X0Y0' EOL
SeqC EOP EOL
CloseSub
Post2 {organize Subs into one program}
'%' 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:
Meldas 5000C OKK [VT] M952 89
Haas [VT] PMQ69 17 3
Meldas 5000C OKK [SP] MU79 89 2
Meldas 5000C OKK [PM] M369 89
Cin 10HC [ST&D] PM931 17 3
17 Prawne i etyczne aspekty psychiatrii, orzecznictwo lekarskie w zaburzeniach i chorobach psychiczn
17 (30)
Fanuc 6M [SM] PM956 17 3
ZESZYT1 (17)
17 Iskra Joanna Analiza wartości hemoglobiny glikowanej Hb
B 17 Flying Fortress II The Mighty 8th Poradnik Gry Online

więcej podobnych podstron