{7/24/90, Added InitProg globally to posts with this remark, DWB}
{5/19/92 Modified: Cin 5V 1250 Acr 8-D M154.57 For: Gibbs & Associates Updated to Version 4.0 per Fanuc 5M M015.79 Format. Kim Michelman}
{11/17/94 Updated: Cin 5V 1250 Acr 8-D M154.81 For: Gibbs & Associates/McIver Versions: ncCad 4.33/ncCAM 4.33/ncPost 4.33.04/Compost 4.21.23 Changes made per Pete Jackson This Processor does not support the following: WorkFixtureOffsets ZMoves Planes Spindle Coolant CutterRadiusCompensation CRCOfst is output on StrtPos block at FirstOperation, NewTool and SameTool. Updated to Version 4.2 per LongHand M001.81.3e Format. This supports MultipleParts. Using Var(1), Var(2) and Var(3) for logical control of MultiplePart Operations. Using Var(4), Var(5), Var(6) and Var(7) for correct Positioning of AutoCycles that Repeat in X and/or Y, and when AbsoluteMoves = FALSE. Corrected FORMAT5 from '########;0' to '#######0'. Added Tag# to FORMAT5. Added Recall# to FORMAT5. Added RestoreScale Sub per 4-Axis Post Processor. Added logic of MPLoop sub to handle IF NewTool? and LastOp? situations. Commented out DoEndOpPS at MPLoop for OneToolAllParts, it does not work correctly. Added BadMPWFOReport sub. Reports when MultipleParts AND WorkFixtureOffsets = TRUE AND EquallySpacedOffset values exist. Added FORMAT8, 'Ä…#bbbb.bbbb#', for PartShiftX#, PartShiftY# and PartShiftZ# commands. Moved SeqC and EOL outside of IF ELSE condition at ExitMove sub. Moved SeqC AbsOrInc and EOL outside of IF ELSE condition at AutoCycCutSub2 sub. Deleted ReSetPass2 at end of ZonlyRepAutoCycle sub. Already executed at end of call to AutoCycCutSub2 sub. Changed First occurance of GetConnect to ' G78' at ZonlyRepAutoCycle sub. FeedConnect only applies to Each Repeat, not Each Feature. DWB}
{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 *******************************************}
RestoreScale: IF Metric? {CAM file is in Metric, tools and tool path} SetScale('.03937007874') { change to English, this is an English post} END RETURN
DoPartCycleComment: IF MultipleParts? AND UseComments? AND SubComment? '( PART NO. ' Tag# ' )' EOL END RETURN
DoCycleComment: 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
BadMPWFOReport: SetStatusOff ' ' EOL 'Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„' EOL 'Ä„ NOTE: Even though you have elected to Ä„' EOL 'Ä„ process this file using Multiple Ä„' EOL 'Ä„ Parts with Work Fixtures, there exist Ä„' EOL 'Ä„ non-zero values in the invisible, Ä„' EOL 'Ä„ Equally SpacedÉ fields, as follows: Ä„' EOL 'Ä„ Ä„' EOL '*****************************************' EOL IF NotEqual? PartShiftX# Num#('0') ' X axis shift = ' PartShiftX# EOL END IF NotEqual? PartShiftY# Num#('0') ' Y axis shift = ' PartShiftY# EOL END IF NotEqual? PartShiftZ# Num#('0') ' Z axis shift = ' PartShiftZ# EOL END '*****************************************' EOL 'Ä„ Ä„' EOL 'Ä„ Please reset these values to zero as Ä„' EOL 'Ä„ they affect the coordinate values Ä„' EOL 'Ä„ output, starting with Part# 2. Ä„' EOL 'Ä„ Thank You. Ä„' EOL 'Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„' EOL ' ' EOL SetStatusOn RETURN
PSInit: {reset flags} 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
EntryMove: { NOTE: This Processor does not support ZMoves } RETURN
GetConnect: IF FeedConnect? FeedC ELSE ' G78' SetFlag('2') { Unconditional Rapid or Feed on FirstFeat LineFeat } END RETURN
ExitMove: IF NOT FeedConnect? SeqLabC ' G81' EOL END RETURN
ExitMove2: { NOTE: This Processor does not support ZMoves } RETURN
CycleWarning: { NOTE: This Post Processor takes care of Z Clearance. } RETURN
FormatArc: IF ArcCW? CWArcC ELSE CCWArcC END MoveXYC ArcIJ RETURN
CkCRC: { 4.2 } { NOTE: This Processor does not support CutterRadiusCompensation } RETURN
StdLine: IF Decelerate? IF RoomToDecel? DecelMove1 SeqLabC FeedC MoveXYC FeedRateC EOL DecelMove2 END SeqLabC FeedC MoveXYC DecelFeed EOL ELSE IF XMove? OR YMove? SeqLabC FeedC MoveXYC FeedRateC EOL END END RETURN
ToolPath: EACHFeat IF PointFeat? { Drilling Only } SeqLabC MoveSXYC EOL {.80.01} ELSE IF RapidFeat? IF XMove? OR YMove? IF Flag?('2') SetFlagF('2') { Unconditional Rapid on FirstFeat LineFeat } Rapid END END IF AutoCycle? SeqLabC RapidC MoveXYC EOL ELSE IF XMove? OR YMove? SeqLabC RapidC MoveXYC EOL {.82} END END ELSE IF LineFeat? IF XMove? OR YMove? IF Flag?('2') SetFlagF('2') { Unconditional Feed on FirstFeat LineFeat } Feed END END IF AutoCycle? {.70} IF LastFeat? SeqLabC 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 IF AutoCycle? SetAbs Save# Num#('6') SUB# EPX# CurOriginPosX# Save# Num#('7') SUB# EPY# CurOriginPosY# SetInc END END NEXTFeat RETURN
WFOStuff: { NOTE: This Processor does not support WorkFixtureOffsets. } RETURN
AutoCycCutSub2: {part 2} { NOTE: This Processor does not support ZMoves } SeqLabC AbsOrInc EOL SetSRSubXY {restore SR to 1st position value} ReSetPass2 {restore for positioning moves} RETURN
Milling: ToolPath RETURN
XYZRep: CycleWarning EachRep IF FirstCycle? DoCycleComment ELSE ExitMove DoCycleComment SeqLabC GetConnect StrtPosC EOL END ToolPath NextRep RETURN
NoRepAutoCycle: EACHFeat IF SPXMove? OR SPYMove? SeqLabC ' G81' EOL DoCycleComment SeqLabC ' G78' MoveSXYC EOL SetFlag('2') { Unconditional Rapid or Feed on FirstFeat LineFeat } ELSE DoCycleComment END AutoCycCutSub1 Milling AutoCycCutSub2 NEXTFeat RETURN
ZonlyRepAutoCycle: EACHFeat IF SPXMove? OR SPYMove? SeqLabC ' G81' EOL DoCycleComment SeqLabC ' G78' MoveSXYC EOL SetFlag('2') { Unconditional Rapid or Feed on FirstFeat LineFeat } ELSE DoCycleComment END AutoCycCutSub1 EachRep IF NOT FirstCycle? ExitMove DoCycleComment IF SPXMove? OR SPYMove? SeqLabC GetConnect MoveSXYC EOL END END ToolPath NextRep AutoCycCutSub2 NEXTFeat RETURN
DrillStuff: { Nothing needed here } RETURN
CheckPass: IF AutoCycle? {use the correct StrtPos} SetPass2 ELSE SetPass1 END RETURN
StartOp: Plane { No Output } 'O?' AbsOrInc IF Milling? SetFlag('1') ' G78' SetFlag('2') { Unconditional Rapid or Feed on FirstFeat LineFeat } IF CutterRadiusCompensation? CRCOfst ELSE ' V00' END ELSE { Drilling } SetFlagF('1') GetCycle Cycle ' V00' END StrtPos ToolOfst IF Milling? FeedRate END EOL RETURN
CkFlag: IF Flag?('1') { LAST Milling } ' G81' ELSE { LAST Drilling } Rapid END RETURN
MasterSub: IF FirstOperation? IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart? ELSE IF ToolChangeAtHome? SetHome END DoPartCycleComment DoOpComments DoPostScript StartOp END ELSE IF NewTool? IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart? ELSE
{Finish off last Operation}
DoEndOpPS SeqLabC CkFlag ToolChng EOL IF LAST ProgStop? SeqLabC ' M00' EOL ELSE SeqLabC ProgStop EOL END
{Start new Operation}
DoPartCycleComment DoOpComments DoPostScript StartOp END ELSE IF SameTool? DoEndOpPS SeqLabC CkFlag ' M26' EOL IF LAST ProgStop? SeqLabC ' M00' EOL END
{Start new Operation}
GetStartOfSameTool StartOp END END END {common point for all operations} IF Milling? SetFlag('2') { Unconditional Rapid or Feed on FirstFeat LineFeat } IF AutoCycle? IF Repeats? IF ZShiftOnly? ZonlyRepAutoCycle ELSE XYZRepAutoCycle END ELSE NoRepAutoCycle END ELSE { NOT AutoCycle } IF Repeats? XYZRep ELSE Milling END END SetFlagF('2') { Unconditional Rapid or Feed on FirstFeat LineFeat } ELSE IF Drilling? IF Repeats? EachRep DoCycleComment ToolPath NextRep ELSE ToolPath END END END RETURN
EndPartSub: {End of program ************************************************************}
{finish last operation} DoEndOpPS SeqLabC CkFlag ToolChng EOL IF ProgStop? SeqLabC ' M00' EOL ELSE IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart? SeqLabC ProgStop EOL END END RETURN
MPLoop: TagInit IF AllToolsOnePart? EachPart TagInc EachOp MasterSub NextOp EndPartSub NextPart ELSE { OneToolAllParts } Save# Num#('2') Recall# Num#('1') IF LTEqual? Recall# Num#('1') Recall# Num#('3') EachOp IF Equal? Operation# Recall# Num#('2') Save# Num#('2') ADD# Operation# Num#('1') IF NewTool? IF LAST Milling? SetFlag('1') ELSE SetFlagF('1') END IF Equal? Recall# Num#('1') Recall# Num#('3') Save# Num#('2') Operation# ELSE IF NotEqual? Recall# Num#('1') SUB# Recall# Num#('2') Num#('1') Save# Num#('2') SUB# Operation# Num#('1') END END END END NextOp EachPart TagInc EachOp IF GTEqual? Operation# Recall# Num#('1') IF LTEqual? Operation# Recall# Num#('2') IF Equal? Operation# Recall# Num#('1') IF FirstPart?
{Finish off last Operation}
{DoEndOpPS} SeqLabC CkFlag ' M26' EOL
{Start new Operation}
GetStartOfSameTool StartOp END END MasterSub END END NextOp NextPart Save# Num#('1') ADD# Recall# Num#('2') Num#('1') END END RETURN
{Start of executable Prog **************************************************}
{setup and initializations} InitProg ReverseXZArcs SkipZ SetMaxRPM('10000') SetMaxFeed('500') Save# Num#('1') Num#('0') { This Tool FirstOp# } Save# Num#('2') Num#('0') { This Tool LastOp# } Save# Num#('3') Num#('0') { LastOp# } Save# Num#('4') Num#('0') { XPos Status Register Updated Position for Repeated AutoCycles } Save# Num#('5') Num#('0') { YPos Status Register Updated Position for Repeated AutoCycles } Save# Num#('6') Num#('0') { LastFeat EPX# AbsPosValue for Repeated AutoCycles } Save# Num#('7') Num#('0') { LastFeat EPY# AbsPosValue for Repeated AutoCycles } SetFlagF('1') { Milling/Drilling Flag } SetFlagF('2') { Unconditional Rapid or Feed on FirstFeat LineFeat } 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 EOR EOL 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 IN SPINDLE )' EOL END END OpenSub RestoreScale IF MultipleParts? Save# Num#('1') Num#('1') IF WorkFixtureOffsets? 'NOTE: This Post Processor does not support Work Fixture Offsets for Multiple Parts.' EOL 'Therefore, the output will be controlled by the following values that are' EOL 'already entered in Equally Spaced Offsets Edit Fields:' EOL 'X' PartShiftX# ' Y' PartShiftY# ' Z' PartShiftZ# EOL 'It is recommended that you change your selection to Equally Spaced Offsets.' EOL IF NotEqual? PartShiftX# Num#('0') BadMPWFOReport ELSE IF NotEqual? PartShiftY# Num#('0') BadMPWFOReport ELSE IF NotEqual? PartShiftZ# Num#('0') BadMPWFOReport END END END END EachOp IF LastOp? Save# Num#('3') Operation# END NextOp MPLoop IF OneToolAllParts? MPLoop MPLoop MPLoop MPLoop MPLoop MPLoop MPLoop MPLoop MPLoop MPLoop MPLoop MPLoop MPLoop MPLoop MPLoop MPLoop MPLoop MPLoop MPLoop MPLoop MPLoop MPLoop MPLoop MPLoop MPLoop EndPartSub END ELSE EachOp MasterSub NextOp EndPartSub END SeqLabC EOP EOL EOR EOL Post 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