Haas [WMF] PMZ27 17 3


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

{5/20/93
Copied & modified: Fanuc 10M M008.81.2
For: Haas Automation
Combined OpToolID and ToolChng on one block at FirstOperation and NewTool.
Combined DoWFONum Speed SpinOn AbsOrInc Rapid StrtPos and OfstOn on one block at FirstOperation,
NewTool and SameTool.
Added CkCRC sub to cancel CutterRadiusCompensation on LastFeature of ToolPath.
Added literal 'G74' for Left-Handed Tapping at Drilling.
Moved Canned Drill Cycle Block to Main Program when Repeats = TRUE at Drilling.
Main program will output the Canned Drill Cycle, and the SubPrograms will contain only the
positions from the second feature on.
DWB}

{8/2/93
Modified: Haas M573.81.2
For: Haas Automation
Changes made per visit with Harold Moon at Haas Automation.
Added ProgramName$ to SubID block at StartSub.
Added blank lines between subs.
Deleted RepLab OnePart at OpenMP.
Moved Rapid, Feed and Connect Commands to be output in front of AbsOrInc on same block.
Deleted colons from all Comments.
Deleted Spaces following '(, and preceeding )' from ProgramNameComment at FirstOperation.
Changed Seq to 'N' Tool# EOL at FirstOperation and NewTool, output on block by itself.
Changed Safe Start block from G17G80G40 to G0G90G54G40G80G17 at FirstOperation and NewTool.
Changed StrtPos block from DoWFONum Speed SpinOn AbsOrInc Rapid StrtPos OfstOn to
Rapid AbsOrInc DoWFONum StrtPos Speed SpinOn at FirstOperation and NewTool.
Added PlaneC to StrtPos block at NewTool.
Moved OfstOn to beginning of CoolOn block at FirstOperation and NewTool.
Changed DoWFONum PlaneC AbsOrInc Rapid to Rapid AbsOrInc DoWFONum PlaneC at SameTool StrtPos block.
Added IF RetractToCP1 boolean at SameTool.
This is to force output of ZCP1 or ZCP2 for Drilling.
Changed RapidC ZCP3C to Rapid ZCP3 at Drilling.
Moved 'G80' to Rapid ZCP3 at Drilling.
Added literal 'M19', Spindle Orient, at OfstOff block at end of Prog.
Added MasterOp/CallMasterOp PostScript Command support for Drilling.
Routines have been added to call previously created subroutines.
Added MasterOpF and CallMasterOpF at PSInit.
Added PostScript Comments regarding MasterOp and CallMasterOp Commands.
Added support of MasterOp and CallMasterOp Commands at Drilling.
Added FORMAT for Recall# to output called sub.
DWB}

{9/19/95
Copied: Haas M573.81.2 & modified to HAAS (SMAC) M---.--.-
Set max RPM to 12000 and max Feed to 3000. Added tool change and comment to 'N' Tool#.
Set WFO numbers to run from G110 to G139, allowing 30 fixture offsets instead of 6.
Removed duplicate prep. codes from set up blocks. Remove 'R' Format Arcs. Removed some Comments.
Removed all M5's and added M19 to all OfstOff comands.
Sent Y axis to machine zero and changed to first tool at end of program.
KC}

{10/24/96
Modified: Haas (SMAC) M857.10
Created: Haas [HA] MZ67.13
For: Haas Automation
Versions: Catalyst v3.09C/Compost 4.21.37/v1.0b1
Changes made per Paul Cross of Haas Automation.
Updated for Catalyst v3.05C per Fanuc 6M M001.13.1 Format
Changed First Work Fixture Offset from G110 to G54 in Compost2 Origins and Values Dialog.
Changed Last Work Fixture Offset from G130 to G59 in Compost2 Origins and Values Dialog.
Added FeedEntC for SameTool Operations at EntryMove sub.
Commented out ResetCRCNum at ToolPath sub.
Customer only wants it output when it changes.
Added condition to output 'G' NewWFO# for FirstOperation or when changed via PostScript at WFOStuff
sub.
Moved SafeStart block from FirstOp2 sub to FirstOp1 sub.
Moved OpToolID ToolChng to separate block at FirstOp1 and NewToolOp3 subs.
Added AbsOrInc Rapid to StrtPos block at FirstOp3 sub.
Deleted SafeStart block at NewToolOp3 sub.
Changed Plane to PlaneC at NewToolOp3 sub.
Added AbsOrInc Rapid DoWFONum to StrtPos block at NewToolOp5 sub.
Added condition to output OperationIDComment for FirstOperation or NewTool only at DoOpComments.
DWB}

{4/10/97,
Initial: Haas [HA] MZ67.13
Created: Haas [HPD] Mxxx.13
Removed 'N' Tool# from FirstOp and NewTool, MPK}

{6/12/97,
Created: Haas [HPD] MY68.13.01 (from Haas [HPD] MY68.13)
For: High Precision Development
modifed CloseMP so that post would output movement to next part in a manner familiar to High Precision.
added additional format statements.
WS}

{6/23/97,
Created: Haas [HPD] MY68.13.02 (from Haas [HPD] MY68.13.01)
For: High Precision Development
changed coolant code position to be after the Tool Change block or before the OfstOn command.
changed end of program PreTool code to be the (Last Tool + 1).
WS}

{3Dec97
Original: Haas [HPD] MY68.13.2
Created: Haas [HPD] MY68.13.3
For: High Precision Devices
Changes made per: Bill Dougherty
Moved Speed SpinOn and CoolOn onto seperate Lines in FirstOp3 and NewToolOp5
Customer wants a limit of one M-code per line
Added Literal 'M31' in FirstOp3 { Swarf Conveyer Start }
Added SpinOff in End1
Added Literal 'X-15.' in End3
Charles Winston}

{15Dec97
Original: Haas [HPD] CY68.15
Created: Haas [HPD] CY68.15.1
For: High Precision Devices
Changes made per: Bill Dougherty
Moved SpinOff to the OfstOff line and Deleted Literal 'M19' in End1
Changed Literal G28 To G53 in End3
Added AbsValue 'M19' { Spindle Orient } in End3
Charles Winston}

{3Dec97, Created B_Style Advanced Mill Post Per Haas [QC] B587.15.1, Charles Winston }

{3Dec97, Created C_Style Advanced Mill Post Per Haas [QC] C587.15.1, Charles Winston }

{22Dec97
Original: Haas [HPD] CY68.15.1
Created: Haas [HPD] CY68.15.2
For: High Precision Devices
Changes made per: Bill Dougherty
Moved G53 line after AbsValue 'M19' in End3
Charles Winston}

{2/9/98,
Initial : Haas [HPD] CY68.15.2
Created: Haas [WMF] CZ27.15
Customer: Hoberman & Assoc.

Changes to "Prog": (to match the output of MZ27.89.2)

1. Moved G54 to motion block and M8 to Z motion.
2. Removed M31 block and added retract before 1st TC.
3. Removed retract block before tool change, added blank & Start-up lines.
4. Some changes to sameToolOp1 & 3.
5. Some changes to End1, 2, & 3.
6. Per customer request (Bill Record) moved rotaries output after X & Y move and
retract to ZCP1 (not home) for new CS.
JHE}

{1/26/99
Initial: Haas [WMF] CY27.15
Created: Haas [WMF] PMY27.17.3
Created simple 4th positioning post per Fanuc 6m PM001.17.3
}

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

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

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

{Added Subroutines ****}

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

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

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

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

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

{Prog Subroutines ****}

RestoreScale:
IF Metric? {CAM file is in Metric, tools and tool path}
SetScale('.03937007874') { change to English, this is an English post}
END
RETURN

wfo:
FORMAT(ADD#,5)
'G'
IF GreaterThan? ADD# PartNum# Num#('53') Num#('59')
ADD# ADD# PartNum# Num#('53') Num#('50')
ELSE
ADD# PartNum# Num#('53')
END
FORMAT(ADD#,4)
RETURN

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

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

doOpComments:
IF UseComments?
SetScale('1')
IF FirstOperation? OR NewTool?
IF OperationIDComment?
'( OPERATION ' Operation# ' ' OperationType$ ' )' EOL
END
END
IF OperationComment?
'( ' OperationComment$ ' )' EOL
END
restoreScale
END
RETURN

doToolComment:
IF UseComments?
IF ToolComment?
'( ' ToolComment$ ' )' EOL
END
END
RETURN

doProgramComment:
IF UseComments?
IF ProgramNameComment?
'(' ProgramName$ ')'
END
END
RETURN

psInit:
NewWFOF
FourthCWF
FourthCCWF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
PalletInF
RETURN

psStuff:
IF FifthCW?
FORMAT(FifthDegree#,2)
SeqC 'B' FifthDegree# EOL
FifthCWF
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
SeqC 'B' FifthDegree# EOL
FifthCCWF
END
RETURN

doPostScript:
psInit
EachPS
SeqC PostScript EOL
psStuff
NextPS
RETURN

doEndOpPS:
psInit
EachEOPS
SeqC EndOpPS EOL
psStuff
NextPS
RETURN

absValueC:
IF NOT AbsValue?
AbsValue
END
RETURN

incValueC:
IF AbsValue?
IncValue
END
RETURN

absOrIncC:
IF AbsoluteMoves?
absValueC
ELSE
incValueC
END
RETURN

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

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

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

startSub:
OpenSub
' ' EOL
SubID DoProgramComment EOL
DoSubComment
RETURN

subWarning:
IF NOT FeedConnect?
IF AnyZshift?
' ' EOL
'( WARNING Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT )' EOL
' ' EOL
END
END
RETURN

stdSub:
SeqC SubCall CallLab RepLab RepCycs EOL
StartSub
RETURN

finishSub1: {part 1}
SeqC CRCOffC
IF NOT FeedConnect?
RapidC ZCP3C
END
EOL
RETURN

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

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

openMP:
NewProg
IF WorkFixtureOffsets?
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP }
END
NewWFO
EachWFO {simple eachPart}
doWFOOps
IncWFO
NextWFO {simple NextPart}
startSub
ELSE
SeqC SubCall CallLab RepLab Parts EOL
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
END
startSub
END
RETURN

closeMP:
IF WorkFixtureOffsets?
SeqC EndSub EOL
CloseSub
SeqC WFO1 EOL
ELSE
SeqC 'G00X0Y0' EOL
TrackXNO# Num#('0')
TrackYNO# Num#('0')
SeqC Preset 'X' OriginShiftPX# 'Y' OriginShiftPY# EOL
SeqC EndSub EOL
CloseSub
SeqC Preset 'X' OriginUSPXCTP#('1') 'Y' OriginUSPYCTP#('1') EOL {ShiftRC EOL}
SeqC 'G00X0Y0' EOL
TrackXNO# Num#('0')
TrackYNO# Num#('0')
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
SetFlag('6')
END
END
RETURN

FormatLine:
DoAbsOrInc ckCRC FeedC MoveXYZC
RETURN

ckCRCNum:
IF Flag?('6')
SetFlagF('6')
CRCOffsetC
END
RETURN

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

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

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

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

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

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

toolPath:
ResetCRCNum
EACHFeat
IF FirstFeat?
resetSP
END
IF PointFeat?
tpPointFeat
ELSE
IF RapidFeat?
tpRapidFeat
ELSE
IF LineFeat?
tpLineFeat
ELSE
IF ArcFeat?
tpArcFeat
END
END
END
END
IF LastFeat?
getEP
END
NEXTFeat
restoreAbsOrInc
RETURN

autoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
startSub
SetSRXYtoSP
SeqC incValueC EOL
RETURN

autoCycCutSub2: {part 2}
toolPath
SeqC absOrIncC CRCOffC
IF Repeats? AND FeedConnect? AND ZshiftOnly?
ELSE
RapidC ZCP2
END
EOL
SeqC EndSub EOL
CloseSub
SetSRSubXY {restore SR to 1st position value}
SetSRSubMove
RETURN

autoCycPat:
SetPass2 {position pattern}
toolPath {call after NewProg for correct sub calls}
SetPass1 {reset}
RETURN

milling:
IF AutoCycle?
NewProg
autoCycCutSub1
entryMove
autoCycCutSub2
autoCycPat
ELSE
entryMove
toolPath
END
RETURN

g92Sub:
subWarning
stdSub
SeqC absOrIncC Connect doStartPos EOL
milling
finishSub1
finishSubG92
RETURN

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

doSepSubFeedConnect:
IF FeedConnect?
FeedEntC
END
RETURN

doSepSubSPMove:
SetStatusOff
IF SPXMove? OR SPYMove?
IF AutoCycle?
incValueC
END
SeqC Connect StrtPosC doSepSubFeedConnect EOL
absOrIncC
ELSE
Connect
END
SetStatusOn
RETURN

doSepSubZMoves:
IF FeedConnect?
SeqC FeedC ZInPlusInc FeedEnt EOL
ELSE
IF FeedEntry?
IF NOT FirstCycle?
SeqC RapidC ZCP2PlusInc EOL
END
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
IF FirstCycle? AND AutoCycle?
Rapid
END
SeqC RapidC ZInPlusInc EOL
END
END
SeqC SubCall CallLab EOL
IF NOT FeedConnect? AND NOT AbsValue?
TrackZNO# ZCP2PlusInc#
SeqC ZCP2C EOL
IF NOT AutoCycle?
TrackZNO# ClearancePlane3#
END
END
RETURN

setSepSubZ:
SetAbs
TrackZNO# ADD# SPZ# MUL# RepsLess1# RepeatZ#
SetInc
RETURN

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

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

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

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

millingOp:
SeqC ZCP2C EOL
IF Repeats?
NewProg
IF ZshiftOnly?
IF AutoCycle? {incremental Autocycle sub can have Z moves}
zonlyRepAutoCycle
ELSE {Z shift only, NOT Auto Cycle}
SetFlag('1') { Milling ZShiftOnly SepSubs activated }
zonlyRep
SetFlagF('1') { Milling ZShiftOnly SepSubs deactivated }
END {end Auto Cycle IF}
ELSE {not Z only}
g92Sub
END {end Z only IF}
ELSE {no repeat OPs}
milling
END
IF AutoCycle?
SeqC CRCOffC ZCP3C EOL
setSRXYtoACEP
ELSE
SeqC CRCOffC RapidC ZCP3C EOL
END
RETURN

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

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

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

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

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

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

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

progStart:
InitProg
ReverseXZArcs
InitWFONum
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('12000')
SetMaxFeed('3000')
SetFlagF('1') { Milling ZShiftOnly SepSubs }
Save# Num#('1') Num#('0') { Status Register Variable for X Axis }
Save# Num#('2') Num#('0') { Status Register Variable for Y Axis }
SetFlagF('1') { Milling ZShiftOnly SepSubs/DrillSubs deactivated }
SetFlagF('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
SetFlagF('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP }
SetFlagF('9') { For valid Drill Rotation Sub }
IF PSComment? AND UseComments?
'Utility Data:' EOL
' At Op Start: All literals and commands will appear at the beginning of the operation.' EOL
' At Op End: All literals and commands will appear at the end of the operation.' EOL
' Literals: put between single or double quotes.' EOL
' Separate commands and literals with at least one space.' EOL
' A CR ( RETURN key ) will start a new line.' EOL
' Commands: may be capital and/or lower case letters. Separate commands with a space.' EOL
' NewWFO(56), NWFO(56) -' EOL
' The Work Fixture Offset # you specify will be used for all following operations.' EOL
' Do not use with the ncPost multiple part option.' EOL
' 5thAxisCW(30), 5ACW(30) -' EOL
' generates a + B move of the value you specify' EOL
' 5thAxisCCW(22.5), 5ACCW(22.5) -' EOL
' generates a - B move of the value you specify' EOL
END
RETURN

initOp:
EOR EOL
ProgID1 DoProgramComment EOL
IF UseComments?
IF ProgramComment?
'( ' ProgramComment$ ' )' EOL
END
IF FormatNameComment?
'( FORMAT ' FormatName$ ' )' EOL
END
END
OpenSub
restoreScale
RETURN

firstOp1:
IF ToolChangeAtHome?
SetHome
END
SeqC Rapid Plane CRCOff 'G49G80' EOL
SeqC IncValue OfstOff SpinOff EOL
' ' EOL
Seq OpToolID ToolChng doToolComment doOpComments EOL
doPostScript
RETURN

firstOp2:
CheckPass
SeqC Speed SpinOn EOL
SeqC Rapid wfoStuff AbsOrInc doStartPos EOL
RETURN

firstOp3:
SeqC OfstOn CoolOn EOL
RETURN

newToolOp1:
SeqC CoolOff EOL
If MultipleParts? AND FullUp?
SeqC incValueC OfstOff EOL
END
setAngleUnder360
RETURN

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

newToolOp3: {Start new Operation}
' ' EOL
Seq Rapid Plane CRCOff 'G80' EOL
SeqC OpToolID ToolChng doToolComment doOpComments EOL
doPostScript
RETURN

newToolOp4:
CheckPass
SeqC Speed SpinOn EOL
SeqC Rapid wfoStuff AbsOrInc doStartPos EOL
RETURN

newToolOp5:
SeqC OfstOn CoolOn EOL
RETURN

sameToolOp1:
doEndOpPS
IF LAST ProgStop?
SeqC CoolOff EOL
IF AbsoluteMoves?
SeqC incValueC OfstOff SpinOff EOL
ELSE
SeqC OfstOff SpinOff EOL
END
SeqC 'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF NewToolOffset? OR ChangeCS?
SeqC RapidC ZCP1 EOL
END
END
setAngleUnder360
RETURN

sameToolOp2: {Start new Operation}
doOpComments
doPostScript
checkPass
RETURN

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

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

end2:
doEndOpPS
IF FIRST ToolChangeAtHome? {added FIRST modifier}
SeqC absOrIncC Rapid FirstHome EOL
END
IF ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
END
RETURN

end3:
SeqC IncValue 'G28Y0.' EOL
SeqC PreTool ToolChng EOL
SeqC EOP EOL
CloseSub
Post2 {organize Subs into one program}
EOR EOL
Close
IF UseComments?
SetScale('1') {restore scale for comments}
Reopen
IF FileBytesComment?
'( FILE LENGTH ' FileBytes# ' CHARACTERS )' EOL
END
IF FileFeetComment?
'( FILE LENGTH ' FileFeet# ' FEET )' EOL
END
IF FileMetersComment?
'( FILE LENGTH ' FileMeters# ' METERS )' EOL
END
Close
END
RETURN

mpAllTools1P: {Multiple Parts, All Tools 1 Part}
EachOp {Start of post processing}
IF EquallySpacedOffsets?
SetFlag('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
END
IF FirstOperation?
openMP
firstOp1
firstOp2
firstOp3
ELSE
IF NewTool?
newToolOp1
newToolOp2 {to tool change, CS problem}
newToolOp3
newToolOp4
newToolOp5
ELSE {implied SameTool?}
sameToolOp1
sameToolOp2
sameToolOp3
END
END {common point for all operations}
opGuts
NextOp {loops back to EachOP until last Operation}
end1
end2
closeMP
end3
RETURN

mp1ToollAllPfu: {Multiple Parts, 1 Tool all Parts, full up}
EachOp {Start of post processing}
IF EquallySpacedOffsets?
SetFlag('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
END
IF FirstOperation?
firstOp1
openMP
firstOp2
firstOp3
ELSE
IF NewTool?
newToolOp1
closeMP
newToolOp2 {to tool change, CS problem}
newToolOp3
openMP
newToolOp4
newToolOp5
ELSE {implied SameTool?}
sameToolOp1
sameToolOp2
sameToolOp3
END
END {common point for all operations}
opGuts
NextOp {loops back to EachOP until last Operation}
end1
closeMP
end2
end3
RETURN

mp1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane}
EachOp {Start of post processing}
SetFlag('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF FirstOperation?
firstOp1
firstOp2
firstOp3
openMP
firstOp2 {need StrtPos in Sub}
ELSE
IF NewTool?
closeMP
newToolOp1
newToolOp2 {to tool change, CS problem}
newToolOp3
newToolOp4
newToolOp5
openMP
newToolOp4 {need StrtPos in Sub}
ELSE {implied SameTool?}
sameToolOp1
sameToolOp2
sameToolOp3
END
END {common point for all operations}
opGuts
NextOp {loops back to EachOP until last Operation}
closeMP
end1
end2
end3
RETURN

noMPs: {no multiple parts}
EachOp {Start of post processing}
SetFlag('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF FirstOperation?
firstOp1
firstOp2
firstOp3
ELSE
IF NewTool?
newToolOp1
newToolOp2
newToolOp3
newToolOp4
newToolOp5
ELSE {implied SameTool?}
sameToolOp1
sameToolOp2
sameToolOp3
END
END {common point for all operations}
opGuts
NextOp {loops back to EachOP until last Operation}
end1
end2
end3
RETURN

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

progStart {setup and initializations}
initOp

IF MultipleParts?
IF AllToolsOnePart?
mpAllTools1P
ELSE {implied OneToolAllParts?}
IF FullUp?
mp1ToollAllPfu
ELSE {implied ExitClearancePlane?}
mp1ToollAllPXcp
END
END
ELSE
noMPs
END



Wyszukiwarka

Podobne podstrony:
Haas [MM] RMQ57 17 5
Haas [HA] PMZ67 17 3
Haas [VT] PMQ69 17 3
Haas [WMF] MZ27 15 3
Haas [QC] PM587 17 4
Haas [WMF] CZ27 15m
Haas [SM] RMT47 17 5
Haas [HA] RMZ67 17 6
Haas [HA] RMZ67 17 6m
Haas [WMF] CZ27 15
Haas PM573 17 3
Cin 10HC [ST&D] PM931 17 3
17 Prawne i etyczne aspekty psychiatrii, orzecznictwo lekarskie w zaburzeniach i chorobach psychiczn
17 (30)

więcej podobnych podstron