Fanuc 15M MTS [CP] NDU66 16 2m


{
MILL=T
LATHE=F
SIMPLE_ROT_POS=
ROTARY_MILL=F
ADV_MILL=Y
SUBS=N
}

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

{4/6/98
Modified: LongHand (NW) D001.12k
Created: LongHand (NW) D001.15
For: Gibbs & Associates
Versions: Catalyst v4.23.13(mac)/ComPost2 1.1b3
Changed FORMAT#20 to FORMAT#9 at Testing Subroutines.
FORMATs must be in sequential numbering order in order to work correctly.
DWB}

{5/15/98,
Updated: LongHand (NW) D001.15
Created: Fanuc 6M LH (NW) DV83.16
For: Gibbs & Associates
Versions: Catalyst v4.23.13(mac)/ComPost2 1.1b3
Corrected support for Linear ChangeCS.
Linear ChangeCS covers Multiple CSGroups in One Plane.
Post does not output CSWFOComments, G52Comments or G52Stuff for this situation.
IF AAxisAvail? OR BAxisAvail? does not automatically support this.
Changed IF AAxisAvail? OR BAxisAvail? to IF GreaterThan? NumOfCS# Num#('1') at G52Stuff.
Deleted IF AAxisAvail? OR BAxisAvail? at DoCSComment.
Changed IF AAxisAvail? OR BAxisAvail? to IF GreaterThan? NumOfCS# Num#('1') at DoCSWFOComment.
Post retracts Tool at SameTool for this situation.
Retraction is only necessary for AChange OR BChange situations.
Changed ChangeCS? to AChange? OR BChange at SameToolOp1.
Changed ChangeCS? to AChange? OR BChange at SameToolOp3.
Simplified ClearCSOffset occurance.
ClearCSOffset occurs at 3 different places, including at the output of CSComments.
Discovered that CheckPass is a good place for all situations.
Deleted ClearCSOffset at CSG52, DoCSWFOComment and CSComments Procedures.
Added ClearCSOffset at CheckPass.
Moved IF FirstOperation? OR NewTool? OR ChangeCS? Boolean from CSG52 to G52Stuff.
Moved call to CSComments Procedure to inside IF UseComments? Boolean at DoOpComments.
To suppress when Comments are turned off.
Added AbsValueC, IncValueC and AbsOrIncC Procedures.
Simplifies readability of Prog.
Reduces redundancy of output.
Allows us to return to earlier versions
Improves upon earlier problem with incremental output of ShiftPC command at CloseMP while
allowing us to return to .85 OfstOff blocks.
AbsValueC called from AbsOrIncC.
IncValueC called from AbsOrIncC, DoAbsOrInc and DoDrillAbsOrInc.
IncValueC called for OfstOff Blocks at NewToolOp1, two places at SameToolOp1 and DoAbsOrInc.
AbsOrIncC called for ShiftPC Block at CloseMP.
AbsOrIncC called from DoAbsOrInc, DoDrillAbsOrInc and RestoreAbsOrInc.
AbsOrIncC called for Home Block at NewToolOp2.
AbsOrIncC called for FirstHome Block at End2.
Additional modifications.
Added CRCOffC at AutoCycCutSub2.
Corrects unique situation in ZonlyRepAutoCycle where one Operation is CRCLeft and LastFeat
is an ArcFeat followed by another Operation that is CRCRight.
CRCOffC did not get output at end of CRCLeft Operation and CRCOnC did not get output at start
of CRCRight Operation.
Oddly, CRCOnC only outputs if CRCOffC has been output, not if CRCSide changes.
Moved Boolean Test of Flag(3) at MP1ToollAllPfu and MP1ToollAllPXcp to MPLoop.
Added following Procedures:
NewPart1
Called at MPLoop.
Similar to SameTool1.
NewPart2
Called at MPLoop.
Similar to SameTool2.
NewPart3
Called at MPLoop.
Similar to SameTool3.
6/18/98
Changed to Lowercase Procedure Names.
Added comments to all SetFlag, SetFlagF and IF Flag statements.
Added Flag(6) to switch from B-Style to C-Style at progStart.
TRUE = B-Style Output, FALSE = C-Style Output.
Added Flag(7) to switch from local coordinates to uncompensated coordinates at progStart.
TRUE = Local WFO Coordinates, FALSE = D-Style Output.
Added pertinent comments at progStart.
Added IF Equal? NumOfCS# Num#('1') at progStart.
This is a standard 3 Axis - Output M-Style.
Changed literal 'G80' to DrillOff at end of IF Drilling.
Changed literal 'G80' to DrillOff at firstOp1 and newToolOp3.
To allow for change in FORM without having to recompile.
Changed SpeedC to Speed at for LAST ProgStop condition at sameToolOp3.
6/30/98
Deleted Gibbs System XYRepeat support.
Virtual only support ZShiftOnly Repeats.
Deleted CycleWarning procedure.
Added cutAutoCycle procedure.
Called for all AutoCycle Operations.
Supports NoRepeat and ZShiftOnly Repeats.
Replaces noRepAutoCycle and zonlyRepAutoCycle procedures
Deleted xYZRepAutoCycle procedure.
Changed XYZRep to ZOnlyRep.
Supports ZShiftOnly Repeats.
Moved LongDrillStuff from OpGuts to LongDrillStuff.
Rewrote OpGuts Procedure.
Deleted Drilling Repeats at IF Drilling.
Rewrote PostScript instructions at progStart.
7/22/98
Reverted back to Gibbs System XYRepeat support.
IF setup correctly, Virtual will support XShift and/or YShift Repeats for both Contour and
Patterns.
Rules for correct setup (as best as I understand at the moment).
Geometry CSGroup must be oriented to a plane that intersects CS#1 in a perpendicular direction.
Example, XZPlane and YZPlane, and any oriented rotation of either Plane around the XYPlane.
Any change in the ZPitch of the Origin will cause ZShiftOnly Repeat Operation.
Set Desired ZStep so that Operation will result in multiple passes.
NOTE: If correctly setup, ZStep would be misleading.
Step will be in line with depth axis of CSGroup.
Restored with slight modifications the xyRep Procedure.
Restored with slight modifications the xyRep Procedure.
Restored related code to OpGuts Procedure.
ZShiftOnly Contour Operations remain Full SepSub.
Any customer requesting G92 Style will require copying code from archives.
Deleted Deceleration from ToolPath LineFeat and ArcFeat.
There are plans to support this in the future through the use of Construction Tools in the
Virtual Process.
DWB}

{8/20/98,
Initial : Fanuc 6M LH (NW) DV83.16
Created: Fanuc 15M Mitsui LH [CP] DU66.16
Customer: Caco Pacific, Ray - 626/331-3361

Changes to "Form":

1. Under Tool Offsets, changed Tool Length Offset Cancel Number to 30

Changes to "Prog":

1. Added G20 (inch mode) and G90 to restart blocks.
2. Changed G54 thru G59 to be G54.1P1 thru G54.1P48 and moved the output to StrtPos block.
3. Added M11 (unclamp) and M10 (clamp) codes for the rotary axis.
4. Moved ToolChng to be output with OpToolID and added PreTool output.
5. Moved CoolOn to OfstOn block and CoolOff to OfstOff block.
6. Added move to machine X & Y Home position before tool change and End.
7. Added G84.2 for Rigid Tapping.
8. Deleted EOR from program start and added a seperator comment before tool change.
9. Added getCoolOn sub to support 4 types of coolants and changed CoolOn to getCoolOn.
10. Updated Post Script with coolant codes.
11. Under SameTool, retract to ZCP1 for rotary moves.
12. Added Save#('11') & 12 to save the current rotary location.
13. Added moveRotaryHome sub to move the rotary to zero at program end.
JHE}

{8/24/98,
Initial : Fanuc 15M Mitsui LH [CP] DU66.16
Created: Fanuc 15M Mitsui LH [CP] DU66.16m
Customer: Caco Pacific, Ray - 626/331-3361

Changes to "Form":

1. Under Default Formats, changed F to ####.;0. and
IJK QR XYZ to ####.###;0.
2. Under Arcs, changed IJ Max Arc Radius to 2500.000

Changes to "Prog":

1. Changed #4 FORMAT from 4 to 3 decimal points.
2. Changed RestoreScale sub to metric.
3. Changed MoveComment from INCHES to MILLIMETERS.
JHE}

{09/11/98,
Initial: Fanuc 15M Mitsui LH [CP] DU66.16m
Created: Fanuc 15M Mitsui LH [CP] DU66.16.1m
For: Caco Pacific

Changes to Form:
1) Default Formats - Changed F to ####.##;0.

Changes to Prog:
1) FirstOp1 - Changed G20 to G21.
CDH}

{11/23/98,
Initial: Fanuc 15M Mitsui LH [CP] DU66.16.1m
Created: Fanuc 15M Mitsui LH [CP] DU66.16.2m
For: Caco Pacific

Changes to Prog:
1) NewToolOp3 - Changed G20 to G21.
CDH}

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

#1 = '#.00'
#2 = '#####.###;0.'
#3 = '*#####.###;0.'
#4 = '####.###;0.' {Changed - JHE 8/24}
#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 NOT Metric? {CAM file is in English, tools and tool path}
SetScale('25.4') { change to Metric, this is a Metric post}
END
RETURN

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

cSWFO:
'G54.1P' ADD# cSPartNum# Num#('0') {Cganged from 'G' and '53' - JHE}
RETURN

wFO:
'G54.1P' ADD# PartNum# Num#('0') {Cganged from 'G' and '53' - JHE}
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
wFO {Changed from WFO1 - JHE}
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 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
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

getCoolOn:
IF NOT CoolOff?
IF Mist?
'M61' { Mist }
ELSE
IF ThruSpin?
'M50' { Thru Spindle }
ELSE
IF Pulse?
'M51' { Thru Side }
ELSE
CoolOn { Flood }
END
END
END
END
RETURN

moveRotaryHome: {Added this sub routine - JHE}
IF AAxisAvail?
IF NotEqual? Recall# Num#('11') Num#('0')
SeqC AbsValue 'M11' EOL {Unclamp rotary - JHE}
SeqC Rapid 'A0.' EOL
ELSE
SeqC AbsValue 'M11' EOL
END
ELSE
IF BAxisAvail?
IF NotEqual? Recall# Num#('12') Num#('0')
SeqC AbsValue 'M11' EOL
SeqC Rapid 'B0.' EOL
ELSE
SeqC AbsValue 'M11' EOL
END
ELSE
SeqC AbsValue EOL
END
END
RETURN

cSAngleA:
IF AAxisAvail?
IF Flag?('6') AND WFOCS? { TRUE = B-Style Output, FALSE = C-Style Output }
'A0.'
ELSE
'A' CSOffsetA#
END
END
Save# Num#('11') CSOffsetA#
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
Save# Num#('12') CSOffsetB#
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

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

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

entryMove:
IF FeedEntry?
SeqC FeedC ZInC
IF NOT EmptyLine? { Mostly for FeedConnect ZShiftOnly with ZMove }
FeedEntC
END
EOL
ELSE
SeqC RapidC ZInC EOL
END
RETURN

exitMove:
IF NOT FeedConnect?
CRCOffC
IF FIFO?
FeedC pRIMEZCP2 FeedEntC
ELSE
RapidC pRIMEZCP2
END
END
RETURN

exitMove2:
LoadFeat Num#('0') Num#('0') ClearancePlane3#
IF ZMove?
IF FIFO?
FeedC ZCP3C FeedEntC
ELSE
RapidC ZCP3C
END
END
RETURN

absValueC:
IF NOT AbsValue?
AbsValue
END
RETURN

incValueC:
IF AbsValue?
IncValue
END
RETURN

absOrIncC:
IF AbsoluteMoves?
absValueC
ELSE
incValueC
END
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

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 IncValue EOL
RETURN

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

milling:
entryMove
toolPath
RETURN

xyRep:
FindAnyZMoves
EachRep
DoCycleComment
IF FirstCycle?
EntryMove
ELSE
CRCOffC
IF FeedConnect?
IF SPXMove? OR SPYMove?
SeqC FeedC MoveSXYC EOL
END
IF NOT NoZMoves?
EntryMove
END
ELSE
IF SPXMove? OR SPYMove?
SeqC RapidC MoveSXYC EOL
END
IF FeedEntry?
SeqC ZCP2C EOL
END
EntryMove
END
END
ToolPath
SeqC ExitMove EOL
NextRep
RETURN

xyRepAutoCycle:
EachRep
DoCycleComment
IF NOT FirstCycle?
IF FIFO?
Rapid
END
SeqC RapidC StrtPos EOL
IF NOT FeedConnect?
SeqC ZCP2C EOL
END
END
EACHFeat
IF NOT FirstFeat?
DoCycleComment
END
IF SPXMove? OR SPYMove?
IF FIFO?
Rapid
END
SeqC RapidC MoveSXYC EOL
END
AutoCycCutSub1
Milling
AutoCycCutSub2
NEXTFeat
SeqC CRCOffC
LoadpRIMEZCP2
IF ZMove?
ExitMove
END
EOL
NextRep
RETURN

cutAutoCycle:
EACHFeat
doCycleComment
IF SPXMove? OR SPYMove?
IF FIFO?
Rapid
END
SeqC RapidC MoveSXYC EOL
END
autoCycCutSub1
IF Repeats?
IF ZShiftOnly?
EachRep
IF NOT FirstCycle?
IF FeedConnect?
doCycleComment
IF SPXMove? OR SPYMove?
SeqC FeedC MoveSXYC FeedEntC EOL
END
AbsOrInc
ELSE
SeqC AbsOrInc exitMove EOL
doCycleComment
IF SPXMove? OR SPYMove?
SeqC IncValue RapidC MoveSXYC EOL
AbsOrInc
END
IF FeedEntry? AND NOT FIFO?
SeqC RapidC ZCP2 EOL
END
END
entryMove
SeqC IncValue EOL
END
toolPath
NextRep
END
ELSE
milling
END
autoCycCutSub2
NEXTFeat
RETURN

zOnlyRep:
EachRep
doCycleComment
IF NOT FirstCycle?
CRCOffC
IF SPXMove? OR SPYMove?
IF FeedConnect?
FeedC
ELSE
RapidC
END
SeqC MoveSXYC EOL
END
IF FeedEntry? AND NOT FeedConnect?
SeqC ZCP2C EOL
END
END
entryMove
toolPath
SeqC exitMove EOL
NextRep
RETURN

drillStuff:
SeqC DrillCP EOL
GetCycle
IF RigidTap?
SeqC 'G84.2'
ELSE
SeqC Cycle
END
FromCP StrtPos ZDepth RLevel Dwell Peck Retract FeedEnt EOL
TrackZNO# FIRST SPZ#
RETURN

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

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

opGuts:
ResetCRCNum
RapidF# { No Output }
IF Milling?
SeqC ZCP2C EOL
IF AutoCycle?
IF Repeats?
IF ZShiftOnly?
cutAutoCycle
ELSE
xyRepAutoCycle
END
IF NOT FeedConnect?
SeqC exitMove2 EOL
END
ELSE
cutAutoCycle
SeqC exitMove2 EOL
END
SetPass1
ELSE { NOT AutoCycle }
IF Repeats?
IF ZShiftOnly?
zOnlyRep
ELSE
xyRep
END
ELSE
milling
END
SeqC CRCOffC exitMove2 EOL
END
ELSE
IF Drilling?
drillStuff
toolPath
setDrillEndOpZ
SeqC DrillOff Rapid ZCP3 EOL
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 }
Save# Num#('11') Num#('0') { A-Axis current location - JHE}
Save# Num#('12') Num#('0') { B-Axis current location - JHE}
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 = Local WFO Coordinates, FALSE = D-Style Output }
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
' tscool - output thru spindle coolant M50 ' EOL
' pcool - output pulse coolant M51 ' EOL
' mcool - output mist coolant M61 ' EOL
END
IF Flag?('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
IF Equal? NumOfCS# Num#('1') { 3 Axis Part - Output M-Style }
SetFlagF('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
ELSE
IF MultipleParts?
IF WorkFixtureOffsets?
IF LTEqual? MUL# Parts# NumOfCS# Num#('6')
SetWFOCS { use WFO for CS changes }
ELSE
SetFlagF('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
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') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
'G52'
ELSE
'non-wfo'
END
' style output. )' EOL
END
END
ELSE
SetFlagF('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
END
ELSE
IF LTEqual? NumOfCS# Num#('6') {****}
SetWFOCS { use WFO for CS changes }
ELSE
SetFlagF('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
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') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
'G52'
ELSE
'non-wfo'
END
' 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
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$ ' MILLIMETERS )' EOL {Changed from INCHES - JHE}
END
IF PartsComment?
'( PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
'( FIRST TOOL NOT IN SPINDLE )' EOL
END
END
restoreScale
RETURN

firstOp1:
'(---------------)' EOL
Seq Plane 'G21' CRCOff DrillOff AbsOrInc EOL
SeqC OpToolID ToolChng EOL
doPartCycleComment
doOpComments
doPostScript
RETURN

firstOp2:
g52Stuff
SeqC PreTool EOL
SeqC Speed SpinOn EOL
checkPass
IF AAxisAvail? OR BAxisAvail?
SeqC 'M11' EOL {unclamp rotary}
END
SeqC AbsOrInc Rapid StrtPos cSAngleA cSAngleB wFOStuff EOL
IF AAxisAvail? OR BAxisAvail?
SeqC 'M10' EOL {clamp rotary}
END
RETURN

firstOp3:
SeqC OfstOn getCoolOn EOL
RETURN

newToolOp1:
SeqC IncValue OfstOff CoolOff EOL
RETURN

newToolOp2:
doEndOpPS
{IF ToolChangeAtHome?}
SeqC IncValue 'G30X0.Y0.' SpinOff EOL
IF AAxisAvail? OR BAxisAvail?
SeqC AbsValue 'M11' EOL {unclamp rotary}
END
IF LAST ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
END
RETURN

newToolOp3: {Start new Operation}
'(---------------)' EOL
Seq Plane 'G21' CRCOff DrillOff AbsOrInc EOL
SeqC OpToolID ToolChng EOL
doPartCycleComment
doOpComments
doPostScript
RETURN

newToolOp4:
g52Stuff
SeqC PreTool EOL
SeqC Speed SpinOn EOL
checkPass
IF AAxisAvail? OR BAxisAvail?
SeqC 'M11' EOL {unclamp rotary}
END
SeqC AbsOrInc Rapid StrtPos cSAngleA cSAngleB wFOStuff EOL
IF AAxisAvail? OR BAxisAvail?
SeqC 'M10' EOL {clamp rotary}
END
RETURN

newToolOp5:
SeqC OfstOn getCoolOn EOL
RETURN

sameToolOp1:
doEndOpPS
IF LAST ProgStop?
SeqC incValueC OfstOff CoolOff EOL
SeqC SpinOff EOL
SeqC 'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF NewToolOffset?
SeqC incValueC OfstOff EOL
ELSE
IF AChange? OR BChange? {Added - JHE}
SeqC RapidC ZCP1 EOL
END
END
END
RETURN

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

sameToolOp3: {Start new Operation}
g52Stuff
IF LAST ProgStop?
SeqC Speed SpinOn EOL
IF AAxisAvail? OR BAxisAvail?
SeqC 'M11' EOL {unclamp rotary}
END
SeqC PlaneC AbsOrInc Rapid StrtPos cSAngleA cSAngleB wFOStuff EOL
IF AAxisAvail? OR BAxisAvail?
SeqC 'M10' EOL {clamp rotary}
END
SeqC OfstOn getCoolOn EOL
ELSE
IF AAxisAvail? OR BAxisAvail?
IF AChange? OR BChange?
SeqC 'M11' EOL {unclamp rotary}
END
END
SeqC PlaneC AbsOrInc Rapid StrtPos cSAngleAC cSAngleBC SpeedC wFOStuff EOL
IF AAxisAvail? OR BAxisAvail?
IF AChange? OR BChange?
SeqC 'M10' EOL {clamp rotary}
END
END
IF NewToolOffset? {Removed OR AChange? OR BChange? - JHE}
SeqC OfstOn EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqC getCoolOn EOL
END
END
RETURN

end1:
SeqC IncValue OfstOff CoolOff EOL
RETURN

end2:
doEndOpPS
{IF FIRST ToolChangeAtHome?}
SeqC IncValue 'G30X0.Y0.' SpinOff EOL
moveRotaryHome {Added - JHE}
IF ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
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 incValueC OfstOff CoolOff 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
IF AAxisAvail? OR BAxisAvail?
SeqC 'M11' EOL {unclamp rotary}
END
SeqC PlaneC AbsOrInc Rapid StrtPos cSAngleA cSAngleB Speed wFOStuff EOL
IF AAxisAvail? OR BAxisAvail?
SeqC 'M10' EOL {clamp rotary}
END
IF FullUp?
SeqC OfstOn getCoolOn 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:
Fanuc 15M MTS [OT] NCQ32 16 1
Fanuc 15M MTS [OT] NCQ32 16 1
Fanuc 15M Krk [OT] NCQ16 16 2
Fanuc 11M MS [EE] NMT57 16 2m
Fanuc 15M Mts [JPL2A] CQ12 12 1
Fanuc 15M MTS [ABE] CV14 12m
Fanuc 15M Mon [SM] MT98 16 1
Fanuc 15M Kmura [PP] CX07 16
Fanuc 15M MTS [HA] M999 89 2
Fanuc 15M Kit [OT] NMQ39 16 2
Fanuc 15M MTS [PC] MU01 89 1
Fanuc 15M MTS M402 89
Fanuc 6M linmov M001 16 2m
Fanuc 6M M001 16 2m
Fadal Format 2 [NW] D611 16 2m
Fanuc 0M LH P&W [SP] CV84 16 3
Fanuc 15M Mitsui [EG] CW15 12
Fanuc 18M MS [CST] NCT81 16

więcej podobnych podstron