{
MILL=T
LATHE=F
SIMPLE_ROT_POS=T
ROTARY_MILL=F
ADV_MILL=F
SUBS=T
MILLTURN_Y-AXIS=F
METRIC=F
}
{Prog Comments ****}
{
10/21/94 [cwh]
M688.82
Updated to new post prog format.
11/29/94 [ws]
Cin Acr A2100 M688.82.02 ( from M688.82.01 )
Modified so No Pretooling done on last tool change.
Modified so 'W' value posted on all drill lines based on "W = zretract - top surface"
Modified drilling 'R' value to be top surface via CalcZSurf#
11/30/94 [ws]
Cin Acr A2100 M688.82.03 ( from M688.82.02 )
Modified G80 line to include a 'R' value where R = zretract.
1/3/95 [ws]
Cin Acr A2100 M688.82.04 ( from M688.82.03 )
Modified so 'Z' value for drilling is calculated as "Z = Tip Depth - Top Surface"
Modified so when using Post Script command for coolant change coolant reset back to the original
2/15/95 [ws]
Cin Acr A2100 M688.82.05 ( from M688.82.04 )
Modified so output H word is not on a line by itself. (affects how MP NC code is output)
2/22/95 [ws]
Cin Acr A2100 M688.82.06 ( from M688.82.05 )
Modified so subroutine labels are reinitialized on reprocessing.
Modified "M02M52" end of Program statement to "M26M02"
added tool prep of the first tool used in the last tool change.
7/11/95 [ws]
Cin Acr A2100 M688.82.07 ( from M688.82.06 )
Modified so Rigid Tap has no R word on G80 cycle.
Modified so Spindle Speed is on Rigid Tap Block.
Modified so M code is on the Rigid Tap Block
7/13/95 [ws]
Cin Acr A2100 M688.82.08 ( from M688.82.07 )
Modified Rigid Tap and Tap blocks to use G95 (feed / rev ) and cancel with G94 after G80 block
to restore back to Feed/Minute.
}
{3/30/99
Initial: Cin Acr 850SX Lancer M688.82.08
Created: Cin Acr 850SX Lancer PM688.17.3
made simple 4th axis post per Fanuc 6M PM001.17.3
MPK}
{Prog Numeric Format Definitions ****}
#1 = '#.00'
#2 = '#####.###;0.'
#3 = '*#####.###;0.'
#4 = '####.####;0'
#5 = '#######0'
#6 = '##.##;0'
#7 = '0000'
#8 = '+####.####;0'
#9 = '#'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(TrackC#,3)
FORMAT(TrackCNO#,3)
FORMAT(MoveC#,3)
FORMAT(UnitAngle#,3)
FORMAT(CP1LessCP2#,4)
FORMAT(ADD#,4)
FORMAT(SUB#,4)
FORMAT(ClearancePlane1#,4)
FORMAT(ClearancePlane2#,4)
FORMAT(CalcZSurf#,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(Repeats#,5)
FORMAT(Tag#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
FORMAT(Recall#,7)
FORMAT(HelixPitch#,8)
FORMAT(RapidF#,9)
{Prog Subroutines ****}
{***** CMI specific Subroutines *****}
doPreTool:
IF NOT LastTool?
FORMAT(ADD#,5)
'T' ADD# NextTool# Num#('1000') { PreTool }
FORMAT(ADD#,4)
ELSE
FORMAT(ADD#,5)
'T'ADD# FIRST Tool# Num#('1000') { Last Tool Change PreTool to first tool}
FORMAT(ADD#,4)
END
RETURN
doOpToolID:
FORMAT(ADD#,5)
'T' ADD# Tool# Num#('1000')
FORMAT(ADD#,4)
RETURN
{***** End CMI specific Subroutines *****}
{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:
'H' 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?
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?
'(MSG, SUB NUMBER: ' Program# ' )' EOL
END
RETURN
doOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
'(MSG, OPERATION ' Operation# ': ' OperationType$ ' )' EOL
END
IF OperationComment?
'(MSG, ' OperationComment$ ' )' EOL
END
IF WorkGroupComment?
'(MSG, ' WorkGroupComment$ ' )' EOL
END
IF ToolTypeComment?
'(MSG, TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
IF ToolComment?
'(MSG, ' ToolComment$ ' )' EOL
END
restoreScale
END
RETURN
doCoolOn:
IF ThruSpin?
'M27'
ELSE
CoolOn
END
RETURN
psInit:
NewWFOF
FourthCWF
FourthCCWF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
PalletInF
RETURN
psStuff:
IF FifthCW?
FORMAT(FifthDegree#,2)
SeqLabC 'B' FifthDegree# EOL
FifthCWF
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
SeqLabC 'B' FifthDegree# EOL
FifthCCWF
END
RETURN
doPostScript:
psInit
EachPS
SeqLabC PostScript EOL
psStuff
NextPS
RETURN
doEndOpPS:
psInit
EachEOPS
SeqLabC 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
SeqLabC Preset 'A' TrackC# UnitAngle# EOL
ELSE
IF LTEqual? MoveC# Num#('-360')
IF Equal? UnitAngle# Num#('0') {reset the A-axis to be 0}
ResetAngle
SeqLabC Preset 'A' TrackC# UnitAngle# EOL
ELSE {reset the A-axis to be between -0.001 and -359.999}
ResetAngle
SeqLabC 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?
SeqLabC Feed ZIn FeedEntC EOL
ELSE
SeqLabC RapidC ZIn EOL
END
RETURN
startSub:
OpenSub
'(DFS,L' Program# ')' EOL
DoSubComment
RETURN
subWarning:
IF NOT FeedConnect?
IF AnyZshift?
' ' EOL
'(MSG, WARNING Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT )' EOL
' ' EOL
END
END
RETURN
StdSub:
SeqLabC 'G10=[T2]V0' EOL {sets temporary register #2 to 0}
SeqLabC 'Q' Program# '1' EOL {branch label 1}
SeqLabC '(CLS,L' Program# ')' EOL {call subroutine}
SeqLabC 'G10=[T2]V[T2]+1' EOL {increment register #2 by 1}
SeqLabC 'G11E[T2]=' Repeats# 'L' Program# '2' EOL {if register #2 is equal to number of repeats then jump to branch label 2}
SeqLabC 'G11L-' Program# '1' EOL {jump backwards to branch label 1}
SeqLabC 'Q' Program# '2' EOL {branch label 2}
StartSub
RETURN
finishSub1: {part 1}
SeqLabC CRCOffC
IF NOT FeedConnect?
RapidC ZCP3C
END
EOL
RETURN
finishSubG92: {part 2}
SeqLabC Preset ShiftRC EOL
SeqLabC '(ENS)' EOL
CloseSub
SeqLabC Preset UnshftRC EOL
RETURN
OpenMP:
NewProg
IF WorkFixtureOffsets?
NewWFO
EachWFO {simple eachPart}
IF AllToolsOnePart?
doOpComments {The next eight lines take the place of FirstOp1and FirstOp2 for AllToolsOnePart }
doPostScript
':?' Plane 'G70' AbsOrInc Rapid 'T' Tool# ToolChng EOL { Inch }
IF AutoCycle? {This takes palce of the CheckPass sub in FirstOp2}
SetPass2
ELSE
SetPass1
END
END
IF OneToolAllParts? AND FullUp? AND GreaterThan? PartNum# Num#('1') {Does not send spindle full up on first part}
SeqLabC 'M26' EOL {Sends tool full up}
SeqLabC PlaneC Rapid doStartPos ZCP1 Speed SpinOn doPreTool SetWFO EOL
ELSE
SeqLabC PlaneC Rapid doStartPos ZCP1 Speed SpinOn doPreTool SetWFO EOL { Takes the place of FirstOp3 (and 3a) and NewToolOp5 (and 5a) for all multiple parts cases, except NewToolOp5 in the case of AllToolsOnePart }
END
IF AllToolsOnePart?
SeqLabC doCoolOn EOL
ELSE
IF EQUAL? PartNum# Num#('1')
SeqLabC doCoolOn EOL
END
END
SeqLabC '(CLS,L' Program# ')' EOL
IncWFO
NextWFO {simple NextPart}
ELSE
SeqLabC 'G10=[T1]V0' EOL {sets temporary register #1 to 0}
SeqLabC 'Q' Program# '1' EOL {branch label 1}
SeqLabC '(CLS,L' Program# ')' EOL {call subroutine}
SeqLabC 'G10=[T1]V[T1]+1' EOL {increment register #1 by 1}
SeqLabC 'G11E[T1]=' Parts# 'L' Program# '2' EOL {if register #1 is equal to number of parts then jump to branch label 2}
SeqLabC 'G11L-' Program# '1' EOL {jump backwards to branch label 1}
SeqLabC 'Q' Program# '2' EOL {branch label 2}
END
StartSub
RETURN
closeMP:
IF WorkFixtureOffsets?
SeqLabC '(ENS)' EOL
CloseSub
ELSE
SeqLabC Preset ShiftPC EOL
IF OneToolAllParts? AND FullUp?
SeqLabC 'M26' EOL
SeqLabC StrtPos EOL
END
SeqLabC '(ENS)' EOL
CloseSub
SeqLabC 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 }
SeqLabC absOrIncC EOL
END
RETURN
ckCRC:
IF LastFeat?
CRCOffC
ELSE
IF NOT ZMove?
CRCOnC
END
END
RETURN
tpPointFeat:
IF AutoCycle?
SeqLabC MoveSXYC EOL
IF Repeats? AND ZshiftOnly?
SeqLabC '(CLS,L' TRUNC# SUB# Program# Num#('1') ')' EOL
ELSE
SeqLabC '(CLS,L' Program# ')' 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
IF SPXMove? OR SPYMove? OR SPZMove?
SeqLabC DoDrillAbsOrInc MoveSXYZC
IF RetractToCP1?
IF NotEqual? SUB# ClearancePlane1# CalcZSurf# Num#('0')
IF GreaterThan? SUB# ClearancePlane1# CalcZSurf# Num#('0')
'W' SUB# ClearancePlane1# CalcZSurf#
END
END
ELSE
IF NotEqual? SUB# ClearancePlane2# CalcZSurf# Num#('0')
IF GreaterThan? SUB# ClearancePlane2# CalcZSurf# Num#('0')
'W' SUB# ClearancePlane2# CalcZSurf#
END
END
END
EOL
END
END
IF LastFeat?
IF Flag?('9') { valid Drill Rotation Sub }
restoreAbsOrInc
IF NOT MasterOp?
SeqLabC '(ENS)' EOL
CloseSub
END
END
END
END
RETURN
tpRapidFeat:
IF XMove? OR YMove? OR ZMove?
SeqLabC doAbsOrInc ckCRC RapidC MoveXYZC EOL
END
RETURN
tpLineFeat:
IF XMove? OR YMove? OR ZMove?
SeqLabC doAbsOrInc ckCRC FeedC MoveXYZC FeedRateC EOL
END
RETURN
tpArcFeat:
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
SeqLabC 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
SeqLabC incValueC EOL
RETURN
autoCycCutSub2: {part 2}
toolPath
SeqLabC absOrIncC CRCOffC
IF Repeats? AND FeedConnect? AND ZshiftOnly?
ELSE
RapidC ZCP2
END
EOL
SeqLabC '(ENS)' 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
SeqLabC 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
SeqLabC '(ENS)' 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
SeqLabC Connect StrtPosC doSepSubFeedConnect EOL
absOrIncC
ELSE
Connect
END
SetStatusOn
RETURN
doSepSubZMoves:
IF FeedConnect?
SeqLabC FeedC ZInPlusInc FeedEnt EOL
ELSE
IF FeedEntry?
IF NOT FirstCycle?
SeqLabC RapidC ZCP2PlusInc EOL
END
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
IF FirstCycle? AND AutoCycle?
Rapid
END
SeqLabC RapidC ZInPlusInc EOL
END
END
SeqLabC '(CLS,L' Program# ')' EOL
IF NOT FeedConnect? AND NOT AbsValue?
TrackZNO# ZCP2PlusInc#
SeqLabC 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?
SeqLabC 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
SeqLabC '(ENS)' 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:
SeqLabC 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?
SeqLabC CRCOffC ZCP3C EOL
setSRXYtoACEP
ELSE
SeqLabC 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
drillStuff:
SeqLabC DrillCP EOL
GetCycle
SeqLabC PlaneC
IF FIFO? AND Dwell? { Bore/Ream with Dwell }
'G89'
ELSE
Cycle
IF Tap?
'G95' { switch to Feed per Revolution units }
END
END
StrtPos
'Z' Sub# Add# ClearancePlane2# Zdepth# CalcZSurf# { Z = tip depth - Top Surface}
'R' CalcZSurf#
IF RetractToCP1?
IF NotEqual? SUB# ClearancePlane1# CalcZSurf# Num#('0')
IF GreaterThan? SUB# ClearancePlane1# CalcZSurf# Num#('0')
'W' SUB# ClearancePlane1# CalcZSurf#
END
END
ELSE
IF NotEqual? SUB# ClearancePlane2# CalcZSurf# Num#('0')
IF GreaterThan? SUB# ClearancePlane2# CalcZSurf# Num#('0')
'W' SUB# ClearancePlane2# CalcZSurf#
END
END
END
Peck
IF Peck?
FeedEnt
IF PeckChipBreaker?
'J0'
ELSE
'J1'
END
ELSE
IF Tap? AND OptCyc1? {Rigid Tapping}
'F' FeedTapIPR#('1') Speed SpinOn 'J1'
ELSE
IF Tap?
'F' FeedTapIPR#('1')
ELSE
FeedEnt
END
END
END
EOL
RETURN
drillingOp:
drillStuff
TrackZNO# FIRST SPZ#
toolPath
IF RetractToCP1?
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
SeqLabC DrillOff
IF Tap? AND OptCyc1?
'J0' EOL
SeqLabC 'G94' 'F1.'
ELSE
IF RetractToCP1?
'R' ClearancePlane1#
ELSE
'R' ClearancePlane2#
END
IF Tap?
EOL
SeqLabC 'G94' 'F1.'
END
END
EOL
setDrillEndOpZ
IF NOT Rotations?
SeqLabC 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
SeqLabC '(ENS)' EOL
CloseSub
checkPass
ELSE
SeqLabC rotateStartPosC EOL
END
SeqLabC '(CLS,L' Program2# ')' EOL
ELSE
IF Drilling?
IF FirstRotation?
drillingOp
checkPass
ELSE
IF RetractToCP1? AND Equal? ClearancePlane1# ClearancePlane3#
SeqLabC rotateStartPosC EOL
ELSE
IF NOT RetractToCP1? AND Equal? ClearancePlane2# ClearancePlane3#
SeqLabC rotateStartPosC EOL
ELSE { Need to cancel Drill Cycle between Rotations }
SeqLabC Rapid ZCP3 EOL
SeqLabC rotateStartPosC EOL
drillStuff
END
END
END
IF CallMasterOp?
IF NOT FirstRotation?
SeqLabC SubCall CallLabB CallMasterNum# EOL
SeqLabC '(CLS,L' CallMasterNum# ')' EOL
END
ELSE
IF MasterOp?
IF NOT FirstRotation?
SeqLabC '(CLS,L' Program# ')' EOL
END
ELSE
IF Flag?('9') { valid Drill Rotation Sub }
SeqLabC '(CLS,L' Program# ')' EOL
END
END
END
IF LastRotation?
SeqLabC 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
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 }
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
IF UseComments?
IF ProgramNameComment?
'(MSG, PROGRAM: ' ProgramName$ ' )' EOL
END
IF ProgramComment?
'(MSG, ' ProgramComment$ ' )' EOL
END
IF FormatNameComment?
'(MSG, FORMAT: ' FormatName$ ' )' EOL
END
IF TimeComment?
'(MSG, ' Date$ ' AT ' Time$ ' )' EOL
END
IF MovesComment?
'(MSG, OUTPUT IN ' MoveType$ ' INCHES )' EOL
END
IF PartsComment?
'(MSG, PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
'(MSG, FIRST TOOL NOT IN SPINDLE )' EOL
END
END
OpenSub
restoreScale
SetProgNum('0')
RETURN
firstOp1:
IF ToolChangeAtHome?
SetHome
END
doOpComments
doPostScript
':?' Plane 'G70' AbsOrInc Rapid { Inch }
SeqLabC doOpToolID ToolChng EOL
Save# Num#('1') Tool# { save first tool number in Num#('1') variable }
RETURN
firstOp2:
CheckPass
SeqLabC Rapid doStartPos ZCP1 Speed SpinOn wfoStuff doPreTool EOL
RETURN
firstOp3:
SeqLabC doCoolOn EOL
RETURN
newToolOp1:
setAngleUnder360
RETURN
newToolOp2:
doEndOpPS
IF ToolChangeAtHome?
SeqLabC absOrIncC Rapid Home SpinOff EOL
END
IF LAST ProgStop?
SeqLabC 'M0' EOL
ELSE
SeqLabC ProgStop EOL
END
RETURN
newToolOp3: {Start new Operation}
doOpComments
doPostScript
':?' Plane 'G70' AbsOrInc Rapid { Inch }
SeqLabC doOpToolID ToolChng EOL
RETURN
newToolOp4:
CheckPass
SeqLabC PlaneC Rapid doStartPos ZCP1 Speed SpinOn wfoStuff doPreTool EOL
RETURN
newToolOp5:
SeqLabC doCoolOn EOL
RETURN
sameToolOp1:
doEndOpPS
IF LAST ProgStop?
SeqLabC SpinOff EOL
SeqLabC 'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
END
RETURN
sameToolOp2: {Start new Operation}
doOpComments
doPostScript
checkPass
RETURN
sameToolOp3: {Start new Operation}
IF LAST ProgStop?
SeqLabC PlaneC Rapid doStartPos ZCP1 Speed SpinOn wfoStuff EOL
SeqLabC doCoolOn EOL
ELSE
IF NewToolOffset? OR ChangeCS?
SeqLabC PlaneC Rapid doStartPos ZCP1 SpeedC wfoStuff EOL
ELSE
SeqLabC PlaneC Rapid doStartPos SpeedC wfoStuff EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqLabC doCoolOn EOL
END
END
RETURN
end1:
setAngleUnder360
IF NotEqual? UnitAngle# Num#('0')
SeqLabC absOrIncC RapidC 'A' TrackC# Num#('0') EOL
END
RETURN
end2:
doEndOpPS
IF FIRST ToolChangeAtHome?
SeqLabC AbsOrInc Rapid FirstHome EOL
END
IF ProgStop?
SeqLabC 'M0' EOL
END
RETURN
end3:
SeqLabC 'M26M02' EOL { Z Axis Full Retract/End of Program }
CloseSub
Post2 {organize Subs into one program}
IF UseComments?
SetScale('1') {restore scale for comments}
IF FileBytesComment?
'(MSG, FILE LENGTH: ' FileBytes# ' CHARACTERS )' EOL
END
IF FileFeetComment?
'(MSG, FILE LENGTH: ' FileFeet# ' FEET )' EOL
END
IF FileMetersComment?
'(MSG, FILE LENGTH: ' FileMeters# ' METERS )' EOL
END
END
EOR EOL
Close
ReTag
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
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
ELSE
IF NewTool?
newToolOp1
closeMP
newToolOp2 {to tool change, CS problem}
newToolOp3
openMP
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
openMP
ELSE
IF NewTool?
closeMP
newToolOp1
newToolOp2 {to tool change, CS problem}
newToolOp3
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:
Cin Acr 850SX Sabre PM689 17 3Cin Acr 850SX Lancer M688 82 08Cin Acr 850SX [WI] M700 87mCin Acr 850SX [WI] M700 87Cin Acr 850SX [D&H] CY84 15Cin Acr 850SX [AP] MW67 12mCin Acr 850SX [WI] M598 89Cin Acr 850SX Sab HMT M856 10 1Cin Acr 850SX [LBS] MU11 87Cin Acr 850SX [D&H] C966 12 5więcej podobnych podstron