Fanuc 6MB Kit [ASKO] M686 87 2


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

{3/1/90, Updated to Version 3.2 per Fanuc 6M M001.70 Format, DWB}

{6/21/90
Modified: Fanuc 10M Kit M028.70
For: GS Manufacturing
Use G89 for FIFO cycle with Dwell.
Added InitProg, FIRST modifier & Connect for ZOnlyRep sub.
Added Prog Formats.
Added CoolOff? and new CoolOn sub.
Changed to new PS subs.
Jim Radcliffe}

{7/24/90, Replaced all occurances of SetSRXYZero with SetSRXYtoSP, DWB}

{3/26/91
Modified: Fanuc 10M Kit M028.73
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 6M M001.80 Format.
Kim Michelman}

{5/11/93, Updated Fanuc 10M Kit M028.79 to .81.2 format, JR}
{NOTE: only difference to M001.81.2 is the G89 bore cycle, JR}

{5/11/93
Copied & modified: Fanuc 10M Kit M028.81.2
For: AAA Tool & Die
Control: Fanuc 6MB
Machine: Kitamura Mycenter-3
Modified safter start blocks.
Cancel CRC on last non-arc feature, left CRCOffC in other locations in prog as saftey.
Output 'N' Operation# at start of all operations if MinimizeSequencing is true.
Send to machine home Y at end of each tool.
Jim Radcliffe}

{9/8/94
Updated: Fanuc 6MB Kit M-3 M592.81.2
For: Gibbs & Associates/ASKO
Versions: ncCad 4.33/ncCAM 4.33/ncPost 4.33.03/Compost 4.21.22
Updated to Version 4.2 per Fanuc 6M M001.81.2d Format.
Added RestoreScale Sub per 4-Axis Post Processor.
Changed TrackZNO# ZDepth# to TrackZNO# FIRST SPZ# at IF Drilling.
SPZ# is affected by SetScale, whereas ZDepth# is not.
Added CkCRC sub for CRCOffC per version 4.2.
CutterRadiusCompensation ExitLength will output G40 on LastFeat AND LineFeat at StdLine sub.
Added support of CRC during multiple pocket dog-bone operation.
Added condition to output CRCOnC for XMove OR YMove only at CkCRC sub.
Outputs G41/G42 on First LineFeat after Z Plunge.
Modified condition to output CRCOffC for LastFeat AND AutoCycle at ToolPath RapidFeat.
Assures that G40 is not output prior to LastFeat.
Added CRCOffC for ZMoveOnly Feature at ToolPath RapidFeat.
Outputs G40 at all Z Retract blocks.
DWB}

{9/8/94
Copied: Fanuc 6MB Kit M-3 M592.81.3
Created: Fanuc 6MB Kit [ASKO] M686.81.3
Control: Fanuc 6MB
Machine: Kitamura Mycenter-6
For: ASKO [American Shear Knife]
Changes made per Tim Thompson of American Shear Knife.
Versions: ncCad 4.33/ncCAM 4.33/ncPost 4.33.03/Compost 4.21.22
Changed decimal FORMATs to force 0.0 in Prog and Form.
Added spaces between addresses in Prog and Form.
Added DoSeq sub.
Outputs current value of Sequence block and increments by 1.
This is necessary to control Pallet related Sequence Line Numbers.
Added DoSeqC sub.
Calls DoSeq sub IF NOT MinimizeSequencing? = TRUE.
Changed ZIn to ZInC for RapidEntry at EntryMove sub.
Changed SetMaxRPM from 10000 to 3500 at setup and initializations.
Changed SetMaxFeed from 500 to 197 at setup and initializations.
Modified startup code at FirstOperation and NewTool.
Added PreTool ' M12' at FirstOperation and NewTool.
Added Rapid ' Z6.0' to CoolOff block at NewTool, SameTool and end of Prog.
Added condition to output StrtPos on Canned Cycle block for FirstOperation only at IF Drilling.
Deleted DrillOff command at IF Drilling.
Added condition to check for move to ZCP3 at end of IF Drilling.
Added ' G49' AbsOrInc at end of Prog.
Made modifications to CutterRadiusCompensation.
Customer requested that CRCOn CRCOfst be output on WFOStuff and StrtPos blocks and CRCOffC be
output after retraction to ZCP3.
Deleted code contained in CkCRC Sub and call to same 3 places at StdLine sub.
Deleted CRCOffsetC 3 places at StdLine sub.
Deleted CRCOffC from FinishSub1 sub, and RapidFeat and LineFeat of ToolPath sub.
Deleted ResetCRCNum command at start of ToolPath sub.
Added CRCOn CRCOfst StrtPos to WFOStuff block at FirstOperation and NewTool.
Added CRCOn CRCOfst to StrtPos block at FirstOperation, NewTool and SameTool
Added CRCOffC at NewTool, SameTool and end of Prog.
Added support of ThroughSpindleCoolant PostScript command.
Control supports M07 Oil Hole Drill Coolant.
Added ResetCool at PSInit sub.
Added GetCoolOn sub to output M07 or CoolOn when needed.
Changed all CoolOn commands to GetCoolOn sub call.
Added support of OptionalCycle1 PostScript Command.
Customer stated the FirstOperations for usually are for operator setup conditions, and usually
consists of a Spot Drilling Operation.
After program has been proved out, these Operations are ignored by switching the Block Delete
to the on position.
Added OptCyc1F at PSInit sub.
Added SetLineStrtChr('/') for OptCyc1 Drilling Operations at FirstTool, NewTool and SameTool.
Added SetLineStrtChr('') for restoration of normal output at NewTool, SameTool and end of Prog.
Added support of PalletIn and PalletOut PostScript Commands.
Customer usually programs two pallets twice in each program, starting with Pallet #1.
He usually programs side 1 of his part on both Pallets, and follows this with side 2 on both.
He also programs Pallet related Sequence Line Numbers:
N1000 - N1999 = Pallet 1 - Side 1
N2000 - N2999 = Pallet 2 - Side 1
N3000 - N3999 = Pallet 1 - Side 2
N4000 - N4999 = Pallet 2 - Side 2
Added PalletInF at PSInit sub.
Added PalletOutF at PSInit sub.
Added Var(1) to store value of Pallet related Sequence Line Numbers
Added Recall# to FORMAT#5 in Prog.
Processor assumes that programs start with Pallet #1, but checks Pallet# at FirstOperation just
in case user wants to start with Pallet #2.
Pallet 1 is loaded by output of M61 command and unloaded by output of M62 command.
Pallet 2 is loaded by output of M63 command and unloaded by output of M64 command.
Reference return code for Y0.0 is G28 for Pallet 1 and G30 for Pallet 2
Added Var(2) to store currently loaded Pallet#.
Pallet handling occurs at FirstOperation, NewTool and end of Prog.
DWB}

{1/5/95
Modified: Fanuc 6MB Kit [ASKO] M686.81.3
For: ASKO [American Shear Knife]
Versions: ncCad 4.33/ncCAM 4.33/ncPost 4.33.04/Compost 4.21.23
Versions: Catalyst v2.14.22C/Catalyst v2.14.22PPC/Compost 4.21.23
Changes made per Dave Touran and Tim Thompson of American Shear Knife.
Added blank line following Program Comments at FirstOperation.
Modified logic for turning CRCOn at FirstOperation, NewTool and SameTool.
Added LoadFeat EPX# EPY# Num#('0')
Outputs EndPoint of FirstFeature of ToolPath, must be a LineFeat.
Changed StrtPos to MoveXY coordinates caused by LoadFeat.
Moved to output after PreTool block.
Was outputting prior to PreTool block.
Added First OpToolID ' M12' at end of Prog.
Added ToolChng at end of Prog.
Deleted support of PostScript OptCyc1 command for Block Delete output per notes of 9/8/94.
Added support of PostScript OptionalCycle1 command for Drilling Operations.
IF FIRO? = TRUE, processor will output LongHand Non-Canned Drilling Cycle.
DWB}

{
Format: Fanuc 6MB Kit [ASKO] M686.81.5
For: ASKO
Moved M12 to be after the second to last feature of the toolpath
Changed remaining SeqC into DoSeqC
TH}

{2/9/96, Updated .81 version to .84, MPK}

{3/22/96, Tested ZOnlyRepAutCycle, Incremented number to .87, MPK}
{5/3/96,
Initial: Fanuc 6MB Kit [ASKO] M686.87
Created: Fanuc 6MB Kit [ASKO] M686.87.1
Fixed DoSeq sub to increment line numbers, modified pretooling in Toolpath, changed last prettol to output the second tool used,
output block deletes for first operation, formatted output with extra line returns as per customer request, eliminated all
occurances of
IF Milling?
LoadFeat SPX# SPY# ClearancePlane1#
DoSeqC
IF CutterRadiusCompensation?
CRCOn CRCOfst
END
MoveXY EOL
END
replaced with:
IF CutterRadiusCompensation?
DoSeqC CRCOn CRCOfst StrtPos EOL
END

And replaced all calls of
IF CutterRadiusCompensation?
LoadFeat SPX# SPY# ClearancePlane1#
CRCOn CRCOfst MoveXYC
ELSE
StrtPosC
END
with
IF CutterRadiusCompensation?
CRCOn CRCOfst StrtPos
END
StrtPosC
added 'G80' when swithing form a drilling to milling operation with same tool, eliminated check for FirstOperation? and
output of StartPos for if Drilling? scetion, MPK & DWB}

{11/7/96,
Initial: Fanuc 6MB Kit [ASKO] M686.87.1
Created: Fanuc 6MB Kit [ASKO] M686.87.2
Eliminated use of DoSeq and DoSeqC subs,
Substituted ' ' EOL for ASCII('13') in NewTool,
put program stops on separate line from move to home pos,
MPK}

{Prog Numeric Format Definitions *******************************************}

#1 = '#.00'
#2 = '##0.0##;0.'
#3 = '*##0.0##;0.'
#4 = '####.####;0.'
#5 = '#######0'
#6 = '####^##0'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ToolDiameter#,4) {.72}
FORMAT(Recall#,5) { Pallet Sequence# }
FORMAT(Program#,5) {.72}
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(NewWFO#,5) {.72}
FORMAT(Parts#,5) {.72}
FORMAT(Dwell#,6) {.72}

{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
ResetCool
PalletInF
PalletOutF
OptCyc1F
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 {literals}
PSStuff {commands}
NextPS
RETURN

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

EntryMove:
IF FeedEntry?
SeqC Feed ZIn
IF FirstOperation? OR NewTool?
FeedEnt
ELSE
FeedEntC
END
EOL
ELSE
SeqC RapidC ZInC EOL
END
RETURN

StartSub:
OpenSub
SubID EOL
DoSubComment
RETURN

SubWarning:
IF NOT FeedConnect?
IF AnyZshift?
' ' EOL
'( WARNING Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT )' EOL
' ' EOL
END
END
RETURN

StdSub:
SeqC SubCall CallLab RepLab RepCycs EOL
StartSub
RETURN

FinishSub1: {part 1}
SeqC
IF NOT FeedConnect?
IF AutoCycle?
ZCP3C
ELSE
IF FIFO? {.81}
FeedC ZCP3C FeedEntC
ELSE
RapidC ZCP3C
END
END
END
EOL
RETURN

FinishSubG92: {part 2}
SeqC Preset ShiftRC EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshftRC EOL
RETURN

OpenMP:
NewProg
IF WorkFixtureOffsets?
NewWFO
EachWFO
SeqC SetWFO EOL
SeqC SubCall CallLab RepLab OnePart EOL
IncWFO
NextWFO
ELSE
SeqC SubCall CallLab RepLab Parts EOL
END
StartSub
RETURN

CloseMP:
IF WorkFixtureOffsets?
SeqC EndSub EOL
CloseSub
SeqC WFO1 EOL
ELSE
SeqC Preset ShiftPC EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshftPC EOL
END
RETURN

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

CkCRC: { 4.2 }
{ CRCOnC/CRCOffC and CRCOffsetC handled above the part }
RETURN

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

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqC MoveSXYC EOL
SeqC SubCall CallLab EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
IF OptCyc1? AND FIRO?
IF NOT FirstFeat?
IF SPXMove? OR SPYMove?
SeqC RapidC MoveSXYC EOL
END
IF RetractToCP1?
SeqC RapidC ZCP2C EOL
END
END
IF SPZMove?
SeqC FeedC MoveSZC
IF FirstFeat?
IF FirstOperation? OR NewTool?
FeedEnt
ELSE
FeedEntC
END
END
EOL
END
IF RetractToCP1?
SeqC RapidC ZCP1C EOL
ELSE
SeqC RapidC ZCP2C EOL
END
ELSE
SeqC MoveSXYZC EOL {.80.01}
END
END
ELSE
IF RapidFeat?
IF AutoCycle?
SeqC RapidC MoveXYZC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqC RapidC MoveXYZC EOL {.82}
END
END
ELSE
IF LineFeat?
IF AutoCycle? {.70}
IF LastFeat?
SeqC FeedC MoveXYZC FeedRateC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqC FeedC MoveXYZC FeedRateC EOL
ELSE
StdLine {enables CRC on first call}
END
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
SeqC FormatArc ArcFeedC EOL
DecelMove2
END
SeqC FormatArc DecelFeed EOL
ELSE
SeqC FormatArc ArcFeedC EOL
END
NEXTQuadrant
END
END
END
END
IF PointFeat? AND Autocycle?
ELSE
IF FirstFeat? AND LastFeat?
IF LastOp? AND NOT FirstTool?
ELSE
IF NEXT NewTool?
SeqC PreTool ' M12' EOL
END
END
ELSE
IF LAST FirstFeat?
IF LastOp? AND NOT FirstTool?
ELSE
IF NEXT NewTool?
SeqC PreTool ' M12' EOL
END
END
END
END
END
NEXTFeat
RETURN

WFOStuff:
IF NewWFO?
IF MultipleParts?
EOL
'*** WARNING *** DO NOT USE NEWWFO() WITH NCPOST MULTIPLE PARTS' EOL
ELSE
' G' NewWFO#
END
ELSE
IF NOT SameTool?
IF NeedWFO1?
' G' NewWFO#
END
END
END
RETURN

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

AutoCycCutSub2: {part 2}
ToolPath
SeqC AbsOrInc
IF Repeats? AND FeedConnect? AND ZshiftOnly?
{.69 removed RapidC} {.71.2 removed CRCOffC, gets turned off in ToolPath}
ELSE
IF FIFO? {.81}
FeedC ZCP2 FeedEntC
ELSE
RapidC ZCP2
END
END
EOL
SeqC EndSub 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
EntryMove
AutoCycCutSub2
AutoCycPat
ELSE
EntryMove
ToolPath
END
RETURN

G92Sub:
SubWarning
StdSub
SeqC AbsOrInc Connect StrtPos EOL
Milling
FinishSub1
FinishSubG92
RETURN

ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
NewProg
EachCycle
SetSRXYtoEP
IF FeedConnect?
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqC Feed IncValue StrtPosC EOL
SeqC AbsOrInc
ELSE
SeqC Feed
END
ELSE
SeqC Feed
END
ZInPlusInc FeedEnt EOL
ELSE
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqC Rapid IncValue StrtPosC EOL
IF FeedEntry?
SeqC AbsOrInc ZCP2PlusInc EOL
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqC AbsOrInc ZInPlusInc EOL
END
ELSE
IF FeedEntry?
SeqC Rapid ZCP2PlusInc EOL
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqC Rapid ZInPlusInc EOL
END
END
ELSE
IF FeedEntry?
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqC Rapid ZInPlusInc EOL
END
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
SeqC SubCall CallLab EOL
NextCycle
SetStatusOn
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
{.69, removed FinishSub1}
IF FeedConnect? {there is no Z up in the sub, .69}
IF FIFO? {.81}
SeqC Feed ZCP2 FeedEnt EOL {.69}
ELSE
SeqC Rapid ZCP2 EOL {.69}
END
END {.69}
SeqC EndSub EOL
CloseSub
{Element shift, not pattern}
RETURN

ZonlyRep:
EachCycle
IF NOT FirstCycle?
SeqC Connect StrtPos EOL {.71.2, added Connect}
END
IF FeedConnect?
SeqC FeedC ZInPlusInc FeedEnt EOL {.71.2, changed to FeedC}
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqC RapidC ZCP2PlusIncC EOL {can't call for cycle =1} {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqC RapidC ZInPlusInc EOL {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
END
SeqC SubCall CallLab EOL
NextCycle
StartSub
SkipZ
ToolPath
UnSkipZ { Moved from FinishSub1 }
FinishSub1
SeqC EndSub EOL
CloseSub
RETURN

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

GetStartOfSameTool:
DoOpComments
DoPostScript
CheckPass
RETURN

GetCoolOn:
IF NOT CoolOff?
IF ThruSpin?
' M07'
ELSE
CoolOn
END
END
RETURN

{Start of executable Prog **************************************************}

{setup and initializations}
InitProg
ReverseXZArcs
InitWFONum
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('3500')
SetMaxFeed('197')
Save# Num#('1') Num#('1000') { Starting Line Number }
Save# Num#('2') Num#('0') { Current Pallet Loaded }
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
' NewWFO(56), NWFO(56) -' EOL
' The Work Fixture Offset # you specify will be used for all following operations.' EOL
' Do not use with the ncPost multiple part option.' 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
' PalletIn(n), PIN(n)' EOL
' outputs M61 when n=1, or M63 when n=2, and increments Sequence Line Numbers to next' EOL
' 1000 series. Processor is set up to assume that PalletIn(1) status exists at the start.' EOL
' This command is checked at the beginning of Tool Change Operations, only.' EOL
' PalletOut, POUT' EOL
' outputs M62 or M64 depending on value in argument of previous PalletIn(n) command' EOL
' This command is checked at the end of Operations prior to Tool Changes, only.' EOL
' OptionalCycle1, OptCyc1 -' EOL
' Will output LongHand Non-Canned FI-RO Drilling Cycle.' EOL
' ThroughSpindleCoolant, TSCool -' EOL
' outputs an M07 for Oil Hole Drill Coolant feature, instead of the standard M08 for' EOL
' Flood Coolant, when the Coolant On box is checked for the Operation that contains' EOL
' this command. The command is non-modal, which means that the following Operation will' EOL
' revert to the M08 status. This command is checked at the beginning of Operations, only.' EOL
END
EachOp {Start of post processing *********************}
IF FirstOperation?
EOR EOL
ProgID1
IF UseComments? AND ProgramNameComment?
'( ' ProgramName$ ' )'
END
EOL
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
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
Seq IncValue ' G30 X0.0' EOL
DoPostScript
SeqC IncValue ' G28 Y0.0'
IF PalletIn? AND Equal? Pallet# Num#('2')
Save# Num#('2') Num#('2') { Current Pallet Loaded }
' M63' { Load Pallet 2 }
ELSE
Save# Num#('2') Num#('1') { Current Pallet Loaded }
' M61' { Load Pallet 1 }
END
EOL
SetLineStrtChr('/')
SeqC Rapid Plane ' G20' CRCOff ' G49' DrillOff AbsOrInc EOL
SeqC OpToolID EOL
SeqC ToolChng EOL
DoOpComments
CheckPass
SeqC Rapid WFOStuff
IF CutterRadiusCompensation?
CRCOn CRCOfst
END
StrtPos EOL
SeqC Speed SpinOn EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
CheckPass
SeqC AbsOrInc Rapid StrtPos EOL
END
SeqC ' G43' ToolOfst ZCP1 GetCoolOn EOL
IF CutterRadiusCompensation?
SeqC CRCOn CRCOfst StrtPos EOL
END
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqC StrtPos EOL
END
ELSE
IF NewTool?

{Finish off last Operation}

IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
SeqC CRCOffC EOL
SeqC Rapid ' Z6.0' CoolOff EOL
SeqC IncValue OfstOff ToolChng EOL
SetLineStrtChr('')
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF PalletOut?
SeqC CoolOff EOL
SeqC IncValue ' G30 X0.0' SpinOff EOL
IF Equal? Recall# Num#('2') Num#('2') { Pallet 2 Loaded }
SeqC IncValue ' G30 Y0.0 M64' EOL { Unload Pallet 2 }
ELSE { Pallet 1 Loaded }
SeqC IncValue ' G28 Y0.0 M62' EOL { Unload Pallet 1 }
END
END
IF ToolChangeAtHome?
SeqC AbsOrInc Rapid Home EOL
END
SeqC
IF LAST ProgStop?
' M00'
ELSE
IF PalletOut?
' M01'
ELSE
ProgStop
END
END
EOL
' ' EOL
{Start new Operation}

DoPostScript
IF PalletIn?
Save# Num#('1') DIV# Recall# Num#('1') Num#('1000')
Save# Num#('1') TRUNC# Recall# Num#('1')
Save# Num#('1') ADD# Recall# Num#('1') Num#('1')
Save# Num#('1') MUL# Recall# Num#('1') Num#('1000') { Starting Line Number }
Seq IncValue ' G30 X0.0' EOL
IF Equal? Pallet# Num#('1')
Save# Num#('2') Num#('1') { Current Pallet Loaded }
SeqC IncValue ' G28 Y0.0 M61' EOL { Load Pallet 1 }
ELSE
Save# Num#('2') Num#('2') { Current Pallet Loaded }
SeqC IncValue ' G30 Y0.0 M63' EOL { Load Pallet 2 }
END
SeqC
ELSE
Seq
END
Rapid Plane ' G20' CRCOff ' G49' DrillOff AbsOrInc EOL
SeqC OpToolID EOL
SeqC ToolChng EOL
DoOpComments
CheckPass
SeqC Rapid WFOStuff
IF CutterRadiusCompensation?
CRCOn CRCOfst
END
StrtPos EOL
SeqC Speed SpinOn EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
CheckPass
SeqC AbsOrInc Rapid StrtPos EOL
END
SeqC ' G43' ToolOfst ZCP1 GetCoolOn EOL
IF CutterRadiusCompensation?
SeqC CRCOn CRCOfst StrtPos EOL
END
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqC StrtPos EOL
END
ELSE
IF SameTool?
SeqC CRCOffC EOL
DoEndOpPS
IF LAST ProgStop?
SeqC Rapid ' Z6.0' CoolOff EOL
SeqC IncValue OfstOff EOL
SetLineStrtChr('')
SeqC ' M00' EOL

{Start new Operation}

GetStartOfSameTool
SeqC PlaneC Rapid WFOStuff
IF CutterRadiusCompensation?
CRCOn CRCOfst StrtPos
END
StrtPosC
SpeedC SpinOn EOL
SeqC ' G43' ToolOfst ZCP1 GetCoolOn EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF NewToolOffset?
SeqC Rapid ' Z6.0' EOL
SeqC IncValue OfstOff EOL
SetLineStrtChr('')

{Start new Operation}

GetStartOfSameTool
SeqC PlaneC Rapid WFOStuff
IF CutterRadiusCompensation?
CRCOn CRCOfst StrtPos
END
StrtPosC
SpeedC EOL
SeqC ' G43' ToolOfst ZCP1 EOL
ELSE
SetLineStrtChr('')

{Start new Operation}

IF Milling? AND LAST Drilling?
SeqC ' G80' EOL
END
GetStartOfSameTool
SeqC PlaneC RapidC WFOStuff
IF CutterRadiusCompensation?
CRCOn CRCOfst StrtPos
END
StrtPosC
SpeedC EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqC GetCoolOn EOL
END
END
END
END
END {common point for all operations}
IF Milling?
SeqC ZCP2C EOL
IF Repeats?
NewProg
IF ZshiftOnly?
IF AutoCycle? {incremental Autocycle sub can have Z moves}
ZonlyRepAutoCycle
ELSE {Z shift only, NOT Auto Cycle}
IF UseSeparateSubCalls? AND CyclesLessThanMaxSubCalls?
FindAnyZMoves {for normal abs subroutine}
IF NoZMoves?
ZonlyRep
ELSE
G92Sub {pattern shift, not element}
END
ELSE {no sep subs desired}
G92Sub
END
END {end Auto Cycle IF}
ELSE {not Z only}
G92Sub
END {end Z only IF}
ELSE {no repeat OPs}
Milling
END
IF AutoCycle?
SeqC ZCP3C EOL
ELSE
IF FIFO? {.81}
SeqC FeedC ZCP3C FeedEntC EOL
ELSE
SeqC RapidC ZCP3C EOL
END
END
ELSE
IF Drilling?
IF Repeats?
NewProg
StdSub
SeqC AbsOrInc Rapid StrtPos EOL
END
GetCycle
IF OptCyc1? AND FIRO?
IF FirstOperation? OR NewTool?
SeqC RapidC StrtPos EOL
END
SeqC ZCP2C EOL
ToolPath
LoadFeat Num#('0') Num#('0') ClearancePlane3#
IF ZMove?
SeqC RapidC ZCP3C EOL
END
ELSE
SeqC DrillCP EOL
SeqC FromCP
IF FIFO? AND Dwell?
'G89'
ELSE
Cycle
END
ZDepth RLevel Dwell Peck Retract FeedEnt EOL
TrackZNO# FIRST SPZ# {.81.2}
ToolPath
IF RetractToCP1? {.81}
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
IF Repeats?
FinishSubG92
END
LoadFeat Num#('0') Num#('0') ClearancePlane3#
IF ZMove?
SeqC ' G80' Rapid ZCP3 EOL
END
END
END
END
NextOp {loops back to EachOP until last Operation}

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

{finish last operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
SeqC CRCOffC EOL
SeqC ' G80' Rapid ' Z6.0' CoolOff EOL
SeqC IncValue OfstOff EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF NOT FirstTool?
EachOp
IF FirstOperation?
SeqC PreTool ' M12' EOL { ATC Up Position Hold }
SeqC ToolChng EOL
END
NextOp
END
SeqC IncValue ' G30 X0.0' SpinOff EOL
IF Equal? Recall# Num#('2') Num#('2') { Pallet 2 Loaded }
SeqC IncValue ' G30 Y0.0 M64' EOL { Unload Pallet 2 }
ELSE { Pallet 1 Loaded }
SeqC IncValue ' G28 Y0.0 M62' EOL { Unload Pallet 1 }
END
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
SeqC AbsOrInc Rapid FirstHome EOL
END
SeqC
IF ProgStop?
' M00'
END
EOL
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
SeqC ' G49' AbsOrInc EOL
SeqC EOP EOL
CloseSub
Post2 {organize Subs into one program}
EOR EOL
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:
Fanuc 6MB Kit M 3 M592 87
Fanuc 3M Kit [PM] M821 87
Fanuc 6MB MS (BN) M599 87
Fanuc 10M Kit 1 M151 87
Fanuc 0M Kit G54 NS M531 87
Fanuc 0M Kit G54 [JR] M538 87
Fanuc 10M MVJr[G43r] M192 87
Fanuc 10M Kit PM028 17 3
Fanuc 10M Kit [LM] M904 89
Fanuc 10M Kit C028 12
Fanuc 10M Kit M028 89 1
Fanuc 6M Yamaguchi 60M M567 87
Fanuc 11M Okuma [AI] MY86 87
Fanuc 11M Mon VMC75 M343 87
Fanuc 10M Kit [GM] M303 89
Fanuc 11M Acr 3000V M382 87
Fanuc 0M SH [UP] M927 87

więcej podobnych podstron