Fanuc 5M Router [SP] M571 81 3


{Change Comments ***********************************************************} {5/13/93 Copied & modified: Fanuc 5M [TM] M542.81.3 For: Swiss Plywood Machine: Porter Router Control: Fanuc 5M Changes made per conversations with Wayne Jacob at Swiss Plywood and FAX. This supports both Absolute and Incremental output. 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. All M01 are output with block deletes, EOP = M01, not M30. Added SetLineStrtChr('/'), block deletes, for M01, M21 and M28 codes. This control has a single turret with 6 bolts for each index position, activated by M11 - M16 codes. Changed OpToolID to 'M1' Tool#. /M21 at FirstOperation starts the motor and is only output once. /M28 at FirstOperation raises the optional head and is only output once. Added 'M21' and 'M28' with Block Deletes at FirstOperation. M24 lowers the head, M28 raises the head. Added HeadDown and HeadUp subs. HeadDown called from EntryMove sub and ToolPath PointFeat. HeadUp called from ExitMove, ExitMove2, AutoCycleCutSub2 and XYRep subs, and ToolPath PointFeat. Optional HeadUp called from FirstOperation. SetFlag(1) means HeadUp, SetFlagF(1) means HeadDown. Uses G00, G01, G02 and G03. Changed ArcIJC to ArcIJ and deleted ArcRC at FormatArc. G04P250 = quarter-second Dwell. Added Preset Home at FirstOperation and NewTool. Format for X, Y, I and J is ####^##0. Incremental Arc Centers with Minus Signs when needed. Format for F is ###^0. Deleted FORMATs 2 and 3, RotateF at PSInit, 4th and 5th Axis at PSStuff, and PostScript Comments related to this. Deleted NewWFO# at Formats and WFOStuff and NewWFOF at PSInit. Deleted all occurances of CRCOnC, CRCOffC and CRCOffsetC. Deleted all Z-axis output and added SkipZ at setup and initializations. Deleted ZOnlyRepAutoCycle sub. Deleted Canned Drilling Block at DrillStuff. Modified Drilling to output FeedC and FeedRateC on second Feature, Dwell if needed, HeadDown and HeadUp. Deleted ToolChng, Speed, SpinOn, SpinOff, CoolOn, CoolOff, OfstOn and OfstOff. Added ability to send SameTool to Home. DWB} {Prog Numeric Format Definitions *******************************************} #1 = '#.00' #4 = '####.####;0.' #5 = '#######0' #6 = '####^##0' #7 = '#;' FORMAT(FileFeet#,1) FORMAT(FileMeters#,1) FORMAT(PartShiftX#,4) FORMAT(PartShiftY#,4) FORMAT(PartShiftZ#,4) FORMAT(ToolDiameter#,4) {.72} FORMAT(Program#,5) {.72} FORMAT(Operation#,5) {.72} FORMAT(Tool#,5) {.72} FORMAT(Parts#,5) {.72} FORMAT(Tag#,5) 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 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 PSInit: {reset flags} RETURN PSStuff: {revised.72} RETURN DoPostScript: PSInit EachPS SeqC PostScript EOL {literals} PSStuff {commands} NextPS RETURN DoEndOpPS: PSInit EachEOPS SeqC EndOpPS EOL {literals} PSStuff {commands} NextPS RETURN HeadDown: IF Flag?('1') SetFlagF('1') SeqC 'M24' EOL END RETURN HeadUp: IF NOT Flag?('1') SetFlag('1') SeqC 'M28' EOL END RETURN EntryMove: HeadDown RETURN GetConnect: IF FeedConnect? FeedC ELSE RapidC END RETURN ExitMove: IF NOT FeedConnect? HeadUp END RETURN ExitMove2: HeadUp RETURN CycleWarning: { NOTE: This Post Processor takes care of Z Clearance. } RETURN FormatArc: IF ArcCW? CWArcC ELSE CCWArcC END MoveXYC ArcIJ RETURN StdLine: {enables CRC on first call, .70} IF Decelerate? IF RoomToDecel? DecelMove1 SeqC FeedC MoveXYC FeedRateC EOL DecelMove2 END SeqC FeedC MoveXYC DecelFeed EOL ELSE IF XMove? OR YMove? SeqC FeedC MoveXYC FeedRateC EOL END END RETURN ToolPath: EACHFeat IF PointFeat? { Drilling Only } IF NOT FirstFeat? SeqC FeedC MoveSXYC FeedEntC EOL {.80.01} END IF Dwell? SeqC 'G04P' Dwell# EOL END HeadDown HeadUp ELSE IF RapidFeat? IF XMove? OR YMove? SeqC RapidC MoveXYC EOL END ELSE IF LineFeat? StdLine ELSE IF ArcFeat? EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop } IF LastQuadrant? AND Decelerate? IF RoomToDecel? DecelMove1 SeqC FormatArc ArcFeedC EOL DecelMove2 END SeqC FormatArc DecelFeed EOL ELSE SeqC 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 Post Processor does not support WorkFixtureOffsets. } RETURN AutoCycCutSub1: {part 1} CalcACSRXY {calc tool position, CalcAutoCycleStatusRecordXY} SaveSubStatus {save tool position} SetPass1 {element cut moves} SetSRXYtoSP SeqC IncValue EOL RETURN AutoCycCutSub2: {part 2} SeqC AbsOrInc EOL HeadUp SetSRSubXY {restore SR to 1st position value} ReSetPass2 {restore for positioning moves} RETURN Milling: EntryMove ToolPath RETURN XYRep: CycleWarning EachRep IF NOT FirstCycle? SeqC GetConnect StrtPosC EOL END DoCycleComment IF FirstCycle? EntryMove ELSE IF FeedConnect? IF ZshiftOnly? EntryMove END ELSE IF FeedEntry? HeadUp END EntryMove END END ToolPath ExitMove NextRep RETURN NoRepAutoCycle: EACHFeat IF SPXMove? OR SPYMove? SeqC RapidC MoveSXYC EOL END AutoCycCutSub1 DoCycleComment Milling AutoCycCutSub2 NEXTFeat RETURN XYRepAutoCycle: CycleWarning EachRep EACHFeat IF SPXMove? OR SPYMove? SeqC GetConnect MoveSXYC EOL END SetAbs Save# Num#('4') SPX# Save# Num#('5') SPY# SetInc AutoCycCutSub1 DoCycleComment Milling AutoCycCutSub2 SetAbs TrackXNO# ADD# Recall# Num#('4') Recall# Num#('6') TrackYNO# ADD# Recall# Num#('5') Recall# Num#('7') SetAbsOrInc NEXTFeat NextRep RETURN DrillStuff: GetCycle RETURN CheckPass: IF AutoCycle? {use the correct StrtPos} SetPass2 ELSE SetPass1 END RETURN GetStartOfSameTool: DoPartCycleComment DoOpComments DoPostScript CheckPass RETURN MasterSub: IF FirstOperation? IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart? ELSE Seq 'M1' Tool# EOL { Index Position } SetLineStrtChr('/') SeqC 'M21' EOL { Motor Start } HeadUp { Optional Head Up } SetLineStrtChr('') IF ToolChangeAtHome? SetHome SeqC Preset Home EOL END DoPartCycleComment DoOpComments DoPostScript CheckPass SeqC Plane AbsOrInc EOL SeqC Rapid StrtPos EOL END ELSE IF NewTool? IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart? ELSE {Finish off last Operation} DoEndOpPS IF ToolChangeAtHome? SetAbs LoadFeat SUB# HomeX# CurOriginPosX# SUB# HomeY# CurOriginPosY# Num#('0') { Dummy Z } SeqC AbsOrInc EOL SeqC Rapid MoveXY EOL END SetLineStrtChr('/') IF LAST ProgStop? SeqC 'M01' EOL ELSE SeqC ProgStop EOL END SetLineStrtChr('') {Start new Operation} Seq 'M1' Tool# EOL { Index Position } IF ToolChangeAtHome? SeqC Preset Home EOL END DoPartCycleComment DoOpComments DoPostScript CheckPass SeqC PlaneC AbsOrInc EOL SeqC Rapid StrtPos EOL END ELSE IF SameTool? DoEndOpPS IF ToolChangeAtHome? SetAbs LoadFeat SUB# HomeX# CurOriginPosX# SUB# HomeY# CurOriginPosY# Num#('0') { Dummy Z } SeqC AbsOrInc EOL SeqC Rapid MoveXY EOL END IF LAST ProgStop? SetLineStrtChr('/') SeqC 'M01' EOL SetLineStrtChr('') END {Start new Operation} GetStartOfSameTool SeqC PlaneC AbsOrInc EOL SeqC Rapid StrtPos EOL END END END {common point for all operations} RapidF# { No Output } IF Milling? IF AutoCycle? IF Repeats? XYRepAutoCycle IF NOT FeedConnect? SeqC ExitMove2 EOL END ELSE NoRepAutoCycle SeqC ExitMove2 EOL END ELSE { NOT AutoCycle } IF Repeats? XYRep ELSE Milling END SeqC ExitMove2 EOL END ELSE IF Drilling? IF Repeats? EachRep DoCycleComment IF FirstCycle? DrillStuff END SeqC StrtPosC EOL ToolPath NextRep ELSE DrillStuff ToolPath END END END RETURN EndPartSub: {End of program ************************************************************} {finish last operation} DoEndOpPS IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier} SetAbs LoadFeat SUB# FIRST HomeX# CurOriginPosX# SUB# FIRST HomeY# CurOriginPosY# Num#('0') { Dummy Z } SeqC AbsOrInc EOL SeqC Rapid MoveXY EOL END SetLineStrtChr('/') IF ProgStop? SeqC 'M01' EOL ELSE IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart? SeqC ProgStop EOL END END SetLineStrtChr('') 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 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 NOT FirstPart? {Finish off last Operation} DoEndOpPS {Start new Operation} DoPartCycleComment DoOpComments DoPostScript CheckPass SeqC PlaneC AbsOrInc EOL SeqC Rapid StrtPos EOL 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 SetMaxFeed('400') Save# Num#('1') Num#('0') Save# Num#('2') Num#('0') Save# Num#('3') Num#('0') SetFlagF('1') { For M24/M28 Head Down/Up } 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 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 NOT IN SPINDLE )' EOL END END OpenSub RestoreScale WFOStuff IF MultipleParts? 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 END Save# Num#('1') Num#('1') 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 SetLineStrtChr('/') SeqC EOP EOL SetLineStrtChr('') Post Close 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:
AB 4300 Router [SP] M572 81 3
Fanuc 5M [HM] M653 81 4m
Fanuc 5M [HM] M653 81 4
Fanuc 0M [SP] M455 81 2
Fanuc 0M LH P&W [SP] CV84 16 3
Fanuc 0M Wasino WM3 M525 81 2
Fanuc 10M MV40 [KC] M668 81 2
Fanuc 5M Mazak LH [JT] MU88 16m
Fanuc 11M Mat [PM] M716 81 8
AT Fanuc 5M M083 80
Dynapath Delta 20 SP M780 81 2
Fanuc 6M Mat MC1000V M474 81 1
Fanuc Mate TC Gild L048 81 1
Fanuc SMG 48V [TS] M576 81 3
Fanuc 0M Leadwell (TT) M188 81
Fanuc 5M M015 87m

więcej podobnych podstron