{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 *******************************************}
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
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
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