Fanuc 6M Mat [ST] DU89 12 2


{
MILL=T
LATHE=F
SIMPLE_ROT_POS=F
ROTARY_MILL=F
ADV_MILL=T
SUBS=T
MILLTURN_Y-AXIS=F
METRIC=F
}

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

{added separate sub call code and warning for not separate, 7/5/88 WFG}
{separate sub calls turned off in this post- 'UseSeparateSubCalls' commented out}
{ncPost3ż24 or better}
{added IF ToolChangeAtHome?, & SetHome 9/26/88 WFG}
{added PostScript commands 3/11/89 WFG}
{added PostScript command comments 5/9/89, WFG, use ncPost 3.10Ś9 or better}
{removed run time comments, 5/9/89, WFG}
{added "must be all capital letters when typed in" to Postscript Command comment, 5/17/89, JR}
{added metric, 6/5/89, WFG}
{suppressed first cycle StrtPos for sep subs,7/17/89 WFG}
{last tool now goes to FirstHome when finished, 7/26/89, WFG}
{changed to Sep Sub standard}
{.65, corrected Sep sub problem if 1st cut <> Z step, 9/14/89 WFG, requires ncPost 3.19Ś5}
{.66, added name comment to Prog ID # line, 10/30/89, WFG}
{.67, new prog commands, 11/20/89, WFG}
{*.68, AutoCycles and 3.2 support, 12/4/89, WFG (Good luck on the upgrades to other posts)}
{.69, corrected 2 repeat op/autocycle problems, 12/21/89, WFG}

{1/8/90-2/7/90
Changes to M001.69
Moved DoPostScript command to very beginning of NewTool & SameTool op's, same as FirstOp.
Deleted last line of NewWFO PostScript comment, it no longer applies.
Move DoEndOpPS command in NewTool & end of prog to end of operation outside of Full-up MP.
Restucture to have M01 or M00 in New Tool.
Deleted ProgStop? from end of prog, not neccesary.
Check for ProgStop at beginning AND end of operation does not work, it comes out both places,
only using for end of operation. Reflected in PSComments.
Deleted StopProg sub.
Re-wrote SameTool section for many reasons.
Deleted ClearancePlane3# prog format it is no longer needed.
New sub CheckPass to replace statement in main for SetPass.
Modified WFOStuff sub to include SameTool.
Deleted StrtPos from OpenMP sub and added to main where needed.
Updated to .70 format.
Jim Radcliffe}

{.71.1, added InitProg, 4/11/90, JR}
{.71.2, FIRST modifier, no CRCOffC in AutoCycCutSub2, add Connect for ZOnlyRep, 4/23/90, JR}
{.72.1, New PS subs, formats, CoolOff?, ProgStop to start of NewTool & SameTool, 5/23/90, JR}
{.72.2, modified subroutine stuff (same effect), 7/1/90, DWB}
{.73, Replaced SetSRXYZero with SetSRXYtoSP, CoolOff, new formaters, 7/24/90, DWB}
{.74, ResetCRCNum, modified PostScript comments, 8/1/90, JR}
{.76, corrected AutoCycle SP and EP Status Record errors}

{1/25/91
Copied & modified: Fanuc 6M M001.76.1
For: U.C.O. Tool & Die, Inc.
Modified beginning of program and beginnig of operation sequences.
WFO's by PostScript or MP only.
R format arcs.
Jim Radcliffe}

{12/6/93
Modified: Fanuc 6M [UCO] M391.76.1
For: Gibbs & Associates
Updated to .81.2 format per Fanuc 6M M001.81.2
Jim Radcliffe}

{8/19/95, Updated Fanuc 6M [UCO] M391.81.2 to .85 format per Fanuc 6M M001.85.01.02, JR}

{1/17/96, Updated .85 to .86 version, MPK}

{3/12/96, Updated Fanuc 6M [UCO] M391.86 per Fanuc 6M C001.11, MPK}

{3/25/96, Tested ZOnlyRepAutoCycle, Changed version # to .12, MPK}

{9/14/98
Initial: Fanuc 6M [UCO] C391.12
Created: Fanuc 6M [UCO] C391.12.1
Develop: ComPost2 1.1b3, Virtual Gibbs 4.24
Comment: Updated per Fanuc 6M (FW) B001.12.10
Jim Radcliffe}

{9/15/98
Initial: Fanuc 6M [UCO] C391.12.1
Created: Fanuc 6M Mat [ST] Dxxx.12
ForUser: Sobot Tool
Control: Fanuc 6MB (without work fixture offset option)
Machine: Matsuura MC1000V
Develop: ComPost2 1.1b3, Virtual Gibbs 4.24
Comment: New processor per marked up readoput from Mike Lapke
Changed literal G45 to G46.
Added Preset line to beginning of program.
Moved OpToolID and ToolChng to separate lines.
Added move to machine home at end of program.
Changed to D style output:
non-wfo output after exceding max WFO
set Max WFO to zero
deleted header messages for switching output type
deleted default wfo output in WFOStuff
Jim Radcliffe}

{23Sep98
Original: Fanuc 6M Mat [ST] DU89.12
Created: Fanuc 6M Mat [ST] DU89.12.1
For: Sobot Tool
Changes made per: Mike Lapke
Added Post Header Comment at the top of Prog.
Added IncValue 'G46X0A0H62' to FirstOp1
Changed Literal 'X0.Y0.' to 'X0.Y0.A0.' in FirstOp1
Changed Literal 'G28X0.Y0.' to 'G28X0.Y0.A0.' in End3
Charles Winston}

{24Sep98
Original: Fanuc 6M Mat [ST] DU89.12
Created: Fanuc 6M Mat [ST] DU89.12.1
For: Sobot Tool
Changes made per: Mike Lapke
Changed Literal 'G46X0A0H62' to 'G46A0H62' FirstOp1
Charles Winston}

{Prog Numeric Format Definitions ****}

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(CSOffsetA#,3)
FORMAT(CSOffsetB#,3)
FORMAT(ToolDiameter#,4)
FORMAT(CSOffsetX#,4)
FORMAT(CSOffsetY#,4)
FORMAT(CSOffsetZ#,4)
FORMAT(TrackZNO#,4)
FORMAT(Program#,5)
FORMAT(CSSubID#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(ADD#,5)
FORMAT(CS#,5)
FORMAT(Parts#,5)
FORMAT(CallMasterNum#,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

CalcCSWFO#:
ADD# MUL# NumOfCS# SUB# PartNum# Num#('1') CS#
RETURN

CSWFO:
'G' ADD# CalcCSWFO# Num#('53')
RETURN

WFO:
'G' ADD# PartNum# Num#('53')
RETURN

WFOStuff:
IF MultipleParts? AND AllToolsOnePart?
{WFO called from CloseMP}
{ClearCSOffset called from OpenMP}
ELSE
IF WFOCS?
IF NOT SameTool?
SeqC CSWFO EOL
ELSE
IF ChangeCS?
IF MultipleParts?
{MP ChangeCS is hadled in SubCSMP and CloseMP}
ELSE
SeqC CSWFO EOL
END
END
END
ClearCSOffset
END
END
RETURN

DoSubComment:
IF UseComments? AND SubComment?
'( SUB NUMBER: ' Program# ' )' EOL
END
RETURN

DoCSWFOComment:
'( CS#' CS# ' - ' CSComment$ ' )' EOL
'( ' CSWFO '= X' CSOffsetX# ' Y' CSOffsetY# ' Z' CSOffsetZ# ' )' EOL
RETURN

DoCSComment:
'( CS#' CS# ' - ' CSComment$ ' )' EOL
RETURN

OffsetComments:
IF NOT MultipleParts?
IF WFOCS?
IF ChangeCS?
DoCSWFOComment
END
ELSE
IF ChangeCS?
DoCSComment
ELSE
IF NOT SameTool?
DoCSComment
END
END
END
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
OffsetComments
RETURN

AbsValueC:
IF NOT AbsValue?
AbsValue
END
RETURN

IncValueC:
IF AbsValue?
IncValue
END
RETURN

AbsOrIncC:
IF AbsoluteMoves?
AbsValueC
ELSE
IncValueC
END
RETURN

CSAngleA:
IF AAxisAvail?
'A' CSOffsetA#
END
RETURN

CSAngleAC:
IF AChange?
CSAngleA
END
RETURN

CSAngleB:
IF BAxisAvail?
'B' CSOffsetB#
END
RETURN

CSAngleBC:
IF BChange?
CSAngleB
END
RETURN

PSInit: {reset flags}
OptCyc1F
MasterOpF
CallMasterOpF
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

EntryMove:
IF FeedEntry?
SeqC Feed ZIn FeedEnt EOL
ELSE
SeqC RapidC ZIn 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 CRCOffC
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

ToggleIncDecWFO:
IF Flag?('3')
SetFlagF('3')
ELSE
SetFlag('3')
END
RETURN

DoWFOOps:
IF Flag?('5')
SetFlagF('5') { Suppress Redundant WFO for MP-OTAP-ECP }
ELSE
SeqC SetWFO EOL
END
SeqC SubCall CallLab RepLab OnePart EOL
RETURN

OpenMP:
NewProg
IF WorkFixtureOffsets?
IF WFOCS?
StartSub
SaveCSProg
SaveCSOpStart
ClearCSOffset
ELSE
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('5') { Suppress Redundant WFO for MP-OTAP-ECP }
END
IF Flag?('3')
NewWFO
EachWFO {simple eachPart}
DoWFOOps
IncWFO
NextWFO {simple NextPart}
DecWFO
ELSE
LastWFO
EachWFO {simple eachPart}
DoWFOOps
DecWFO
NextPrevWFO {simple NextPart}
IncWFO
END
IF Flag?('4')
ToggleIncDecWFO
END
StartSub
END
ELSE
SeqC SubCall CallLab RepLab Parts EOL
StartSub
END
RETURN

DoCSWFOOps:
EachCSOp
DoCSWFOComment
ClearCSOffset
IF Flag?('5')
SetFlagF('5') { Suppress Redundant WFO for MP-OTAP-ECP }
ELSE
SeqC CSWFO EOL
END
SeqC SubCall CallLabB CSSubID# RepLab OnePart EOL
NextCSOp
RETURN

CloseMP:
IF WorkFixtureOffsets?
SeqC EndSub EOL
CloseSub
IF WFOCS?
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('5') { Suppress Redundant WFO for MP-OTAP-ECP }
END
IF Flag?('3')
NewWFO
EachWFO {simple eachPart}
DoCSWFOOps
IncWFO
NextWFO {simple NextPart}
DecWFO
ELSE
LastWFO
EachWFO {simple eachPart}
DoCSWFOOps
DecWFO
NextPrevWFO {simple NextPart}
IncWFO
END
IF Flag?('4')
ToggleIncDecWFO
END
END
ELSE
SeqC AbsOrIncC EOL
SeqC Preset ShiftPC EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshftPC EOL
END
RETURN

SubCSMP:
IF WFOCS?
IF ChangeCS?
SeqC EndSub EOL
CloseSub
NewProg
StartSub
SaveCSProg
END
ClearCSOffset
END
RETURN

DoAbsOrInc:
IF Flag?('1')
IF ZMove?
IncValueC
ELSE
AbsOrIncC
END
END
RETURN

DoDrillAbsOrInc:
IF Flag?('1')
IF SPZMove?
IncValueC
ELSE
AbsOrIncC
END
END
RETURN

RestoreAbsOrInc:
IF Flag?('1')
SeqC AbsOrIncC EOL
END
RETURN

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

ToolPath:
ResetCRCNum
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqC MoveSXYC EOL
SeqC SubCall CallLab EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
SeqC DoDrillAbsOrInc MoveSXYZC EOL {.80.01}
END
ELSE
IF RapidFeat?
IF LastFeat?
SeqC DoAbsOrInc CRCOffC RapidC MoveXYZC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqC DoAbsOrInc RapidC MoveXYZC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqC DoAbsOrInc CRCOnC RapidC MoveXYZC CRCOffsetC EOL
END
END
END
ELSE
IF LineFeat?
IF LastFeat?
SeqC DoAbsOrInc CRCOffC FeedC MoveXYZC FeedRateC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqC DoAbsOrInc FeedC MoveXYZC FeedRateC EOL
ELSE
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqC DoAbsOrInc CRCOnC FeedC MoveXYZC FeedRateC CRCOffsetC EOL
DecelMove2
END
SeqC DoAbsOrInc CRCOnC FeedC MoveXYZC DecelFeed CRCOffsetC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqC DoAbsOrInc CRCOnC FeedC MoveXYZC FeedRateC CRCOffsetC EOL
END
END
END
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
NEXTFeat
RestoreAbsOrInc
RETURN

AutoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
StartSub
SetSRXYtoSP
Seq 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
IF FeedConnect? {there is no Z up in the sub}
IF FIFO?
SeqC Feed ZCP2 FeedEnt EOL
ELSE
SeqC Rapid ZCP2 EOL
END
END
SeqC EndSub EOL
CloseSub
{Element shift, not pattern}
RETURN

ZonlyRep:
EachCycle
IF NOT FirstCycle?
SeqC Connect StrtPos EOL
END
IF FeedConnect?
SeqC FeedC ZInPlusInc FeedEnt EOL
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqC RapidC ZCP2PlusIncC EOL
END
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqC RapidC ZInPlusInc EOL
END
END
SeqC SubCall CallLab EOL
NextCycle
StartSub
TrackZNO# FIRST SPZ#
ToolPath
FinishSub1
SeqC EndSub EOL
CloseSub
RETURN

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

SkipToLastFeat:
EachFeat
IF LastFeat?
TrackXNO# SPX#
TrackYNO# SPY#
END
NextFeat
RETURN

SetDrillEndOpZ:
IF RetractToCP1?
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
RETURN

OpGuts:
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?
SetFlag('1') {std sep sub Zreps are in effect} {rep change 2}
ZonlyRep {rep change 1}
SetFlagF('1') {not std sep sub Zreps in effect} {rep change 3}
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
ELSE
IF FIFO?
SeqC FeedC CRCOffC ZCP3C FeedEntC
ELSE
SeqC RapidC CRCOffC ZCP3C
END
END
ELSE
IF Drilling?
IF Repeats?
NewProg
StdSub
SeqC AbsOrInc Rapid StrtPos EOL
END
SeqC DrillCP EOL
GetCycle
SeqC Cycle FromCP StrtPos ZDepth RLevel Dwell Peck Retract FeedEnt EOL
IF CallMasterOp?
SeqC SubCall CallLabB CallMasterNum# EOL
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') {std sep sub Zreps in effect}
NewMasterProg
SeqC SubCall CallLab EOL
StartSub
ToolPath
SeqC EndSub EOL
CloseSub
SetFlagF('1') {not std sep sub Zreps in effect}
ELSE
ToolPath
END
END
SetDrillEndOpZ
IF Repeats?
SeqC DrillOff EOL
FinishSubG92
SeqC RapidC ZCP3C
ELSE
SeqC DrillOff ZCP3C
END
END
END
RETURN

ProgStart:
InitProg
ReverseXZArcs
InitWFONum
SetFlood
SetFlagF('1') {not std sep sub Zreps in effect} {rep change 2}
SetFlag('3') {True = incrementing WFO numbers for MP. False = decrementing WFO numebrs for MP}
SetFlag('4') {True = toggle between incrementing/decrementing WFO's }
SetFlagF('5') { Suppress Redundant WFO for MP-OTAP-ECP }
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
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
END

IF MultipleParts?
IF WorkFixtureOffsets?
IF LTEqual? MUL# Parts# NumOfCS# Num#('0')
SetWFOCS { use WFO for CS changes }
END
END
ELSE
IF LTEqual? NumOfCS# Num#('0') {****}
SetWFOCS { use WFO for CS changes }
END
END
RETURN

InitOp:
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
RETURN

FirstOp1:
Seq Rapid Plane CRCOff DrillOff IncValue EOL
SeqC IncValue 'G46A0H62' EOL
SeqC IncValue 'G46X0H63' EOL
SeqC IncValue 'G46Y0H64' EOL
SeqC Preset 'X0.Y0.A0.' EOL
SeqC OpToolID EOL
SeqC ToolChng EOL
DoOpComments
DoPostScript
WFOStuff
RETURN

FirstOp2:
CheckPass
SeqC AbsOrInc Rapid StrtPos CSAngleA CSAngleB EOL
RETURN

FirstOp3:
SeqC IncValue 'G46Z0' ToolOfst Speed SpinOn EOL
SeqC AbsValue Preset Home ZCP1 CoolOn EOL
RETURN

NewToolOp1:
CoolOff EOL
SeqC IncValueC OfstOff EOL
RETURN

NewToolOp2:
DoEndOpPS
IF ToolChangeAtHome?
SeqC AbsOrIncC Rapid Home SpinOff EOL
ELSE
SeqC SpinOff EOL
END
IF LAST ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
END
RETURN

NewToolOp3: {Start new Operation}
SeqC OpToolID EOL
SeqC ToolChng EOL
DoOpComments
DoPostScript
WFOStuff
RETURN

NewToolOp4:
CheckPass
SeqC AbsOrInc Rapid StrtPos CSAngleA CSAngleB EOL
RETURN

NewToolOp5:
SeqC IncValue 'G46Z0' ToolOfst Speed SpinOn EOL
SeqC AbsValue Preset Home ZCP1 CoolOn EOL
RETURN

SameToolOp1:
IF LAST ProgStop?
CoolOff
ELSE
IF CoolOff? AND LAST NOT CoolOff?
CoolOff
END
END
EOL
DoEndOpPS
IF LAST ProgStop?
SeqC IncValueC OfstOff EOL
SeqC SpinOff EOL
SeqC 'M0' EOL
ELSE
IF NewToolOffset? OR ChangeCS?
SeqC IncValueC OfstOff EOL
END
END
RETURN

SameToolOp2: {Start new Operation}
DoOpComments
DoPostScript
CheckPass
RETURN

SameToolOp3: {Start new Operation}
WFOStuff
IF LAST ProgStop?
SeqC IncValue 'G46Z0' ToolOfst Speed SpinOn EOL
SeqC AbsValue Preset ZCP1 CoolOn EOL
SeqC PlaneC AbsOrInc Rapid StrtPos CSAngleA CSAngleB EOL
ELSE
IF NewToolOffset? OR ChangeCS?
SeqC IncValue 'G46Z0' ToolOfst SpeedC EOL
SeqC AbsValue Preset ZCP1
IF NOT CoolOff? AND LAST CoolOff?
CoolOn
END
EOL
SeqC PlaneC AbsOrInc Rapid StrtPos CSAngleA CSAngleB EOL
ELSE
IF NOT CoolOff? AND LAST CoolOff?
SeqC CoolOn EOL
END
SeqC PlaneC AbsOrInc Rapid StrtPos CSAngleA CSAngleB SpeedC EOL
END
END
RETURN

End1:
CoolOff EOL
SeqC IncValueC OfstOff EOL
RETURN

End2:
DoEndOpPS
IF FIRST ToolChangeAtHome? {added FIRST modifier}
SeqC AbsOrIncC Rapid FirstHome SpinOff EOL
ELSE
SeqC SpinOff EOL
END
IF Equal? CSOffsetA# Num#('0') AND Equal? CSOffsetB# Num#('0')
ELSE
SeqC
IF AAxisAvail?
CSAngleA
END
IF BAxisAvail?
CSAngleB
END
EOL
SeqC Preset
IF AAxisAvail?
'A0'
END
IF BAxisAvail?
'B0'
END
EOL
END
IF ProgStop?
SeqC 'M0' EOL
END
RETURN

End3:
SeqC IncValueC 'G28X0.Y0.A0.' 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
RETURN

MPallTools1P: {Multiple Parts, All Tools 1 Part}
EachOp {Start of post processing}
IF FirstOperation?
InitOp
OpenMP
FirstOp1
FirstOp3
FirstOp2
ELSE
IF NewTool?
NewToolOp1
NewToolOp2 {to tool change, CS problem}
SubCSMP
NewToolOp3
NewToolOp5
NewToolOp4
ELSE {implied SameTool?}
SameToolOp1
SubCSMP
SameToolOp2
SameToolOp3
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
End1 {End of program}
End2
CloseMP
End3
RETURN

MP1ToollAllPfu: {Multiple Parts, 1 Tool all Parts, full up}
EachOp {Start of post processing}
IF FirstOperation?
InitOp
FirstOp1
OpenMP
FirstOp3
FirstOp2
ELSE
IF NewTool?
NewToolOp1
CloseMP
NewToolOp2 {to tool change, CS problem}
NewToolOp3
OpenMP
NewToolOp5
NewToolOp4
ELSE {implied SameTool?}
SameToolOp1
SubCSMP
SameToolOp2
SameToolOp3
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
End1 {End of program}
CloseMP
End2
End3
RETURN

MP1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane}
EachOp {Start of post processing}
IF FirstOperation?
InitOp
FirstOp1
FirstOp3
FirstOp2
OpenMP
FirstOp2 {need StrtPos in Sub}
ELSE
IF NewTool?
EOL
CloseMP
SeqC
NewToolOp1
NewToolOp2 {to tool change, CS problem}
NewToolOp3
NewToolOp5
NewToolOp4
OpenMP
NewToolOp4 {need StrtPos in Sub}
ELSE {implied SameTool?}
SameToolOp1
SubCSMP
SameToolOp2
SameToolOp3
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
EOL
CloseMP {End of program}
SeqC
End1
End2
End3
RETURN

NoMPs: {no multiple parts}
EachOp {Start of post processing}
IF FirstOperation?
InitOp
FirstOp1
FirstOp3
FirstOp2
ELSE
IF NewTool?
NewToolOp1
NewToolOp2
NewToolOp3
NewToolOp5
NewToolOp4
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
End1 {End of program}
End2
End3
RETURN

{Start of executable Prog, top level ****}

ProgStart {setup and initializations}

IF MultipleParts?
IF AllToolsOnePart?
MPallTools1P
ELSE {implied OneToolAllParts?}
IF FullUp?
MP1ToollAllPfu
ELSE {implied ExitClearancePlane?}
MP1ToollAllPXcp
END
END
ELSE
NoMPs
END


Wyszukiwarka

Podobne podstrony:
Fanuc 6M Mat [ST] RMU89 17 7
Fanuc 6M Mat [ST] PMU89 17 3
Fanuc 15M Mat [IH] B958 12
Fanuc 6M Mat [BM] M481 80
Fanuc 11M Mat 600 C199 12
Fanuc 6M Mat MC1000V M474 81 1
Fanuc 15M Mat [IH] C958 12
Fanuc 6M MTS [GT] D717 12
Fanuc 6M MS [MM] CT49 12
Fanuc 6M MS [PW] D953 12
Fanuc 6M Varnsd [GT] D894 12 1
Fanuc 6M [SM] M956 12
Fanuc 6M MS C002 12
Fanuc 6M (RCS) C708 12
Fanuc 6M [ST] NMT61 89

więcej podobnych podstron