K & T 180 Type C M177 82 1


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

{2/21/89
Copied and modified: K & T Type C M127.58
For: Angelus Can
Machine: K&T 180
Control: Model C
Deleted 'B0's and added PostScript codes.
JR}

{added PostScript comments, deleted RunTime comments 5/17/89 JR}

{11/28/89
Updated: K & T 180 Type C M177.57
For: Angelus Can
JR}

{7/19/90, Updated: K & T 180 Type C M177.61 to .72.1 format, JR}
{7/24/90, Replaced all occurances of SetSRXYZero with SetSRXYtoSP, DWB}

{10/2/92
Copied & modified: K & T 180 Type C M177.72.1
For: Gibbs & Associates
Updated to Version 4.1 per LongHand [AbsOrInc] M001.81.1.
DWB}

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

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

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

{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

DoPartCycleComment:
IF MultipleParts? AND UseComments? AND SubComment?
'( PART NO. ' Tag# ' )' EOL
END
RETURN

DoCycleComment:
IF UseComments? AND SubComment?
'( CYCLE START )' EOL
END
RETURN

DoOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
'(MSG, OPERATION ' Operation# ': ' OperationType$ ' )' EOL
END
IF OperationComment?
'(MSG, ' OperationComment$ ' )' EOL
END
IF WorkGroupComment?
'(MSG, ' WorkGroupComment$ ' )' EOL
END
IF ToolTypeComment?
'(MSG, TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
IF ToolComment?
'(MSG, ' ToolComment$ ' )' EOL
END
RestoreScale
END
RETURN

PSInit: {reset flags}
RotateF
RETURN

PSStuff: {revised.72}
IF FourthCW?
FORMAT(FourthDegree#,2)
SeqC Rapid AbsOrInc 'B' FourthDegree# RapidF EOL
FourthCWF {reset flag}
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
SeqC Rapid AbsOrInc 'B' FourthDegree# RapidF EOL
FourthCCWF {reset flag}
END
RETURN

DoPostScript:
PSInit
EachPS
SeqC PostScript EOL {literals}
{PSStuff commands called from inside EachOp/NextOp Loop.}
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqC EndOpPS EOL {literals}
PSStuff {commands}
NextPS
RETURN

EntryMove:
IF FeedEntry?
SeqC FeedC ZInC FeedEntC EOL
ELSE
SeqC RapidC ZInC RapidFC EOL
END
RETURN

GetConnect:
IF FeedConnect?
FeedC
ELSE
RapidC
END
RETURN

GetConnectF:
IF FeedConnect?
FeedEntC
ELSE
RapidFC
END
RETURN

ExitMove:
IF CutterRadiusCompensation? AND NOT AutoCycle?
SeqC FeedC CRCOff LastFeatExtend FeedRateC EOL
END
IF NOT FeedConnect?
SeqC
IF FIFO? { .81 }
FeedC
ELSE
IF NOT AutoCycle?
RapidC
END
END
PRIME ZCP2C
IF FIFO? { .81 }
FeedEntC
ELSE
IF NOT AutoCycle?
RapidFC
END
END
EOL
END
RETURN

ExitMove2:
IF CutterRadiusCompensation? AND NOT Repeats? AND NOT AutoCycle?
SeqC FeedC CRCOff LastFeatExtend FeedRateC EOL
END
IF FIFO?
SeqC FeedC ZCP3C FeedEntC EOL
ELSE
SeqC RapidC ZCP3C RapidFC EOL
END
RETURN

CycleWarning:
{ NOTE: This Post Processor takes care of Z Clearance. }
RETURN

FormatArc:
IF ArcCW?
CWArc
ELSE
CCWArc
END
MoveXYZC ArcIJC
RETURN

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

ToolPath:
EACHFeat
IF PointFeat? { Drilling Only }
IF NOT FirstFeat?
SeqC Cycle MoveSXYZC RLevel Peck FeedEnt EOL
END
SeqC DrillOff EOL
IF RetractToCP1?
SeqC Rapid ZCP1 RapidF EOL
ELSE
SeqC Rapid ZCP2 RapidF EOL
END
ELSE
IF RapidFeat?
IF LastFeat? AND AutoCycle? {.70}
SeqC RapidC CRCOffC MoveXYZC RapidFC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqC RapidC MoveXYZC RapidFC EOL
END
END
ELSE
IF LineFeat?
IF AutoCycle? {.70}
IF LastFeat?
SeqC FeedC CRCOffC MoveXYZC FeedRateC EOL
ELSE
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
END
ELSE
StdLine
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
RETURN

WFOStuff:
{ NOTE: This Post Processor does not support WorkFixtureOffsets. }
RETURN

AutoCycCutSub1: {part 1}
CalcACSRXY {calc tool position, CalcAutoCycleStatusRecordXY}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
SetSRXYtoSP
SeqC IncValue EOL
RETURN

AutoCycCutSub2: {part 2}
IF FIFO? {.81}
SeqC AbsOrInc FeedC ZCP2 FeedEntC EOL {.71.2 removed CRCOffC, gets turned off in ToolPath}
ELSE
SeqC AbsOrInc RapidC ZCP2 RapidFC EOL
END
SetSRSubXY {restore SR to 1st position value}
ReSetPass2 {restore for positioning moves}
RETURN

Milling:
EntryMove
ToolPath
RETURN

XYZRep:
CycleWarning
EachRep
IF NOT FirstCycle?
SeqC GetConnect CRCOffC StrtPosC GetConnectF EOL
END
DoCycleComment
IF FirstCycle?
EntryMove
ELSE
IF FeedConnect?
IF ZshiftOnly?
EntryMove
END
ELSE
IF FeedEntry?
SeqC ZCP2C EOL
END
EntryMove
END
END
ToolPath
ExitMove
NextRep
RETURN

NoRepAutoCycle:
EACHFeat
IF SPXMove? OR SPYMove?
SeqC RapidC MoveSXYC RapidFC EOL
END
AutoCycCutSub1
DoCycleComment
Milling
AutoCycCutSub2
NEXTFeat
RETURN

XYZRepAutoCycle:
CycleWarning
EachRep
EACHFeat
IF FirstCycle? AND FirstFeat?
ELSE
SeqC GetConnect MoveSX MoveSY GetConnectF EOL
END
AutoCycCutSub1
DoCycleComment
Milling
AutoCycCutSub2
NEXTFeat
NextRep
RETURN

ZonlyRepAutoCycle:
EACHFeat
IF SPXMove? OR SPYMove?
SeqC GetConnect MoveSXYC GetConnectF EOL
END
AutoCycCutSub1
EachRep
IF FirstCycle?
DoCycleComment
EntryMove
ELSE
IF NOT FeedConnect?
ExitMove
END
IF SPXMove? OR SPYMove?
SeqC GetConnect MoveSXYC GetConnectF EOL
END
DoCycleComment
IF NOT FeedConnect?
EntryMove
END
END
ToolPath
NextRep
AutoCycCutSub2
ReSetPass2 {restore for positioning moves}
NEXTFeat
RETURN

DrillStuff:
SeqC DrillCP EOL
GetCycle
SeqC Cycle StrtPos ZDepth RLevel Peck FeedEnt EOL
TrackZNO# ZDepth# {.81}
ToolPath
RETURN

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

GetStartOfSameTool:
DoPartCycleComment
DoOpComments
DoPostScript
CheckPass
RETURN

MasterSub:
IF FirstOperation?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
ELSE
SeqC Plane 'G70' AbsOrInc 'G80G94' EOL
SeqC Rapid 'Z200000P0M25' RapidF EOL
SeqC 'X100000Y150000M25' EOL
SeqC 'B0' EOL
SeqC 'G99' EOL
SeqC 'X100000Y50000' EOL
SeqC 'M25' EOL
'(MSG, EDIT, ADD ACTUAL Y AFTER M25. DO NOT EDIT X )' EOL
SeqC Preset 'X100000Y50000' EOL
SeqC RapidC 'Z200000P0M25' RapidFC EOL
SeqC 'X100000Y150000M19M25' EOL
DoPartCycleComment
DoOpComments
Seq OPToolID EOL
SeqC ToolChng EOL
DoPostScript
SeqC Speed SpinOn
IF NOT LastTool?
PreTool
END
EOL
PSStuff
CheckPass
SeqC Rapid PlaneC AbsOrInc StrtPos RapidF EOL
SeqC OfstOn CoolOn EOL
END
ELSE
IF NewTool?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
ELSE

{Finish off last Operation}

SeqC CoolOff EOL
SeqC RapidC 'Z200000P0M25' RapidFC EOL
DoEndOpPS
SeqC 'X100000Y150000M19M25' EOL
IF LAST ProgStop?
SeqC 'M00' EOL
ELSE
SeqC ProgStop EOL
END

{Start new Operation}

DoPartCycleComment
DoOpComments
Seq OpToolID EOL
SeqC ToolChng EOL
DoPostScript
SeqC Speed SpinOn PreTool EOL
PSStuff
CheckPass
SeqC Rapid PlaneC AbsOrInc StrtPos RapidF EOL
SeqC OfstOn CoolOn EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqC CoolOff EOL
SeqC RapidC 'Z200000P0M25' RapidFC EOL
SeqC 'M00' EOL

{Start new Operation}

GetStartOfSameTool
SeqC SpeedC SpinOn EOL
PSStuff
SeqC Rapid PlaneC StrtPos RapidF EOL
SeqC OfstOn CoolOn EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF NewToolOffset?
SeqC RapidC 'Z200000P0M25' RapidFC EOL

{Start new Operation}

GetStartOfSameTool
SeqC SpeedC EOL
PSStuff
SeqC RapidC PlaneC StrtPos RapidFC EOL
SeqC OfstOn EOL
ELSE
{Start new Operation}

GetStartOfSameTool
SeqC SpeedC EOL
PSStuff
SeqC RapidC PlaneC StrtPos RapidFC EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqC CoolOn EOL
END
END
END
END
END {common point for all operations}
ResetCRCNum {.72}
IF Milling?
SeqC ZCP2C EOL
IF AutoCycle?
IF Repeats?
IF ZshiftOnly?
ZonlyRepAutoCycle
ELSE
XYZRepAutoCycle
END
IF NOT FeedConnect?
SeqC ExitMove2 EOL
END
ELSE
NoRepAutoCycle
SeqC ExitMove2 EOL
END
ELSE { NOT AutoCycle }
IF Repeats?
XYZRep
ELSE
Milling
END
SeqC ExitMove2 EOL
END
ELSE
IF Drilling?
IF Repeats?
EachRep
DoCycleComment
DrillStuff
NextRep
ELSE
DrillStuff
END
IF RetractToCP1? {.81}
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
SeqC RapidC ZCP3C RapidFC EOL
END
END
RETURN

EndPartSub:
{End of program ************************************************************}

{finish last operation}
SeqC CoolOff EOL
SeqC RapidC 'Z200000P0M25' RapidFC EOL
DoEndOpPS
SeqC 'X100000Y150000M25' EOL
IF ProgStop?
SeqC 'M00' EOL
ELSE
IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart?
SeqC ProgStop EOL
END
END
RETURN

MPLoop:
TagInit
IF AllToolsOnePart?
EachPart
TagInc
EachOp
MasterSub
NextOp
EndPartSub
NextPart
ELSE { OneToolAllParts }
IF LTEqual? Recall# Num#('1') Recall# Num#('3')
Save# Num#('2') Recall# Num#('1')
EachOp
IF GTEqual? Operation# Recall# Num#('1')
IF Equal? Recall# Num#('1') Recall# Num#('2')
IF LastOp?
Save# Num#('2') ADD# Operation# Num#('1')
ELSE
IF NewTool? AND NOT FirstOperation?
Save# Num#('2') Operation#
END
END
END
END
NextOp
EachPart
TagInc
EachOp
IF GTEqual? Operation# Recall# Num#('1')
IF LessThan? Operation# Recall# Num#('2')
IF Equal? Operation# Recall# Num#('1')
IF NOT FirstPart?

{Finish off last Operation}

IF FullUp?
SeqC CoolOff EOL
SeqC RapidC 'Z200000P0M25' RapidFC EOL
END
DoEndOpPS

{Start new Operation}

DoPartCycleComment
DoOpComments
DoPostScript
SeqC Speed SpinOn EOL
PSStuff
CheckPass
SeqC Rapid PlaneC StrtPos RapidF EOL
IF FullUp?
SeqC OfstOn CoolOn EOL
END
END
END
MasterSub
END
END
NextOp
NextPart
Save# Num#('1') Recall# Num#('2')
END
END
RETURN

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

{setup and initializations}
InitProg
ReverseXZArcs
SetFlood
SetMaxRPM('10000')
SetMaxFeed('500')
Save# Num#('1') Num#('0')
Save# Num#('2') Num#('0')
Save# Num#('3') Num#('0')
SetFlagF('1')
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
' 4thAxisCW(12.5), 4ACW(12.5) -' EOL
' generates a + B move of the value you specify' EOL
' 4thAxisCCW(22.5), 4ACCW(22.5) -' EOL
' generates a - B move of the value you specify' EOL
END
EOR EOL
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
IF ProgramNameComment?
'(NAM, ' ProgramName$ ' )' EOL
END
IF ProgramComment?
'(MSG, ' ProgramComment$ ' )' EOL
END
IF FormatNameComment?
'(MSG, FORMAT: ' FormatName$ ' )' EOL
END
IF TimeComment?
'(MSG, ' Date$ ' AT ' Time$ ' )' EOL
END
IF MovesComment?
'(MSG, OUTPUT IN ' MoveType$ ' INCHES )' EOL
END
IF PartsComment?
'(MSG, PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
'(MSG, FIRST TOOL NOT IN SPINDLE )' EOL
END
END
OpenSub
RestoreScale
IF MultipleParts?
IF WorkFixtureOffsets?
'NOTE: This Post Processor does not support Work Fixture Offsets for Multiple Parts.' EOL
'Therefore, the output will be controlled by the following values that are' EOL
'already entered in Equally Spaced Offsets Edit Fields:' EOL
'X' PartShiftX# 'Y' PartShiftY# 'Z' PartShiftZ# EOL
'It is recommended that you change your selection to Equally Spaced Offsets.' EOL
END
Save# Num#('1') Num#('1')
EachOp
IF LastOp?
Save# Num#('3') Operation#
END
NextOp
MPLoop
IF OneToolAllParts?
MPLoop MPLoop MPLoop MPLoop MPLoop
MPLoop MPLoop MPLoop MPLoop MPLoop
MPLoop MPLoop MPLoop MPLoop MPLoop
MPLoop MPLoop MPLoop MPLoop MPLoop
MPLoop MPLoop MPLoop MPLoop MPLoop
EndPartSub
END
ELSE
EachOp
MasterSub
NextOp
EndPartSub
END
SeqC EOP EOL
Post
Close
IF UseComments?
SetScale('1') {restore scale for comments}
Reopen
IF FileBytesComment?
'(MSG, FILE LENGTH: ' FileBytes# ' CHARACTERS )' EOL
END
IF FileFeetComment?
'(MSG, FILE LENGTH: ' FileFeet# ' FEET )' EOL
END
IF FileMetersComment?
'(MSG, FILE LENGTH: ' FileMeters# ' METERS )' EOL
END
Close
END


Wyszukiwarka

Podobne podstrony:
K & T 180 Type C&D M523 82 6
Fanuc 2000C Mazak L168 82
Fanuc 10T MS [2 G54] L066 82
function ingres field type
Output Section Type
GE 550T LeBlonde L082 82
programowanie kluczyka Jaguar x type
Fanuc 0T (Anzon1) L077 82 1m
36 (82)
BooleanControl Type
Fanuc 3TF Tak TS LTM L263 82 2

więcej podobnych podstron