{
MILL=T
LATHE=T
ADV_MILL=F
SUBS=T
ROTARY_MILL=T
MILLTURN_POLAR-SEG=T
MILLTURN_Y-AXIS=F
METRIC=F
}
{
Before you change this post, make sure that flag(10) is set correctly:
>>> You must check G90/G91 output since I DID NOT !!! <<<
>>> As far as I know, U & W should works for both G-codes groups <<<
Flag(10) - True for Fanuc Control with Standard G-codes (Default).
G32 - Thread Cutting
G50 - Preset and Max RPM Setting
G98 - Per Minute Feedrate
G99 - Per Revolution Feedrate
X,Z - Absolute Programming
U,W - Incremental Programming
False for Fanuc Control with Special G-codes.
G33 - Thread Cutting
G92 - Preset and Max RPM Setting - Must be set in the "Form" under Origins & Values
G94 - Per Minute Feedrate
G95 - Per Revolution Feedrate
G90 - Absolute Programming - Must be set in the "Form" under Origins & Values
G91 - Incremental Programming - Must be set in the "Form" under Origins & Values
}
{Change Comments ***********************************************************}
{1/6/99,
Initial : Fanuc 16T [VG] YSML800.17
Created: Fanuc 16T [VG] SML800.17
Customer: Master Post for Gibbs & Associates
Changes to "Prog":
1. Removed all 'Y0.' output (6 times).
2. Removed all calls to MoveSY (8 times).
3. Under millApproach sub, removed TrackYNO# SPY# (2 times) and
moved it to the end of the sub.
JHE}
{1/20/99,
Initial : Fanuc 16T [VG] SML800.17
Created: Fanuc 16T [VG] SML800.17.1
Customer: Master Post for Gibbs & Associates
Changes to "Prog":
1. Changed Inch SetArcSegmentAccuracy to (.0005).
2. Added SetArcSegmentAccuracy('.0127') for Metric.
3. Added FORMAT to DIV#
4. In threadCycle sub, changed chamfer calculation to DIV# RunOutZ# FeedIPR#.
JHE}
{2/22/99,
Initial : Fanuc 16T [VG] SML800.17.1
Created: Fanuc 16T [VG] SML800.17.2
Customer: Master Post for Gibbs & Associates
ComPost2: v1.7b15
Changes to "Form":
1. Under Turn Rough - OD/ID, changed X Stock Left to Dia.
2. Under Turn Rough - Face, changed X Stock Left to Dia.
3. Under Pattern Shift, changed X Stock Left to Dia.
4. Under Threading, changed Finish X and X Taper to Dia.
Changes to "Prog":
1. Changed XsAreRadii to XsAreRadiiF (diameter output).
2. Removed StockOn from turnApproachSP sub.
3. Removed IF TurningOp? AND LAST NOT TurningOp? from newToolOp2.
4. Added TrackCNO# Num#('0') after G28H0. (2 places).
5. Under tpArcFeat, added IF ArcIJFormat? and ArcR.
6. Under formatArc, added IF ArcIJFormat? and ArcR.
JHE}
{3/8/99,
Initial : Fanuc 16T [VG] SML800.17.2
Created: Fanuc 16T [VG] SML800.17.3
Customer: Master Post for Gibbs & Associates
ComPost2: v1.7b15
Changes to "Prog":
1. Under drillingCycles sub (for turning), changed Peck to doPeck (Q need trailing
zeros output).
2. Under tpPointFeat sub (for Drilling and NOT FirstFeat), added doPeck to each line
(Q is required with every location).
3. Moved doPeck sub before tpLastFeat sub.
4. Under rotaryReps (for Drilling and not FirstRotation), added doPeck in 4 places.
5. Under skipToLastFeat sub, removed IF LastFeat? boolean.
We need to update the C-axis for every location and not only for the last location.
The Post Engine takes the shortest path and we have to follow all locations to
correctly update the C-axis.
JHE}
{Prog Numeric Format Definitions *******************************************}
#1 = '###.00'
#2 = '###.####;0.'
#3 = '####0'
#4 = '###^##0'
#5 = '##.######;0.'
#6 = '##^###0' {used for Peck & minmun depth of cut - JHE}
#7 = '#'
#8 = '0^0;00' {Added for thread chamfer - JHE}
#9 = '00;00' {Added for thread angle & # of spring passes - JHE}
#10 = '*#####.###;0.' {Added for rotary axis - JHE}
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(Recall#,2)
FORMAT(ADD#,2)
FORMAT(SUB#,2)
FORMAT(MUL#,2)
FORMAT(SPX#,2)
FORMAT(SPY#,2)
FORMAT(SPZ#,2)
FORMAT(EPX#,2)
FORMAT(EPY#,2)
FORMAT(EPZ#,2)
FORMAT(TrackX#,2)
FORMAT(TrackY#,2)
FORMAT(TrackZ#,2)
FORMAT(TrackXNO#,2)
FORMAT(TrackYNO#,2)
FORMAT(TrackZNO#,2)
FORMAT(ArcCPH#,2)
FORMAT(ArcCPV#,2)
FORMAT(ToolDiameter#,2)
FORMAT(LastCutXRadius#,2)
FORMAT(InFeedAngle#,2)
FORMAT(TRUNC#,3)
FORMAT(Program#,3)
FORMAT(Program2#,3)
FORMAT(CallMasterNum#,3)
FORMAT(Operation#,3)
FORMAT(Tag#,3)
FORMAT(Tool#,3)
FORMAT(CalcEPRPM#,3)
FORMAT(Dwell#,4)
FORMAT(Peck#,6)
FORMAT(RapidF#,7)
FORMAT(DIV#,8) {Added - JHE}
FORMAT(SpringPasses#,9)
FORMAT(UnitAngle#,10)
FORMAT(TrackC#,10)
FORMAT(TrackCNO#,10)
FORMAT(MoveC#,10)
{Prog Subroutines **********************************************************}
resetSP: {update to the correct StartPos}
IF NOT TurningOp?
IF Rotations? OR Repeats? OR AutoCycle?
CalcSCAng
IF AbsValue?
IF FaceTool?
TrackXNO# SPX#
ELSE
TrackZNO# SPZ#
END
TrackYNO# SPY#
TrackCNO# MoveC#
ELSE
SetAbs
IF FaceTool?
TrackXNO# SPX#
ELSE
TrackZNO# SPZ#
END
TrackYNO# SPY#
TrackCNO# MoveC#
SetInc
END
END
END
RETURN
saveEP: {save the correct EndPos}
IF PointFeat?
IF AutoCycle?
SetACSPCompF
IF FaceTool?
Save# Num#('1') ADD# Recall# Num#('1') SPX# { xOpEP }
ELSE
Save# Num#('3') ADD# Recall# Num#('3') SPZ# { zOpEP }
END
Save# Num#('2') ADD# Recall# Num#('2') SPY# { yOpEP }
Save# Num#('4') ADD# Recall# Num#('4') MoveC# { cOpEP }
SetACSPComp
ELSE
IF FaceTool?
Save# Num#('1') SPX# { xOpEP }
ELSE
Save# Num#('3') SPZ# { zOpEP }
END
Save# Num#('2') SPY# { yOpEP }
Save# Num#('4') MoveC# { cOpEP }
END
ELSE
IF FaceTool?
Save# Num#('1') EPX# { xOpEP }
ELSE
Save# Num#('3') EPZ# { zOpEP }
END
Save# Num#('2') EPY# { yOpEP }
Save# Num#('4') MoveC# { cOpEP }
END
RETURN
getEP: {save the correct EndPos}
IF NOT TurningOp?
IF Rotations? OR Repeats? OR AutoCycle?
IF AbsValue?
saveEP
ELSE
SetAbs
saveEP
SetInc
END
END
END
RETURN
setSRXYtoACEP:
IF FaceTool?
TrackXNO# Recall# Num#('1') { xOpEP }
ELSE
TrackZNO# Recall# Num#('3') { zOpEP }
END
TrackYNO# Recall# Num#('2') { yOpEP }
TrackCNO# Recall# Num#('4') { cOpEP }
RETURN
doMillCP1: {no calls to this sub - JHE}
IF FaceTool?
ThisOpEntryZCP
ELSE
ThisOpEntryXCP
END
RETURN
doMillCP2:
IF FaceTool?
IF AbsValue?
ZOpCP
ELSE
'W' ZOpCP#
END
ELSE
IF AbsValue?
XOpCD
ELSE
'U' XOpCD#
END
END
RETURN
doMillCP3:
IF FaceTool?
IF AbsValue?
ZOpECP
ELSE
'W' ZOpECP#
END
ELSE
IF AbsValue?
XOpECD
ELSE
'U' XOpECD#
END
END
RETURN
doMillCP1C: {no calls to this sub - JHE}
IF FaceTool?
ThisOpEntryZCPC
ELSE
ThisOpEntryXCPC
END
RETURN
doMillCP2C:
IF FaceTool?
ZOpCPC
ELSE
XOpCDC
END
RETURN
doMillCP3C:
IF FaceTool?
ZOpECPC
ELSE
XOpECDC
END
RETURN
doDrillCP:
IF FaceTool?
IF RetractToCP1?
ThisOpEntryZCPC
ELSE
ZOpCPC
END
ELSE
IF RetractToCP1?
ThisOpEntryXCPC
ELSE
XOpCDC
END
END
RETURN
tagNext: {outputs the ASCII character that Retag uses}
ASCII('62') {with Tag# to reference the sequence # stored with tagNext}
RETURN
tagNextRef: {outputs the ASCII character that Retag uses}
ASCII('179') {with Tag# to reference the sequence # stored with tagNext}
RETURN
tagPrev: {outputs the ASCII character that Retag uses}
ASCII('60') {with Tag# to store the previous sequence #}
RETURN
tagPrevRef: {outputs the ASCII character that Retag uses}
ASCII('178') {with Tag# to reference the sequence # stored with tagPrev}
RETURN
restoreScale:
IF Metric? {CAM file is in Metric, tools and tool path}
SetScale('.03937007874') { change to English, this is an English post}
END
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?
IF TurningOp? AND NOT Drilling?
'( TOOL ' Tool# ', ' ToolSize$ ' ' ToolType$ ' )' EOL
ELSE
'( TOOL ' Tool# ', ' ToolDiameter# ' DIA. ' ToolType$ ' )' EOL
END
END
IF ToolComment?
'( ' ToolComment$ ' )' EOL
END
restoreScale
END
RETURN
psInit: {reset flags}
OptCyc1F
MasterOpF
CallMasterOpF
PalletInF
RETURN
doPostScript:
psInit
EachPS
SeqLabC PostScript EOL {literals}
NextPS
RETURN
doEndOpPS:
psInit
EachEOPS
SeqLabC EndOpPS EOL {literals}
NextPS
RETURN
doMoveSXC:
IF AbsValue?
MoveSXC
ELSE
IF SPXMove?
'U' SPX#
END
END
RETURN
doMoveSYC:
IF AbsValue?
MoveSYC
ELSE
IF SPYMove?
'V' SPY#
END
END
RETURN
doMoveSZC:
IF AbsValue?
MoveSZC
ELSE
IF SPZMove?
'W' SPZ#
END
END
RETURN
doMoveXC:
IF AbsValue?
MoveXC
ELSE
IF XMove?
'U' EPX#
END
END
RETURN
doMoveYC:
IF AbsValue?
MoveYC
ELSE
IF YMove?
'V' EPY#
END
END
RETURN
doMoveZC:
IF AbsValue?
MoveZC
ELSE
IF ZMove?
'W' EPZ#
END
END
RETURN
doMoveCC:
IF AbsValue?
MoveCC
ELSE
IF CMove?
'H' MoveC#
END
END
RETURN
doStartPos: {called from g92Sub - JHE}
IF RotaryMill?
IF FaceTool?
'X' TrackX# SPX# {*'Y0.' TrackYNO# SPY#*} CalcSCAng MoveC
ELSE
{*'Y0.' TrackYNO# SPY#*} 'Z' TrackZ# SPZ# CalcSCAng MoveC
END
ELSE
IF FaceTool?
XSP {*MoveSY*} TrackCNO# Num#('0')
ELSE
{*MoveSY*} ZSP TrackCNO# Num#('0')
END
END
RETURN
doZIn:
IF FaceTool?
doMoveSZC
ELSE
doMoveSXC
END
RETURN
entryMove:
IF FirstOperation? OR NewTool?
RapidF# { Forces FeedEnt/FeedRate }
ELSE
IF LAST Rotations? OR LAST Repeats?
RapidF#
END
END
IF FeedEntry?
SeqLabC FeedC doZIn FeedEntC EOL
ELSE
SeqLabC RapidC doZIn EOL
END
RETURN
startSub:
OpenSub
SubID 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:
SeqLabC SubCall CallLab RepLab RepCycs EOL
startSub
RETURN
finishSub1: {part 1}
IF NOT FeedConnect?
SeqLabC CRCOffC RapidC doMillCP3C EOL
ELSE
SeqLabC CRCOffC EOL
END
RETURN
finishSubG92: {part 2}
SeqLabC Preset ShiftRC EOL
SeqLabC EndSub EOL
CloseSub
SeqLabC Preset UnshftRC EOL
RETURN
stockOnNoCan:
IF NOT CannedCycle?
StockOn {need stock for SP positioning, if not a canned cycle}
END
RETURN
feedNoCan:
IF NOT CannedCycle?
FeedC
END
RETURN
feedRateNoCan:
IF NOT CannedCycle?
FeedRateC
END
RETURN
setAngleUnder360:
{sets status register and machine to current rotary position between -360 and 360 deg}
IF NOT FirstOperation?
IF LAST RotaryMill? OR LAST Rotations?
IF GTEqual? MoveC# Num#('360')
{reset the C-axis to be between 0 and 359.999}
ResetAngle
SeqLabC Preset 'C' TrackC# UnitAngle# EOL
ELSE
IF LTEqual? MoveC# Num#('-360')
IF Equal? UnitAngle# Num#('0')
{reset the C-axis to be 0}
ResetAngle
SeqLabC Preset 'C' TrackC# UnitAngle# EOL
ELSE
{reset the C-axis to be between -0.001 and -359.999}
ResetAngle
SeqLabC Preset 'C' TrackC# SUB# UnitAngle# Num#('360') EOL
END
END
END
END
END
RETURN
doSpinOn:
IF TurningOp?
SpinOn
ELSE
IF CWSpindle?
'M13' {live tool CW}
ELSE
'M14' {live tool CCW}
END
END
RETURN
doFeedRate:
IF NOT EmptyLine?
IF RotaryMill?
AngleFeedC
ELSE
FeedRateC
END
END
RETURN
doAbsOrInc:
IF Rotations? AND RotaryMill?
SetInc
ELSE
IF Flag?('1') { Milling ZShiftOnly SepSubs/DrillSubs activated }
IF FaceTool? AND ZMove?
SetInc
ELSE
IF NOT FaceTool? AND XMove?
SetInc
ELSE
SetAbs
END
END
END
END
RETURN
doACAbsOrInc:
IF Rotations? AND CMove?
SetInc
ELSE
SetAbs
END
RETURN
doDrillAbsOrInc:
IF Rotations? AND RotaryMill?
SetInc
ELSE
IF Flag?('1') { DrillSubs activated }
IF FaceTool? AND SPZMove?
SetInc
ELSE
IF NOT FaceTool? AND SPXMove?
SetInc
ELSE
SetAbs
END
END
END
END
RETURN
restoreAbsOrInc:
IF Rotations? AND RotaryMill? AND NOT AutoCycle?
SetAbs
ELSE
IF Flag?('1') { Milling ZShiftOnly SepSubs/DrillSubs activated }
SetAbs
END
END
RETURN
ckCRC:
IF LastFeat?
CRCOffC
ELSE
IF TurningOp?
IF XMove? OR ZMove?
CRCOnC
END
ELSE
IF FaceTool? AND NOT ZMove?
CRCOnC
ELSE
IF NOT FaceTool? AND NOT XMove?
CRCOnC
END
END
END
END
RETURN
doPeck:
IF Peck?
'Q' Peck#
END
RETURN
tpLastFeat: {turning op's}
IF Drilling?
IF Tap?
SeqLabC SpinOff EOL
SeqLabC 'G4P500' EOL
SeqLabC Speed InverseSpinOn EOL
ELSE
IF Dwell?
SeqLabC 'G4P' Dwell# EOL
END
END
ELSE
IF CannedCycle?
SeqLab
END
END
RETURN
tpPointFeat:
IF AutoCycle?
IF RotaryMill?
CalcSCAng
IF FaceTool?
SeqLabC doACAbsOrInc doMoveSXC doMoveCC EOL
ELSE
SeqLabC doACAbsOrInc doMoveSZC doMoveCC EOL
END
SetAbs
ELSE
IF FaceTool?
SeqLabC doMoveSXC doMoveSYC EOL
ELSE
SeqLabC doMoveSYC doMoveSZC EOL
END
END
IF Repeats? AND ZshiftOnly?
SeqLabC SubCall CallLabB TRUNC# SUB# Program# Num#('1') EOL
ELSE
SeqLabC SubCall CallLab EOL
END
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE {implies Drilling}
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
CalcSCAng
IF FaceTool?
IF RotaryMill?
SeqLabC doDrillAbsOrInc doMoveSXC doMoveSZC doMoveCC doPeck EOL
ELSE
SeqLabC doDrillAbsOrInc doMoveSXC doMoveSYC doMoveSZC doMoveCC doPeck EOL
END
ELSE {implies OD Tool}
IF RotaryMill?
SeqLabC doDrillAbsOrInc doMoveSXC doMoveSZC doMoveCC doPeck EOL
ELSE
SeqLabC doDrillAbsOrInc doMoveSXC doMoveSYC doMoveSZC doMoveCC doPeck EOL
END
END
END
IF LastFeat?
IF Flag?('9') { valid Drill Rotation Sub }
restoreAbsOrInc
IF NOT MasterOp?
SeqLabC EndSub EOL
CloseSub
END
END
END
END
RETURN
tpRapidFeat:
IF TurningOp?
IF XMove? OR ZMove?
IF NOT FirstFeat? AND LAST ThreadFeat?
SeqLabC ckCRC Rapid MoveXC MoveZC EOL
ELSE
SeqLabC ckCRC RapidC MoveXC MoveZC EOL
END
END
ELSE
IF FaceTool?
IF RotaryMill?
CalcCAng
IF XMove? OR ZMove? OR CMove?
SeqLabC ckCRC RapidC doAbsOrInc doMoveXC doMoveZC doMoveCC EOL
END
ELSE
CalcCAng
IF XMove? OR YMove? OR ZMove? OR CMove?
SeqLabC ckCRC RapidC doAbsOrInc doMoveXC doMoveYC doMoveZC doMoveCC EOL
END
END
ELSE {implies OD Tool}
IF RotaryMill?
CalcCAng
IF XMove? OR ZMove? OR CMove?
SeqLabC ckCRC RapidC doAbsOrInc doMoveXC doMoveZC doMoveCC EOL
END
ELSE
CalcCAng
IF XMove? OR YMove? OR ZMove? OR CMove?
SeqLabC ckCRC RapidC doAbsOrInc doMoveXC doMoveYC doMoveZC doMoveCC EOL
END
END
END
END
RETURN
tpLineFeat:
IF TurningOp?
IF XMove? OR ZMove?
SeqLabC ckCRC FeedC MoveXC MoveZC FeedRateC EOL
END
ELSE
IF FaceTool?
IF RotaryMill?
EACHSpiralSeg
CalcCAng
IF XMove? OR ZMove? OR CMove?
SeqLabC ckCRC FeedC doAbsOrInc doMoveXC doMoveZC doMoveCC doFeedRate EOL
END
NEXTSpiralSeg
ELSE
IF XMove? OR YMove? OR ZMove?
SeqLabC ckCRC FeedC doAbsOrInc doMoveXC doMoveYC doMoveZC doFeedRate EOL
END
END
ELSE {implies OD Tool}
IF RotaryMill?
CalcCAng
IF XMove? OR ZMove? OR CMove?
SeqLabC ckCRC FeedC doAbsOrInc doMoveXC doMoveZC doMoveCC doFeedRate EOL
END
ELSE
IF XMove? OR YMove? OR ZMove?
SeqLabC ckCRC FeedC doAbsOrInc doMoveXC doMoveYC doMoveZC doFeedRate EOL
END
END
END
END
RETURN
formatArc: {Apply to milling only - JHE}
IF ArcCW?
CWArcC doMoveXC doMoveYC doMoveZC
ELSE
CCWArcC doMoveXC doMoveYC doMoveZC
END
IF FaceTool?
IF ArcIJFormat? {Added - JHE 2/22}
CircleIC CircleJC
ELSE
ArcRC {Added - JHE 2/22}
END
ELSE {implies OD Tool}
IF ArcIJFormat? {Added - JHE 2/22}
CircleJC CircleKC
ELSE
ArcRC {Added - JHE 2/22}
END
END
RETURN
tpArcFeat:
IF TurningOp?
EACHQuadrant { Do not use NOT, LAST, FIRST or NEXT modifiers in this loop }
IF ArcCW?
SeqLabC CWArcC
ELSE
SeqLabC CCWArcC
END
MoveXC MoveZC
IF ArcIJFormat? {Added - JHE 2/22}
CircleIC CircleKC FeedRateC EOL
ELSE
ArcRC FeedRateC EOL {Added - JHE 2/22}
END
NEXTQuadrant
ELSE
IF FaceTool?
IF RotaryMill?
{if the arc center and the rotary center coincide}
IF Equal? Num#('0') ArcCPH# AND Equal? Num#('0') ArcCPV#
CalcCAng
IF ZMove? OR CMove?
SeqLabC FeedC doAbsOrInc doMoveZC doMoveCC doFeedRate EOL
END
ELSE
EACHArcSegment
CalcCAng
IF XMove? OR ZMove? OR CMove?
SeqLabC FeedC doAbsOrInc doMoveXC doMoveZC doMoveCC doFeedRate EOL
END
NEXTArcSegment
END
ELSE
EACHQuadrant
SeqLabC doAbsOrInc formatArc doFeedRate EOL
NEXTQuadrant
END
ELSE {implies OD Tool}
IF RotaryMill?
EACHArcSegment
CalcCAng
IF XMove? OR ZMove? OR CMove?
SeqLabC FeedC doAbsOrInc doMoveXC doMoveZC doMoveCC doFeedRate EOL
END
NEXTArcSegment
ELSE
EACHQuadrant
SeqLabC doAbsOrInc formatArc doFeedRate EOL
NEXTQuadrant
END
END
END
RETURN
tpThreadFeat:
IF Flag?('10') {IF Standard G-codes}
SeqLabC 'G32' MoveXC MoveZC ThrdLead EOL
ELSE {Special G-codes}
SeqLabC 'G33' MoveXC MoveZC ThrdLead EOL
END
RETURN
toolPath:
EACHFeat
IF FirstFeat?
resetSP
END
IF TurningOp?
GetToolTip
IF LastFeat?
tpLastFeat
END
END
IF PointFeat?
tpPointFeat
ELSE
IF RapidFeat?
tpRapidFeat
ELSE
IF LineFeat?
tpLineFeat
ELSE
IF ArcFeat?
tpArcFeat
ELSE
IF TurningOp? AND ThreadFeat?
tpThreadFeat
END
END
END
END
END
IF LastFeat?
getEP
END
NEXTFeat
restoreAbsOrInc
RETURN
checkRapid:
IF LAST TurningOp?
IF LAST CannedCycle?
IF LAST Roughing?
Rapid
ELSE
IF LAST Threading?
Rapid
END
END
ELSE
IF LAST Threading?
Rapid
ELSE
RapidC
END
END
ELSE
IF LAST Drilling?
RapidC
END
END
RETURN
checkPass:
Plane2
SetPass1
IF NOT TurningOp?
IF Autocycle?
SetPass2
END
END
RETURN
autoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
startSub
SetSRXYtoSP
SetInc
RETURN
autoCycCutSub2: {part 2}
toolPath
SetAbs
SeqLabC CRCOffC
IF Repeats? AND FeedConnect? AND ZshiftOnly?
ELSE
RapidC doMillCP2
END
EOL
SeqLabC 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
doSepSubContour:
SetPass1
IF FaceTool?
TrackZNO# SPZ#
ELSE {implies OD Tool}
TrackXNO# SPX#
END
startSub
RapidF#
IF AutoCycle?
NewProg
autoCycCutSub1 {build element sub}
IF FaceTool?
TrackZNO# SPZ#
ELSE {implies OD Tool}
TrackXNO# SPX#
END
autoCycCutSub2
ELSE
toolPath
finishSub1
SeqLabC EndSub EOL
CloseSub
END
SetPass1
SetStatusRapid
RapidF#
SetSRXYtoEP
IF FaceTool?
TrackZNO# ZOpCP#
ELSE {implies OD Tool}
TrackXNO# XOpCD#
END
TrackCNO# Recall# Num#('4') { cOpEP }
RETURN
doSepSubFeedConnect:
IF FeedConnect?
IF CMove?
AngleFeedC
ELSE
FeedEntC
END
END
RETURN
doSepSubSPMove:
SetStatusOff
IF RotaryMill?
CalcSCAng
IF FaceTool?
IF SPXMove? OR CMove?
IF Rotations? OR AutoCycle?
SetInc
END
SeqLabC Connect doMoveSXC doMoveCC doSepSubFeedConnect EOL
SetAbs
ELSE
Connect
END
ELSE {implies OD Tool}
IF SPZMove? OR CMove?
IF Rotations? OR AutoCycle?
SetInc
END
SeqLabC Connect doMoveSZC doMoveCC doSepSubFeedConnect EOL
SetAbs
ELSE
Connect
END
END
ELSE
IF FaceTool?
IF SPXMove? OR SPYMove?
IF AutoCycle?
SetInc
END
SeqLabC Connect doMoveSXC doMoveSYC doSepSubFeedConnect EOL
SetAbs
ELSE
Connect
END
ELSE {implies OD Tool}
IF SPYMove? OR SPZMove?
IF AutoCycle?
SetInc
END
SeqLabC Connect doMoveSYC doMoveSZC doSepSubFeedConnect EOL
SetAbs
ELSE
Connect
END
END
END
SetStatusOn
RETURN
doSepSubDMoves:
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 SubCall CallLab EOL
IF NOT FeedConnect? AND NOT AbsValue?
IF FaceTool?
TrackZNO# ZCP2PlusInc#
IF NOT Equal? ZCP2PlusInc# ZOpCP#
SeqLabC doMillCP2 EOL
END
IF NOT AutoCycle?
TrackZNO# ZOpECP#
END
ELSE {implies OD Tool}
TrackXNO# ZCP2PlusInc#
IF NOT Equal? ZCP2PlusInc# XOpCD#
SeqLabC doMillCP2 EOL
END
IF NOT AutoCycle?
TrackXNO# XOpECD#
END
END
END
RETURN
setSepSubD:
SetAbs
IF FaceTool?
TrackZNO# ADD# SPZ# MUL# RepsLess1# RepeatZ#
ELSE {implies OD Tool}
TrackXNO# ADD# SPX# MUL# RepsLess1# RepeatX#
END
SetInc
RETURN
doSepSubExit:
IF NOT AbsValue?
setSepSubD
END
IF AutoCycle?
SeqLabC Rapid doMillCP2 EOL
ELSE
Rapid {Will be output at millingOp ZCP3 - DWB}
END
RETURN
resetSepSubSR:
SetPass1
SetStatusRapid
RapidF#
IF FaceTool?
TrackXNO# Recall# Num#('1') { xOpEP }
ELSE
TrackZNO# Recall# Num#('3') { zOpEP }
END
TrackYNO# Recall# Num#('2') { yOpEP }
TrackCNO# Recall# Num#('4') { cOpEP }
RETURN
doOnlyRepAutoCycle:
doSepSubContour
EachCycle
IF NOT FirstCycle?
doSepSubSPMove
END
doSepSubDMoves
NextCycle
IF FeedConnect?
doSepSubExit
END
SeqLabC EndSub EOL
CloseSub
{Element shift, not pattern}
autoCycPat {write pattern moves and main calls}
resetSepSubSR
IF FaceTool?
TrackZNO# ZOpCP#
ELSE {implies OD Tool}
TrackXNO# XOpCD#
END
RETURN
doOnlyRep:
doSepSubContour
EachCycle
IF NOT FirstCycle?
doSepSubSPMove
END
doSepSubDMoves
NextCycle
resetSepSubSR
IF FeedConnect?
doSepSubExit
ELSE {implies OD Tool}
IF FaceTool?
TrackZNO# ZOpECP#
ELSE
TrackXNO# XOpECD#
END
END
RETURN
milling:
IF AutoCycle?
NewProg
autoCycCutSub1
entryMove
autoCycCutSub2
autoCycPat
ELSE
entryMove
toolPath
END
RETURN
g92Sub:
subWarning
stdSub
SetAbs
SeqLabC Connect doStartPos EOL
milling
finishSub1
finishSubG92
RETURN
millingOp:
SeqLabC doMillCP2C EOL
IF Repeats?
NewProg
IF ZshiftOnly?
IF AutoCycle? {incremental Autocycle sub can have Z moves}
doOnlyRepAutoCycle
ELSE {Z shift only, NOT Auto Cycle}
SetFlag('1') { Milling ZShiftOnly SepSubs activated }
doOnlyRep
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 doMillCP3C EOL
setSRXYtoACEP
ELSE
SeqLabC CRCOffC RapidC doMillCP3C EOL
END
RETURN
skipToLastFeat:
EachFeat
{*IF LastFeat?*}
IF FaceTool?
TrackXNO# SPX#
ELSE
TrackZNO# SPZ#
END
TrackYNO# SPY#
CalcSCAng
TrackCNO# MoveC#
{*END*}
NextFeat
RETURN
setDrillEndOpD:
IF FaceTool?
IF RetractToCP1?
TrackZNO# ThisOpEntryZCP#
ELSE
TrackZNO# ZOpCP#
END
ELSE {implies OD Tool}
IF RetractToCP1?
TrackXNO# ThisOpEntryXCP#
ELSE
TrackXNO# XOpCD#
END
END
RETURN
doCycle:
IF FaceTool?
IF FIFO?
'G85'
ELSE
IF Tap?
'G84'
ELSE
'G83'
END
END
ELSE
IF FIFO?
'G89'
ELSE
IF Tap?
'G88'
ELSE
'G87'
END
END
END
RETURN
doDrillStartPos:
IF FaceTool?
IF RotaryMill?
XSP CalcSCAng MoveC
ELSE
XSP {*MoveSY*} CalcSCAng MoveC
END
ELSE {implies OD Tool}
IF RotaryMill?
ZSP CalcSCAng MoveC
ELSE
{*MoveSY*} ZSP CalcSCAng MoveC
END
END
RETURN
doDrillDepth:
IF FaceTool?
MoveSZC
ELSE
MoveSXC
END
RETURN
doRLevel:
{R level is the distance from CP1 to CP2 - JHE}
SetStatusOff
IF RetractToCP1?
IF FaceTool?
'R' SUB# ZOpCP# ThisOpEntryZCP#
ELSE
'R' SUB# XOpCD# ThisOpEntryXCP#
END
ELSE
'R0.'
END
SetStatusOn
RETURN
{* doPeck: moved before tpLastFeat sub - JHE
IF Peck?
'Q' Peck#
END
RETURN *}
doDwell:
IF Dwell?
'P' Dwell#
END
RETURN
drillingOp:
SeqLabC doDrillCP EOL
GetCycle
SeqLabC doCycle doDrillStartPos doDrillDepth doRLevel doPeck doDwell FeedEnt EOL
IF CallMasterOp?
SeqLabC SubCall CallLabB CallMasterNum# EOL
skipToLastFeat
ELSE
IF FaceTool?
TrackZNO# SPZ#
ELSE
TrackXNO# SPX#
END
IF MasterOp?
SetFlag('1') { DrillSubs activated }
NewMasterProg
SeqLabC SubCall CallLab EOL
startSub
toolPath
SeqLabC EndSub EOL
CloseSub
SetFlagF('1') { DrillSubs deactivated }
ELSE
toolPath
END
END
setDrillEndOpD
IF NOT Rotations?
SeqLabC DrillOff Rapid doMillCP3 EOL
END
RETURN
rotateStartPosC:
IF FaceTool?
TrackXNO# Recall# Num#('1') { xOpEP }
IF RotaryMill?
MoveSXC CalcSCAng MoveC
ELSE
TrackYNO# Recall# Num#('2') { yOpEP }
MoveSXC MoveSYC CalcSCAng MoveC
END
ELSE {implies OD Tool}
TrackZNO# Recall# Num#('3') { zOpEP }
IF RotaryMill?
MoveSZC CalcSCAng MoveC
ELSE
TrackYNO# Recall# Num#('2') { yOpEP }
MoveSYC MoveSZC CalcSCAng MoveC
END
END
RETURN
rotaryReps: {use the correct EndPos}
EachRotation
IF Milling?
IF FirstRotation?
NewProg
SaveProgNum2
StartSub
millingOp
SeqLabC EndSub EOL
CloseSub
checkPass
ELSE
SeqLabC rotateStartPosC EOL
END
SeqLabC SubCall CallLabB Program2# EOL
ELSE
IF Drilling?
IF FirstRotation?
drillingOp
checkPass
ELSE
IF FaceTool? AND RetractToCP1? AND Equal? ThisOpEntryZCP# ZOpECP#
SeqLabC rotateStartPosC doPeck EOL
ELSE
IF FaceTool? AND NOT RetractToCP1? AND Equal? ZOpCP# ZOpECP#
SeqLabC rotateStartPosC doPeck EOL
ELSE
IF NOT FaceTool? AND RetractToCP1? AND Equal? ThisOpEntryXCP# XOpECD#
SeqLabC rotateStartPosC doPeck EOL
ELSE
IF NOT FaceTool? AND NOT RetractToCP1? AND Equal? XOpCD# XOpECD#
SeqLabC rotateStartPosC doPeck EOL
ELSE { Need to cancel Drill Cycle between Rotations }
SeqLabC DrillOff Rapid doMillCP3 EOL
SeqLabC rotateStartPosC EOL
SeqLabC doDrillCP EOL
SeqLabC doCycle doDrillStartPos doDrillDepth doRLevel doPeck doDwell FeedEnt EOL
END
END
END
END
END
IF CallMasterOp?
IF NOT FirstRotation?
SeqLabC SubCall CallLabB CallMasterNum# EOL
END
ELSE
IF MasterOp?
IF NOT FirstRotation?
SeqLabC SubCall CallLab EOL
END
ELSE
IF Flag?('9') { valid Drill Rotation Sub }
SeqLabC SubCall CallLab EOL
END
END
END
IF LastRotation?
SeqLabC DrillOff Rapid doMillCP3 EOL
END
END
END
IF LastRotation?
EachFeat
IF LastFeat?
IF PointFeat?
CalcSCAng
ELSE
CalcCAng
END
TrackCNO# MoveC# EOL
END
NextFeat
END
NextRotation
IF FaceTool?
TrackXNO# Recall# Num#('1') { xOpEP }
TrackZNO# ZOpECP#
ELSE
TrackXNO# XOpECD#
TrackZNO# Recall# Num#('3') { zOpEP }
END
TrackYNO# Recall# Num#('2') { yOpEP }
RETURN
roughingCycle:
TagInc
SetPass2
IF RoughContour?
{1st block}
{R is Pull out amount and I did it 1/4 of CutDepth}
SeqLabC LCycle CutDepth 'R' MUL# CutDepth# Num#('0.25') EOL
{2nd block}
SeqLabC LCycle 'P' tagNextRef Tag# 'Q' tagPrevRef Tag# XStkLeft ZStkLeft FeedRate EOL
tagNext Tag# EOL
IF ApproachFace?
SeqLab StepMove ZSP EOL
SeqLabC FeedC XSP EOL
ELSE {implies OD or ID}
SeqLab StepMove XSP EOL
SeqLabC FeedC ZSP EOL
END
ELSE
IF RoughPatternShift?
SeqLabC LCycle XminusU ZminusW NumCuts EOL
SeqLabC LCycle 'P' tagNextRef Tag# 'Q' tagPrevRef Tag# XStkLeft ZStkLeft FeedRate EOL
tagNext Tag# EOL
SeqLab StepMove StrtPos EOL
END
END
toolPath
tagPrev Tag# EOL
IF AutoFinish?
SeqLabC 'G70' 'P' tagNextRef Tag# 'Q' tagPrevRef Tag# EOL
END
SetPass1
TrackXNO# CycleStartX#
TrackZNO# CycleStartZ#
RETURN
threadCycle:
IF Chamfer?
SeqLabC 'M23' EOL
END
{1st block}
SeqLabC LCycle 'P' SpringPasses#
DIV# RunOutZ# FeedIPR#
FORMAT(MUL#,9)
MUL# InFeedAngle# Num#('2')
FORMAT(MUL#,2)
FORMAT(LastCutXRadius#,6)
'Q' LastCutXRadius# {min depth of cut = last cut}
FORMAT(LastCutXRadius#,2)
'R' LastCutXRadius# EOL
{2nd block}
SeqLabC LCycle XatFinZ FinZ XTapAtZ ThrdHeight CutDepth ThrdLead EOL
IF Chamfer?
SeqLabC 'M24' EOL
END
RETURN
drillingCycles:
SeqLabC LCycle ZDepth RLevel doPeck
IF Dwell?
'P' Dwell# FeedRate EOL
ELSE
FeedRate EOL
END
SeqLabC DrillOff Rapid ZOpECP EOL
RETURN
latheOp:
IF CannedCycle?
StockOff
IF Roughing?
roughingCycle
ELSE
IF Threading?
threadCycle
ELSE
IF Drilling?
drillingCycles
END
END
END
ELSE
StockOn
SetPass1
toolPath
IF Drilling? AND Tap?
SeqLabC SpinOff EOL
SeqLabC 'G4P500' EOL
SeqLabC Speed SpinOn EOL
END
END
RETURN
opGuts:
IF TurningOp?
latheOp
ELSE
IF FaceTool? AND AutoCycle? AND RotaryMill?
'*************************************' EOL
'WARNING!!! Patterns and Thread Milling are not supported' EOL
' in Face Operations !!!' EOL
'*************************************' EOL
END
IF Rotations?
rotaryReps
ELSE
IF Milling?
millingOp
ELSE
IF Drilling?
drillingOp
END
END
END
END
RETURN
progStart:
InitProg
SetAbs
PosSideLathe
StandardXZArcs
XsAreRadiiF {Changed - JHE 2/22}
SetFlood
SetMaxRPM('8000')
IF Metric?
SetMaxFeed('12700')
SetArcSegmentAccuracy('.0127') {Added - JHE}
ELSE
SetMaxFeed('500')
SetArcSegmentAccuracy('.0005') {Changed from .001 - JHE}
END
Save# Num#('1') Num#('0') { xOpEP }
Save# Num#('2') Num#('0') { yOpEP }
Save# Num#('3') Num#('0') { zOpEP }
Save# Num#('4') Num#('0') { cOpEP }
SetFlagF('1') { Milling dShiftOnly SepSubs deactivated }
SetFlagF('9') { For valid Drill Rotation Sub }
SetFlag('10') {True for Fanuc Control with Standard G-codes}
{False for Fanuc Control with Special G-codes}
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
END
RETURN
initOp:
EOR EOL
ProgID1
IF UseComments? AND ProgramNameComment?
'( ' ProgramName$ ' )'
END
EOL
IF UseComments?
IF ProgramComment?
'( ' ProgramComment$ ' )' EOL
END
IF FormatNameComment?
'( FORMAT, ' FormatName$ ' )' EOL
END
IF TimeComment?
'( ' Date$ ' AT ' Time$ ' )' EOL
END
IF MovesComment?
'( OUTPUT IN ABSOLUTE INCHES )' EOL
END
END
OpenSub
restoreScale
RETURN
firstOp1:
StockOff
SetHome
doOpComments
doPostScript
checkPass
IF ToolChangeAtHome?
SeqLabC Rapid Home EOL
END
SeqLab OpToolID '00' EOL
IF TurningOp?
SeqLabC 'M46' EOL { C-Axis Connection Cancel - Turning Mode }
IF Flag?('10') {IF Standard G-codes}
SeqLabC 'G99' EOL { Inches Per Revolution }
ELSE {Special G-codes}
SeqLabC 'G95' EOL { Inches Per Revolution }
END
IF ConstantSurfaceFeed?
SeqLabC Preset MaxRPM EOL
SeqLabC CSSOff 'G97' CalcRPM1 doSpinOn EOL
ELSE
SeqLabC CSSOff 'G97' Speed doSpinOn EOL
END
ELSE
SeqLabC 'M45' EOL { C-Axis Connection On - Milling Mode }
IF Flag?('10') {IF Standard G-codes}
SeqLabC 'G98' EOL { Inches Per Minute }
ELSE {Special G-codes}
SeqLabC 'G94' EOL { Inches Per Minute }
END
SeqLabC Rapid 'G28H0.' EOL { C-Axis Zero Reference Return }
TrackCNO# Num#('0')
SeqLabC CSSOff 'G97' Speed doSpinOn EOL
END
RETURN
turnApproach:
RapidF# { RapidF# Forces FeedRate }
IF ApproachOD?
SeqLabC StockOff Rapid ThisOpEntryXCP
ELSE
IF ApproachID?
SeqLabC StockOff Rapid XOpCD
ELSE {ApproachFace}
SeqLabC stockOnNoCan Rapid XSP
END
END
StockOff ThisOpEntryZCP OpToolID LatheOffset CoolOn EOL
RETURN
turnApproachSP:
IF ApproachFace?
SeqLabC stockOnNoCan XSPC EOL
SeqLabC StockOff ZOpCPC EOL
stockOnNoCan
IF NotEqual? CycleStartZ# ZOpCP#
SeqLabC feedNoCan ZSPC feedRateNoCan EOL
END
ELSE { OD/ID Approach }
SeqLabC stockOnNoCan ZSPC EOL
SeqLabC StockOff XOpCDC EOL
stockOnNoCan
IF NotEqual? CycleStartX# XOpCD#
SeqLabC feedNoCan XSPC feedRateNoCan EOL
END
END
IF ConstantSurfaceFeed? AND NOT SameTool?
SeqLabC CSSOn 'G96' Speed EOL
END
RETURN
millApproach:
RapidF# { RapidF# Forces FeedRate }
IF FaceTool?
IF RotaryMill?
SeqLabC stockOn Rapid XSP {*'Y0.'*} StockOff ThisOpEntryZCP CalcSCAng MoveC
{*TrackYNO# SPY#*}
ELSE
SeqLabC stockOn Rapid XSP {*MoveSY*} StockOff ThisOpEntryZCP CalcSCAng MoveC
END
ELSE {implies OD Tool}
IF RotaryMill?
SeqLabC StockOff Rapid ThisOpEntryXCP {*'Y0.'*} ThisOpEntryZCP CalcSCAng MoveC
{*TrackYNO# SPY#*}
ELSE
SeqLabC StockOff Rapid ThisOpEntryXCP {*MoveSY*} ThisOpEntryZCP CalcSCAng MoveC
END
END
OpToolID LatheOffset CoolOn EOL
TrackYNO# SPY# {Moved to here - JHE}
RETURN
millApproachSP:
IF FaceTool?
IF RotaryMill?
IF SameTool?
SeqLabC stockOn Rapid XSP {*'Y0.'*} CalcSCAng MoveC EOL
TrackYNO# SPY#
ELSE
SeqLabC StockOn RapidC XSPC MoveSYC CalcSCAng MoveCC EOL
END
ELSE
IF SameTool?
SeqLabC stockOn Rapid XSP {*MoveSY*} CalcSCAng MoveC EOL
ELSE
SeqLabC stockOn RapidC XSPC MoveSYC CalcSCAng MoveCC EOL
END
END
setAngleUnder360
IF Milling?
SeqLabC StockOff ZOpCPC EOL
END
ELSE {implies OD Tool}
IF RotaryMill?
IF SameTool?
SeqLabC StockOn Rapid {*'Y0.'*} ZSP CalcSCAng MoveC EOL
TrackYNO# SPY#
ELSE
SeqLabC StockOn RapidC MoveSYC ZSPC CalcSCAng MoveCC EOL
END
ELSE
IF SameTool?
SeqLabC StockOn Rapid {*MoveSY*} ZSP CalcSCAng MoveC EOL
ELSE
SeqLabC StockOn RapidC MoveSYC ZSPC CalcSCAng MoveCC EOL
END
END
setAngleUnder360
IF Milling?
SeqLabC StockOff XOpCDC EOL
END
END
StockOn
RETURN
newToolOp1: {Finish off last Operation}
StockOff
checkRapid
IF LAST ApproachOD?
SeqLabC LAST OpExitXCPC EOL
ELSE
IF LAST ApproachID?
SeqLabC LAST XOpECDC EOL
END
END
SeqLabC LAST OpExitZCPC EOL
RETURN
newToolOp2:
doEndOpPS
SeqLabC CoolOff EOL
IF LAST TurningOp?
IF LAST ConstantSurfaceFeed?
SeqLabC CSSOff 'G97' CalcRPM2 EOL
END
IF ToolChangeAtHome?
SeqLabC NewHome EOL
END
IF NOT TurningOp?
SeqLabC SpinOff EOL
END
ELSE
SeqLabC SpinOff EOL
END
SeqLabC LAST OpToolID '00' EOL
IF LAST ProgStop?
SeqLabC 'M0' EOL
ELSE
SeqLabC ProgStop EOL
END
RETURN
newToolOp3: {Start new Operation}
doOpComments
doPostScript
checkPass
SeqLab OpToolID '00' EOL
IF TurningOp?
IF LAST NOT TurningOp?
SeqLabC 'M46' EOL { C-Axis Connection Cancel - Turning Mode }
IF Flag?('10') {IF Standard G-codes}
SeqLabC 'G99' EOL { Inches Per Revolution }
ELSE {Special G-codes}
SeqLabC 'G95' EOL { Inches Per Revolution }
END
END
IF ConstantSurfaceFeed?
SeqLabC Preset MaxRPM EOL
SeqLabC CSSOff 'G97' CalcRPM1 doSpinOn EOL
ELSE
SeqLabC CSSOff 'G97' Speed doSpinOn EOL
END
ELSE
IF LAST TurningOp?
SeqLabC 'M45' EOL { C-Axis Connection On - Milling Mode }
IF Flag?('10') {IF Standard G-codes}
SeqLabC 'G98' EOL { Inches Per Minute }
ELSE {Special G-codes}
SeqLabC 'G94' EOL { Inches Per Minute }
END
SeqLabC 'G28H0.' EOL { C-Axis Zero Reference Return }
TrackCNO# Num#('0')
END
SeqLabC CSSOff 'G97' Speed doSpinOn EOL
END
RETURN
sameToolOp1:
StockOff
doOpComments
checkRapid
checkPass
IF ApproachOD?
IF LAST ApproachOD?
SeqLabC LAST XOpECDC EOL
ELSE {around}
IF LAST ApproachID?
SeqLabC LAST XOpECDC EOL
END
SeqLabC LAST OpExitZCPC EOL
SeqLabC LAST OpExitXCPC EOL
END
ELSE
IF ApproachID?
IF LAST ApproachID?
SeqLabC LAST XOpECDC EOL
ELSE
IF LAST ApproachOD? {around}
SeqLabC LAST OpExitXCPC EOL
END
SeqLabC LAST OpExitZCPC EOL
SeqLabC XOpCDC EOL
END
ELSE {ApproachFace}
IF LAST ApproachFace?
SeqLabC LAST ZOpECPC EOL
ELSE
IF LAST ApproachOD? {around}
SeqLabC LAST OpExitXCPC EOL
ELSE {LAST ApproachID}
SeqLabC LAST XOpECDC EOL
END
SeqLabC LAST OpExitZCPC EOL
END
END
END
RETURN
sameToolOp2:
doEndOpPS
IF LAST ProgStop?
SeqLabC 'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
END
IF NewToolOffset?
SeqLabC OpToolID '00' EOL
SeqLabC OpToolID LatheOffset EOL
END
IF TurningOp?
IF LAST ProgStop?
IF ConstantSurfaceFeed?
SeqLabC Preset MaxRPM EOL
SeqLabC CSSOn 'G96' Speed SpinOn EOL
ELSE
SeqLabC CSSOff 'G97' Speed SpinOn EOL
END
SeqLabC CoolOn EOL
ELSE
IF ConstantSurfaceFeed?
IF LAST ConstantSurfaceFeed?
IF NotEqual? MaxRPM# LAST MaxRPM#
SeqLabC Preset MaxRPM EOL
END
IF NotEqual? SpeedRPM# LAST SpeedRPM#
SeqLabC 'G96' Speed EOL
END
ELSE
SeqLabC Preset MaxRPM EOL
SeqLabC CSSOn 'G96' Speed EOL
END
ELSE
IF LAST ConstantSurfaceFeed?
SeqLabC CSSOff 'G97' Speed EOL
ELSE
IF NotEqual? SpeedRPM# LAST SpeedRPM#
SeqLabC 'G97' Speed EOL
END
END
END
IF LAST ProgStop?
{Moved output up - JHE}
ELSE
IF NOT CoolOff? AND LAST CoolOff?
SeqLabC CoolOn EOL
END
END
END
END
doPostScript
RETURN
endOp1: {finish last operation}
StockOff
IF ApproachOD?
SeqLabC Rapid OpExitXCP EOL
SeqLabC OpExitZCPC EOL
ELSE
IF ApproachID?
SeqLabC Rapid XOpECD EOL
SeqLabC OpExitZCPC EOL
ELSE {implies ApproachFace}
SeqLabC Rapid OpExitZCP EOL
END
END
RETURN
endOp2:
doEndOpPS
SeqLabC CoolOff EOL
IF TurningOp?
IF ConstantSurfaceFeed?
SeqLabC CSSOff 'G97S' CalcEPRPM# EOL
END
END
IF ToolChangeAtHome?
SeqLabC FirstHome SpinOff EOL
ELSE
SeqLabC SpinOff EOL
END
SeqLabC OpToolID '00' EOL
IF ProgStop?
SeqLabC 'M0' EOL
END
RETURN
endOp3:
SeqLabC EOP EOL
Post
EOR EOL
Close
Retag
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
{Start of executable Prog, Top Level ******************************}
progStart
EachOp
GetLCycle
IF FirstOperation?
initOp
firstOp1
IF TurningOp?
turnApproach
turnApproachSP
ELSE
millApproach
millApproachSP
END
ELSE
IF NewTool?
newToolOp1
newToolOp2
newToolOp3
IF TurningOp?
turnApproach
turnApproachSP
ELSE
millApproach
millApproachSP
END
ELSE
sameToolOp1
sameToolOp2
IF TurningOp?
turnApproachSP
ELSE
millApproachSP
END
END
END
opGuts
NextOp
endOp1
endOp2
endOp3
Wyszukiwarka
Podobne podstrony:
Fanuc 16T [VG] SML800 17 3mFanuc 16T [VG] YSML800 17 3mFanuc 16T [VG] YSML800 17 3Fanuc 6M [SM] PM956 17 3Fanuc 10M Kit PM028 17 3Fanuc 10M Takasawa RM365 17 5Fanuc 16T MS [AM] L615 85 2Fanuc 0M [NM] PMZ26 17 3Fanuc 16T MS [ IN] L443 85Fanuc 16T MS [ ] L314 85mFanuc 16T MS [ MM] L771 85Fanuc 18T0 [LTC] YIML821 17 1Fanuc 16T MS [ BM] L425 85 1Fanuc 16T MS [FD] L389 82 2Fanuc 0M [NM] PMZ26 17 3mFanuc 11M [JBT] RM142 17 5więcej podobnych podstron