Fanuc 11M Niigata [UM] MW93 89m


{5/24/93
created initial NoSubs Processor to .81 format
FIFO stuff not supported
variables: 1 = tools 1st op; 2 = tools last op; 3 = ncCAMs last op
Jim Radcliffe}

{7/29/93, v.81.1, added FIFO handling, JR}
{8/3/93, v.81.2, SameTool WFO, RapidF#, additional FIFO handling, JR}
{9/12/95, v.81.3, FIFO? queries changed to ExitType & ExitFeed calls, WFO MultipleParts, JR}
{5/8/96, v.89, Return to the StrtPos before next iteration of CutAutoCycle Repeats ZshiftOnly, JR}
{6/4/96, v.89.1, minor corrections SeqC, CRCOff & SameTool, JR}

{12/16/96
Initial: Fanuc 6M NoSubs M877.89.1
Created: Fanuc 11M Makino MZ90.89
ForUser: Braden Engineering / Caco Pacific Corp
Control: Fanuc 11M
Machine: Makino
Develop: ComPost2 PPC v1.0b4, Virtual Gibbs 3.23
Comment: New processor per notes from Mark Rief
Added G70 to first op saftey start block.
Deleted ToolChng command from beginning of program.
Suppressed OfstOff at tool changes IF NOT ToolChangeAtHome
Moved CoolOn to OfstOn line.
Added PreTool.
Added 6 additional lines to end of program before EOP.
Changed start tool comment to FIRST TOOL IN SPINDLE.
Added RigidTap.
Jim Radcliffe}

{2/20/97
Initial: Fanuc 11M Makino MZ90.89
Created: Fanuc 11M Makino MZ90.89.1
Develop: ComPost2 68K 1.0b11, Virtual Gibbs 3.23
Comment: Modified per faxes and phone consultation with Mark Rief and Larry Monzon
Deleted EOR from beginning of program.
Changed G70 to G20.
Added seperator comment at the beginning of each tool.
Changed literal X0 on OfstOff line at end of program to Y0.
Changed TrackZNO# ZDepth# to TrackZNO# FIRST SPZ# and added formatter for TrackZNO#.
Added custom coolant. Changed CoolOn to GetCoolOn.
Deleted SetMaxFeed and SetMaxRPM.
Jim Radcliffe}

{2/20/97, Created Metric Version, JR}

{1/13/98,
Initial : Fanuc 11M Makino MZ90.89.1m
Created: Fanuc 11M Niigata [UM] MW93.89m
Customer: Uddens Mekaniska, Sweden

Changes to "Form":

1. Under Spindle & Coolant, changed Spindle Off code to M19.

Changes to "Prog":

1. Moved GetCoolOn to the motion to ZCP2 for Milling and to DrillCP for Drilling.
2. Moved CoolOff to the motion to ZCP3 for Milling and Drilling.
3. Changes to FirstOperation to match the customer output.
4. Changes to NewTool to match the customer output.
5. Changes to SameTool to match the customer output.
6. Changes to FinishLastOp to match the customer output.
JHE}


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

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ToolDiameter#,4)
FORMAT(TrackZNO#,4)
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 an Metric post}
END
RETURN

DoSubComment:
IF UseComments? AND SubComment?
'( CYCLE START )' EOL
END
RETURN

DoOpComments:
IF UseComments?
SetScale('1')
IF MultipleParts? AND SubComment?
'( PART ' Tag# ' )' EOL
END
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
PSStuff
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqC EndOpPS EOL
PSStuff
NextPS
RETURN

ExitType:
IF FIFO?
FeedC
ELSE
RapidC
END
RETURN

ExitFeed:
IF FIFO?
FeedEntC
END
RETURN

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

StdRapid:
IF LastFeat?
SeqC CRCOffC RapidC MoveXYZC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqC RapidC MoveXYZC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqC CRCOnC RapidC MoveXYZC CRCOffsetC EOL
END
END
END
RETURN

StdLine: {enables CRC on first call, .70}
IF LastFeat?
SeqC CRCOffC FeedC MoveXYZC FeedRateC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqC FeedC MoveXYZC FeedRateC EOL
ELSE
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqC CRCOnC FeedC MoveXYZC FeedRateC CRCOffsetC EOL
DecelMove2
END
SeqC CRCOnC FeedC MoveXYZC DecelFeed CRCOffsetC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqC CRCOnC FeedC MoveXYZC FeedRateC CRCOffsetC EOL
END
END
END
END
RETURN

StdArc:
EACHQuadrant
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
SeqC FormatArc ArcFeedC EOL
DecelMove2
END
SeqC FormatArc DecelFeed EOL
ELSE
SeqC FormatArc ArcFeedC EOL
END
NEXTQuadrant
RETURN

ToolPath2: {for AutoCycle element moves}
EACHFeat
IF RapidFeat?
StdRapid
ELSE
IF LineFeat?
StdLine
ELSE
IF ArcFeat?
StdArc
END
END
END
NEXTFeat
RETURN

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

CutAutoCycle:
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
SetSRXYtoSP
SeqC IncValue EOL
IF Repeats? AND ZshiftOnly?
EachRep
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
IF FeedConnect?
SeqC FeedC StrtPosC EOL
ELSE
SeqC RapidC StrtPosC EOL
END
END
END
EntryMove
ToolPath2
IF NOT FeedConnect?
SeqC ExitType PRIME ZCP2 ExitFeed EOL
END
NextRep
ELSE
EntryMove
ToolPath2
END
SeqC AbsOrInc ExitType ZCP2 ExitFeed EOL
SetSRSubXY {restore tool position}
SetSRSubMove
ReSetPass2 {restore for positioning moves}
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
IF NOT FirstFeat?
SeqC
IF FIFO?
Rapid
END
MoveSXYC EOL
END
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
CutAutoCycle
ELSE
SeqC MoveSXYZC EOL {.80.01}
END
ELSE
IF RapidFeat?
StdRapid
ELSE
IF LineFeat?
StdLine
ELSE
IF ArcFeat?
StdArc
END
END
END
END
NEXTFeat
RETURN

WFOStuff:
IF MultipleParts? AND WorkFixtureOffsets?
SetWFO {Removed SeqC & EOL - JHE}
ELSE
IF NewWFO?
'G' NewWFO# {Removed SeqC & EOL - JHE}
ELSE
IF NOT SameTool?
IF NeedWFO1?
'G' NewWFO# {Removed SeqC & EOL - JHE}
END
END
END
END
RETURN

CheckPass:
IF AutoCycle? {use the correct StrtPos}
SetPass2
ELSE
SetPass1
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

DoOp:
IF FirstOperation?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
IF FullUp?
{SeqC CoolOff EOL} {Removed this line - JHE}
SeqC IncValue OfstOff EOL
END
DoOpComments
{WFOStuff} {Moved to motion block - JHE}
ELSE
'(---------------)' EOL
Seq Plane 'G21' CRCOff DrillOff EOL
SeqC IncValue OfstOff 'X0.Y0.' SpinOff EOL {Added this line - JHE}
SeqC 'G10L2P1X0.Y0.Z0.' EOL {Added this line - JHE}
SeqC OpToolID 'M41' EOL {Added M41 - JHE}
SeqC ToolChng EOL {Added this line - JHE}
DoOpComments
SeqC PreTool EOL
DoPostScript
{WFOStuff} {Moved to motion block - JHE}
{SeqC Speed SpinOn EOL} {Moved to motion block - JHE}
END
CheckPass
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? AND NOT FirstPart?
SeqC Rapid WFOStuff AbsOrInc StrtPos EOL {Added WFOStuff AbsOrInc - JHE}
ELSE
SeqC Rapid WFOStuff AbsOrInc StrtPos OfstOn Speed SpinOn EOL
{SeqC OfstOn GetCoolOn EOL} {Removed GetCoolOn & moved OfstOn to motion block - JHE}
END
ELSE
IF NewTool?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
{only need to set up for tool change on 1st part}
ELSE
{SeqC CoolOff EOL} {Removed CoolOff - JHE}
SeqC RapidC IncValue OfstOff 'X0.Y0.' SpinOff EOL {Added this line - JHE}
DoEndOpPS
IF ToolChangeAtHome?
SeqC AbsOrInc Home EOL {Removed Rapid & SpinOff - JHE}
END
IF LAST ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
END
END

{Start new Operation}

IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
IF FullUp?
{SeqC CoolOff EOL} {Removed this line - JHE}
SeqC IncValue OfstOff EOL
END
DoOpComments
{WFOStuff} {Moved to motion block - JHE}
ELSE
'(---------------)' EOL
Seq Plane 'G21' CRCOff DrillOff AbsOrInc EOL {Added AbsOrInc - JHE}
SeqC OpToolID EOL {Removed ToolChng - JHE}
SeqC ToolChng EOL {Added this line - JHE}
DoOpComments
SeqC PreTool EOL
DoPostScript
{WFOStuff} {Moved to motion block - JHE}
{SeqC Speed SpinOn EOL} {Moved to motion block - JHE}
END
CheckPass
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? AND NOT FirstPart?
SeqC Rapid WFOStuff AbsOrInc StrtPos EOL {Added WFOStuff AbsOrInc - JHE}
ELSE
SeqC Rapid WFOStuff AbsOrInc StrtPos OfstOn Speed SpinOn EOL
{SeqC OfstOn GetCoolOn EOL} {Removed GetCoolOn & moved OfstOn to motion block - JHE}
END
ELSE
IF SameTool?

{Finish off last Operation}

IF LAST ProgStop?
SeqC CoolOff EOL
SeqC IncValue OfstOff SpinOff EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
END
IF NewToolOffset?
SeqC IncValue OfstOff EOL
END
DoEndOpPS
IF LAST ProgStop?
{SeqC SpinOff EOL} {Moved to motion block - JHE}
SeqC 'M0' EOL
END

{Start new Operation}

DoOpComments
DoPostScript
{WFOStuff} {Moved to motion block - JHE}
CheckPass
SeqC Rapid WFOStuff AbsOrInc StrtPos
IF LAST ProgStop? OR NewToolOffset?
OfstOn {Moved to motion block - JHE}
END
SpeedC
IF LAST ProgStop?
SpinOn
END
EOL
SeqC
IF LAST ProgStop?
GetCoolOn
ELSE
IF NOT CoolOff? AND LAST CoolOff?
GetCoolOn
END
END
EOL
END
END
END

{ Common Point for All Operations }

ResetCRCNum {call here to reset for each new operation only, call in tool path to reset for each repeat in an operation}
RapidF# {forces the output of a conditional feedrate for each operation}

IF Milling?
IF NewTool? {Added this check - JHE}
SeqC ZCP2C GetCoolOn EOL {Added GetCoolOn - JHE}
ELSE
SeqC ZCP2C EOL {SameTool - JHE}
END
IF Repeats?
IF ZshiftOnly? AND AutoCycle?
{done in CutAutoCycle called from ToolPath}
ELSE
EACHRep
DoSubComment
IF NOT FirstCycle?
SeqC Connect StrtPos EOL
IF NOT FeedConnect?
SeqC ZCP2C EOL
END
END
END
END
IF NOT AutoCycle?
EntryMove
END
ToolPath
IF Repeats?
IF ZshiftOnly? AND AutoCycle?
{done in CutAutoCycle called from ToolPath}
ELSE
SeqC CRCOffC
IF NOT FeedConnect?
ExitType PRIME ZCP3C
END
ExitFeed EOL
NEXTRep
END
END
IF AutoCycle?
IF NEXT NewTool? {Added this check - JHE}
SeqC ZCP3C CoolOff EOL {Added CoolOff - JHE}
ELSE
SeqC ZCP3C EOL {SameTool - JHE}
END
ELSE
IF NEXT NewTool? {Added this check - JHE}
SeqC CRCOffC ExitType ZCP3C ExitFeed CoolOff EOL {Added CoolOff - JHE}
ELSE
SeqC CRCOffC ExitType ZCP3C ExitFeed EOL {SameTool - JHE}
END
END
ELSE
IF Drilling?
IF Repeats?
EACHRep
DoSubComment
END
IF NewTool? {Added this check - JHE}
SeqC DrillCP GetCoolOn EOL {Added GetCoolOn - JHE}
ELSE
SeqC DrillCP EOL {SameTool - JHE}
END
GetCycle
SeqC
IF RigidTap?
'G84.2'
ELSE
Cycle
END
FromCP StrtPos ZDepth RLevel Dwell Peck Retract FeedEnt EOL
TrackZNO# FIRST SPZ#
ToolPath
IF RetractToCP1? {.81}
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
SeqC 'G80' EOL
IF Repeats?
NEXTRep
END
IF NEXT NewTool? {Added this check - JHE}
SeqC Rapid ZCP3 CoolOff EOL {Added CoolOff, removed C's - JHE}
ELSE
SeqC Rapid ZCP3 EOL {SameTool - JHE}
END
END
END
RETURN

FinishLastOp:
SeqC CoolOff EOL
SeqC RapidC IncValue OfstOff 'X0.Y0.' SpinOff EOL {Added this line - JHE}
SeqC AbsOrInc 'B0.' EOL {Added this line - JHE}
DoEndOpPS
IF FIRST ToolChangeAtHome?
SeqC FirstHome EOL {Removed AbsOrInc Rapid SpinOff - JHE}
END
IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart? {no tool change after doing last part}
IF ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
END
ELSE
SeqC IncValue 'G30X0.M40' EOL {Removed OfstOff, added G30 M40 - JHE}
{SeqC CRCOff 'G49D0' EOL} {Removed this line - JHE}
SeqC AbsOrInc EOL
SeqC 'M60' EOL {Removed ProgStop, added M60 - JHE}
SeqC 'M63' EOL {Removed 'S800', added M63 - JHE}
{SeqC UnTool ToolChng EOL} {Removed this line - JHE}
SeqC EOP EOL
END
RETURN

DoToolsOps:
EachOp
IF GTEqual? Operation# Recall# Num#('1') AND LTEqual? Operation# Recall# Num#('2')
{Tools1stOp ² op ² ToolsLastOp}
DoOp
END
NextOp
RETURN

NextTools1stOp:
SetNextToolOp Operation#
RETURN

GetToolsOps:
EachOp
IF Equal? Operation# Recall# Num#('1') {if op = Tools1stOp}
IF GreaterThan? NextTools1stOp Recall# Num#('1') {if NextTools1stOp is greater Tools1stOp}
Save# Num#('2') SUB# NextTools1stOp Num#('1') {ToolsLastOp becomes NextTools1stOp less 1}
ELSE {else}
Save# Num#('2') Recall# Num#('3') {ToolsLastOp becomes ncCAMsLastOp}
END
END
NextOp
RETURN

DoTool:
IF NOT Flag?('1')
GetToolsOps
IF WorkFixtureOffsets?
NewWFO
EachWFO
TagInc
DoToolsOps
IncWFO
NextWFO
ELSE
EachPart
TagInc
DoToolsOps
NextPart
END
IF LessThan? Recall# Num#('2') Recall# Num#('3') {if ToolsLastOp < ncCAMsLastOp}
Save# Num#('1') ADD# Recall# Num#('2') Num#('1') {Tools1stOp becomes NextTools1stOp}
ELSE {else}
SetFlag('1') {set DoneFlag}
END
TagInit
END
RETURN

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

{setup and initializations}
InitProg
TagInit
SetFlagF('1') {done flag}
ReverseXZArcs
InitWFONum
SetFlood
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
EachOp {Start of post processing *********************}
IF FirstOperation?
ProgID1
IF UseComments? AND ProgramNameComment?
'( ' ProgramName$ ' )'
END
EOL
IF ToolChangeAtHome?
SetHome
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$ ' MILLIMETERS )' EOL
END
IF PartsComment?
'( PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
'( FIRST TOOL NOT IN SPINDLE )' EOL
END
END
OpenSub
RestoreScale
END
NextOp
IF MultipleParts?
IF AllToolsOnePart?
IF WorkFixtureOffsets?
NewWFO
EachWFO
TagInc
EachOp
DoOp
NextOp
FinishLastOp
IncWFO
NextWFO
ELSE
EachPart
TagInc
EachOp
DoOp
NextOp
FinishLastOp
NextPart
END
ELSE
IF OneToolAllParts?
EachOp
IF FirstOperation?
Save# Num#('1') Operation# {ncCAMs1stOp becomes Tools1stOp}
END
IF LastOp?
Save# Num#('3') Operation# {save ncCAMsLastOp}
END
NextOp
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
FinishLastOp
END
END
ELSE
EachOp
DoOp
NextOp
FinishLastOp
END
EOR EOL
CloseSub
Post2
IF UseComments?
SetScale('1')
IF FileBytesComment?
'( FILE LENGTH: ' FileBytes# ' CHARACTERS )' EOL
END
IF FileFeetComment?
'( FILE LENGTH: ' FileFeet# ' FEET )' EOL
END
IF FileMetersComment?
'( FILE LENGTH: ' FileMeters# ' METERS )' EOL
END
END
Close


Wyszukiwarka

Podobne podstrony:
Fanuc 11M M007 89m
Fanuc 11M [FN] M516 89m
Fanuc 11M MS M020 89m
Fanuc 11M [TM] CQ07 16 2
Fanuc 11M MS [HM] M433 80
Fanuc 11M Okuma M124 87
Fanuc 11M [EDMP] MW52 89
Fanuc 11M MTS LH M059 13 1
Fanuc 11M Toyoda [GS] MU04 89
Fanuc 11M [FA] MZ02 89
Fanuc 11M [JBT] M142 89 4
Fanuc 11M MS [RE] M734 89 1
Fanuc 11M Toyoda D434 15 1
Fanuc 11M [FN] M516 89
Fanuc 11M Tyd [CGB] CT37 16 4
Fanuc 11M MS [BTD] M432 80 1
Fanuc 11M [HA1] MZ69 85

więcej podobnych podstron