Mitsubishi H20 [MET] M568 87


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

{8/24/89
Copied & modified: Japax M026.53.
For: Lawrence Berkeley Labs
Changed positioning FORMAT to 4 decimal places.
Added literal 'M80M82M84' to beginning of each operation.
Added literal 'M90' to beginning of each operation.
Added literal 'M91' to end of each operation.
Deleted literal 'A01D01'.
Added CRCOffset label to MachSpec.
Changed CRCOffsetC to CRCOfst in ToolPath.
Set R-Format Max Arc Angle to 359,
Set Discrimination to Max Angle so full 360 circles get an IJ.
Changed Arc Center Lables to I & J.
Added FeedRateC to ToolPath.
JR}

{8/17/93
Modified: Mitsubishi H20 M240.62
For: Lawrence Berkeley Labs
Changes made per request by Pete Jackson
Updated to Version 4.1 per Fanuc 6M M001.81.2 Format.
DWB}

{7/27/94
Copied & modified: Mitsubishi H20 M240.81.2
For: Braden Eng / Milwaukee Electric Tool, Inc.
Deleted G20 from beginning of program.
Jim Radcliffe}

{2/9/96, Updated .81 number to .84, no changes necessary, MPK}

{3/22/96, Tested ZOnlyRepAutCycle, Incremented number to .87, MPK}

{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) {.72}
FORMAT(Program#,5) {.72}
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(NewWFO#,5) {.72}
FORMAT(Parts#,5) {.72}
FORMAT(Dwell#,6) {.72}
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

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
RestoreScale
END
RETURN

PSInit: {reset flags}
NewWFOF
RotateF
RETURN

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

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

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

EntryMove:
{ NOTE: This Post Processor does not support ZMoves. }
RETURN

StartSub:
OpenSub
DoSubComment
'>' SubNum EOL
RETURN

SubWarning:
{ NOTE: This Post Processor does not support ZMoves. }
RETURN

StdSub:
SeqLabC SubCall CallLab SubID 'R' RepCycs EOL
StartSub
RETURN

FinishSub1: {part 1}
IF NOT AutoCycle?
SeqLabC CRCOff 'M91' EOL
END
RETURN

FinishSubG92: {part 2}
SeqLab Preset ShiftR EOL
'<' SubNum EOL
CloseSub
SeqLabC Preset UnshiftR EOL
RETURN

OpenMP:
IF WorkFixtureOffsets?
' ' EOL
' ( Note - Post does not support MultipleParts with WorkFixtureOffsets. )' EOL
' ( Please change to EquallySpacedOffsets. )' EOL
' ' EOL
ELSE
NewProg
SeqLabC SubCall CallLab SubID 'R' Parts EOL
OpenSub
DoSubComment
'>' SubNum EOL
END
RETURN

CloseMP:
IF NOT WorkFixtureOffsets?
SeqLab Preset ShiftP EOL
'<' SubNum EOL
CloseSub
SeqLabC Preset UnshiftP EOL
END
RETURN

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

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

ToolPath:
ResetCRCNum {.72}
EACHFeat
IF PointFeat? { AutoCycle Only }
SeqLabC MoveSXYC EOL
SeqLabC SubCall CallLab SubID 'R1' EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
IF RapidFeat?
IF LastFeat? AND AutoCycle? {.70}
SeqLabC CRCOffC RapidC MoveXYC EOL
ELSE
IF XMove? OR YMove?
SeqLabC RapidC MoveXYC EOL
END
END
ELSE
IF LineFeat?
IF AutoCycle? {.70}
IF LastFeat?
SeqLabC CRCOffC FeedC MoveXYC FeedRateC EOL
ELSE
StdLine {enables CRC on first call}
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
SeqLabC FormatArc ArcFeedC EOL
DecelMove2
END
SeqLabC FormatArc DecelFeed EOL
ELSE
SeqLabC FormatArc ArcFeedC EOL
END
NEXTQuadrant
END
END
END
END
NEXTFeat
RETURN

WFOStuff:
{ NOTE: This Post Processor does not support WorkFixtureOffsets. }
RETURN

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

AutoCycCutSub2: {part 2}
ToolPath
SeqLab AbsValue CRCOff 'M91' EOL
'<' SubNum 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
AutoCycCutSub2
AutoCycPat
ELSE
ToolPath
END
RETURN

G92Sub:
StdSub
SeqLab SetAbs Connect StrtPos EOL
Milling
FinishSub1
FinishSubG92
RETURN

ZonlyRepAutoCycle:
{ NOTE: This Post Processor does not support ZMoves. }
RETURN

ZonlyRep:
{ NOTE: This Post Processor does not support ZMoves. }
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
SkipZ
SetMaxFeed('500')
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
EachOp {Start of post processing *********************}
IF FirstOperation?
EOR 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 NOT IN SPINDLE )' EOL
END
END
OpenSub
RestoreScale
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
SeqLab Plane AbsValue EOL
DoOpComments
DoPostScript
CheckPass
SeqLabC 'M80M82M84' EOL
SeqLabC 'M90' EOL
SeqLabC Preset StrtPos EOL
IF MultipleParts? AND OneToolAllParts?
OpenMP
SeqLab StrtPos EOL
END
ELSE
IF NewTool?

{Finish off last Operation}

IF MultipleParts? AND OneToolAllParts?
CloseMP
END
DoEndOpPS
SeqLabC 'M00' EOL

{Start new Operation}

SeqLabC PlaneC EOL
DoOpComments
DoPostScript
SeqLabC 'M80M82M84' EOL
SeqLabC 'M90' EOL
CheckPass
IF MultipleParts? AND OneToolAllParts?
OpenMP
SeqLab StrtPos EOL
END
ELSE
IF SameTool?
DoEndOpPS
SeqLabC 'M00' EOL

{Start new Operation}

SeqLabC PlaneC EOL
DoOpComments
DoPostScript
SeqLabC 'M80M82M84' EOL
SeqLabC 'M90' EOL
CheckPass
END
END
END {common point for all operations}
RapidF# { Forces FeedRate }
IF AutoCycle?
SeqLabC StrtPos EOL
END
IF Milling?
IF Repeats?
NewProg
G92Sub
ELSE {no repeat OPs}
Milling
IF NOT AutoCycle?
SeqLabC CRCOff 'M91' EOL
END
END
ELSE
IF Drilling?
{ NOTE: This Post Processor does not support Drilling. }
END
END
NextOp {loops back to EachOP until last Operation}

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

{finish last operation}
IF MultipleParts? AND OneToolAllParts?
CloseMP
END
DoEndOpPS
SeqLabC EOP EOL
CloseSub
Post2 {organize Subs into one program}
EOR 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