Tree 300 [FN] M540 82 1


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

{12/15/92
Copied & modified: Tree 320 M077.82.1
For: FN Manufacturing
Machine: TREE
Control: Journeyman 300
Changes made per manual and sample program supplied by Mike Giugliano at FN Manufacturing.
Deleted '###.#;0.' FORMAT for FeedEntry# Drilling Parameter.
Deleted ClearancePlane1# from FORMATs.
Added HelixPitch# to FORMATs.
Added NewWFO# to FORMATs.
Changed all Comments from Parenthesis to semi-colon.
Added NewWFOF at PSInit.
Changed all Occurances of ' G80' Program# to CallLab.
Changed all Occurances of ' G70' Program# to EOR.
Modified FormatArc sub for Helical Arcs.
Output to be G12/G13 I J K F X Y Z
Flag(1) is set at ZOnlyRep to bypass IF ZMove? Boolean.
Flag(2) is set to output G0 or G1 on first non-ArcFeat block following Helix to cancel G12 or G13.
Changed CWArcC/CCWArcC to CWArc/CCWArc.
Broke up FormatArc sub to output ArcFeedC or DecelFeed after G2, G3, G12 or G13.
Deleted ArcRC.
Added ' K' HelixPitch#.
Added MoveSXYZC for Variable Drill Depths at ToolPath PointFeat.
Moved CRCOnC to be output on block by itself before FirstFeat of ToolPath contour.
Moved CRCOffC to be output on block by itself after LastFeat of ToolPath contour.
Added WFOStuff sub, changed 'G' Address to ' E', added call to sub 3 places.
Output AbsOrInc on line by itself at AutoCycCutSub2 and FirstOperation.
Added InitWFONum at setup and initializations.
Added SetMinRPM('50') at setup and initializations.
Changed SetMaxRPM from 10000 to 4000 at setup and initializations.
Changed SetMaxFeed from 500 to 200 at setup and initializations.
Added NewWFO PostScript Comment.
Added ' G70', Inch command, at FirstOperation.
Changed ' G10' Tool# ' M6' to OpToolID ToolOffset# at FirstOperation and NewTool.
Added literal ' M1' at FirstOperation.
Added literal ' M41', Low GearRange, at FirstOperation and NewTool.
Changed ' G300' ClearancePlane1# to ZCP1# at FirstOperation, NewTool and SameTool.
Deleted ' G99', Reset G92 command, at FirstOperation, NewTool and SameTool.
Output unconditional Plane on line by itself at FirstOperation, NewTool and SameTool.
Added output of ' M42', High GearRange, if SpeedRPM# is ł 450, at FirstOperation and NewTool.
Changed ' G100', OfstOff command, to ' T0' EOL ' Z0' EOL at NewTool, SameTool and end of Prog.
Deleted SpinOff at NewTool, SameTool and end of Prog.
Added literal ' M0' at NewTool.
Deleted ' G99', Reset G92 command, prior to ZCP3 at IF Milling.
Added FromCP at IF Drilling.
Changed from Drill Cycle Parameter blocks to Canned Drill Cycle Block.
Added IF FIRST ToolChangeAtHome? at end of Prog.
Deleted 8 literal 'END's follows EOP at end of Prog.
Deleted literal ' G700' at end of Prog.

Made following modifications to conform to Fanuc 6M M001.81.2
Added SubWarning sub.
Added Connect StrtPos at G92Sub.

Converted per LongHand [AbsOrInc] M001.81.2
DWB}

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

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(HelixPitch#,4)
FORMAT(PartShiftX#,4)
FORMAT(PartShiftY#,4)
FORMAT(PartShiftZ#,4)
FORMAT(ToolDiameter#,4) {.72}
FORMAT(Program#,5) {.72}
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(NewWFO#,5) {.72}
FORMAT(Parts#,5) {.72}
FORMAT(Tag#,5)
FORMAT(Dwell#,6) {.72}
FORMAT(RapidF#,7)
FORMAT(ToolOffset#,8)

{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

DoPartCycleComment:
IF MultipleParts? AND UseComments? AND SubComment?
'; PART NO. ' Tag# 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
END
RETURN

PSInit: {reset flags}
NewWFOF
RotateF
RETURN

PSStuff: {revised.72}
IF FourthCW?
FORMAT(FourthDegree#,2)
SeqC ' A' FourthDegree# EOL
FourthCWF {reset flag}
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
SeqC ' A' FourthDegree# EOL
FourthCCWF {reset flag}
END
IF FifthCW?
FORMAT(FifthDegree#,2)
SeqC ' B' FifthDegree# EOL
FifthCWF {reset flag}
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
SeqC ' B' FifthDegree# EOL
FifthCCWF {reset flag}
END
RETURN

DoPostScript:
PSInit
EachPS
SeqC PostScript EOL {literals}
PSStuff {commands}
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqC EndOpPS EOL {literals}
PSStuff {commands}
NextPS
RETURN

EntryMove:
IF FeedEntry?
SeqC FeedC ZIn FeedEntC EOL
ELSE
SeqC RapidC ZIn EOL
END
RETURN

GetConnect:
IF FeedConnect?
FeedC
ELSE
RapidC
END
RETURN

ExitMove:
IF NOT FeedConnect?
SeqC
IF FIFO? { .81 }
FeedC
ELSE
IF NOT AutoCycle?
RapidC
END
END
PRIME ZCP2C
IF FIFO? { .81 }
FeedEntC
END
EOL
END
RETURN

ExitMove2:
IF FIFO?
FeedC ZCP3C FeedEntC
ELSE
RapidC ZCP3C
END
RETURN

CycleWarning:
{ NOTE: This Post Processor takes care of Z Clearance. }
RETURN

FormatArc1:
IF ZMove? AND NOT Flag?('1') { NOT ZonlyRep }
SetFlag('2')
IF ArcCW?
' G12' { CW Helix }
ELSE
' G13' { CCW Helix }
END
ELSE
IF ArcCW?
CWArc
ELSE
CCWArc
END
END
RETURN

FormatArc2:
ArcIJ
IF Flag?('2') { Helix }
' K' HelixPitch#
END
MoveXYZC
RETURN

StdLine: {enables CRC on first call, .70}
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqC FeedC FeedRateC MoveXYZC EOL
DecelMove2
END
SeqC FeedC DecelFeed MoveXYZC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqC FeedC FeedRateC MoveXYZC EOL
END
END
RETURN

ToolPath:
EACHFeat
IF PointFeat? { Drilling Only }
SeqC MoveSXYZC EOL {.80.01}
ELSE
IF FirstFeat?
SeqC CRCOnC EOL
END
IF RapidFeat?
IF LastFeat? AND AutoCycle? {.70}
SeqC RapidC MoveXYZC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqC RapidC MoveXYZC EOL
END
END
ELSE
IF LineFeat?
IF AutoCycle? {.70}
IF LastFeat?
SeqC FeedC FeedRateC MoveXYZC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqC FeedC FeedRateC MoveXYZC EOL
ELSE
StdLine {enables CRC on first call}
END
END
ELSE
StdLine
END
ELSE
IF ArcFeat?
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
SeqC FormatArc1 ArcFeedC FormatArc2 EOL
DecelMove2
END
SeqC FormatArc1 DecelFeed FormatArc2 EOL
ELSE
SeqC FormatArc1 ArcFeedC FormatArc2 EOL
END
NEXTQuadrant
IF Flag?('2') { Helix }
SetFlagF('2')
IF LastFeat? OR NEXT RapidFeat?
Rapid
ELSE
IF NEXT LineFeat?
Feed
END
END
END
END
END
END
IF LastFeat?
SeqC CRCOffC EOL
END
IF AutoCycle?
SetAbs
Save# Num#('6') SUB# EPX# CurOriginPosX#
Save# Num#('7') SUB# EPY# CurOriginPosY#
SetInc
END
END
NEXTFeat
RETURN

WFOStuff: { Called at beginning only. }
SeqC ' E' NewWFO# EOL
RETURN

AutoCycCutSub1: {part 1}
CalcACSRXY {calc tool position, CalcAutoCycleStatusRecordXY}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
SetSRXYtoSP
SeqC IncValue EOL
RETURN

AutoCycCutSub2: {part 2}
SeqC AbsOrInc EOL
IF FIFO? {.81}
SeqC FeedC ZCP2 FeedEntC EOL {.71.2 removed CRCOffC, gets turned off in ToolPath}
ELSE
SeqC RapidC ZCP2 EOL
END
SetSRSubXY {restore SR to 1st position value}
ReSetPass2 {restore for positioning moves}
RETURN

Milling:
EntryMove
ToolPath
RETURN

XYZRep:
CycleWarning
EachRep
IF NOT FirstCycle?
SeqC GetConnect StrtPosC EOL
END
DoCycleComment
IF FirstCycle?
EntryMove
ELSE
IF FeedConnect?
IF ZshiftOnly?
EntryMove
END
ELSE
IF FeedEntry?
SeqC ZCP2C EOL
END
EntryMove
END
END
ToolPath
ExitMove
NextRep
RETURN

NoRepAutoCycle:
EACHFeat
IF SPXMove? OR SPYMove?
SeqC RapidC MoveSXYC EOL
END
AutoCycCutSub1
DoCycleComment
Milling
AutoCycCutSub2
NEXTFeat
RETURN

XYZRepAutoCycle:
CycleWarning
EachRep
EACHFeat
IF SPXMove? OR SPYMove?
SeqC GetConnect MoveSXYC EOL
END
SetAbs
Save# Num#('4') SPX#
Save# Num#('5') SPY#
SetInc
AutoCycCutSub1
DoCycleComment
Milling
AutoCycCutSub2
SetAbs
TrackXNO# ADD# Recall# Num#('4') Recall# Num#('6')
TrackYNO# ADD# Recall# Num#('5') Recall# Num#('7')
SetAbsOrInc
NEXTFeat
NextRep
RETURN

ZonlyRepAutoCycle:
EACHFeat
IF SPXMove? OR SPYMove?
SeqC GetConnect MoveSXYC EOL
END
AutoCycCutSub1
EachRep
IF FirstCycle?
DoCycleComment
EntryMove
ELSE
IF NOT FeedConnect?
ExitMove
END
IF SPXMove? OR SPYMove?
SeqC GetConnect MoveSXYC EOL
END
DoCycleComment
IF NOT FeedConnect?
EntryMove
END
END
ToolPath
NextRep
AutoCycCutSub2
ReSetPass2 {restore for positioning moves}
NEXTFeat
RETURN

DrillStuff:
GetCycle
SeqC FromCP EOL
SeqC Cycle StrtPos ZDepth RLevel Dwell Peck FeedEnt EOL
TrackZNO# ZDepth# {.81}
RETURN

CheckPass:
IF AutoCycle? {use the correct StrtPos}
SetPass2
ELSE
SetPass1
END
RETURN

GetStartOfSameTool:
DoPartCycleComment
DoOpComments
DoPostScript
CheckPass
RETURN

MasterSub:
IF FirstOperation?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
ELSE
IF ToolChangeAtHome?
SetHome
END
Seq ' G70' EOL { Inch }
SeqC AbsOrInc EOL
SeqC OpToolID ToolOffset# EOL
SeqC ' M1' EOL { Forced ProgStop }
DoPartCycleComment
DoOpComments
DoPostScript
SeqC ' M41' EOL { Low GearRange }
SeqC SpinOn Speed EOL
CheckPass
SeqC Rapid StrtPos EOL
SeqC ZCP1 EOL
SeqC Plane EOL
IF GTEqual? SpeedRPM# Num#('450')
SeqC ' M42' EOL { High GearRange }
END
SeqC CoolOn EOL
END
ELSE
IF NewTool?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
ELSE

{Finish off last Operation}

SeqC CoolOff EOL
SeqC ' T0' EOL
SeqC ' Z0' EOL
DoEndOpPS
IF ToolChangeAtHome?
SetAbs
LoadFeat
SUB# HomeX# CurOriginPosX#
SUB# HomeY# CurOriginPosY#
Num#('0')
SeqC Rapid MoveXY EOL
END
IF LAST ProgStop?
SeqC ' M0' EOL
ELSE
SeqC ProgStop EOL
END

{Start new Operation}

Seq OpToolID ToolOffset# EOL
SeqC ' M0' EOL { Forced ProgStop }
DoPartCycleComment
DoOpComments
DoPostScript
SeqC ' M41' EOL { Low GearRange }
SeqC SpinOn Speed EOL
CheckPass
SeqC Rapid StrtPos EOL
SeqC ZCP1 EOL
SeqC Plane EOL
IF GTEqual? SpeedRPM# Num#('450')
SeqC ' M42' EOL { High GearRange }
END
SeqC CoolOn EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqC CoolOff EOL
SeqC ' T0' EOL
SeqC ' Z0' EOL
SeqC ' M0' EOL

{Start new Operation}

GetStartOfSameTool
SeqC OpToolID ToolOffset# EOL
SeqC SpinOn Speed EOL
SeqC Rapid StrtPos EOL
SeqC ZCP1 EOL
SeqC Plane EOL
SeqC CoolOn EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF NewToolOffset?
SeqC ' T0' EOL
SeqC ' Z0' EOL

{Start new Operation}

GetStartOfSameTool
SeqC OpToolID ToolOffset# EOL
SeqC SpeedC EOL
SeqC Rapid StrtPos EOL
SeqC ZCP1 EOL
SeqC Plane EOL
ELSE

{Start new Operation}

GetStartOfSameTool
SeqC SpeedC EOL
SeqC Rapid StrtPos EOL
SeqC Plane EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqC CoolOn EOL
END
END
END
END
END {common point for all operations}
RapidF# { No Output }
IF Milling?
IF AutoCycle?
IF Repeats?
IF ZshiftOnly?
ZonlyRepAutoCycle
ELSE
XYZRepAutoCycle
END
IF NOT FeedConnect?
SeqC ExitMove2 EOL
END
ELSE
NoRepAutoCycle
SeqC ExitMove2 EOL
END
ELSE { NOT AutoCycle }
IF Repeats?
XYZRep
ELSE
Milling
END
SeqC ExitMove2 EOL
END
ELSE
IF Drilling?
IF Repeats?
EachRep
DoCycleComment
IF FirstCycle?
DrillStuff
END
ToolPath
NextRep
ELSE
DrillStuff
ToolPath
END
IF RetractToCP1? {.81}
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
SeqC ' G80' EOL
SeqC Rapid ZCP3 EOL
END
END
RETURN

EndPartSub:
{End of program ************************************************************}

{finish last operation}
SeqC CoolOff EOL
SeqC ' T0' EOL
SeqC ' Z0' EOL
DoEndOpPS
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
SetAbs
LoadFeat
SUB# FIRST HomeX# CurOriginPosX#
SUB# FIRST HomeY# CurOriginPosY#
Num#('0')
SeqC Rapid MoveXY EOL
END
IF ProgStop?
SeqC ' M0' EOL
ELSE
IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart?
SeqC ProgStop EOL
END
END
RETURN

MPLoop:
TagInit
IF AllToolsOnePart?
EachPart
TagInc
EachOp
MasterSub
NextOp
EndPartSub
NextPart
ELSE { OneToolAllParts }
IF LTEqual? Recall# Num#('1') Recall# Num#('3')
Save# Num#('2') Recall# Num#('1')
EachOp
IF GTEqual? Operation# Recall# Num#('1')
IF Equal? Recall# Num#('1') Recall# Num#('2')
IF LastOp?
Save# Num#('2') ADD# Operation# Num#('1')
ELSE
IF NewTool? AND NOT FirstOperation?
Save# Num#('2') Operation#
END
END
END
END
NextOp
EachPart
TagInc
EachOp
IF GTEqual? Operation# Recall# Num#('1')
IF LessThan? Operation# Recall# Num#('2')
IF Equal? Operation# Recall# Num#('1')
IF NOT FirstPart?

{Finish off last Operation}

IF FullUp?
SeqC CoolOff EOL
SeqC ' T0' EOL
SeqC ' Z0' EOL
END
DoEndOpPS

{Start new Operation}

DoPartCycleComment
DoOpComments
DoPostScript
CheckPass
SeqC Rapid StrtPos EOL
SeqC Plane EOL
IF FullUp?
SeqC ZCP1 EOL
SeqC CoolOn EOL
END
END
END
MasterSub
END
END
NextOp
NextPart
Save# Num#('1') Recall# Num#('2')
END
END
RETURN

{Start of executable Prog **************************************************}

{setup and initializations}
InitProg
ReverseXZArcs
InitWFONum
SetFlood
SetMinRPM('50')
SetMaxRPM('4000')
SetMaxFeed('200')
IF PSComment? AND UseComments?
'PostScript:' 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
' EndOP -' EOL
' all literals and commands before an ENDOP command' EOL
' will appear at the beginning of the operation. All ' EOL
' literals and commands after an ENDOP command will appear' EOL
' at the end of the operation. ' EOL
' NewWFO(56), NWFO(56) -' EOL
' The Work Fixture Offset # you specify will be used for all following operations.' EOL
' Do not use with the ncPost multiple part option.' EOL
' 4thAxisCW(12.5), 4ACW(12.5) -' EOL
' generates a + A move of the value you specify' EOL
' 4thAxisCCW(22.5), 4ACCW(22.5) -' EOL
' generates a - A move of the value you specify' EOL
' 5thAxisCW(30), 5ACW(30) -' EOL
' generates a + B move of the value you specify' EOL
' 5thAxisCCW(22.5), 5ACCW(22.5) -' EOL
' generates a - B move of the value you specify' EOL
END
EOR EOL
IF UseComments?
IF ProgramNameComment?
'; PROGRAM: ' ProgramName$ EOL
END
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
OpenSub
RestoreScale
WFOStuff
IF MultipleParts?
IF WorkFixtureOffsets?
'NOTE: This Post Processor does not support Work Fixture Offsets for Multiple Parts.' EOL
'Therefore, the output will be controlled by the following values that are' EOL
'already entered in Equally Spaced Offsets Edit Fields:' EOL
'X' PartShiftX# ' Y' PartShiftY# ' Z' PartShiftZ# EOL
'It is recommended that you change your selection to Equally Spaced Offsets.' EOL
END
Save# Num#('1') Num#('1')
EachOp
IF LastOp?
Save# Num#('3') Operation#
END
NextOp
MPLoop
IF OneToolAllParts?
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
SeqC EOP EOL
EOR EOL
Post
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


Wyszukiwarka

Podobne podstrony:
Tree Omicron [JAV] L569 82
Swedturn 6 CNC 300[LE] L222 82
Fanuc 6M Mazak [FN] M522 82 1m
Fanuc 2000C Mazak L168 82
Fanuc 10T MS [2 G54] L066 82
Za opóźnienia w budowie Stadionu Narodowego – podwyżki o prawie 300 , trzynastki i wysokie premie
GE 550T LeBlonde L082 82
package tree

więcej podobnych podstron