Dyna Myte 4000 M404 80


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

{3/4/91
Modified: Dyna Myte 4400 M228.73.1
For: Gibbs & Associates
Updated to Version 3.4 per Fanuc 6M M001.76.3 Format.
Corrected Drill cycles, AutoCycles, Repeats and Arcs in all planes per results from tests on
a Dyna Myte 2400 milling machine.
Made modifications to resemble Dyna Myte 2200 M119.76.3.
NOTE: This post processor will not output correctly if the user requests MultipleParts
and any operation contains AutoCycles or Repeats.
DWB}

{5/31/91
Modified: Dyna Myte 4400 M404.76.3
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 6M M001.80 Format.
Modified to output literal 'GOf' on all Rapid moves, Rapid is not a modal condition.
DWB}

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

#1 = '#.00'
#2 = '0'
#3 = '00'
#4 = '########;0'
#5 = 'b0.0; 0.0'
#6 = '+b00.000; 00.000'
#7 = '-b0.0000; 0.0000'
#8 = '+b0.0000; 0.0000'
#9 = '0000;0000'
#10 = '-0000;0000' { see IF Tap? in ToolPath }

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(Tool#,2) {.72}
FORMAT(Program#,3) {.72}
FORMAT(Parts#,3) {.72}
FORMAT(PartsLess1#,3)
FORMAT(Repeats#,3)
FORMAT(RepsLess1#,3)
FORMAT(NumFullPecks#,3)
FORMAT(Tag#,4)
FORMAT(Operation#,4) {.72}
FORMAT(FeedContour#,5)
FORMAT(FeedEntry#,5)
FORMAT(ArcAngle#,6)
FORMAT(ToolDiameter#,7) {.72}
FORMAT(HomeX#,7)
FORMAT(HomeY#,7)
FORMAT(StartPosX#,7)
FORMAT(StartPosY#,7)
FORMAT(SPX#,7)
FORMAT(SPY#,7)
FORMAT(SPZ#,7)
FORMAT(ArcJ#,7)
FORMAT(ClearancePlane2#,7)
FORMAT(RepeatX#,7)
FORMAT(RepeatY#,7)
FORMAT(OriginUnshiftRX#,7)
FORMAT(OriginUnshiftRY#,7)
FORMAT(ZDepth#,8)
FORMAT(SpeedRPM#,9)

{Prog Subroutines **********************************************************}

DoSubComment:
IF UseComments? AND SubComment?
'( SUB NUMBER: ' Program# ' )' 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
IF Metric? {CAM file is in metric, tools and tool path}
SetScale('.03937007874') { change to English, this is an English post}
END
END
RETURN

MoveType:
'G' {all moves get this}
IF AutoCycle?
'R' {incremantal}
ELSE
'O' {absolute}
END
RETURN

FeedRates:
IF Milling?
'? ' 'F XY =' FeedContour# EOL
END
'? ' 'F Z =' FeedEntry# EOL
RETURN

PSInit: {reset flags}
RotateF
RETURN

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

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

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

EntryMove:
IF FeedEntry?
'? ' MoveType ' ' ZIn EOL
ELSE
'? ' MoveType 'f' ZIn EOL
END
RETURN

StartSub:
OpenSub
'? ' 'SUB ' Program# EOL
DoSubComment
RETURN

SubWarning:
IF NOT FeedConnect?
IF AnyZshift?
' ' EOL
'( WARNING Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT )' EOL
' ' EOL
END
END
RETURN

StdSub:
IF AnyZShift?
'? ' 'REPEAT ' Repeats# EOL
'? ' 'CALL SUB ' Program# EOL
ELSE
'? ' 'CALL SUB ' Program# EOL
'? ' 'REPEAT ' RepsLess1# EOL
'? ' 'ZERO AT' EOL
'? ' ' X' RepeatX# EOL
'? ' ' Y' RepeatY# EOL
'? ' 'CALL SUB ' Program# EOL
'? ' 'REPEAT END' EOL
END
StartSub
RETURN

FinishSub1: {part 1}
UnSkipZ
IF NOT FeedConnect?
'? ' 'GOf' ZCP3 EOL
END
RETURN

FinishSubG92: {part 2}
'? ' 'SUB RETURN' EOL
CloseSub
IF AnyZshift?
'? ' 'REPEAT END' EOL
END
'? ' '>REF COODS' EOL
RETURN

OpenMP:
NewProg
EachPart
IF NOT FirstPart?
'? ' 'ZERO AT' EOL
'? ' ' X' CurOriginPosX# EOL
'? ' ' Y' CurOriginPosY# EOL
'? ' ' Z' CurOriginPosZ# EOL
END
'? ' 'CALL SUB ' Program# EOL
NextPart
StartSub
RETURN

CloseMP:
'? ' 'SUB RETURN' EOL
CloseSub
'? ' '>REF COODS' EOL
RETURN

FormatArc:
IF XYPlane?
'? ' 'ARC ' EOL
IF AutoCycle?
SetAbs
END
'? ' ArcI EOL
'? ' ArcJ EOL
IF AutoCycle?
SetInc
END
'? ' ' a='
IF ArcCW?
'-'
ELSE
' '
END
ArcAngle# EOL
ELSE
IF Repeats?
'*** ERROR - CANNOT USE XZ OR YZ ARCS WITH REPEATS' EOL
ELSE
IF XZPlane?
'? ' 'ZERO Y' EOL
ELSE {YZPlane}
'? ' 'ZERO X' EOL
END
'? ' 'ZERO AT ' EOL
'? ' ' Z' ArcJ# EOL
'? ' 'GR Q'
IF ArcCW?
'-'
ELSE
' '
END
ArcAngle# EOL
'? ' '>REF COODS' EOL
END
END
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
IF NOT FirstFeat?
'? ' 'GOfX' SPX# EOL
'? ' 'GOfY' SPY# EOL
END
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
SetStatusOff
SetACSPCompF
'? ' 'ZERO AT' EOL
'? ' ' X' SPX# EOL
'? ' ' Y' SPY# EOL
'? ' 'CALL SUB ' Program# EOL
'? ' '>REF COODS' EOL
SetACSPComp
SetStatusOn
ELSE
IF FIRO? OR Peck?
'? ' ' X=' SPX# EOL
'? ' ' Y=' SPY# EOL
ELSE
IF NOT FirstFeat?
'? ' ' X=' SPX# EOL
'? ' ' Y=' SPY# EOL
END
IF FIFO?
'? ' 'GOcZ' SPZ# EOL
ELSE {Tap}
'? ' 'GO Z' SPZ# EOL
FORMAT(SpeedRPM#,10)
'? ' 'SP= ' SpeedRPM# ' RPM' EOL
'? ' 'GOf' ZCP2 EOL
FORMAT(SpeedRPM#,9)
'? ' 'SP= ' SpeedRPM# ' RPM' EOL
END
END
END
ELSE
IF RapidFeat?
IF XMove? OR YMove?
'? ' MoveType 'f' MoveX EOL
'? ' MoveType 'f' MoveY EOL
END
IF ZMove?
'? ' MoveType 'f' MoveZ EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove?
'? ' MoveType ' ' MoveX EOL
'? ' ' ' MoveY EOL
IF Repeats? AND ZshiftOnly? AND NoZMoves?
ELSE
IF ZMove?
'? ' ' ' MoveZ EOL
END
END
ELSE
IF ZMove?
'? ' MoveType ' ' MoveZ EOL
END
END
ELSE
IF ArcFeat?
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
FormatArc
NEXTQuadrant
END
END
END
END
NEXTFeat
RETURN

WFOStuff:
{ Note: This Post Processor does not support Work Fixture Offsets. }
RETURN

AutoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
StartSub
SetSRXYtoSP
SetInc
RETURN

AutoCycCutSub2: {part 2}
ToolPath
SetAbs
IF Repeats? AND FeedConnect? AND ZshiftOnly?
ELSE
'? ' 'GOf' ZCP2 EOL
END
'? ' 'SUB RETURN' EOL
CloseSub
SetSRSubXY {restore SR to 1st position value}
SetSRSubMove
RETURN

AutoCycPat:
SetPass2 {position pattern}
ToolPath {call after NewProg for correct sub calls}
SetPass1 {reset}
RETURN

Milling:
IF AutoCycle?
NewProg
AutoCycCutSub1
EntryMove
AutoCycCutSub2
AutoCycPat
ELSE
EntryMove
ToolPath
END
RETURN

G92Sub:
SubWarning
StdSub
IF FeedConnect?
'? ' 'GO X' StartPosX# EOL
'? ' ' Y' StartPosY# EOL
ELSE
'? ' 'GOfX' StartPosX# EOL
'? ' 'GOfY' StartPosY# EOL
END
Milling
IF AnyZShift?
'? ' 'ZERO Z' EOL
SetInc
FinishSub1
SetAbs
ELSE
FinishSub1
END
FinishSubG92
RETURN

XYOnlyRepAutoCycle:
EachRep
EACHFeat
IF FirstCycle? AND FirstFeat?
ELSE
'? ' 'GOfX' SPX# EOL
'? ' 'GOfY' SPY# EOL
END
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
SetStatusOff
SetACSPCompF
'? ' 'ZERO AT' EOL
'? ' ' X' SPX# EOL
'? ' ' Y' SPY# EOL
'? ' 'CALL SUB ' Program# EOL
'? ' '>REF COODS' EOL
SetACSPComp
SetStatusOn
NEXTFeat
NextRep
AutoCycCutSub1
EntryMove
AutoCycCutSub2
RETURN

ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
NewProg
EachCycle
IF FeedConnect?
'? ' 'GO ' ZInPlusInc EOL
ELSE
IF FeedEntry?
IF NOT FirstCycle?
'? ' 'GOf' ZCP2PlusInc EOL {.69 added Rapid, reads better}
{can't call for cycle = 1, .69 changed to ZCP2PlusInc}
END
'? ' 'GO ' ZInPlusInc EOL
ELSE
'? ' 'GOf' ZInPlusInc EOL {.69 added Rapid, reads better}
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
'? ' 'CALL SUB ' Program# EOL
NextCycle
SetStatusOn
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
{.69, removed FinishSub1}
IF FeedConnect? {there is no Z up in the sub, .69}
'? ' 'GOf' ZCP2 EOL
END
'? ' 'SUB RETURN' EOL
CloseSub
RETURN

ZonlyRep:
EachCycle
IF NOT FirstCycle?
IF FeedConnect?
'? ' 'GO X' StartPosX# EOL
'? ' ' Y' StartPosY# EOL
ELSE
'? ' 'GOfX' StartPosX# EOL
'? ' 'GOfY' StartPosY# EOL
END
END
IF FeedConnect?
'? ' 'GO ' ZInPlusInc EOL {.71.2, changed to FeedC}
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
'? ' 'GOf' ZCP2PlusInc EOL {can't call for cycle =1} {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
'? ' 'GO ' ZInPlusInc EOL
ELSE
'? ' 'GOf' ZInPlusInc EOL {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
END
'? ' 'CALL SUB ' Program# EOL
NextCycle
StartSub
SkipZ
ToolPath
FinishSub1
'? ' 'SUB RETURN' EOL
CloseSub
RETURN

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

GetStartOfSameTool:
DoOpComments
DoPostScript
CheckPass
RETURN

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

{setup and initializations}
InitProg
ReverseXZArcs
UseSeparateSubCalls
SetMaxSeparateSubCalls ('50')
SetMaxRPM('4800')
SetMaxFeed('98')
SetLowerCaseOK
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
' 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
IF MultipleParts?
' ' EOL
'***** WARNING!!! This post processor does not support MultipleParts with *****' EOL
'***** any operation that contains Arcs generated in the XZ or YZ plane, *****' EOL
'***** or any operation that contains Repeats or AutoCycles, or both!!! *****' EOL
' ' EOL
END
EachOp {Start of post processing *********************}
SetAbs
Plane
IF FirstOperation?
EOR EOL
'? ' 'START INS ' Program# EOL
IF ToolChangeAtHome?
SetHome
END
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 ABSOLUTE INCHES )' EOL
END
IF PartsComment?
'( PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
'( FIRST TOOL IN SPINDLE )' EOL
END
END
OpenSub
IF Metric? {CAM file is in metric, tools and tool path}
SetScale('.03937007874') { change to English, this is an English post}
END
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
'? ' 'SETUP >zcxyu' EOL
DoOpComments
DoPostScript
'? ' 'TOOL ' Tool# EOL
IF CutterRadiusCompensation?
'? ' 'TD= ' ToolDiameter# EOL
END
FeedRates
IF NOT CoolOff?
'? ' 'COOLANT ON' EOL
END
'? ' 'SPINDLE ON' EOL
'? ' 'SP= ' SpeedRPM# ' RPM' EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
END
'? ' 'GOfX' StartPosX# EOL
'? ' 'GOfY' StartPosY# EOL
ELSE
IF NewTool?
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
IF LAST NOT CoolOff?
'? ' 'COOLANT OFF' EOL
END
'? ' 'Z>ZMAX' EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF ToolChangeAtHome?
'? ' 'GOfX' HomeX# EOL
'? ' 'GOfY' HomeY# EOL
END
'? ' 'SPINDLE OFF' EOL
IF LAST ProgStop?
'? ' 'HALT' EOL
ELSE
IF OptionalStops?
'? ' 'HALT' EOL
END
END

{Start new Operation}

DoOpComments
DoPostScript
'? ' 'TOOL ' Tool# EOL
IF CutterRadiusCompensation?
'? ' 'TD= ' ToolDiameter# EOL
END
FeedRates
IF NOT CoolOff?
'? ' 'COOLANT ON' EOL
END
'? ' 'SPINDLE ON' EOL
'? ' 'SP= ' SpeedRPM# ' RPM' EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
END
'? ' 'GOfX' StartPosX# EOL
'? ' 'GOfY' StartPosY# EOL
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
IF LAST NOT CoolOff?
'? ' 'COOLANT OFF' EOL
END
'? ' 'Z>ZMAX' EOL
'? ' 'SPINDLE OFF' EOL
'? ' 'HALT' EOL

{Start new Operation}

GetStartOfSameTool
FeedRates
IF NOT CoolOff?
'? ' 'COOLANT ON' EOL
END
'? ' 'SPINDLE ON' EOL
'? ' 'SP= ' SpeedRPM# ' RPM' EOL
'? ' 'GOfX' StartPosX# EOL
'? ' 'GOfY' StartPosY# EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
'? ' 'COOLANT OFF' EOL
END
IF NewToolOffset?
'? ' 'Z>ZMAX' EOL

{Start new Operation}

GetStartOfSameTool
FeedRates
'? ' 'SP= ' SpeedRPM# ' RPM' EOL
'? ' 'GOfX' StartPosX# EOL
'? ' 'GOfY' StartPosY# EOL
ELSE

{Start new Operation}

GetStartOfSameTool
FeedRates
'? ' 'SP= ' SpeedRPM# ' RPM' EOL
'? ' 'GOfX' StartPosX# EOL
'? ' 'GOfY' StartPosY# EOL
END
IF NOT CoolOff? AND LAST CoolOff?
'? ' 'COOLANT ON' EOL
END
END
END
END
END {common point for all operations}
IF Milling?
'? ' 'GOf' ZCP2 EOL
IF Repeats?
NewProg
IF ZshiftOnly?
IF AutoCycle? {incremental Autocycle sub can have Z moves}
ZonlyRepAutoCycle
ELSE {Z shift only, NOT Auto Cycle}
IF UseSeparateSubCalls? AND CyclesLessThanMaxSubCalls?
FindAnyZMoves {for normal abs subroutine}
IF NoZMoves?
ZonlyRep
ELSE
G92Sub {pattern shift, not element}
END
ELSE {no sep subs desired}
G92Sub
END
END {end Auto Cycle IF}
ELSE {not Z only}
IF AutoCycle?
XYOnlyRepAutoCycle
ELSE
G92Sub
END
END {end Z only IF}
ELSE {no repeat OPs}
Milling
END
'? ' 'GOf' ZCP3 EOL
ELSE
IF Drilling?
GetCycle
IF Peck? OR FIRO?
IF Repeats?
NewProg
'? ' 'CALL SUB ' Program# EOL
'? ' 'REPEAT ' RepsLess1# EOL
'? ' 'GOfX' RepeatX# EOL
'? ' 'GOfY' RepeatY# EOL
'? ' 'PROG.REF' EOL
'? ' 'CALL SUB ' Program# EOL
StartSub
'? ' 'GOfX' StartPosX# EOL
'? ' 'GOfY' StartPosY# EOL
END
IF Peck?
'? ' 'DRIL PECK=' NumFullPecks# EOL
ELSE
'? ' 'DRIL PECK=00' EOL
END
'? ZH=' ClearancePlane2# EOL
'? Zd= ' ZDepth# EOL
ToolPath
IF Repeats?
'? ' 'SUB RETURN' EOL
CloseSub
'? ' 'REPEAT END' EOL
'? ' 'GOfX' OriginUnshiftRX#('1') EOL
'? ' 'GOfY' OriginUnshiftRY#('1') EOL
'? ' 'PROG.REF' EOL
END
ELSE {NOT Peck? OR FIRO?}
IF Repeats?
StdSub
'? ' 'GOfX' StartPosX# EOL
'? ' 'GOfY' StartPosY# EOL
END
'? ' 'GOf' ZCP2 EOL
ToolPath
IF Repeats?
FinishSubG92
END
END
'? ' 'GOf' ZCP3 EOL
END
END
NextOp {loops back to EachOP until last Operation}

{End of program ************************************************************}

{finish last operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
IF NOT CoolOff?
'? ' 'COOLANT OFF' EOL
END
'? ' 'Z>ZMAX' EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
'? ' 'GOfX' FIRST HomeX# EOL
'? ' 'GOfY' FIRST HomeY# EOL
END
'? ' 'SPINDLE OFF' EOL
IF ProgStop?
'? ' 'HALT' EOL
END
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
'? ' 'SKIP TO ł' Tag# EOL
CloseSub
Post2 {organize Subs into one program}
'>' Tag# EOL
'? ' 'END NEWPART' EOL
Close
Retag
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:
Dyna Myte 4000 long M405 80 1
Dyna Myte 2000 M119 80
Dyna Myte 4400 M228 80
Dyna Myte 2400 [CC] MV98 80 2
Dyna Myte 2800 long M419 80 1
Dyna Myte 2000 long M346 80 1M
Dyna Myte 4400 long M307 80 1
Dyna Myte 2800 M420 80m
Dyna Myte 2000 M119 80M
Dyna Myte 3000 L188 82
Dyna Myte 2800 M420 85
Dyna Myte 2000 M119 85
żuraw 80

więcej podobnych podstron