Seikos 3 HS VMC40 NCU97 16


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

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

{9/24/92
Copied & modified: Fanuc 10M [PP] M451.81.2
For: B&C
Customer documentation was poor, and the new information that was added to the end of the
prog was moved down below the 'M99' command.
KM}

{8/18/93
Modified: Seikos M2 HS [BC] M517.81.3
For: B&C
Changes made per conversations with Rick Parks at B&C
Updated to Version 4.1 per Fanuc 6M M001.81.2 Format.
Changed Tap Cycle from G84 to G841 in Composts Drill Cycles Dialog.
This is Direct Rigid Tapping.
Added PostScript OptionalCycle1 for G84 Canned Tap Cycle at Drilling.
Modified output of WorkFixtureOffsets for MultipleParts at OpenMP.
Configured to output following values, (read from left to right):
G54 G55 G56 G57 G58 G59
G540 G550 G560 G570 G580 G590
G541 G551 G561 G571 G581 G591
G542 G552 G562 G572 G582 G592
G543 G553 G563 G573 G583 G593
G544 G554 G564 G574 G584 G594
G545 G555 G565 G575 G585 G595
G546 G556 G566 G576 G586 G596
G547 G557 G567 G577 G587 G597
G548 G558 G568 G578 G588 G598
G549 G559 G569 G579 G589 G599
DWB}

{9/28/95, Updated Seikos M2 HS [B&C] M517.81.4 to .85 format per Fanuc 6M M001.85.01.03, JR}
{2/9/96, created B style Advanced Mill Version per Fanuc 6M (FW) B001.10.02, JR}

{2/13/96
Initial: Seikos M2 HS [B&C] B517.10.02
Created: Seikos M3 HS [SKS] Bxxx.10.02
ForUser: SKS Machining
Control: Seikos M3
Machine: Hitachi Seiki VK45 with Yuasa Indexer
Develop: ComPost 4.21.33, Catalyst68K v3.0C
Comment: New Processor per marked up readout from Patrick Smolarek.
Deleted literal 'M0' from beginning of program.
Changed literal 'X0Y0' at beginning of first tools to StrtPos.
Changed SpinOn to GetSpinOn.
Outputs M13 for SpinOn and CoolOn.
Outputs M3 if CoolOn was not specified.
Deleted CoolOn except where needed in SameTool.
Added literal 'M123' at end of tools.
Does a full spindle retract
Turns off the spindle
Turns off the coolant
Changed EOP output from M99 to M30.
Indewxer is commanded by M code 70
Combined CSAngleA & CSAngleB
Jim Radcliffe}

{2/16/96, Updated .10 to .11 version
Fixed taping cycles pre customer
removed M15 & g91 line per customer.
JM}

{3/25/96, Tested ZOnlyRepAutoCycle, Changed version # to .12, MPK}
{4/3/96,
Initial: Seikos M3 HS [SKS] B932.12
Created: Seikos M3 HS [SKS] B932.12.1
Changed tapping cycle (not rigid) to G81, as per customer fax, MPK}
{4/4/96
Initial: Seikos M3 HS [SKS] B932.12.1
Created: Seikos M3 HS [SKS] B932.12.2
Undid my earlier change, added Cycle to drilling section, changed IF Tap? AND OpCyc1? to IF RigidTap?, MPK}

{1/21/98
Initial: Seikos M3 HS [SKS] B932.12.2
Created: Seicos Lamda 10M Bxxx.12
ForUser: Metric Precision & Machine & Eng., Inc.
Control: Hitachi Seiki Seicos Lamda 10M
Machine: Hitachi Seiki Seicos VM50
Develop: ComPost2 1.1b3, Virtual 4.21.21
Comment: New processor per fax and conversation with Bill Voelzke
Moved GetSpinOn to StrtPos line.
Moved CSAngleAB to line by itself after StrtPos line.
Changed M123 to IncValue OfstOff which outputs G91G30Z0
Deleted UnTool from end of program.
Added subs and calls AbsValueC, IncValueC and AbsOrIncC.
Updated per Fanuc 6M (FW) B001.12.08
Jim Radcliffe}

{10/7/98
Initial: Seikos 10M Lamda [MP] BV03.12
Created: Siekos 3 HS VMC40 NCU97.16
ForUser: CNC Industries
Control: Siekos III
Machine: Hitachi Seiki VMC40
Develop: Compost2 v1.6b8, Virtual 4.29.63
Comment: New processor per marked up readout from Kurt Wendhack
Updated and changed per Fanuc 6M [PW] NCU99.16
Jim Radcliffe}

{Prog Numeric Format Definitions ****}

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(CSOffsetA#,3)
FORMAT(CSOffsetB#,3)
FORMAT(ToolDiameter#,4)
FORMAT(CSOffsetX#,4)
FORMAT(CSOffsetY#,4)
FORMAT(CSOffsetZ#,4)
FORMAT(TrackXNO#,4)
FORMAT(TrackYNO#,4)
FORMAT(TrackZNO#,4)
FORMAT(TrackZ#,4)
FORMAT(Recall#,5)
FORMAT(ADD#,5)
FORMAT(CS#,5)
FORMAT(PartNum#,5)
FORMAT(Program#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
FORMAT(RapidF#,7)

{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

cSPartNum#:
ADD# CS# MUL# NumOfCS# SUB# PartNum# Num#('1')
RETURN

cSWFO:
'G' ADD# cSPartNum# Num#('53')
RETURN

wFO:
'G' ADD# PartNum# Num#('53')
RETURN

wFOStuff:
IF Flag?('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF NOT SameTool?
IF WFOCS?
cSWFO
ELSE
IF MultipleParts? AND WorkFixtureOffsets?
wFO
ELSE
WFO1
END
END
ELSE
IF WFOCS?
IF ChangeCS?
cSWFO
END
END
END
END
SetFlagF('2') { Do not output WFO second time wFOStuff is called for MP-WFO-OTAP-ECP }
RETURN

cSG52:
SeqC 'G52X' CSOffsetX# 'Y' CSOffsetY# 'Z' CSOffsetZ# EOL
RETURN

g52Stuff:
IF NOT Flag?('7') AND NOT WFOCS?
IF FirstOperation? OR NewTool? OR ChangeCS?
IF MultipleParts?
IF WorkFixtureOffsets?
cSG52
END
ELSE
cSG52
END
END
END
RETURN

doCSComment:
'( CS#' CS# ' - ' CSComment$ ' )' EOL
RETURN

doCSWFOComment:
IF FirstOperation? OR NewTool? OR ChangeCS?
'( ' cSWFO ' = X' CSOffsetX# ' Y' CSOffsetY# ' Z' CSOffsetZ#
IF Flag?('6') { TRUE = B-Style Output, FALSE = C-Style Output }
IF AAxisAvail?
' A' CSOffsetA#
END
IF BAxisAvail?
' B' CSOffsetB#
END
END
' )' EOL
IF NOT Flag?('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
SetFlag('2') { Need to output wFOStuff }
END
END
RETURN

cSComments:
doCSComment
IF WFOCS?
doCSWFOComment
END
RETURN

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

doCycleComment:
IF UseComments? AND SubComment?
'( CYCLE START )' 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
cSComments
END
RETURN

cSAngleA:
IF AAxisAvail?
IF Flag?('6') AND WFOCS? { TRUE = B-Style Output, FALSE = C-Style Output }
'A0.'
ELSE
IF FirstOperation?
FORMAT(ADD#,3)
'A' ADD# CSOffsetA# Num#('3') { single direction positioning 1st move }
SetFlag('21')
FORMAT(ADD#,5)
ELSE
IF GreaterThan? CSOffsetA# LAST CSOffsetA#
FORMAT(ADD#,3)
'A' ADD# CSOffsetA# Num#('3') { single direction positioning 1st move }
SetFlag('21')
FORMAT(ADD#,5)
ELSE
'A' CSOffsetA#
END
END
END
END
RETURN

cSAngleA2C: { single direction positioning 2nd move }
IF Flag?('21')
'A' CSOffsetA#
SetFlagF('21')
END
RETURN

cSAngleAC:
IF AChange?
cSAngleA
END
RETURN

cSAngleB:
IF BAxisAvail?
IF Flag?('6') AND WFOCS? { TRUE = B-Style Output, FALSE = C-Style Output }
'B0.'
ELSE
'B' CSOffsetB#
END
END
RETURN

cSAngleBC:
IF BChange?
cSAngleB
END
RETURN

pSInit:
NewWFOF
FourthCWF
FourthCCWF
FifthCWF
FifthCCWF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN

pSStuff:
RETURN

doPostScript:
pSInit
EachPS
SeqC PostScript EOL
pSStuff
NextPS
RETURN

doEndOpPS:
pSInit
EachEOPS
SeqC EndOpPS EOL
pSStuff
NextPS
RETURN

loadPRIMEZCP2:
IF NOT Flag?('7')
LoadFeat Num#('0') Num#('0') PRIME ClearancePlane2#
ELSE
LoadFeat Num#('0') Num#('0') ADD# CSOffsetZ# PRIME ClearancePlane2#
END
RETURN

pRIMEZCP2:
IF NOT Flag?('7')
PRIME ZCP2
ELSE
'Z' TrackZ# ADD# CSOffsetZ# PRIME ClearancePlane2#
END
RETURN

loadPRIMEZCP3:
IF NOT Flag?('7')
LoadFeat Num#('0') Num#('0') PRIME ClearancePlane3#
ELSE
LoadFeat Num#('0') Num#('0') ADD# CSOffsetZ# PRIME ClearancePlane3#
END
RETURN

pRIMEZCP3:
IF NOT Flag?('7')
PRIME ZCP3
ELSE
'Z' TrackZ# ADD# CSOffsetZ# PRIME ClearancePlane3#
END
RETURN

connectC:
IF FeedConnect?
FeedC
ELSE
RapidC
END
RETURN

absValueC:
IF NOT AbsValue?
AbsValue
END
RETURN

incValueC:
IF AbsValue?
IncValue
END
RETURN

absOrIncC:
IF AbsoluteMoves?
absValueC
ELSE
incValueC
END
RETURN

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

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

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

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

formatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXYZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
RETURN

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

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

doPeck: { longDrillStuff }
IF GreaterThan? SUB# Recall# Num#('3') Peck# SPZ# { IF OldZ - Peck# > Depth }
Save# Num#('3') SUB# Recall# Num#('3') Peck# { Save New Peck Depth }
SeqC Feed 'Z' Recall# Num#('3') FeedEntC EOL { Move to New Peck Depth }
Rapid
IF PeckFullRetract?
SeqC ZCP2 EOL { Retract Tool Full Out }
END
FORMAT(ADD#,4)
SeqC 'Z' ADD# Recall# Num#('3') Retract# EOL { Move to Retract Position }
TrackZNO# ADD# Recall# Num#('3') Retract# { Update Status Register }
FORMAT(ADD#,5)
END
RETURN

drillFeature: { longDrillStuff }
SeqC RapidC MoveSXYC EOL
SeqC ZCP2C EOL
IF Peck?
FORMAT(Recall#,4)
Save# Num#('3') ClearancePlane2#
doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck
doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck
doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck
doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck
doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck
doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck
doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck
doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck
doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck
doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck
FORMAT(Recall#,5)
END
SeqC FeedC MoveSZC FeedEntC EOL
IF Dwell?
SeqC 'G4X' Dwell# EOL
END
IF FIFO? OR Tap?
SeqC FeedC ZCP2C EOL
IF RetractToCP1?
SeqC RapidC ZCP1C EOL
END
ELSE
IF RetractToCP1?
SeqC RapidC ZCP1C EOL
ELSE
SeqC RapidC ZCP2C EOL
END
END
RETURN

toolPath:
EACHFeat
IF PointFeat? { Drilling Only }
SeqC MoveSXYZC EOL
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqC ckCRC RapidC MoveXYZC ckCRCNum EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
SeqC ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL
END
ELSE
IF ArcFeat?
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
SeqC formatArc ArcFeedC EOL
NEXTQuadrant
END
END
END
END
NEXTFeat
RETURN

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

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

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

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

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

drilling:
SeqC DrillCP EOL
GetCycle
SeqC
IF RigidTap?
'G841'
ELSE
Cycle
END
FromCP StrtPos ZDepth RLevel Dwell Peck Retract FeedEnt EOL
TrackZNO# FIRST SPZ# {.81.2}
toolPath
setDrillEndOpZ
SeqC DrillOff EOL
SeqC RapidC ZCP3C EOL
RETURN

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

checkPass: {use the correct StrtPos}
IF AutoCycle?
SetPass2
ELSE
SetPass1
END
IF NOT Flag?('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
ClearCSOffset
END
RETURN

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

progStart:
InitProg
ReverseXZArcs
InitWFONum
SetFlood
SetMaxRPM('10000')
IF Metric?
SetMaxFeed('12700')
ELSE
SetMaxFeed('500')
END
Save# Num#('1') Num#('0') { MultipleParts Current Tool FirstOp# }
Save# Num#('2') Num#('0') { MultipleParts ToolOp# Counter }
Save# Num#('3') Num#('0') { LongHand PeckCycle }
SetFlagF('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
SetFlag('3') { Incrementing WFOs in effect }
SetFlag('4') { This post supports IncWFO/DecWFO }
SetFlagF('6') { TRUE = B-Style Output, FALSE = C-Style Output }
SetFlagF('7') { TRUE = D-Style Output }
SetFlag('8') { TRUE = D-Style Output, FALSE = Local G52-WFO Coordinates }
SetFlagF('21') { single direction positioning of A axis }
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
END

IF NOT Flag?('7')
IF Equal? NumOfCS# Num#('1') { 3 Axis Part - Output M-Style }
SetFlag('7')
ELSE
IF MultipleParts?
IF WorkFixtureOffsets?
IF LTEqual? MUL# Parts# NumOfCS# Num#('6')
SetWFOCS { use WFO for CS changes }
ELSE
IF Flag?('8')
SetFlag('7')
END
IF UseComments?
'( Not enough Work Fixture Offsets to handle this part. )' EOL
'( Number of parts [ ' Parts# ' ] times CSs [ ' NumOfCS# ' ] )' EOL
'( exceeds the machine limit. Switching to '
IF Flag?('7')
'non'
ELSE
'G52'
END
'-wfo style output. )' EOL
END
END
ELSE
SetFlag('7')
END
ELSE
IF LTEqual? NumOfCS# Num#('6') {****}
SetWFOCS { use WFO for CS changes }
ELSE
IF Flag?('8')
SetFlag('7')
END
IF UseComments?
'( Not enough Work Fixture Offsets to handle this part. )' EOL
'( Number of CSs [ ' NumOfCS# ' ] exceeds the machine limit. )' EOL
'( Switching to '
IF Flag?('7')
'non'
ELSE
'G52'
END
'-wfo style output. )' EOL
END
END
END
END
END
RETURN

initOp:
EOR EOL
ProgID1
IF UseComments? AND ProgramNameComment?
'( ' ProgramName$ ' )'
END
EOL
EachOp
IF FirstOperation?
IF ToolChangeAtHome?
SetHome
END
END
NextOp
SeqC Rapid AbsValue DrillOff CRCOff 'G61' EOL
SeqC CoolOff EOL
SeqC IncValue OfstOff 'M19' EOL
SeqC 'G28X0Y0' EOL
IF AAxisAvail?
SeqC 'G28A0' EOL
SeqC AbsValue 'G921A0' EOL {Preset}
END
IF UseComments?
IF ProgramComment?
'( ' ProgramComment$ ' )' EOL
END
IF FormatNameComment?
'( FORMAT: ' FormatName$ ' )' EOL
END
IF TimeComment?
'( ' Date$ ' AT ' Time$ ' )' EOL
END
IF MovesComment?
'( OUTPUT IN ' MoveType$ ' INCHES )' EOL
END
IF PartsComment?
'( PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
'( FIRST TOOL NOT IN SPINDLE )' EOL
END
END
restoreScale
RETURN

firstOp1:
doPartCycleComment
doOpComments
Seq OpToolID ToolChng EOL
doPostScript
RETURN

firstOp2:
SeqC PreTool CoolOn EOL
g52Stuff
SeqC Speed SpinOn 'G61' EOL
checkPass
SeqC AbsOrInc Rapid wFOStuff Plane StrtPos cSAngleA cSAngleB EOL
SeqC cSAngleA2C EOL
RETURN

firstOp3:
SeqC OfstOn EOL
RETURN

newToolOp1:
SeqC CoolOff EOL
SeqC incValueC OfstOff 'M19' EOL
RETURN

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

newToolOp3: {Start new Operation}
firstOp1
RETURN

newToolOp4:
firstOp2
RETURN

newToolOp5:
firstOp3
RETURN

sameToolOp1:
doEndOpPS
IF LAST ProgStop?
SeqC CoolOff EOL
SeqC incValueC OfstOff SpinOff EOL
SeqC 'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF NewToolOffset? OR AChange? OR BChange?
SeqC incValueC OfstOff EOL
END
END
RETURN

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

sameToolOp3: {Start new Operation}
g52Stuff
IF LAST ProgStop?
SeqC AbsOrInc Rapid wFOStuff PlaneC StrtPos cSAngleA cSAngleB SpeedC SpinOn EOL
SeqC cSAngleA2C EOL
SeqC OfstOn EOL
SeqC CoolOn EOL
ELSE
SeqC AbsOrInc Rapid wFOStuff PlaneC StrtPos cSAngleA cSAngleB SpeedC EOL
SeqC cSAngleA2C EOL
IF NewToolOffset? OR AChange? OR BChange?
SeqC OfstOn EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqC CoolOn EOL
END
END
RETURN

end1:
SeqC CoolOff EOL
SeqC incValueC OfstOff 'H0M19' EOL
RETURN

end2:
doEndOpPS
IF FIRST ToolChangeAtHome? {added FIRST modifier}
SeqC absOrIncC Rapid PRIME FirstHome EOL
ELSE
SeqC incValueC 'G28X0Y0' EOL
END
SeqC absOrIncC EOL
SeqC UnTool ToolChng EOL
IF Equal? CSOffsetA# Num#('0') AND Equal? CSOffsetB# Num#('0')
ELSE
SeqC absOrIncC
IF AAxisAvail?
cSAngleA
END
IF BAxisAvail?
cSAngleB
END
EOL
SeqC cSAngleA2C EOL
SeqC 'G921' {Preset}
IF AAxisAvail?
'A0'
END
IF BAxisAvail?
'B0'
END
EOL
END
IF ProgStop?
SeqC 'M0' EOL
ELSE
IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart?
SeqC ProgStop EOL
END
END
RETURN

end3:
SeqC EOP EOL
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}
IF FirstOperation? OR EquallySpacedOffsets?
SetFlag('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
END
IF FirstOperation?
firstOp1
firstOp2
firstOp3
ELSE
IF NewTool?
newToolOp1
newToolOp2
newToolOp3
newToolOp4
newToolOp5
ELSE {implied SameTool?}
sameToolOp1
sameToolOp2
sameToolOp3
END
END
opGuts
RETURN

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

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

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

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

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

{finish last operation}
end1
end2
RETURN

newPart1: {Finish off last Part}
IF FullUp?
SeqC CoolOff EOL
SeqC incValueC OfstOff EOL
END
{doEndOpPS}
RETURN

newPart2: {Start new Part}
sameToolOp2
RETURN

newPart3: {Start new Part}
SetFlag('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
g52Stuff
SeqC AbsOrInc Rapid wFOStuff PlaneC StrtPos cSAngleA cSAngleB Speed EOL
SeqC cSAngleA2C EOL
IF FullUp?
SeqC OfstOn EOL
SeqC CoolOn EOL
END
RETURN

toggleIncDecWFO:
IF Flag?('3') { Incrementing WFOs in effect }
SetFlagF('3')
ELSE { Decrementing WFOs in effect }
SetFlag('3')
END
RETURN

mPLoop:
Save# Num#('2') Recall# Num#('1')
IF WorkFixtureOffsets?
IF Flag?('3') { Incrementing WFOs in effect }
NewWFO
ELSE
LastWFO
END
EachWFO
ELSE
EachPart
END
IF AllToolsOnePart?
EachOp
masterSub
NextOp
endPartSub
ELSE { OneToolAllParts }
EachOp
IF Equal? Operation# Recall# Num#('2') { Valid Tool Op }
IF FirstOperation? OR NewTool?
IF FirstPart? AND Flag?('3') { Incrementing WFOs in effect }
masterSub
ELSE
IF LastPart? AND NOT Flag?('3') { Decrementing WFOs in effect }
masterSub
ELSE
newPart1
newPart2
newPart3
opGuts
END
END
ELSE
masterSub
END
IF LastOp?
IF LastPart? AND Flag?('3') { Incrementing WFOs in effect }
Save# Num#('1') Num#('0')
ELSE
IF FirstPart? AND NOT Flag?('3') { Decrementing WFOs in effect }
Save# Num#('1') Num#('0')
END
END
Save# Num#('2') Recall# Num#('1')
ELSE
IF NEXT SameTool?
Save# Num#('2') NEXT Operation#
ELSE
IF LastPart? AND Flag?('3') { Incrementing WFOs in effect }
Save# Num#('1') NEXT Operation#
Save# Num#('2') Num#('0')
ELSE
IF FirstPart? AND NOT Flag?('3') { Decrementing WFOs in effect }
Save# Num#('1') NEXT Operation#
Save# Num#('2') Num#('0')
ELSE
Save# Num#('2') Recall# Num#('1')
END
END
END
END
END
NextOp
END
IF WorkFixtureOffsets?
IF Flag?('3') { Incrementing WFOs in effect }
IncWFO
NextWFO
DecWFO
ELSE { Decrementing WFOs in effect }
DecWFO
NextPrevWFO
IncWFO
END
IF Flag?('4') { This post supports IncWFO/DecWFO }
toggleIncDecWFO
END
ELSE
NextPart
END
RETURN

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

progStart {setup and initializations}
initOp

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


Wyszukiwarka

Podobne podstrony:
Seikos M3 HS [ADB] DU47 16
Seikos M3 HS [ADB] NBQ48 16
Seikos 2 HS M201 89m
Seikos HS 20SII [IS] L708 85
Seikos HS 20SII [ ] L699 85
Fanuc 6M HS [CG] MQ22 16
Seikos M3 HS [ADB] BU47 15
Seikos M2 HS [B&C] M517 89
Seikos M2 HS [B&C] B517 12 09
Seikos M2 HS [FB] M451 76 1
Seikos M2 HS [FB] M451 89

więcej podobnych podstron