{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}
{30Apr98
Original: Fanuc 15M Matsuura C695.12
Created: Fanuc 15M LH Mat [KP] Cxxx.15
For: Kenlee Precision
Changes made per: Keith Thornhill
Updated to a Longhand Advanced Mill Post per Fanuc 6M NoSubs C877.15.2
Note:
I believe there is a bug in the Master Longhand Advanced Mill Posts in both the 'DoTool and the 'MPLoop' style.
Neither Post sends the Tool FullUp with SameTool, between Parts.
The problem occurs with NewTool Offset, CSChange and ProgStop and seems to be because the Operation starts a new
EachOp/NextOp loop and cannot take into account the LAST Operation from the Previous EachOP Loop.
Booleans such as IF LAST ProgStop have no meaning in this situation. Other features may be required such as Coolant handling.
I have added one set of subs to keep track of the problem and another set, equivalent to the functions of SameTool,
to take care of the correct Clearance moves and to handle the ToolOffset and Spindle.
If Im wrong then this is at least safe, as the tool clears the part which it does not do now.
Added Subs StartTool and EndTool in DoToolsOps to track SameTool, 1_Tool_All_Parts. The Subs store the First and Last
Tool#, WFOValue, ToolOffset# and whether the Last Operation of the Loop has a ProgStop.
In DoOp, at FirstOperation these values are tested in CheckForSameTool and CheckForSameToolOffset and the required ToolOffsets cancelled etc.
Added Subs to output a CS# List in the post output. This is handled in two different ways. One method for 1_Tool_All_Parts and another for everything else.
1_Tool_All_Parts in handled in CS_List by calling CS_OP which in turn calls OutputWFO in the order in which they occur in the Output.
All other output builds a list of CS# in Numerical Order by calling DoCS, and, via an EachOp/NextOp Loop, calling CSdata.
Charles Winston}
{Prog Numeric Format Definitions ****}
#1 = '#.00'
#2 = '#####.###;0'
#3 = '*#####.###;0'
#4 = '####.####;0'
#5 = '#######0'
#6 = '#####^##0'
#7 = '*#####.##;0.'
#8 = '*#####.##;0.'
#9 = '#;'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(CSOffsetA#,8)
FORMAT(CSOffsetB#,8)
FORMAT(ToolDiameter#,4)
FORMAT(CSOffsetX#,4)
FORMAT(CSOffsetY#,4)
FORMAT(CSOffsetZ#,4)
FORMAT(TrackZNO#,4)
FORMAT(ADD#,5)
FORMAT(NUM#,5)
FORMAT(CS#,5)
FORMAT(Tag#,5)
FORMAT(Program#,5)
FORMAT(Operation#,5)
FORMAT(SUB#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
FORMAT(RapidF#,9)
FORMAT(Recall#,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
CSWFO:
'G54.1P' ADD# CS# MUL# NumOfCS# SUB# PartNum# Num#('1')
RETURN
WFOStuff:
IF WFOCS?
IF FirstOperation? OR NewTool? OR ChangeCS?
CSWFO
END
ELSE
IF NOT SameTool?
IF MultipleParts?
IF WorkFixtureOffsets?
'G54.1P' PartNum#
ELSE
IF FirstPart?
'G54.1P1'
END
END
ELSE
'G54.1P1'
END
END
END
RETURN
CSG52:
IF FirstOperation? OR NewTool? OR ChangeCS?
SeqC 'G52X' CSOffsetX# 'Y' CSOffsetY# 'Z' CSOffsetZ# EOL
END
RETURN
G52Stuff:
IF AAxisAvail? OR BAxisAvail?
IF NOT WFOCS?
IF MultipleParts?
IF WorkFixtureOffsets?
CSG52
END
ELSE
CSG52
END
END
END
RETURN
DoSubComment:
IF UseComments? AND SubComment?
'( CYCLE START )' EOL
END
RETURN
DoCSComment:
IF AAxisAvail? OR BAxisAvail?
'( CS#' CS# ' - ' CSComment$ ' )' EOL
END
RETURN
DoCSWFOComment:
IF AAxisAvail? OR BAxisAvail?
'( ' CSWFO ' = X' CSOffsetX# ' Y' CSOffsetY# ' Z' CSOffsetZ# ' )' EOL
END
RETURN
CSComments:
IF FirstOperation? OR NewTool? OR ChangeCS?
DoCSComment
IF WFOCS?
DoCSWFOComment
END
END
RETURN
DoToolComment:
IF UseComments? AND ToolComment?
'( ' ToolComment$ ' )'
END
RETURN
DoOpComments:
IF UseComments?
SetScale('1')
IF MultipleParts? AND SubComment?
'( PART ' Tag# ' )' EOL
END
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
RestoreScale
END
CSComments
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
AbsValueC:
IF NOT AbsValue?
AbsValue
END
RETURN
IncValueC:
IF AbsValue?
IncValue
END
RETURN
AbsOrIncC:
IF AbsoluteMoves?
AbsValueC
ELSE
IncValueC
END
RETURN
PSInit:
NewWFOF
FourthCWF
FourthCCWF
FifthCWF
FifthCCWF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN
PSStuff:
RETURN
DoPostScript:
PSInit
EachPS
SeqC PostScript EOL
PSStuff
NextPS
RETURN
DoEndOpPS:
PSInit
EachEOPS
SeqC EndOpPS EOL
PSStuff
NextPS
RETURN
ExitType:
IF FIFO?
FeedC
ELSE
RapidC
END
RETURN
ExitFeed:
IF FIFO?
FeedEntC
END
RETURN
FormatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXYZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
RETURN
ckCRC:
IF LastFeat?
CRCOffC
ELSE
IF NOT ZMove?
CRCOnC
END
END
RETURN
ckCRCNum:
IF NOT LastFeat? AND Equal? SPZ# EPZ#
CRCOffsetC
END
RETURN
StdRapid:
IF XMove? OR YMove? OR ZMove?
SeqC ckCRC RapidC MoveXYZC ckCRCNum EOL
END
RETURN
StdLine: {enables CRC on first call, .70}
IF XMove? OR YMove? OR ZMove?
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqC ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL
DecelMove2
END
SeqC ckCRC FeedC MoveXYZC DecelFeed ckCRCNum EOL
ELSE
SeqC ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL
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: {for AutoCycle element moves}
EACHFeat
IF RapidFeat?
StdRapid
ELSE
IF LineFeat?
StdLine
ELSE
IF ArcFeat?
StdArc
END
END
END
NEXTFeat
RETURN
EntryMove:
IF FeedEntry?
SeqC FeedC ZInC FeedEntC EOL
ELSE
SeqC RapidC ZInC EOL
END
RETURN
CutAutoCycle:
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
SetSRXYtoSP
SeqC IncValue EOL
IF Repeats? AND ZshiftOnly?
EachRep
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
IF FeedConnect?
SeqC FeedC StrtPosC EOL
ELSE
SeqC RapidC StrtPosC EOL
END
END
END
EntryMove
ToolPath2
IF NOT FeedConnect?
SeqC ExitType PRIME ZCP2 ExitFeed EOL
END
NextRep
ELSE
EntryMove
ToolPath2
END
SeqC AbsOrInc ExitType ZCP2 ExitFeed EOL
SetSRSubXY {restore tool position}
SetSRSubMove
ReSetPass2 {restore for positioning moves}
RETURN
ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqC
IF FIFO? AND NOT FirstFeat?
Rapid
END
MoveSXYC EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
CutAutoCycle
ELSE
SeqC MoveSXYZC EOL {.80.01}
END
ELSE
IF RapidFeat?
StdRapid
ELSE
IF LineFeat?
StdLine
ELSE
IF ArcFeat?
StdArc
END
END
END
END
NEXTFeat
RETURN
CheckPass:
IF AutoCycle? {use the correct StrtPos}
SetPass2
ELSE
SetPass1
END
RETURN
DoCS:
IF Equal? Recall# CS# NUM#('0')
Save# CS# Operation# { Save the NUMBER of the First Operation in which each Co-Ordinate Machining System is used }
END
RETURN
WFOValue:
ADD# CS# MUL# NumOfCS# SUB# PartNum# Num#('1')
RETURN
OutputWFO:
IF Equal? Recall# WFOValue Num#('0')
'( ' CSWFO '= X' CSOffsetX# ' Y' CSOffsetY# ' Z' CSOffsetZ#
IF AAxisAvail?
' A' CSOffsetA#
END
IF BAxisAvail?
' B' CSOffsetB#
END
' )' EOL
Save# WFOValue Num#('1')
END
RETURN
CS_OP:
IF WorkFixtureOffsets?
NewWFO
EachWFO
TagInc
EachOp
OutputWFO
NextOp
IncWFO
NextWFO
ELSE
EachPart
TagInc
EachOp
OutputWFO
NextOp
NextPart
END
TagInit
RETURN
CSdata:
IF LTEqual? Recall# NUM#('50') NumOFCS#
Save# NUM#('50') ADD# Recall# NUM#('50') NUM#('1') {counter}
IF GreaterThan? Recall# Recall# NUM#('50') NUM#('0')
EachOp
IF Equal? Operation# Recall# Recall# NUM#('50')
'( ' CSWFO '= X' CSOffsetX# ' Y' CSOffsetY# ' Z' CSOffsetZ#
IF AAxisAvail?
' A' CSOffsetA#
END
IF BAxisAvail?
' B' CSOffsetB#
END
' )' EOL
END
NextOp
END
END
RETURN
DoTheListOfCS:
Save# Num#('50') NUM#('0') { Setup the Op Number to be examined, (Initialized to zero) }
CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata
CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata
CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata
CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata
CSdata CSdata CSdata CSdata CSdata CSdata { Limit of 46 CSs because Num#('50') and Num#('49') are in use}
RETURN
SetZero:
Save# NUM#('50') ADD# Recall# NUM#('50') NUM#('1')
Save# Recall# NUM#('50') NUM#('0')
RETURN
Call_SetZero:
Save# Num#('50') NUM#('0') { Setup the Op Number to be examined, (Initialized to zero) }
SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero
SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero
SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero
SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero
SetZero SetZero SetZero SetZero SetZero SetZero {Call 46 times}
Save# Num#('50') NUM#('0')
RETURN
CS_List:
EOR EOL
ProgID1
IF UseComments? AND ProgramNameComment?
' ( ' ProgramName$ ' )'
END
EOL
TagInit
Call_SetZero
SetFlagF('1') {done flag}
IF MultipleParts?
IF AllToolsOnePart?
IF WorkFixtureOffsets?
NewWFO
EachWFO
TagInc
EachOp
DoCS
NextOp
DoTheListOfCS
Call_SetZero
IncWFO
NextWFO
ELSE
EachPart
TagInc
EachOp
DoCS
NextOp
DoTheListOfCS
Call_SetZero
NextPart
END
ELSE
IF OneToolAllParts?
CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP
CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP
CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP
CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP
CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP
CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP
CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP
CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP
CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP
CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP
CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP
CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP CS_OP
END
END
ELSE
EachOp
DoCS
NextOp
DoTheListOfCS
END
Call_SetZero
Save# Num#('47') Num#('0')
Save# Num#('48') Num#('0')
Save# Num#('49') Num#('0')
Save# Num#('50') Num#('0')
RETURN
ProgStart:
InitProg
TagInit
ReverseXZArcs
InitWFONum
SetFlood
SetMaxRPM('4500')
IF Metric?
SetMaxFeed('4978')
ELSE
SetMaxFeed('196')
END
SetFlagF('1') {done flag}
Save# Num#('1') Num#('0') {tools 1st op}
Save# Num#('2') Num#('0') {tools last op}
Save# Num#('3') Num#('0') {ncCAMs last op}
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
END
IF MultipleParts?
IF WorkFixtureOffsets?
IF LTEqual? MUL# Parts# NumOfCS# Num#('26')
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 G52 style output. )' EOL
END
END
END
ELSE
IF LTEqual? NumOfCS# Num#('26') {****}
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 G52 style output. )' EOL
END
END
END
EachOp
IF FirstOperation?
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
END
NextOp
RETURN
CheckForSameTool: { SameTool MultipleParts Problem }
IF ExitClearancePlane? { ExitClearancePlane = TRUE }
IF Equal? Recall# Num#('49') Recall# Num#('50') { SameTool between Parts = TRUE }
IF Equal? Recall# Num#('44') Num#('1') { LAST ProgStop = TRUE }
SeqC CoolOff EOL
SeqC IncValue OfstOff EOL
IF ToolChangeAtHome?
SeqC AbsOrInc Rapid Home EOL
END
SeqC 'M00' EOL
ELSE
IF NOTEqual? Recall# Num#('48') Recall# Num#('47') { CSChange = TRUE }
SeqC IncValue OfstOff EOL
ELSE
IF NOTEqual? Recall# Num#('46') Recall# Num#('45') { New ToolOffset = TRUE }
SeqC IncValue OfstOff EOL
END
END
END
END
END
RETURN
CheckForSameToolOffset: { SameTool MultipleParts Problem }
IF Equal? Recall# Num#('49') Recall# Num#('50') { SameTool between Parts = TRUE }
IF Equal? Recall# Num#('44') Num#('1') { LAST ProgStop = TRUE }
SeqC CoolOn EOL
SeqC AbsOrInc Plane Rapid StrtPos CSAngleA CSAngleB Speed SpinOn EOL
SeqC OfstOn EOL
ELSE
IF NOTEqual? Recall# Num#('48') Recall# Num#('47') { CSChange = TRUE }
SeqC AbsOrInc Plane Rapid StrtPos CSAngleA CSAngleB EOL
SeqC OfstOn EOL
ELSE
IF NOTEqual? Recall# Num#('46') Recall# Num#('45') { New ToolOffset = TRUE }
SeqC AbsOrInc Plane Rapid StrtPos CSAngleA CSAngleB EOL
SeqC OfstOn EOL
END
END
END
ELSE { Ignore the SameTool Options }
SeqC AbsOrInc Plane Rapid StrtPos CSAngleA CSAngleB EOL
END
RETURN
DoOp:
IF FirstOperation?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
IF FullUp?
SeqC CoolOff EOL
SeqC IncValue OfstOff EOL
END
CheckForSameTool { SameTool MultipleParts Problem }
DoOpComments
SeqC WFOStuff EOL
G52Stuff
ClearCSOffset
ELSE
Seq OpToolID ToolChng DoToolComment EOL
DoOpComments
DoPostScript
SeqC WFOStuff EOL
G52Stuff
ClearCSOffset
END
CheckPass
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? AND NOT FirstPart?
CheckForSameToolOffset { SameTool MultipleParts Problem }
ELSE
SeqC CoolOn EOL
SeqC AbsOrInc Plane Rapid StrtPos CSAngleA CSAngleB Speed SpinOn EOL
SeqC OfstOn PreTool EOL
END
ELSE
IF NewTool?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
{only need to set up for tool change on 1st part}
ELSE
SeqC CoolOff EOL
SeqC IncValue OfstOff EOL
SpinOff EOL
DoEndOpPS
IF ToolChangeAtHome?
SeqC AbsOrInc Rapid Home EOL
END
IF LAST ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
END
END
{Start new Operation}
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
IF FullUp?
SeqC CoolOff EOL
SeqC IncValue OfstOff EOL
END
DoOpComments
SeqC WFOStuff EOL
G52Stuff
ClearCSOffset
ELSE
Seq OpToolID ToolChng DoToolComment EOL
DoOpComments
DoPostScript
SeqC WFOStuff EOL
G52Stuff
ClearCSOffset
END
CheckPass
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? AND NOT FirstPart?
SeqC AbsOrInc Plane Rapid StrtPos CSAngleA CSAngleB EOL
ELSE
SeqC CoolOn EOL
SeqC AbsOrInc Plane Rapid StrtPos CSAngleA CSAngleB Speed SpinOn EOL
SeqC OfstOn PreTool EOL
END
ELSE
IF SameTool?
{Finish off last Operation}
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 LAST ProgStop? OR NewToolOffset? OR ChangeCS?
SeqC IncValue OfstOff EOL
END
END
{Start new Operation}
DoOpComments
DoPostScript
SeqC WFOStuff EOL
G52Stuff
ClearCSOffset
CheckPass
IF LAST ProgStop?
SeqC CoolOn EOL
ELSE
IF NOT CoolOff? AND LAST CoolOff?
SeqC CoolOn EOL
END
END
SeqC AbsOrInc PlaneC Rapid StrtPos CSAngleA CSAngleB SpeedC EOL
IF LAST ProgStop?
SpinOn
END
EOL
IF LAST ProgStop? OR NewToolOffset? OR ChangeCS?
SeqC OfstOn EOL
END
END
END
END
{ Common Point for All Operations }
ResetCRCNum {call here to reset for each new operation only, call in tool path to reset for each repeat in an operation}
RapidF# {forces the output of a conditional feedrate for each operation}
IF Milling?
SeqC ZCP2C EOL
IF Repeats?
IF ZshiftOnly? AND AutoCycle?
{done in CutAutoCycle called from ToolPath}
ELSE
EACHRep
DoSubComment
IF NOT FirstCycle?
SeqC Connect StrtPos EOL
IF NOT FeedConnect?
SeqC ZCP2C EOL
END
END
END
END
IF NOT AutoCycle?
EntryMove
END
ToolPath
IF Repeats?
IF ZshiftOnly? AND AutoCycle?
{done in CutAutoCycle called from ToolPath}
ELSE
SeqC CRCOffC
IF NOT FeedConnect?
ExitType PRIME ZCP3C
END
ExitFeed EOL
NEXTRep
END
END
IF AutoCycle?
SeqC ZCP3C EOL
ELSE
SeqC CRCOffC ExitType ZCP3C ExitFeed EOL
END
ELSE
IF Drilling?
IF Repeats?
EACHRep
DoSubComment
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?
NEXTRep
END
SeqC RapidC ZCP3C EOL
END
END
RETURN
FinishLastOp:
SeqC CoolOff EOL
SeqC IncValue OfstOff EOL
DoEndOpPS
IF FIRST ToolChangeAtHome?
SeqC AbsOrInc Rapid FirstHome EOL
END
IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart? {no tool change after doing last part}
IF ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
END
ELSE
SeqC EOP EOL
END
RETURN
StartTool: { Store the START Tool Information for SameTool, Between Each Part in MP_1ToolAllParts_Xcp }
Save# Num#('49') Tool#
Save# Num#('47') WFOValue
Save# Num#('45') ToolOffset#
RETURN
EndTool: { Store the LAST Tool Information for SameTool, Between Each Part in MP_1ToolAllParts_Xcp }
Save# Num#('50') Tool#
Save# Num#('48') WFOValue
Save# Num#('46') ToolOffset#
IF ProgStop?
Save# Num#('44') Num#('1') { LAST ProgStop = TRUE }
ELSE
Save# Num#('44') Num#('0') { LAST ProgStop = FALSE }
END
RETURN
DoToolsOps:
EachOp
IF FirstOperation?
StartTool
END
IF GTEqual? Operation# Recall# Num#('1') AND LTEqual? Operation# Recall# Num#('2')
{Tools1stOp ² op ² ToolsLastOp}
DoOp
END
IF LastOp?
EndTool
END
NextOp
RETURN
NextTools1stOp:
SetNextToolOp Operation#
RETURN
GetToolsOps:
EachOp
IF Equal? Operation# Recall# Num#('1') {if op = Tools1stOp}
IF GreaterThan? NextTools1stOp Recall# Num#('1') {if NextTools1stOp is greater Tools1stOp}
Save# Num#('2') SUB# NextTools1stOp Num#('1') {ToolsLastOp becomes NextTools1stOp less 1}
ELSE {else}
Save# Num#('2') Recall# Num#('3') {ToolsLastOp becomes ncCAMsLastOp}
END
END
NextOp
RETURN
DoTool:
IF NOT Flag?('1')
GetToolsOps
IF WorkFixtureOffsets?
NewWFO
EachWFO
TagInc
DoToolsOps
IncWFO
NextWFO
ELSE
EachPart
TagInc
DoToolsOps
NextPart
END
IF LessThan? Recall# Num#('2') Recall# Num#('3') {if ToolsLastOp < ncCAMsLastOp}
Save# Num#('1') ADD# Recall# Num#('2') Num#('1') {Tools1stOp becomes NextTools1stOp}
ELSE {else}
SetFlag('1') {set DoneFlag}
END
TagInit
END
RETURN
{Start of executable Prog, Top Level ****}
CS_List {Output a list Of CS#}
ProgStart {setup and initializations}
IF MultipleParts?
IF AllToolsOnePart?
IF WorkFixtureOffsets?
NewWFO
EachWFO
TagInc
EachOp
DoOp
NextOp
FinishLastOp
IncWFO
NextWFO
ELSE
EachPart
TagInc
EachOp
DoOp
NextOp
FinishLastOp
NextPart
END
ELSE
IF OneToolAllParts?
EachOp
IF FirstOperation?
Save# Num#('1') Operation# {ncCAMs1stOp becomes Tools1stOp}
END
IF LastOp?
Save# Num#('3') Operation# {save ncCAMsLastOp}
END
NextOp
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
FinishLastOp
END
END
ELSE
EachOp
DoOp
NextOp
FinishLastOp
END
EOR EOL
CloseSub
Post2
IF UseComments?
SetScale('1')
IF FileBytesComment?
'( FILE LENGTH: ' FileBytes# ' CHARACTERS )' EOL
END
IF FileFeetComment?
'( FILE LENGTH: ' FileFeet# ' FEET )' EOL
END
IF FileMetersComment?
'( FILE LENGTH: ' FileMeters# ' METERS )' EOL
END
END
Close
Wyszukiwarka
Podobne podstrony:
Fanuc 15M Mat [LM] CW83 15 2Fanuc 15M Mat [IH] B958 12Fanuc 3000C Mat LH PM M495 89 3Fanuc 15M Mat [IH] C958 12Fanuc 15M Mon LH [RI] MU56 89 1Fanuc Pro3 Mak LH [AE] CV70 15GE Fanuc 15M 10HC PMW CV68 15Fanuc 15M Kuraki [TM] CU28 15 3Fanuc 11M LH [JBT] DW53 15Fanuc 11M LH [JBT] DW53 15Fanuc 10M LH [LAM] DW59 15Fanuc 15M MTS [CP] NDU66 16 2mFanuc 15M Mitsui [EG] CW15 12Fanuc 11M MTS LH M059 13 1Fanuc 15M Matsuura C695 12Fanuc 0M LW LH [RI] CU58 16Centurion V LH [CT] MW13 15 2mFanuc 15M [PIW] MW82 89 2więcej podobnych podstron