Fanuc 15M Matsuura C695 12


{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}
{.71.2.NoNest, modified for example of no nesting subroutines, 5/22/90, JR}
{.72.1.NoNest, Updated to .72.1 format & minor corrections, 6/6/90, JR}
{.76.1.NoNest, Updated to .76.1 format, 7/18/91, JR}
{.80.NoNest, Updated to .80 format, 9/10/91, JR}
{.81.NoNest, Updated to .81 format, 4/17/92, JR}
{.81.2.NoNest, Updated to .81.2 format, 6/3/93, JR}
{.81.3.NoNest, StdRapid & StdArc subs, 12/6/93, JR}
{.81.4.NoNest, Minor layout improvments & Update stuff, 6/1/94, JR}

{9/28/94
Copied & modified: Fanuc 6M NoNest M001.81.4
For: Walker
Control: Fanuc 15M
Machine: Matsuura Horizontal MC-700H-50-PC25
Custom Processor per Sample Readouts and verbal instructions.
Jim Radcliffe}

{12/14/94
Modified: Fanuc 15M Matsuura M695.81.4
For: Walker
Added SpinOff between tools.
All output is output as MultipleParts ExitClearancePlane WorkFixtureOffsets.
Added logic to handle if MultipleParts was not selected.
Corrected NoNest checks so everything else is output long hand.
Jim Radcliffe}

{
Format: Fanuc 15M Matsuura M695.81.4
Upgraded to C Style post per C001.05
TH}

{ Added ClearCSOffset to SubCSMP TH}

{8/23/95 - Updated to .10 format TH}

{2/12/96, Upda
{3/25/96, Tested ZOnlyRepAutoCycle, Changed version # to .12, MPK}
ted .10 number to .11, no changes necessary, MPK}

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

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

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

FORMAT(CSOffsetX#,4)
FORMAT(CSOffsetY#,4)
FORMAT(CSOffsetZ#,4)
FORMAT(CSOffsetA#,8)
FORMAT(CSOffsetB#,8)
FORMAT(TrackZNO#,4)
FORMAT(ADD#,5)
FORMAT(CS#,5)

{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

DoToolComment:
IF UseComments? AND ToolComment?
'( ' ToolComment$ ' )'
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 SameTool? { it is called on OpToolID line for FirstOperation and NewTool }
DoToolComment EOL
END
IF ToolTypeComment?
'( TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
RestoreScale
END
RETURN

OutputWFO:
'G54.1P' ADD# CS# SUB# NewWFO# Num#('1')
RETURN

CSWFO:
'G54.1P' ADD# CS# SUB# NewWFO# Num#('1')
RETURN

CalcCSWFO: { ((iPart-1)*NumOfCS#) + (CS# + (NewWFO# -1)) }
'G54.1P' ADD# MUL# NumOfCS# SUB# PartNum# Num#('1') ADD# CS# SUB# NewWFO# Num#('1')
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

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

DoPostScript:
EachPS
SeqC PostScript EOL {literals}
NextPS
RETURN

DoEndOpPS:
EachEOPS
SeqC EndOpPS EOL
NextPS
RETURN

EntryMove:
IF FeedEntry?
SeqC Feed ZIn FeedEnt EOL
ELSE
SeqC RapidC ZIn EOL
END
RETURN

StartSub:
OpenSub
ASCII('13') EOL
SubID DoToolComment EOL
DoSubComment
IF UseComments? { output the operation comments of the first operation used in the sub }
IF OperationIDComment?
'( OPERATION ' Operation# ': ' OperationType$ ' )' EOL
END
IF OperationComment?
'( ' OperationComment$ ' )' EOL
END
END
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

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

OpenToolMP:
NewProg
IF WorkFixtureOffsets? OR NOT MultipleParts?
NewWFO
EachWFO
SeqC 'G54.1' SetWFO SubCall CallLab EOL
IncWFO
SetLineStrtChr('/')
NextWFO
SetLineStrtChr('')
NewWFO
ELSE
SeqC SubCall CallLab RepLab Parts EOL
END
StartSub
RETURN

CloseToolMP:
IF WorkFixtureOffsets? OR NOT MultipleParts?
SeqC EndSub EOL
CloseSub
ELSE
SeqC Preset ShiftPC EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshftPC EOL
END
RETURN

OpenMP:
IF WFOCS?
NewProg
StartSub
SaveCSProg
SaveCSOpStart
ClearCSOffset
ELSE
NewProg
IF WorkFixtureOffsets? OR NOT MultipleParts?
NewWFO
EachWFO
SeqC 'G54.1' SetWFO SubCall CallLab EOL
IncWFO
SetLineStrtChr('/')
NextWFO
SetLineStrtChr('')
ELSE
SeqC SubCall CallLab RepLab Parts EOL
END
StartSub
END
RETURN

CloseMP:
IF WFOCS?
SeqC EndSub EOL
CloseSub
IF Flag?('3')
NewWFO
EachWFO {simple eachPart}
EachCSOp
DoCSWFOComment
ClearCSOffset
SeqC CalcCSWFO EOL
SeqC SubCall CallLabB CSSubID# RepLab OnePart EOL
NextCSOp
ClearCSOffset
IncWFO
NextWFO {simple NextPart}
ELSE
LastWFO
EachWFO {simple eachPart}
EachCSOp
DoCSWFOComment
ClearCSOffset
SeqC CalcCSWFO EOL
SeqC SubCall CallLabB CSSubID# RepLab OnePart EOL
NextCSOp
ClearCSOffset
DecWFO
NextPrevWFO {simple NextPart}
END
IF Flag?('4')
ToggleIncDecWFO
END
ELSE
IF WorkFixtureOffsets? OR NOT MultipleParts?
SeqC EndSub EOL
CloseSub
ELSE
SeqC Preset ShiftPC EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshftPC EOL
END
END
RETURN

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

DoAbsOrInc:
IF Flag?('1') AND AbsoluteMoves?
IF ZMove? AND AbsValue?
IncValue
ELSE
IF NOT ZMove? AND NOT AbsValue?
AbsValue
END
END
END
RETURN

RestoreAbsOrInc:
IF Flag?('1') AND AbsoluteMoves? AND NOT AbsValue?
SeqC AbsValue EOL
END
RETURN

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

CkCRC:
IF XMove? OR YMove? { Approach Length Feature and Multiple Pockets }
IF NOT ZMove?
CRCOnC
IF NOT EmptyLine?
ResetCRCNum
END
END
END
IF LastFeat? AND EmptyLine? { Exit Length Feature }
CRCOffC
END
RETURN

StdRapid:
IF LastFeat?
SeqC CRCOffC RapidC MoveXYZC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqC DoAbsOrInc RapidC MoveXYZC EOL
END
END
RETURN

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

StdArc:
EACHQuadrant
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
SeqC FormatArc ArcFeedC EOL
DecelMove2
END
SeqC FormatArc DecelFeed EOL
ELSE
SeqC FormatArc ArcFeedC EOL
END
NEXTQuadrant
RETURN

ToolPath2: {NoNesting} {.72.1, this is for AutoCycles only}
EACHFeat
IF RapidFeat?
StdRapid
ELSE
IF LineFeat?
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
ELSE
IF ArcFeat?
StdArc
END
END
END
NEXTFeat
RETURN

CutAutoCycle: {NoNesting}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
SetSRXYtoSP
Seq IncValue EOL
IF Repeats? AND ZshiftOnly?
EachRep
EntryMove
ToolPath2
IF NOT FeedConnect?
IF FIFO? {.81}
SeqC FeedC PRIME ZCP2 FeedEntC EOL
ELSE
SeqC RapidC PRIME ZCP2 EOL
END
END
NextRep
ELSE
EntryMove
ToolPath2
END
IF FIFO? {.81}
SeqC AbsOrInc FeedC ZCP2 FeedEntC EOL
ELSE
SeqC AbsOrInc RapidC ZCP2 EOL
END
SetSRSubXY {restore tool position}
SetSRSubMove
ReSetPass2 {restore for positioning moves}
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqC MoveSXYC EOL
CutAutoCycle {NoNesting}
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
SeqC MoveSXYZC EOL
END
ELSE
IF RapidFeat?
StdRapid
ELSE
IF LineFeat?
StdLine
ELSE
IF ArcFeat?
StdArc
END
END
END
END
NEXTFeat
RETURN

Milling:
IF AutoCycle?
ToolPath {NoNesting}
ELSE
EntryMove
ToolPath
END
RETURN

G92Sub: {NoNesting}
EachRep
IF AutoCycle?
ToolPath
ELSE
IF FirstCycle?
EntryMove
ELSE
IF FeedConnect? {.72.1, minor changes to entry}
SeqC FeedC StrtPosC EOL
SeqC ZInC FeedEntC EOL
ELSE
SeqC RapidC StrtPosC EOL
SeqC ZCP2C EOL
IF FeedEntry?
SeqC FeedC ZInC FeedEntC EOL
ELSE
SeqC RapidC ZInC EOL
END
END
END
ToolPath
FinishSub1
END
NextRep
RETURN

ZonlyRepAutoCycle: {NoNesting}
ToolPath
RETURN

ZonlyRep: {NoNesting}
SetFlag('1') {std sep sub Zreps are in effect} {rep change 2}
NewProg
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
TrackZNO# FIRST SPZ#
ToolPath
FinishSub1
NextCycle
RETURN

CheckPass:
IF AutoCycle? {use the correct StrtPos}
SetPass2
ELSE
SetPass1
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 }
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('4500')
SetMaxFeed('196')
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#('6')
SetWFOCS { use WFO for CS changes }
ELSE
IF UseComments?
'( Not enough Work Fixture Offsets to handle this part. )' EOL
'( Number of parts [ ' Parts# ' ] times CSs [ ' NumOfCS# ' ] )' EOL
'( exceeds the machine limit. Switching to non-WFO output. )' EOL
END
END
END
ELSE
IF LTEqual? NumOfCS# Num#('6') {****}
SetWFOCS { use WFO for CS changes }
ELSE
IF UseComments?
'( Not enough Work Fixture Offsets to handle this part. )' EOL
'( Number of CSs [ ' NumOfCS# ' ] exceeds the machine limit. )' EOL
'( Switching to non-WFO output. )' EOL
END
END
END
RETURN

OpGuts:
IF Milling?
SeqC ZCP2C EOL
IF Repeats?
IF ZshiftOnly?
IF AutoCycle? {incremental Autocycle sub can have Z moves}
ZonlyRepAutoCycle
ELSE {Z shift only, NOT Auto Cycle}
IF UseSeparateSubCalls? AND CyclesLessThanMaxSubCalls?
ZonlyRep
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 CRCOffC ZCP3C FeedEntC EOL
ELSE
SeqC RapidC CRCOffC ZCP3C EOL
END
END
ELSE
IF Drilling?
IF Repeats? {NoNesting}
EachRep
SeqC AbsOrInc Rapid StrtPos EOL
END
GetCycle
SeqC
IF Tap? AND NOT CWSpindle?
'G74'
ELSE
IF FIFO? AND Dwell?
'G89'
ELSE
Cycle
END
END
FromCP StrtPos ZDepth RLevel Dwell Peck Retract FeedEnt EOL
TrackZNO# FIRST SPZ#
ToolPath
IF RetractToCP1? {.81}
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
SeqC 'G80' EOL
IF Repeats? {NoNesting}
NextRep
END
SeqC RapidC ZCP3C EOL
END
END
SetFlagF('1') {not std sep sub Zreps in effect} {rep change 3}
RETURN

NotSameToolWFO:
IF WFOCS?
IF ChangeCS?
DoCSWFOComment
ClearCSOffset
{ SeqC CSWFO EOL}
ELSE
ClearCSOffset { 11/8/94 }
{ SeqC OutputWFO EOL}
END
ELSE
IF NeedWFO1?
{ SeqC OutputWFO EOL}
END
END
RETURN

SameToolWFO:
IF WFOCS?
IF ChangeCS?
DoCSWFOComment
ClearCSOffset
{ SeqC CSWFO EOL}
ELSE
ClearCSOffset { 11/8/94 }
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 OpToolID ToolChng DoToolComment EOL
DoOpComments
DoPostScript
RETURN

FirstOp2:
RETURN

FirstOp3:
SeqC CoolOn EOL
CheckPass
SeqC AbsOrInc OutputWFO Plane Rapid StrtPos CSAngleA CSAngleB Speed SpinOn EOL
SeqC OfstOn PreTool EOL
RETURN

FirstOp3a:
SeqC CoolOn EOL
CheckPass
SeqC OfstOn PreTool EOL
RETURN

NewToolOp1:
SeqC CoolOff EOL
SeqC IncValue OfstOff
RETURN

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

NewToolOp3: {Start new Operation}
Seq OpToolID ToolChng DoToolComment EOL
DoOpComments
DoPostScript
RETURN

NewToolOp4:
RETURN

NewToolOp5:
SeqC CoolOn EOL
CheckPass
SeqC AbsOrInc OutputWFO Plane Rapid StrtPos CSAngleA CSAngleB Speed SpinOn EOL
SeqC OfstOn PreTool EOL
RETURN

NewToolOp5a:
SeqC CoolOn EOL
CheckPass
SeqC OfstOn PreTool EOL
RETURN

NewToolOp5b:
SeqC CoolOn EOL
CheckPass
SeqC AbsOrInc OutputWFO Plane Rapid StrtPos CSAngleA CSAngleB Speed SpinOn EOL
SeqC OfstOn PreTool EOL
RETURN

SameToolOp1:
DoEndOpPS
IF LAST ProgStop?
SeqC CoolOff EOL
SeqC IncValue OfstOff EOL
IF ToolChangeAtHome?
SeqC AbsOrInc Rapid Home EOL
ELSE
END
SeqC 'M00' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF NewToolOffset? or ChangeCS?
IF ChangeCS?
IF AChange? OR BChange?
SeqC IncValue OfstOff EOL
END
ELSE
SeqC IncValue OfstOff EOL
END
END
END
RETURN

SameToolOp2: {Start new Operation}
DoOpComments
DoPostScript
IF LAST ProgStop?
SeqC CoolOn EOL
ELSE
IF NOT CoolOff? AND LAST CoolOff?
SeqC CoolOn EOL
END
END
CheckPass
RETURN

SameToolOp3: {Start new Operation}
IF LAST ProgStop?
SeqC AbsOrInc
IF ChangeCS?
OutputWFO
END
PlaneC Rapid StrtPos CSAngleA CSAngleB SpeedC SpinOn EOL
SeqC OfstOn EOL
ELSE
IF NewToolOffset? OR ChangeCS?
SeqC AbsOrInc
IF ChangeCS?
OutputWFO
END
PlaneC Rapid StrtPos CSAngleA CSAngleB SpeedC EOL
SeqC OfstOn EOL
ELSE
SeqC AbsOrInc
IF ChangeCS?
OutputWFO
END
PlaneC Rapid StrtPos CSAngleA CSAngleB SpeedC EOL
END
END
RETURN

End1:
SeqC CoolOff EOL
SeqC IncValue OfstOff EOL
RETURN

End2:
DoEndOpPS
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
SeqC AbsOrInc Rapid FirstHome EOL
END

IF NOT Equal? CSOffsetA# Num#('0') OR NOT Equal? CSOffsetB# Num#('0')
IF AAxisAvail?
SeqC CSAngleA
END
IF BAxisAvail?
SeqC CSAngleB
END
EOL

SeqC 'G92'
IF AAxisAvail?
'A0'
END
IF BAxisAvail?
'B0'
END
EOL
END
IF ProgStop?
SeqC 'M0' EOL
END
RETURN

End3:
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
IF NOT WorkFixtureOffsets?
SeqC WFO1 EOL
END
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
NewToolOp2 {to tool change, CS problem}
SubCSMP
NewToolOp3
IF NOT WorkFixtureOffsets?
SeqC WFO1 EOL
END
NewToolOp4
NewToolOp5
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
IF NOT WorkFixtureOffsets?
SeqC WFO1 EOL
END
FirstOp2
OpenMP
FirstOp3
ELSE
IF NewTool?
NewToolOp1
CloseMP
NewToolOp2 {to tool change, CS problem}
NewToolOp3
IF NOT WorkFixtureOffsets?
SeqC WFO1 EOL
END
NewToolOp4
OpenMP
NewToolOp5b
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
IF NOT WorkFixtureOffsets?
SeqC WFO1 EOL
END
FirstOp2
FirstOp3a
OpenMP
SeqC AbsOrInc Rapid StrtPos EOL
ELSE
IF NewTool?
CloseMP
NewToolOp1
NewToolOp2 {to tool change, CS problem}
NewToolOp3
IF NOT WorkFixtureOffsets?
SeqC WFO1 EOL
END
NewToolOp4
NewToolOp5a
OpenMP
SeqC Rapid StrtPos EOL
ELSE {implied SameTool?}
SameToolOp1
SubCSMP
SameToolOp2
SameToolOp3
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
CloseMP {End of program}
End1
End2
End3
RETURN

NoMPs: {no multiple parts}
EachOp {Start of post processing}
IF FirstOperation?
InitOp
FirstOp1
NotSameToolWFO
FirstOp2
FirstOp3
OpenToolMP
SeqC AbsOrInc Rapid StrtPos EOL
ELSE
IF NewTool?
CloseToolMP
NewToolOp1
NewToolOp2
NewToolOp3
NotSameToolWFO
NewToolOp4
NewToolOp5
OpenToolMP
SeqC AbsOrInc Rapid StrtPos EOL
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolWFO
SameToolOp3
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
CloseToolMP
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 15M Matsuura C695 12m
Fanuc 15M Matsuura C747 12
Fanuc 15M Matsuura M695 87m
Fanuc 15M Matsuura M695 87
Fanuc 15M Toyoda C903 12 1
Fanuc 15M Toyoda C903 12 1
Fanuc 15M Mitsui [EG] CW15 12
Fanuc 15M Mat [IH] B958 12
Fanuc 15M Mat [IH] C958 12
Fanuc 15M Mts [JPL2A] CQ12 12 1
Fanuc 15M MS [TC] C861 12 1
Fanuc 15M MTS [CP] NDU66 16 2m
Fanuc 10M Kit C028 12
Fanuc 15M [PIW] MW82 89 2
Fanuc 6M [SM] M956 12
Fanuc 6M Matsuura TS M362 79

więcej podobnych podstron