NumPath 800 Bick 15V M561 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}
{6/4/93, v.81.6, IPR and CSF feed rates, SeqC on EOP line, loop for PeckChipBreaker, JR}
{7/22/93 v.81.7, change PeckChipBreaker to use Z instead of W, JR}

{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(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(Parts#,5) {.72}
FORMAT(Tag#,5)
FORMAT(RapidF#,7)
FORMAT(FeedTapIPR#,8)
FORMAT(Program#,9)
FORMAT(DIV#,10)
FORMAT(Dwell#,11)
FORMAT(TRUNC#,5)
FORMAT(MUL#,4)
FORMAT(Retract#,4)

{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 ' 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

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

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 ' Z' GetW# ' L' GetL# GetFeedEntC EOL {peck amount and number of loops}
SeqC ' Z' 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 PeckChipBreaker?
SeqC ZCP2C EOL
DoPeckChipBreaker
ELSE
IF FIFO?
SeqC ZCP2C EOL
SeqC FeedC ' Z' 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 PeckChipBreaker? 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') EOL
ELSE
GetFeedEntC EOL
END
END
RETURN

GetSpeedC:
IF NotEqual? LAST SpeedRPM# SpeedRPM#
TABLE(1,SpeedRPM#,1)
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 CoolOff EOL
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 TABLE(1,SpeedRPM#,1)
IF FullUp?
ToolOfst CoolOn
END
EOL
ELSE
SeqC Rapid Plane AbsOrInc StrtPos TABLE(1,SpeedRPM#,1) OpToolID ToolOfst SpinOn 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
SeqC CoolOff 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 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 TABLE(1,SpeedRPM#,1)
IF FullUp?
ToolOfst CoolOn
END
EOL
ELSE
SeqC Rapid Plane AbsOrInc StrtPos TABLE(1,SpeedRPM#,1) OpToolID ToolOfst SpinOn CoolOn EOL
END
ELSE
IF SameTool?
IF LAST ProgStop?
SeqC CoolOff EOL
SeqC Rapid OfstOff ' H0' EOL
DoEndOpPS
SeqC ' M0' EOL

{Start new Operation}

GetStartOfSameTool
SeqC RapidC PlaneC StrtPos TABLE(1,SpeedRPM#,1) ToolOfst CoolOn EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF NewToolOffset?
SeqC Rapid OfstOff ' H0' EOL
DoEndOpPS

{Start new Operation}

GetStartOfSameTool
SeqC RapidC PlaneC StrtPos GetSpeedC ToolOfst EOL
ELSE
DoEndOpPS

{Start new Operation}

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

FinishLastOp:
SeqC Rapid OfstOff ' H0' EOL
SeqC CoolOff EOL
DoEndOpPS
IF FIRST ToolChangeAtHome?
SeqC AbsOrInc Rapid FirstHome EOL
END
IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart?
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
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('1500')
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 + 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
'#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 IN 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 PC50 M584 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