GE 550 M087 87


{7/21/87 TF, ADDED N TO STRING 2 FO SEQUENCE # ?}
{7/24/90, Added InitProg globally to posts with this remark, DWB}
{1/24/94, Updated: GE 550 M087.57 to .81.2 format, MultipleParts not supported, JR}

{2/12/96, Changed .81 number to .86, 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'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ZDepth#,2)
FORMAT(ClearancePlane2#,2)
FORMAT(TrackZ#,2)
FORMAT(ToolDiameter#,4)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)

{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?
'( 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}
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

FourSpaces:
' '
RETURN

FIRO:
SeqC FourSpaces 'Z' Zdepth# EOL
SeqC FourSpaces 'Z' ClearancePlane2# RapidF EOL
RETURN

FIFO:
SeqC FourSpaces 'Z' Zdepth# EOL
SeqC FourSpaces 'Z' ClearancePlane2# EOL
RETURN

OpenMP:
{EachPart}
'*** This Processor does not support Multiple Parts ***' EOL
RETURN

CloseMP:
{NextPart}
RETURN

FormatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXYZC ArcIJ
RETURN

StdRapid:
IF XMove? OR YMove? OR ZMove?
SeqC FourSpaces FeedC MoveXYZC RapidF EOL
END
RETURN

StdLine: {enables CRC on first call, .70}
IF XMove? OR YMove? OR ZMove?
SeqC FourSpaces FeedC MoveXYZC EOL
END
RETURN

StdArc:
EACHQuadrant
SeqC FourSpaces FormatArc EOL
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 FourSpaces FeedC ZInC EOL
ELSE
SeqC FourSpaces FeedC ZInC RapidF EOL
END
RETURN

CutAutoCycle:
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
SetSRXYtoSP
SeqC FourSpaces IncValue EOL
IF Repeats? AND ZshiftOnly?
EachRep
EntryMove
ToolPath2
IF NOT FeedConnect?
IF FIFO?
SeqC FourSpaces FeedC PRIME ZCP2 EOL
ELSE
SeqC FourSpaces FeedC PRIME ZCP2 RapidF EOL
END
END
NextRep
ELSE
EntryMove
ToolPath2
END
IF FIFO?
SeqC FourSpaces AbsOrInc EOL
SeqC FourSpaces FeedC ZCP2 FeedEntC EOL
ELSE
SeqC FourSpaces AbsOrInc EOL
SeqC FourSpaces FeedC ZCP2 RapidF EOL
END
SetSRSubXY {restore tool position}
SetSRSubMove
ReSetPass2 {restore for positioning moves}
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
IF NOT FirstFeat?
IF FIFO?
SeqC FourSpaces Feed MoveSXYC RapidF EOL
ELSE
SeqC FourSpaces MoveSXYC EOL
END
END
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
CutAutoCycle
ELSE
IF NOT FirstFeat?
SeqC FourSpaces MoveSXYC RapidF EOL
END
IF Peck?
PeckManual
ELSE
IF FIDRO?
FIRO
ELSE
FIFO
END
END
END
ELSE
IF RapidFeat?
StdRapid
ELSE
IF LineFeat?
StdLine
ELSE
IF ArcFeat?
StdArc
END
END
END
END
NEXTFeat
RETURN

DoLastPeck:
SeqC FourSpaces FeedC 'Z' TrackZ# SPZ# EOL
IF RetractToCP1?
SeqC FourSpaces FeedC ZCP1 RapidF EOL
ELSE
SeqC FourSpaces FeedC ZCP2 RapidF EOL
END
RETURN

DoPeck:
IF GreaterThan? SUB# Recall# Num#('1') Peck# SPZ#
Save# Num#('1') SUB# Recall# Num#('1') Peck#
SeqC FourSpaces FeedC 'Z' TrackZ# Recall# Num#('1') EOL
IF PeckFullRetract?
SeqC FourSpaces FeedC ZCP2 RapidF EOL
END
SeqC FourSpaces FeedC 'Z' TrackZ# ADD# Recall# Num#('1') Retract# RapidF EOL
END
RETURN

DrillPath:
EACHFeat
IF NOT FirstFeat?
SeqC FourSpaces FeedC MoveSXYC RapidF EOL
END
SeqC FourSpaces FeedC ZCP2C RapidF EOL
IF Peck?
Save# Num#('1') ClearancePlane2#
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoLastPeck
ELSE
SeqC FourSpaces FeedC 'Z' ZDepth# EOL
IF Dwell?
SeqC 'G4X' Dwell# EOL
END
IF FIRO?
IF RetractToCP1?
SeqC FourSpaces FeedC ZCP1 RapidF EOL
ELSE
SeqC FourSpaces FeedC ZCP2 RapidF EOL
END
END
IF FIFO?
SeqC FourSpaces ZCP2 EOL
IF RetractToCP1?
SeqC FourSpaces FeedC ZCP1 RapidF EOL
END
END
IF TAP?
SeqC FourSpaces ZCP2 EOL
IF RetractToCP1?
SeqC FourSpaces FeedC ZCP1 RapidF EOL
END
END
END
NEXTFeat
RETURN

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

InitProg
SetFlagF('1') {done flag}
ReverseXZArcs
SetFlood
SetMaxRPM('10000') {?}
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?
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 ' MoveType$ ' 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
DoOpComments
DoPostScript
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
Plane
SeqC FourSpaces AbsOrInc EOL
CheckPass
SeqC FourSpaces Feed StrtPos RapidF EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
END
ELSE
IF NewTool?
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF ToolChangeAtHome?
SeqC FourSpaces Feed Home RapidF EOL
END
IF LAST ProgStop?
SeqC 'M00' EOL
END

{Start new Operation}

DoOpComments
Plane
DoPostScript
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
SeqC FourSpaces Feed StrtPos RapidF EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
END
ELSE
IF SameTool?
IF LAST ProgStop?
SeqC 'M00' EOL
END
DoEndOpPS
DoOpComments
Plane
DoPostScript
CheckPass
SeqC FourSpaces Feed StrtPos RapidF EOL
END
END
END
IF Milling?
SeqC FourSpaces ZCP2 RapidF EOL
IF Repeats?
IF ZshiftOnly? AND AutoCycle?
{done in CutAutoCycle called from ToolPath}
ELSE
EACHRep
DoSubComment
IF NOT FirstCycle?
IF FeedConnect?
SeqC FourSpaces Feed StrtPos EOL
ELSE
SeqC FourSpaces Feed StrtPos RapidF EOL
SeqC FourSpaces ZCP2C RapidF EOL
END
END
END
END
IF NOT AutoCycle?
EntryMove
END
ToolPath
IF Repeats?
IF ZshiftOnly? AND AutoCycle?
{done in CutAutoCycle called from ToolPath}
ELSE
IF NOT FeedConnect?
SeqC FourSpaces FeedC PRIME ZCP3C RapidF EOL
END
NEXTRep
END
END
IF FIFO?
SeqC FourSpaces FeedC ZCP3C EOL
ELSE
SeqC FourSpaces FeedC ZCP3C RapidF EOL
END
ELSE
IF Drilling?
IF Repeats?
EachRep
IF NOT FirstCycle?
SeqC FourSpaces Feed StrtPos RapidF EOL
END
END
DrillPath
IF Repeats?
NextRep
END
SeqC FourSpaces ZCP3C RapidF EOL
END
END
NextOp
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF FIRST ToolChangeAtHome?
SeqC FourSpaces Feed FirstHome RapidF EOL
END
IF ProgStop?
SeqC 'M00' EOL
END
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
CloseSub
Post2 {organize Subs into one program}
Close
IF UseComments?
Reopen
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
Close
END



Wyszukiwarka