NumPath 800 PC50 M584 87


{3/19/93
Copied & modified: LongHand M001.81.3
For: Illiana Machine & Mfg. Corp.
Control: NumeriPath CNC 800
Machine: Bickford 15V NumeriCenter
Using Var(8) for PeckChipBreaker, No support for .81 drilling stuff.
Using Var(9) for current IPM feed rate, Ouputting feed rates in IPR.
Using U,V,P values for origin shifting, set EquallySpacedOffsets to 0 and set
the actual values at these registers in the program. Ideally we would set
EquallySpacedOffsets to desired values, have those values come out in the
U,V,P, and the axis moves would not increment in the EachPart/NextPart loop.
Jim Radcliffe}

{3/26/93
Additional changes requested
Added EOR to beginning and end of program.
Combined DoPartCycleComment with DoOpComments, added a blank line before and after comments.
Modified format to force output of the 1st decimal place
so that for example Z1. will be output as Z1.0
Added spaces before drill addresses.
Added missing R to G85 drill cycle
Added missing Peck command to DrillStuff sub.
Added missing ZCP2 in ToolPath for drilling
Jim Radcliffe}

{5/19/93, v.81.4 corrected: ZCP2 in TP for Drilling, SeqLab in PeckChipBreaker, JR}
{5/25/93, v.81.5 changed to new NoSubs M001.81 formt, JR}

{5/25/93
Copied & modified: NumPath 800 Bick 15V M561.81.5
For: Braden Eng / Illiana Machine & Mfg. Corp.
Control: Numeripath CNC 800-M
Machine: Giddings & Lewis PC-50 Boring Mill
Changed Z axis to output a W.
Changed Speed TABLE output to use standard Speed commands, 1120 max.
Using subs GetCool for requested coolant handling.
Manual Drilling includes PeckFullRetract as well as PeckChipBreaker.
Fourth Axis is a B with .1 degree minimum increment.
Commented out OfstOff lines.
Changed to "First Tool In Spindle" & added ToolChng command.
Moved coolant commands on with or after ZCP2 and off before ZCP3,
machine is a very large machine that splatters coolant.
NOTE: all M functions are executed after the motion in the same block.
Jim Radcliffe}

{7/22/93
Additional modifications requested:
Correction: not all M functions are after functions.
Coolon is a before function
CoolOff is an after function
Moved CoolOn to after move to ZCP2.
Output a G80 before M9 for drill cycles.
Added ConstantSurfaceFeed support.
Added ZCP1 to FirstOperation and NewTool.
Changed to use a program loop for PeckChipBreaker.
Jim Radcliffe}

{2/9/96, Updated .81 number to .84, no changes necessary, MPK}

{3/22/96, Tested ZOnlyRepAutoCycle, Incremented number to .87, MPK}

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

#1 = '#.00'
#2 = '###.###;0.'
#3 = '*###.###;0.'
#4 = '####.0###;0'
#5 = '#######0'
#6 = '####^###0'
#7 = '#;'
#8 = '.######;0'
#9 = '0000'
#10 = '#.####;0'
#11 = '##^0'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(PartShiftX#,4)
FORMAT(PartShiftY#,4)
FORMAT(PartShiftZ#,4)
FORMAT(ClearancePlane1#,4)
FORMAT(ClearancePlane2#,4)
FORMAT(ClearancePlane3#,4)
FORMAT(ZDepth#,4)
FORMAT(TrackZ#,4)
FORMAT(ArcZRads#,4)
FORMAT(ToolDiameter#,4) {.72}
FORMAT(MUL#,4)
FORMAT(Retract#,4)
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(Parts#,5) {.72}
FORMAT(Tag#,5)
FORMAT(TRUNC#,5)
FORMAT(RapidF#,7)
FORMAT(FeedTapIPR#,8)
FORMAT(Program#,9)
FORMAT(DIV#,10)
FORMAT(Dwell#,11)

{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

GetEOL:
IF Flag?('1') {a comment has been output, EOL is needed}
EOL
ELSE
ASCII('13')
END
RETURN

DoOpComments:
IF UseComments?
SetScale('1')
IF MultipleParts? AND SubComment?
GetEOL
'# PART ' Tag# SetFlag('1')
END
IF OperationIDComment?
GetEOL
'# OPERATION ' Operation# ': ' OperationType$ SetFlag('1')
END
IF OperationComment?
GetEOL
'# ' OperationComment$ SetFlag('1')
END
IF WorkGroupComment?
GetEOL
'# ' WorkGroupComment$ SetFlag('1')
END
IF ToolTypeComment?
GetEOL
'# TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ SetFlag('1')
END
IF ToolComment?
GetEOL
'# ' ToolComment$ SetFlag('1')
END
IF Flag?('1')
ASCII('13') EOL
END
SetFlagF('1')
RestoreScale
END
RETURN

PSInit: {reset flags}
RotateF
RETURN

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

DoPostScript:
PSInit
EachPS
SeqC PostScript EOL
PSStuff
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqC EndOpPS EOL
PSStuff
NextPS
RETURN

GetCoolOn:
IF NOT Flag?('3')
IF NOT CoolOff?
CoolOn SetFlag('3')
END
END
RETURN

GetCoolOff:
IF Flag?('3')
IF Drilling? AND NOT Peck? AND NOT FIFO?
' G80'
END
CoolOff SetFlagF('3')
END
RETURN

GetDecelFeedC:
IF NotEqual? Recall# Num#('9') DecelFeed#
IF NOT EmptyLine?
Save# Num#('9') DecelFeed#
' E' DIV# DecelFeed# SpeedRPM#
END
END
RETURN

GetArcFeedC:
IF NotEqual? Recall# Num#('9') ArcFeed#
IF NOT EmptyLine?
Save# Num#('9') ArcFeed#
' E' DIV# ArcFeed# SpeedRPM#
END
END
RETURN

GetFeedRateC:
IF NotEqual? Recall# Num#('9') FeedContour#
IF NOT EmptyLine?
Save# Num#('9') FeedContour#
' E' DIV# FeedContour# SpeedRPM#
END
END
RETURN

GetFeedEntC:
IF NotEqual? Recall# Num#('9') FeedEntry#
IF NOT EmptyLine?
Save# Num#('9') FeedEntry#
' E' DIV# FeedEntry# SpeedRPM#
END
END
RETURN

FormatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
IF XYPlane?
IF ZMove?
MoveX MoveY MoveZC ArcIJ ' K' ArcZRads#
ELSE
MoveX MoveY MoveZC ArcIJ
END
ELSE
IF XZPlane?
MoveX MoveYC MoveZ ArcIJ
ELSE
MoveXC MoveY MoveZ ArcIJ
END
END
RETURN

StdRapid:
IF XMove? OR YMove? OR ZMove?
SeqC RapidC MoveXYZC EOL
END
RETURN

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

StdArc:
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqC CRCOnC FormatArc GetArcFeedC EOL
DecelMove2
END
SeqC CRCOnC FormatArc GetDecelFeedC EOL
ELSE
SeqC CRCOnC FormatArc GetArcFeedC EOL
END
RETURN

ToolPath2: {for AutoCycle element moves}
EACHFeat
IF RapidFeat?
IF LastFeat?
SeqC CRCOffC RapidC MoveXYZC EOL
ELSE
StdRapid
END
ELSE
IF LineFeat?
IF LastFeat?
SeqC CRCOffC FeedC MoveXYZC GetFeedRateC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqC FeedC MoveXYZC GetFeedRateC EOL
ELSE
StdLine {enables CRC on first call}
END
END
ELSE
IF ArcFeat?
StdArc
END
END
END
NEXTFeat
RETURN

EntryMove:
IF FeedEntry?
SeqC FeedC ZInC GetFeedEntC 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
EntryMove
ToolPath2
IF NOT FeedConnect?
SeqC RapidC PRIME ZCP2 EOL
END
NextRep
SeqC AbsOrInc RapidC ZCP2 EOL
ELSE
EntryMove
ToolPath2
SeqC AbsOrInc RapidC ZCP2 EOL
END
SetSRSubXY {restore tool position}
SetSRSubMove
ReSetPass2 {restore for positioning moves}
RETURN

DoPeck:
IF GreaterThan? SUB# Recall# Num#('8') Peck# SPZ# {IF OldZ - Peck# > Depth}
Save# Num#('8') SUB# Recall# Num#('8') Peck# {Save#1 = OldZ - Peck# = NewZ}
SeqC Feed ' W' TrackZ# Recall# Num#('8') GetFeedEntC EOL {move to NewZ}
IF PeckFullRetract?
SeqC Rapid ZCP2 EOL {move to CP2}
END
SeqC RapidC ' W' TrackZ# ADD# Recall# Num#('8') Retract# EOL {move to RetractZ}
END
RETURN

DoLastPeck: {OldZ - Peck# ² Depth}
SeqC Feed ' W' TrackZ# SPZ# GetFeedEntC EOL {move to Depth}
IF RetractToCP1?
SeqC Rapid ZCP1 EOL {move to CP1}
ELSE
SeqC Rapid ZCP2 EOL {move to CP2}
END
RETURN

GetL#: {calculates the number of full loops}
TRUNC# DIV# SUB# ClearancePlane2# ZDepth# SUB# Peck# Retract#
RETURN

GetW#: {calculates the actual peck amount}
MUL# ADD# DIV# SUB# ClearancePlane2# ZDepth# GetL# Retract# NUM#('-1')
RETURN

DoPeckChipBreaker:
SeqC Feed IncValue ' W' GetW# ' L' GetL# GetFeedEntC EOL {peck amount and number of loops}
SeqC ' W' Retract# ' M77' EOL {retract amount and end loop}
IF RetractToCP1?
SeqC Rapid AbsOrInc ZCP1 EOL
ELSE
SeqC Rapid AbsOrInc ZCP2 EOL
END
RETURN

ToolPath:
EACHFeat
IF PointFeat?
SeqC MoveSXYC EOL
IF AutoCycle?
CutAutoCycle
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
IF Peck?
SeqC ZCP2C EOL
SeqC GetCoolOn EOL
IF PeckChipBreaker?
DoPeckChipBreaker
ELSE
Save# Num#('8') ClearancePlane2#
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
DoLastPeck
END
ELSE
IF FIFO?
SeqC ZCP2C EOL
SeqC GetCoolOn EOL
SeqC FeedC ' W' ZDepth# GetFeedEntC EOL
IF Dwell?
SeqC ' G4 F' Dwell# EOL
END
SeqC ZCP2 EOL
IF RetractToCP1?
SeqC Rapid ZCP1 EOL
END
END
END
END
ELSE
IF RapidFeat?
StdRapid
ELSE
IF LineFeat?
StdLine
ELSE
IF ArcFeat?
StdArc
END
END
END
END
NEXTFeat
RETURN

DrillStuff:
GetCycle
IF Peck? OR FIFO?
{no canned cycle, taken care of in ToolPath}
ELSE
SeqC Cycle ZDepth RLevel Peck
IF RetractToCP1?
' K' ClearancePlane1#
ELSE
' K' ClearancePlane2#
END
IF Tap?
' E' FeedTapIPR#('1')
ELSE
GetFeedEntC
END
GetCoolOn EOL
END
RETURN

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

GetStartOfSameTool:
DoOpComments
DoPostScript
CheckPass
RETURN

DoOp:
IF FirstOperation?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
IF FullUp?
{SeqC Rapid OfstOff ' H0' EOL}
END
DoOpComments
ELSE
DoOpComments
DoPostScript
END
IF MultipleParts?
SeqC ' U' CurOriginPosX# ' V' CurOriginPosY# ' P' CurOriginPosZ# EOL
END
CheckPass
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
SeqC Rapid PlaneC AbsOrInc StrtPos Speed
IF FullUp?
{ToolOfst}
END
EOL
ELSE
SeqC Rapid Plane AbsOrInc StrtPos ZCP1 Speed OpToolID ToolOfst SpinOn EOL
END
ELSE
IF NewTool?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
{only need to set up for tool change on 1st part}
ELSE
DoEndOpPS
SeqC
IF ToolChangeAtHome?
AbsOrInc Rapid Home
END
ToolChng EOL
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 Rapid OfstOff ' H0' EOL}
END
DoOpComments
ELSE
DoOpComments
DoPostScript
END
IF MultipleParts? AND OneToolAllParts?
SeqC ' U' CurOriginPosX# ' V' CurOriginPosY# ' P' CurOriginPosZ# EOL
END
CheckPass
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
SeqC Rapid PlaneC AbsOrInc StrtPos Speed
IF FullUp?
{ToolOfst}
END
EOL
ELSE
SeqC Rapid Plane AbsOrInc StrtPos ZCP1 Speed OpToolID ToolOfst SpinOn EOL
END
ELSE
IF SameTool?
IF LAST ProgStop?
{SeqC Rapid OfstOff ' H0' EOL}
DoEndOpPS
SeqC ' M0' EOL

{Start new Operation}

GetStartOfSameTool
SeqC RapidC PlaneC StrtPos Speed ToolOfst EOL
ELSE
IF NewToolOffset?
{SeqC Rapid OfstOff ' H0' EOL}
DoEndOpPS

{Start new Operation}

GetStartOfSameTool
SeqC RapidC PlaneC StrtPos SpeedC ToolOfst EOL
ELSE
DoEndOpPS

{Start new Operation}

GetStartOfSameTool
SeqC RapidC PlaneC StrtPos SpeedC EOL
END
END
END
END
END {common point for all operations}
ResetCRCNum {.72}
Save# Num#('9') Num#('500') {save max feed to fee rate variable to force feed rate output}
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
SeqC GetCoolOn EOL
IF NOT AutoCycle?
EntryMove
END
ToolPath
IF Repeats?
IF ZshiftOnly? AND AutoCycle?
{done in CutAutoCycle called from ToolPath}
ELSE
IF FeedConnect?
SeqC CRCOffC EOL
ELSE
SeqC GetCoolOff EOL
SeqC CRCOffC RapidC PRIME ZCP3C EOL
END
NEXTRep
END
END
SeqC GetCoolOff EOL
SeqC CRCOffC RapidC ZCP3C EOL
ELSE
IF Drilling?
IF Repeats?
EACHRep
DoSubComment
IF FirstCycle?
DrillStuff
END
ToolPath
NextRep
ELSE
DrillStuff
ToolPath
END
SeqC GetCoolOff EOL
SeqC Rapid ZCP3 EOL
END
END
RETURN

FinishLastOp:
{SeqC Rapid OfstOff ' H0' EOL}
DoEndOpPS
SeqC
IF FIRST ToolChangeAtHome?
AbsOrInc Rapid FirstHome
END
IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart?
ToolChng EOL
IF ProgStop?
SeqC ' M0' EOL
ELSE
SeqC ProgStop EOL
END
ELSE
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
EachPart
TagInc
DoToolsOps
NextPart
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
SetFlagF('1') {done flag}
ReverseXZArcs
SetFlood
SetMaxRPM('1120')
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
' 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
EachOp {Start of post processing *********************}
IF FirstOperation?
EOR EOL
'#PGM,' Program# '90' EOL {the 90 refers to customers machine number}
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 SPINDLE ' EOL
END
END
OpenSub
RestoreScale
END
NextOp
IF MultipleParts?
IF AllToolsOnePart?
EachPart
TagInc
EachOp
DoOp
NextOp
FinishLastOp
NextPart
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
Post
IF UseComments?
SetScale('1') {restore scale for comments}
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
EOR EOL
Close


Wyszukiwarka

Podobne podstrony:
NumPath 800 Bick 15V M561 87
G & L 800 10VF [CC] M945 87
K & T 800 Gem D17 M186 87
Fanuc 10M MVJr[G43r] M192 87
Tosnuc 600M BMC 40 M440 87
Fanuc 6M [MC] M710 87
G&L Numeripath 800M M713 87 1
pref 87

więcej podobnych podstron