Tosnuc 888M Tsh [OT] NCQ31 16 2


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

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

{8/11/89, Updated processor JR}
{8/31/89, Added PostScript, JR}
{12/1/89, Updated: Fanuc 11M M007.61, JR}

{2/7/90, Updated to Version 3.2 per Fanuc 6M M001.70 Format, DWB}

{7/24/90, Added InitProg globally to posts with this remark, DWB}
{7/24/90, Replaced all occurances of SetSRXYZero with SetSRXYtoSP, DWB}
{9/28/90, Updated: Fanuc 11M M007.71 to .76.1 format, JR}

{10/23/90
Copied & modified: Fanuc 11M M007.76.1
For: Chndler Evans (Colt Ind.)
Machine: Matsuura/Beaver Mill
Change G70 to G20 at prog start-up.
Add AbsOrInc command to wFO line.
Add line at beginning of 1st tool: /G91G28X0.Y0.Z0.M19
Change tool change position to: /G91G28X0.Y0.M19
Jim Radcliffe}

{11/11/91
Modified: Fanuc 11M Matsuura M353.81
For: Chandler Evans
Removed wrongly placed 'END' in IF SameTool? Section after the IF NewToolOffset?
Kim Michelman}

{
Format: Fanuc 11M Matsuura C353.00
1/25/95
Updated to C Style post per C001.05
TH}

{ Added ClearCSOffset to subCSMP TH}

{8/23/95 - Updated to .10 format TH}

{1/17/96, Updated .10 to .11 version, MPK}

{3/25/96, Tested zonlyRepAutoCycle, Changed version # to .12, MPK}

{5/9/97
Updated: Fanuc 11M Matsuura C353.12
Created: Fanuc 11M Matsuura C353.15
For: Gibbs & Associates/AM Precision
Versions: Catalyst v3.33C/ComPost2 MSL 68K
Changes made per Pete Jackson and EMail dated 5/7/97
Updated for Catalyst v3.33C per Fanuc 6M (PW) C001.15 Format
DWB}

{12/23/97,
Initial : Fanuc 11M Matsuura C353.15
Created: Fanuc 15M Mat [LM] CW83.15
Customer: Liberty Machine

Changes to "Form":

1. Under Arcs, changed I-J Max Arc Radius to 0.000.
2. Under Tool Offsets, changed Tool Length Offset Cancel from G28 to G30.

Changes to "Prog":

1. Changes to firstOp1, 2, & 3 to match the customer output.
2. Changes to newToolOp1, 2, 3, 4, & 5 to match the customer output.
3. Some changes to sameToolOp3 and added check so A or B be output only when moved.
4. Changes to end1 to match the customer output.
5. Changed FORMAT #2 & #3 to 3 decimal points.
6. Changed CSOffsetA# & CSOffsetB# Format to 3.
JHE}

{1/6/98,
Initial : Fanuc 15M Mat [LM] CW83.15
Created: Fanuc 15M Mat [LM] CW83.15.1
Customer: Liberty Machine

Changes to "Prog":

1. Added Var 1 & 2 to output the rotaries as Incremental values.
2. Added Var 3 & 4 to move the rotaries, at tape END, to the start position.
3. Added FORMAT to SUB#.
JHE}

{1/8/98,
Initial : Fanuc 15M Mat [LM] CW83.15.1
Created: Tosnuc 888M Tosh [LM] CW90.15
Customer: Liberty Machine

Changes to "Form":

1. Under General Info, changed Format Code to 10543 & Prog ID Lable to $.
2. Under Origin & Values, changed First Work Fixture Offset to H901 & Last to H999.
3. Under Subs, Changed Call Sub to G72, Return from Sub to M2, & Sub Call Lable to $.
4. Under Tool Offsets, changed Tool Length Offset Cancel to G44.

Changes to "Prog":

1. Changes to firstOp1 & 2 to match the customer output.
2. Changes to newToolOp1, 2, 3, & 4 to match the customer output.
3. Changes to sameToolOp1 & 3 to match the customer output.
4. Changes to end1 & 3 to match the customer output.
5. Changed Fixture Offset Code to G57H and Min Number to be 901.
6. Added 'G57' before SetWFO call.
7. Changed NumOfCS# from 6 to 99 (Fixture Offsets).
8. Added RepLab RepCycs in 5 SubCall lines.
10. Added EOR EOL after all SubEnd calls.
11. Replaced SubID, ProgID1, and all CallLab with '$' Program#.
12. Changed rotary Clamp/Unclamp codes from M21/M22.
JHE}

{1/15/98,
Initial : Tosnuc 888M Tosh [LM] CW90.15
Created: Tosnuc 888M Tosh [LM] CW90.15.1
Customer: Liberty Machine

Changes to "Form":

1. Under Arcs, un-checked Allow R-format Arcs.

Changes to "Prog":

1. Added Plane to first block & PlaneC to restart blocks.
JHE}

{11/16/98,
Initial: Tosnuc 888M Tosh [LM] CW90.15.1
Created: Tosnuc 888M Tosh [DM] Cxxx.15
For: Dimension Machine

Changes to Prog:
1) Deleted all G26 and G27 literals.
2) firstOp1 - Broke up safety start block into two lines.
Control can only handle 5 G-codes on a line.
CDH}

{03Mar99
Original: Tosnuc 888M Tosh [DM] CT41.15
Created: Tosnuc 888M Tshb [OT] NCQ31.16
For: Ort Tool
Changes made per: Jeff Burgard
Develop: Catalyst 5.05/ComPost2 1.7b15
NEW Post: FIRST Draft
Added Post Header Comment at the top of Prog.
Added Spaces between all commands.
Added Pretooling.
Changed to G87 Peck-Chip Cycle in MachSpec.
Added Custom Tapping Cycles.
Moved CoolOff to OpGuts.
Many other changes per phone conversation with Jeff Burgard.
Updated to C_Style Longhand Advanced Mill Post Per Fanuc 6M [PW] NCU99.16
Charles Winston}

{12Mar99
Original: Tosnuc 888M Tshb [OT] NCQ31.16
Created: Tosnuc 888M Tshb [OT] NCQ31.16.1
For: Ort Tool
Changes made per: Jeff Burgard
Develop: Catalyst 5.05/ComPost2 1.7b15
Added Formatting for Peck# and Retract# in Prog Numeric Format Definitions.
Changed ZCP3 to ZCP3C in exitMove AutoCycle Boolean
Added Boolean to suppress G80 in Drilling if SameTool is FALSE in following Operation.
Added Logic in Drilling to output a G23 Cycle.
Added Utility Data Instructions at InitProg on the Use of the G23 Cycle.
Deleted Program# at the start of initOp.
Added ' G173 W-3.' in firstOp2, NewToolOp4 and SameToolOp3.
Added Logic sameToolOp3 to suppress Speed and SpinOn.
Moved Deleted ckCRC and ckCRCNum from ToolPath at if ArcFeat. CRC cannot occur on Arcs.
Added a Boolean to force CRCOff in ToolPath on LastFeat.
Charles Winston}

{12Mar99
Original: Tosnuc 888M Tshb [OT] NCQ31.16.1
Created: Tosnuc 888M Tshb [OT] NCQ31.16.2
For: Ort Tool
Changes made per: Jeff Burgard
FIxed G23 Drill Cycle in ToolPath. Added a move to ZCP3 between each Cycle call.
Charles Winston}

{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(SUB#,3)
FORMAT(SPZ#,4)
FORMAT(EPZ#,4)
FORMAT(ZDepth#,4)
FORMAT(Peck#,4)
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(FeedEntIPR#,4)
FORMAT(Retract#,5)
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

doCoolOff:
IF NOT CoolOff?
IF NOT LastOp?
IF NEXT NOT SameTool?
CoolOff
END
ELSE
CoolOff
END
END
RETURN

ckCoolOFF:
IF MultipleParts?
IF AllToolsOnePart?
doCoolOff
ELSE {implied OneToolAllParts?}
IF FullUp?
doCoolOff
ELSE {implied ExitClearancePlane?}
IF LastPart?
doCoolOff
END
END
END
ELSE
doCoolOff
END
RETURN

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

cSWFO:
' G57 H' ADD# cSPartNum# Num#('900') {Changed 'G' and '53' - JHE 1/8}
RETURN

wFO:
' G57 H' ADD# PartNum# Num#('900') {Changed 'G' and '53' - JHE 1/8}
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
' G57' 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 ' G52 X' 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
' A' SUB# CSOffsetA# Recall# Num#('1')
END
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' SUB# CSOffsetB# Recall# Num#('2')
END
END
RETURN

cSAngleBC:
IF BChange?
cSAngleB
END
RETURN

doRotation:
IF AChange? OR BChange?
SeqC ' M11' EOL
SeqC Rapid IncValue cSAngleA cSAngleB EOL
SeqC ' M10' EOL
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 AbsOrIncC RapidC ZCP3C ckCoolOFF EOL
ELSE
IF FIFO?
SeqC AbsOrInc Feed ZCP3 FeedEnt
ELSE
SeqC AbsOrInc Rapid ZCP3
END
IF NOT Flag?('9')
ckCoolOFF
ELSE
SetFlagF('9')
END
EOL
END
RETURN

finishSub1:
SeqC CRCOffC
IF NOT FeedConnect?
loadPRIMEZCP3
IF ZMove?
IF AutoCycle?
pRIMEZCP3
SetFlagF('9')
ELSE
IF FIFO?
FeedC pRIMEZCP3 FeedEntC
ELSE
RapidC pRIMEZCP3
END
IF Flag?('9')
ckCoolOFF
END
END
ELSE
SetFlagF('9')
END
ELSE
SetFlagF('9')
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 }
{ not supported }
RETURN

drillFeature: { longDrillStuff }
{ not supported }
RETURN

toolPath:
ResetCRCNum
EACHFeat
IF PointFeat? { Drilling Only }
IF PosApproach? AND PeckFullRetract?
IF NOT FirstFeat?
SeqC Rapid ZCP3 EOL
SeqC MoveSXC MoveSYC EOL
SeqC Rapid ZCP2 EOL
SeqC Feed ' Z' ZDepth# EOL
SeqC ' G23 R' Peck# ' D' Retract# FeedEnt EOL
END
ELSE
SeqC MoveSXYZC EOL
END
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
IF LastFeat?
SeqC CRCOffC EOL
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?
Save# Num#('9') Num#('0')
EachRep
Save# Num#('9') Add# Recall# Num#('9') Num#('1') { Count up to the last Repeat }
doCycleComment
IF SPXMove? OR SPYMove?
SeqC connectC MoveSXYC EOL
END
IF FeedConnect?
entryMove
ELSE
IF FeedEntry?
SeqC RapidC ZCP2C EOL
END
entryMove
END
toolPath
IF Equal? Repeats# Recall# Num#('9')
SetFlag('9')
END
finishSub1
NextRep
ELSE
entryMove
toolPath
END
RETURN

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

drilling:
IF PosApproach? AND PeckFullRetract?
SeqC ZCP2C EOL
SeqC FeedC ' Z' ZDepth# EOL
ELSE
SeqC DrillCP EOL
END
GetCycle
IF Tap?
IF CWSpindle?
SeqC ' M843' EOL
ELSE
SeqC ' M844' EOL
END
END
SeqC
IF PosApproach? AND PeckFullRetract?
' G23 R' Peck# ' D' Retract# FeedEnt EOL
ELSE
Cycle FromCP ZDepth RLevel Dwell Peck Retract
IF Tap?
' F' FeedEntIPR#
ELSE
FeedEnt
END
EOL
END
TrackZNO# FIRST SPZ# {.81.2}
toolPath
setDrillEndOpZ
IF Tap?
SeqC ' M845' EOL
END
IF PosApproach? AND PeckFullRetract?
exitMove
ELSE
IF NOT LastOP? AND NEXT NOT SameTool?
SeqC Rapid ' G80' ZCP3 ckCoolOFF EOL
END
END
RETURN

longDrilling:
{ not supported }
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
Save# Num#('1') CSOffsetA# {Rotary Abs Location - JHE}
Save# Num#('2') CSOffsetB# {Rotary Abs Location - JHE}
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('9') { Used for Coolant Off }
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
' ' EOL
' USING the G23 CYCLE.' EOL
' ================' EOL
' This Post will output a G23 Cycle instead of a G83 PECK Full Out, Drill Cycle' EOL
' When The Positive Approach Button is depressed in the Drill Dialog Box.' EOL
' When Selected:' EOL
' [1] the Clearance Setting will Output a D-Value. ( e.g. 22 )' EOL
' [2] the Peck Setting will Output a Radius Value. ( e.g. 10.5 )' EOL
' [3] the Feed Rate Setting will Output an F-Value. ( e.g. 20 )' EOL
' Example: G23 R10.5 D22 F20.' EOL
' ' 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#('99')
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#('99') {****}
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:
IF UseComments? AND ProgramNameComment?
'( ' ProgramName$ ' )'
END
EOL
EachOp
IF FirstOperation?
IF ToolChangeAtHome?
SetHome
END
END
NextOp
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:
SeqC OpToolID EOL
SeqC ToolChng EOL
SeqC ProgStop EOL
doPartCycleComment
doOpComments
doPostScript
RETURN

firstOp2:
SeqC Speed
IF NOT Tap?
SpinOn
END
EOL
SeqC wFOStuff EOL
g52Stuff
SeqC ' G173 W-3.' EOL
checkPass
doRotation
SeqC Rapid Plane AbsOrInc StrtPos EOL
Save# Num#('3') CSOffsetA# {Save Rotary Location}
Save# Num#('4') CSOffsetB# {Save Rotary Location}
RETURN

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

newToolOp1:
SeqC RapidC ZCP1C EOL
RETURN

newToolOp2:
doEndOpPS
IF LAST ProgStop?
SeqC ' M0' EOL
END
RETURN

newToolOp3: {Start new Operation}
SeqC ToolChng EOL
SeqC ProgStop EOL
doPartCycleComment
doOpComments
doPostScript
RETURN

newToolOp4:
SeqC Speed
IF NOT Tap?
SpinOn
END
EOL
SeqC wFOStuff EOL
g52Stuff
SeqC ' G173 W-3.' EOL
checkPass
doRotation
SeqC RapidC AbsOrIncC StrtPos EOL
RETURN

newToolOp5:
SeqC OfstOn CoolOn EOL
IF FirstTool? AND LastTool?
ELSE
SeqC PreTool EOL
END
RETURN

sameToolOp1:
doEndOpPS
IF LAST ProgStop?
SeqC ' G28 G91 Z0.' EOL
SeqC ' M0' EOL
ELSE
IF NewToolOffset? OR ChangeCS?
SeqC RapidC ZCP1C EOL
END
END
RETURN

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

sameToolOp3: {Start new Operation}
SeqC
IF LAST ProgStop?
Speed
IF NOT Tap?
SpinOn
END
ELSE
SpeedC
END
EOL
SeqC wFOStuff EOL
g52Stuff
SeqC ' G173 W-3.' EOL
doRotation {Move B before X & Y}
SeqC Rapid PlaneC AbsOrInc StrtPos EOL
IF LAST ProgStop?
SeqC OfstOn CoolOn EOL
ELSE
IF NewToolOffset? OR ChangeCS?
SeqC OfstOn EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqC CoolOn EOL
END
END
RETURN

end1:
SeqC RapidC ZCP1C EOL
IF NOT FirstTool?
SeqC ToolChng EOL
END
SeqC ' G73 X98. Y70.' EOL
RETURN

end2:
doEndOpPS
IF NOT Equal? Recall# Num#('2') Recall# Num#('4') {OR NOT Equal? Recall# Num#('1') Recall# Num#('3')}
SeqC ' M11' EOL
IF AAxisAvail?
SeqC RapidC IncValue 'A' SUB# Recall# Num#('3') Recall# Num#('1') EOL
END
IF BAxisAvail?
SeqC RapidC IncValue 'B' SUB# Recall# Num#('4') Recall# Num#('2') EOL
END
SeqC ' M10' 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
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 }
SeqC wFOStuff EOL
g52Stuff
SeqC PlaneC AbsOrInc Rapid StrtPos cSAngleA cSAngleB Speed 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:
Tosnuc 777 Tosh [PI] NCQ42 16
Tosnuc 777 Tosh [MTM] CU77 16 7
Fanuc 15M Krk [OT] NCQ16 16 2
Tosnuc 777 Tosh [PI] CT96 16 2
Fanuc 15M Kit [OT] NMQ39 16 2
Fanuc 15M MTS [OT] NCQ32 16 1
Fanuc 15M MTS [OT] NCQ32 16 1
Tosnuc 888M Tosh [DM] CT41 15
Tosnuc 888M Tosh [LM] CW90 15 1
Tosnuc 600M VMC 45 M442 81 3
Tosnuc 600M BMC 40 M440 87
Scenariusz 16 Rowerem do szkoły
r 1 nr 16 1386694464
16 narrator

więcej podobnych podstron