K & T Gemini E [STD] MV55 89


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

{5/30/97
Initial: K & T 800 Gem D17 M186.87
Created: K & T Gemini E VB-4 Mxxx.89
ForUser: Bell Helicopter
Control: K & T Gemini E
Machine: K & T VB-4
Develop: ComPost2 68K 1.0b11, CatalystPPC v3.33C
Comment: New processor per marked up and edited readoputs.
Changed uper limit Z move from Z31.5 to Z20
Added Work Fixture Offsets H1 thru H36.
Added ZCP1 WFOStuff after tool change.
The tool changer changes the tool below the surface of the table.
Adding this line prevents a ramp move into the table with the StrtPos move.
Added 'Y24.M25' to end of program if not FIRST ToolChangeAtHome.
Updated to .89 format per LongHand M001.89
Jim Radcliffe}

{3/16/98
Initial: K & T Gemini E VB-4 MX22.89
Created: K & T Gemini E M000.89
ForUser: CNCCS / Smithville Tool & Die
Control: Kearney & Trecker Gemini E
Machine: Kearney & Trecker VB-4
Develop: ComPost2 1.1b3, Virtual Gibbs 4.24
Comment: New Processor per sample readout from Terry Boles
Changed to NoSubs format per Fanuc 6M NoSubs M877.89.4
Formated output per sample readout.
Jim Radcliffe}

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

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ToolDiameter#,4)
FORMAT(Dwell#,4)
FORMAT(TrackZNo#,4)
FORMAT(ArcZRads#,4)
FORMAT(RapidF#,4)
FORMAT(Program#,5)
FORMAT(Operation#,5)
FORMAT(Tag#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,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?
'( CYCLE START )' EOL
END
RETURN

DoToolComments:
IF UseComments?
SetScale('1')
IF ToolTypeComment?
'( TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
IF ToolComment?
'( ' ToolComment$ ' )' EOL
END
RestoreScale
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
RestoreScale
END
RETURN

AbsValueC:
IF NOT AbsValue?
AbsValue
END
RETURN

IncValueC:
IF AbsValue?
IncValue
END
RETURN

AbsOrIncC:
IF AbsoluteMoves?
AbsValueC
ELSE
IncValueC
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
ELSE
RapidFC
END
RETURN

FormatArc:
IF ArcCW?
CWArc
ELSE
CCWArc
END
IF XYPlane?
MoveXY
IF ZMove?
MoveZ ArcIJ ' K' ArcZRads#
ELSE
ArcIJ
END
ELSE
IF XZPlane?
MoveX
IF YMove?
MoveY MoveZ ArcIJ ' J' ArcZRads#
ELSE
MoveZ ArcIJ
END
ELSE { YZPlane }
IF XMove?
MoveX MoveY MoveZ ArcIJ ' I' ArcZRads#
ELSE
MoveY MoveZ ArcIJ
END
END
END
RETURN

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

StdLine: {enables CRC on first call, .70}
IF LastFeat?
SeqC CRCOffC 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 CRCOnC FeedC MoveXYZC FeedRateC EOL
DecelMove2
END
SeqC CRCOnC FeedC MoveXYZC DecelFeed EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqC CRCOnC FeedC MoveXYZC FeedRateC EOL
END
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: {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 RapidFC 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 RapidFC 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 FIFO? AND NOT FirstFeat?
SeqC Rapid MoveSXYC RapidF EOL
ELSE
SeqC MoveSXYC EOL
END
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
CutAutoCycle
ELSE
IF RetractToCP1? AND NOT FirstFeat?
SeqC DrillOff EOL
SeqC Rapid ZCP1 RapidF EOL
SeqC MoveSXYC EOL
SeqC Cycle MoveSZ RLevel Peck FeedEnt EOL {.80.01}
ELSE
SeqC MoveSXYZC EOL {.80.01}
END
END
ELSE
IF RapidFeat?
StdRapid
ELSE
IF LineFeat?
StdLine
ELSE
IF ArcFeat?
StdArc
END
END
END
END
NEXTFeat
RETURN

WFOStuff:
IF MultipleParts? AND WorkFixtureOffsets?
SetWFO
ELSE
IF NewWFO?
' H' NewWFO#
END
END
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 RapidC ' Z20. M25' RapidFC EOL
END
ELSE
DoToolComments
Seq OpToolID ToolChng EOL
SeqC ' Z20. M25' EOL
SeqC Plane AbsOrInc DrillOff ' G94' EOL
DoPostScript
END
CheckPass
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? AND NOT FirstPart?
SeqC Rapid StrtPos WFOStuff EOL
ELSE
SeqC Rapid StrtPos Speed SpinOn RapidF WFOStuff EOL
SeqC ZCP1 CoolOn EOL
END
DoOpComments
ELSE
IF NewTool?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
{only need to set up for tool change on 1st part}
ELSE
SeqC SpinOff EOL
SeqC RapidC ' Z20. M25' RapidFC EOL
DoEndOpPS
IF ToolChangeAtHome?
SeqC Rapid Home EOL
END
SeqC ' Y27. M25' EOL
IF LAST ProgStop?
SeqC ' M0' EOL
ELSE
SeqC ProgStop EOL
END
' ' EOL
END

{Start new Operation}

IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
IF FullUp?
SeqC RapidC ' Z20. M25' RapidFC EOL
END
ELSE
DoToolComments
Seq OpToolID ToolChng EOL
SeqC ' Z20. M25' EOL
SeqC Plane AbsOrInc DrillOff ' G94' EOL
DoPostScript
END
CheckPass
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? AND NOT FirstPart?
SeqC Rapid StrtPos WFOStuff EOL
ELSE
SeqC Rapid StrtPos Speed SpinOn RapidF WFOStuff EOL
SeqC ZCP1 CoolOn EOL
END
DoOpComments
ELSE
IF SameTool?

{Finish off last Operation}

IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF LAST ProgStop?
SeqC SpinOff EOL
END
IF LAST ProgStop? OR NewToolOffset?
SeqC RapidC ' Z20. M25' RapidFC EOL
END
DoEndOpPS
IF LAST ProgStop?
SeqC ' M0' EOL
END

{Start new Operation}

DoOpComments
SeqC PlaneC EOL
DoPostScript
CheckPass
SeqC Rapid StrtPos SpeedC
IF LAST ProgStop?
SpinOn
END
RapidF WFOStuff 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}

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
IF NOT FirstCycle?
SeqC StrtPos EOL
END
END
GetCycle
SeqC Cycle ZDepth RLevel Peck FeedEnt EOL
TrackZNO# FIRST SPZ#
ToolPath
SeqC ' G80' EOL
SeqC Rapid ZCP3 RapidF EOL
IF Repeats?
NEXTRep
END
SeqC RapidC ZCP3C RapidFC EOL
END
END
RETURN

FinishLastOp:
SeqC SpinOff EOL
SeqC RapidC ' Z20. M25' RapidFC EOL
DoEndOpPS
IF FIRST ToolChangeAtHome?
SeqC Rapid FirstHome EOL
END
SeqC ' Y27. M25' EOL
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 ' X20. M25' EOL
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

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

{setup and initializations}
InitProg
TagInit
SetFlagF('1') {done flag}
ReverseXZArcs
InitWFONum
SetFlood
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
' 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?
ProgID1 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
' ' EOL
SeqC Plane ' G70' AbsOrInc DrillOff EOL
SeqC ' X20. Y27. Z20. M25' EOL
' ' EOL
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


Wyszukiwarka