TRAK AGE 3 DNC MY67 89 1


{5/24/93
created initial NoSubs Processor to .81 format
FIFO stuff not supported
variables: 1 = tools 1st op; 2 = tools last op; 3 = ncCAMs last op
Jim Radcliffe}

{7/29/93, v.81.1, added FIFO handling, JR}
{8/3/93, v.81.2, SameTool WFO, RapidF#, additional FIFO handling, JR}
{9/12/95, v.81.3, FIFO? queries changed to ExitType & ExitFeed calls, WFO MultipleParts, JR}
{5/8/96, v.89, Return to the StrtPos before next iteration of CutAutoCycle Repeats ZshiftOnly, JR}
{6/4/96, v.89.1, minor corrections SeqC, CRCOff & SameTool, JR}

{10/24/96
Initial: Fanuc 6M NoSubs M877.89.1
Created: TRAK A.G.E. 3 Mxxx.89
ForUser: Rose
Control: TRAK A.G.E. 3 ( formatted for CAD/CAM )
Machine: TRAK DPM
Develop: ComPost2 68k v1.0b3, Catalyst68K v3.09.05C
Comment: New processor per manual.
Suppressed Coolant Off commands. No Spindle On commnds. No Full Retract.
No Optional Stop. No Tool Length Offset. No Tool Diameter Offset.
Unconditional IJK
Jim Radcliffe}

{4/4/97
Initial: TRAK AGE 3 MZ66.89
Created: TRAK AGE 3 DNC Mxxx.89
ForUser: Rose Advanced Development
Control: TRAK A.G.E. 3 ( formatted for DNC )
Machine: TRAK DPM
Develop: ComPost2 68K 1.0b11, Virtual Gibbs 3.31 PPC
Comment: New processor per manual and conversation with Kevin Moon at SWI.
No CRC support! Deleted CRC commands from Prog.
Arcs in XY only. No helical interpolation. Z arcs & Helical are output as line segments.
No Drill Cycles. Changed to Long Hand Drilling Routines per Fanuc 6M NoSubs NoDr M001.89.1
Error messages output instead of program for the following situations.
MultipleParts with WorkFixtureOffsets.
Pecking operations with more than 100 pecks.
MultipleParts and OneToolAllParts with more than 50 tool changes.
Jim Radcliffe}

{4/17/97
Initial: TRAK AGE 3 DNC Mxxx.89
Created: TRAK AGE 3 DNC Mxxx.89.1
Comment: Modified per conversation with Kevin Moon and Pete Jackson
The control will not execute incremental!
Added Error message output instead of program for the following situation.
output in incremental option
any operation using patterns
The machine stops when the spindle stops!
Deleted SpinOff at tool changes!!
Jim Radcliffe}

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

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ToolDiameter#,4)
FORMAT(ZDepth#,4)
FORMAT(TrackZ#,4)
FORMAT(Program#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
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

DoSubComment:
IF UseComments? AND SubComment?
'( CYCLE START )' EOL
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
IF ToolComment?
'( ' ToolComment$ ' )' EOL
END
RestoreScale
END
RETURN

PSInit: {reset flags}
NewWFOF
RotateF
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
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

StdRapid:
IF LastFeat?
SeqC RapidC MoveXYZC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqC RapidC MoveXYZC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqC RapidC MoveXYZC EOL
END
END
END
RETURN

StdLine: {enables CRC on first call, .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
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
END
END
RETURN

StdArc:
IF ZMove?
EACHArcSegment
StdLine
NEXTArcSegment
ELSE
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
END
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?
IF NOT FirstFeat?
SeqC
IF FIFO?
Rapid
END
MoveSXYC EOL
END
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

DoPeck:
IF NOT Flag?('2')
SetScale('1')
IF GreaterThan? SUB# Recall# Num#('4') Peck# SPZ# {IF OldZ - Peck# > Depth}
Save# Num#('4') SUB# Recall# Num#('4') Peck# {Save#1 = OldZ - Peck# = NewZ}
RestoreScale
SeqC Feed 'Z' TrackZ# MUL# Recall# Num#('4') NumSc#('1') FeedEntC EOL {move to NewZ}
IF PeckFullRetract?
SeqC Rapid ZCP2 EOL {move to CP2}
END
SeqC RapidC 'Z' TrackZ# ADD# Recall# Num#('4') Retract# EOL {move to RetractZ}
ELSE
RestoreScale
SeqC Feed 'Z' TrackZ# SPZ# FeedEntC EOL {move to Depth}
IF RetractToCP1?
SeqC Rapid ZCP1 EOL {move to CP1}
ELSE
SeqC Rapid ZCP2 EOL {move to CP2}
END
SetFlag('2')
END
END
RETURN

DrillPath:
EACHFeat
SeqC RapidC MoveSXYC EOL
SeqC ZCP2C EOL
IF Peck?
SetFlagF('2') { done flag }
SetScale('1')
Save# Num#('4') ClearancePlane2#
RestoreScale
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
ELSE
SeqC Feed 'Z' ZDepth# FeedEntC EOL
IF Dwell?
SeqC 'G4P' Dwell# EOL
END
IF FIRO?
IF RetractToCP1?
SeqC Rapid ZCP1 EOL
ELSE
SeqC Rapid ZCP2 EOL
END
END
IF FIFO?
SeqC ZCP2 EOL
IF RetractToCP1?
SeqC Rapid ZCP1 EOL
END
END
IF TAP?
SeqC InverseSpinOn EOL
SeqC ZCP2 EOL
SeqC SpinOn EOL
IF RetractToCP1?
SeqC Rapid ZCP1 EOL
END
END
END
NEXTFeat
RETURN

WFOStuff:
{ this controller does not support work offsets }
RETURN

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

DoOp:
IF FirstOperation?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
IF FullUp?
SeqC CoolOff EOL
{SeqC IncValue OfstOff EOL}
END
DoOpComments
WFOStuff
ELSE
Plane { no output }
Seq ToolChng OpToolID EOL
DoOpComments
DoPostScript
WFOStuff
END
CheckPass
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? AND NOT FirstPart?
SeqC Rapid StrtPos EOL
ELSE
SeqC AbsOrInc Rapid StrtPos EOL
SeqC ZCP1 CoolOn EOL
END
ELSE
IF NewTool?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
{only need to set up for tool change on 1st part}
ELSE
IF LAST NOT CoolOff?
SeqC CoolOff EOL
END
{SeqC IncValue OfstOff EOL}
DoEndOpPS
IF ToolChangeAtHome?
SeqC 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
WFOStuff
ELSE
Plane { no output }
Seq ToolChng OpToolID EOL
DoOpComments
DoPostScript
WFOStuff
END
CheckPass
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? AND NOT FirstPart?
SeqC Rapid StrtPos EOL
ELSE
SeqC AbsOrInc Rapid StrtPos EOL
SeqC ZCP1 CoolOn EOL
END
ELSE
IF SameTool?

{Finish off last Operation}

IF LAST ProgStop?
IF LAST NOT CoolOff?
SeqC CoolOff EOL
END
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
END
IF LAST ProgStop? OR NewToolOffset?
{SeqC IncValue OfstOff EOL}
END
DoEndOpPS
IF LAST ProgStop?
SeqC 'M0' EOL
END

{Start new Operation}

DoOpComments
DoPostScript
WFOStuff
CheckPass
SeqC PlaneC AbsOrInc Rapid StrtPos EOL
IF LAST ProgStop? OR NewToolOffset?
SeqC ZCP1 EOL
END
IF LAST ProgStop?
SeqC CoolOn EOL
ELSE
IF NOT CoolOff? AND LAST CoolOff?
SeqC CoolOn EOL
END
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
IF NOT FeedConnect?
ExitType PRIME ZCP3C
END
ExitFeed EOL
NEXTRep
END
END
IF AutoCycle?
SeqC ZCP3C EOL
ELSE
SeqC ExitType ZCP3C ExitFeed EOL
END
ELSE
IF Drilling?
IF Repeats?
EACHRep
DoSubComment
END
DrillPath
IF Repeats?
SeqC RapidC ZCP3C EOL
NEXTRep
END
SeqC RapidC ZCP3C EOL
END
END
RETURN

FinishLastOp:
IF NOT CoolOff?
SeqC CoolOff EOL
END
{SeqC IncValue OfstOff EOL}
DoEndOpPS
IF FIRST ToolChangeAtHome?
SeqC 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

DoToolsOps:
EachOp
IF GTEqual? Operation# Recall# Num#('1') AND LTEqual? Operation# Recall# Num#('2')
{Tools1stOp ˛ op ˛ ToolsLastOp}
DoOp
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

Process:
{setup and initializations}
InitProg
TagInit
SetFlagF('1') {Multiple Parts done flag}
SetFlagF('2') {Peck Drilling 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}
Save# Num#('4') Num#('0') {peck drill Z position}
ReverseXZArcs
InitWFONum
SetFlood
SetMaxRPM('10000') {?}
SetMaxFeed('500') {?}
SetArcSegmentAccuracy('.001')
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
END
EachOp {Start of post processing *********************}
IF FirstOperation?
EOR EOL
IF ToolChangeAtHome?
SetHome
END
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
SeqC 'G20' EOL { inch output }
END
NextOp
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
RETURN

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

SetFlagF('1')
Save# Num#('1') Num#('0') { number of tool changes }
Save# Num#('2') Num#('0') { number of pecks }

IF NOT AbsoluteMoves?
SetFlag('1')
ASCII('13') EOL
ASCII('13') EOL
'This processor does not support' EOL
'incremental output!' EOL
'You must select "Moves Are: Absolute"' EOL
'in the Post window!' EOL
ASCII('13') EOL
ASCII('13') EOL
END

IF MultipleParts? AND WorkFixtureOffsets?
SetFlag('1')
ASCII('13') EOL
ASCII('13') EOL
'This processor does not support' EOL
'work fixture offsets!' EOL
ASCII('13') EOL
ASCII('13') EOL
END

EachOp
IF FirstOperation?
Save# Num#('1') Num#('1')
ELSE
IF NewTool?
Save# Num#('1') ADD# Recall# Num#('1') Num#('1')
END
END
IF Drilling? AND Peck?
IF GreaterThan? NumFullPecks# Num#('100')
SetFlag('1')
ASCII('13') EOL
ASCII('13') EOL
'Operation# ' Operation# ' has more than 100 pecks.' EOL
'Reduce the number of pecks, or, have' EOL
'processor modified to support more.' EOL
ASCII('13') EOL
ASCII('13') EOL
END
END
IF AutoCycle?
SetFlag('1')
ASCII('13') EOL
ASCII('13') EOL
'This processor does not support' EOL
'incremental output!' EOL
'Operation# ' Operation# ' is using a Pattern.' EOL
'Patterns cause incremental output!!' EOL
ASCII('13') EOL
ASCII('13') EOL
END
NextOp

IF MultipleParts? AND OneToolAllParts?
IF GreaterThan? Recall# Num#('1') Num#('50')
SetFlag('1')
ASCII('13') EOL
ASCII('13') EOL
'This processor does not support' EOL
'more than 50 tool changes when' EOL
'Posting with Number of Parts' EOL
'greater than 1 and using the' EOL
'One Tool All Parts setting!' EOL
ASCII('13') EOL
ASCII('13') EOL
END
END

IF Flag?('1')
ASCII('13') EOL
ASCII('13') EOL
'Correct the above items' EOL
'and re-process.' EOL
ASCII('13') EOL
ASCII('13') EOL
ELSE
Process
END

Wyszukiwarka