Sperry Rand UMAC 7 M781 87


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

{1/28/95
Copied & modified: Fanuc 6M NoSubs M001.81.2
For: Braden Eng / Southern Machine
Control: Sperry Rand UMAC-7 System 32C
Machine: Brown & Sharpe Hydrocenter 2536
Leading Zeros. No WFO's.
Speed Codes. No Spindle On/Off commands!
Directional vector used to set up CRC.
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.'
#5 = '#######0'
#6 = '0##^#'
#7 = '#;'
#8 = '00'
#9 = '0#^####'
#10 = '*0#^####'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ToolDiameter#,4)
FORMAT(Program#,5)
FORMAT(Operation#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
FORMAT(RapidF#,7)
FORMAT(Tool#,8)
FORMAT(ToolOffset#,8)
FORMAT(Recall#,9)
FORMAT(ClearancePlane1#,9)
FORMAT(ClearancePlane2#,9)
FORMAT(SPZ#,9)
FORMAT(ArcZRads#,9)
FORMAT(SIN#,9)
FORMAT(COS#,9)

{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)
SeqLabC 'A' FourthDegree# EOL
FourthCWF {reset flag}
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
SeqLabC 'A' FourthDegree# EOL
FourthCCWF {reset flag}
END
IF FifthCW?
FORMAT(FifthDegree#,2)
SeqLabC 'B' FifthDegree# EOL
FifthCWF {reset flag}
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
SeqLabC 'B' FifthDegree# EOL
FifthCCWF {reset flag}
END
RETURN

DoPostScript:
PSInit
EachPS
SeqLabC PostScript EOL
PSStuff
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqLabC 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
IF XYPlane? AND ZMove?
MoveXYZC ArcIJ 'K' ArcZRads#
ELSE
IF XZPlane? AND YMove?
MoveXYZC ArcI 'J' ArcZRads# ArcJ
ELSE
IF YZPlane? AND XMove?
MoveXYZC 'I' ArcZRads# ArcIJ
ELSE
MoveXYZC ArcIJ
END
END
END
RETURN

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

CheckCRCOn:
IF CutterRadiusCompensation? AND NOT Flag?('3')
SeqLabC CRCOn 'X' COS# SPMoveAngle# 'Y' SIN# SPMoveAngle# EOL
SetFlag('3')
END
RETURN

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

StdArc:
EACHQuadrant
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
SeqLabC FormatArc ArcFeedC EOL
DecelMove2
END
SeqLabC FormatArc DecelFeed EOL
ELSE
SeqLabC FormatArc ArcFeedC EOL
END
NEXTQuadrant
RETURN

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

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

CutAutoCycle:
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
SetSRXYtoSP
SeqLabC IncValue EOL
IF Repeats? AND ZshiftOnly?
EachRep
EntryMove
ToolPath2
IF NOT FeedConnect?
IF FIFO?
SeqLabC FeedC PRIME ZCP2 FeedEntC EOL
ELSE
SeqLabC RapidC PRIME ZCP2 EOL
END
END
NextRep
ELSE
EntryMove
ToolPath2
END
IF FIFO?
SeqLabC AbsOrInc FeedC ZCP2 FeedEntC EOL
ELSE
SeqLabC AbsOrInc RapidC ZCP2 EOL
END
SetSRSubXY {restore tool position}
SetSRSubMove
ReSetPass2 {restore for positioning moves}
RETURN

DoPeck:
IF LessThan? ADD# Recall# Num#('4') Peck# SPZ#
Save# Num#('4') ADD# Recall# Num#('4') Peck#
'R' Recall# Num#('5')
'Z' Recall# Num#('4')
Save# Num#('5') SUB# Recall# Num#('4') Retract#
IF PeckChipBreaker?
{ needs K value }
END
ELSE
'R' Recall# Num#('5')
'Z' SPZ#
SetFlagF('2')
END
RETURN

DoPeckC: { it may process a little faster testing a flag vs the logic in DoPeck }
IF Flag?('2')
IF PeckFullRetract?
SeqLabC 'R' ClearancePlane2# ZCP2 EOL { pull out of hole before next peck }
END
SeqLabC DoPeck EOL
END
RETURN

DoPecks:
DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC
DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC
DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC
DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC
DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC
DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC
DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC
DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC
DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC
DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC DoPeckC
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
IF NOT FirstFeat?
SeqLabC
IF FIFO?
Rapid
END
MoveSXYC EOL
END
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
CutAutoCycle
ELSE
IF Peck? AND NOT FirstFeat?
IF RetractToCP1?
SeqLabC 'R' ClearancePlane1# ZCP1 EOL
ELSE
SeqLabC 'R' ClearancePlane2# ZCP2 EOL
END
Save# Num#('4') ClearancePlane2# { var #1 = next Z depth }
Save# Num#('5') ClearancePlane2# { var #2 = next R Plane }
SetFlag('2') { NeedsPeck = true }
SeqLabC MoveSXYC DoPeck EOL
DoPecks
ELSE
IF RetractToCP1? AND NOT FirstFeat?
SeqLabC 'R' ClearancePlane1# ZCP1 EOL { jump up before going to next hole }
SeqLabC MoveSXYC RLevel MoveSZ EOL
ELSE
SeqLabC MoveSXYZC EOL {.80.01}
END
END
END
ELSE
IF RapidFeat?
StdRapid
ELSE
IF LineFeat?
StdLine
ELSE
IF ArcFeat?
StdArc
END
END
END
END
NEXTFeat
RETURN

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

GetStartOfSameTool:
DoOpComments
DoPostScript
CheckPass
RETURN

DoOfstOff:
Rapid 'Z0'
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
OpToolID '00'
ELSE
'T' LAST Tool# '00'
END
RETURN

DoOp:
IF FirstOperation?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
IF FullUp?
SeqLabC CoolOff EOL
SeqLabC DoOfstOff EOL
END
DoOpComments
ELSE
'O?' Plane CRCOff DrillOff AbsOrInc EOL
SeqLabC Rapid OpToolID '00' ToolChng EOL
DoOpComments
DoPostScript
SeqLabC TABLE(1,SpeedRPM#,1) EOL
END
CheckPass
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? AND NOT FirstPart?
SeqLabC Rapid StrtPos EOL
ELSE
SeqLabC Rapid StrtPos EOL
SeqLabC ZCP1 OpToolID ToolOffset# EOL
SeqLabC 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
SeqLabC CoolOff EOL
SeqLabC DoOfstOff EOL
DoEndOpPS
IF ToolChangeAtHome?
SeqLabC AbsOrInc Rapid Home EOL
END
IF LAST ProgStop?
SeqLabC 'M0' EOL
ELSE
SeqLabC ProgStop EOL
END
END

{Start new Operation}

IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
IF FullUp?
SeqLabC CoolOff EOL
SeqLabC DoOfstOff EOL
END
DoOpComments
ELSE
'O?' Plane CRCOff DrillOff AbsOrInc EOL
SeqLabC Rapid OpToolID '00' ToolChng EOL
DoOpComments
DoPostScript
SeqLabC TABLE(1,SpeedRPM#,1) EOL
END
CheckPass
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? AND NOT FirstPart?
SeqLabC Rapid StrtPos EOL
ELSE
SeqLabC AbsOrInc Rapid StrtPos EOL
SeqLabC ZCP1 OpToolID ToolOffset# EOL
SeqLabC CoolOn EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqLabC CoolOff EOL
SeqLabC DoOfstOff EOL
SeqLabC 'M0' EOL

{Start new Operation}

GetStartOfSameTool
SeqLabC PlaneC Rapid AbsOrInc StrtPos TABLE(1,SpeedRPM#,1) EOL
SeqLabC ZCP1 OpToolID ToolOffset# EOL
SeqLabC CoolOn EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
IF NewToolOffset?
SeqLabC DoOfstOff EOL

{Start new Operation}

GetStartOfSameTool
SeqLabC PlaneC Rapid AbsOrInc StrtPos TABLE(1,SpeedRPM#,1) EOL
SeqLabC ZCP1 OpToolID ToolOffset# EOL
ELSE

{Start new Operation}

GetStartOfSameTool
SeqLabC PlaneC Rapid AbsOrInc StrtPos TABLE(1,SpeedRPM#,1) EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqLabC 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?
SeqLabC ZCP2C EOL
IF Repeats?
IF ZshiftOnly? AND AutoCycle?
{done in CutAutoCycle called from ToolPath}
ELSE
EACHRep
DoSubComment
IF NOT FirstCycle?
SeqLabC Connect StrtPos EOL
IF NOT FeedConnect?
SeqLabC 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
SeqLabC CRCOffC
IF NOT FeedConnect?
ExitType PRIME ZCP3C
END
ExitFeed EOL
SetFlagF('3')
NEXTRep
END
END
IF AutoCycle?
SeqLabC ZCP3C EOL
ELSE
SeqLabC CRCOffC ExitType ZCP3C ExitFeed EOL
SetFlagF('3')
END
ELSE
IF Drilling?
IF Repeats?
EACHRep
DoSubComment
END
GetCycle
IF Peck?
Save# Num#('4') ClearancePlane2# { var #1 = next Z depth }
Save# Num#('5') ClearancePlane2# { var #2 = next R Plane }
SetFlag('2') { NeedsPeck = true }
SeqLabC Cycle StrtPos DoPeck FeedEnt EOL
DoPecks
ELSE
SeqLabC Cycle StrtPos RLevel ZDepth FeedEnt EOL
END
TrackZNO# SPZ# {.81}
ToolPath
SeqLabC DrillOff ZCP3 EOL
IF Repeats?
NEXTRep
END
SeqLabC RapidC ZCP3C EOL
END
END
RETURN

FinishLastOp:
SeqLabC CoolOff EOL
SeqLabC DoOfstOff EOL
DoEndOpPS
IF FIRST ToolChangeAtHome?
SeqLabC AbsOrInc Rapid FirstHome EOL
END
IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart? {no tool change after doing last part}
IF ProgStop?
SeqLabC 'M0' EOL
ELSE
SeqLabC 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? = Flase, for DoTool sub ie there are no more tools in the CAM file }
SetFlagF('2') { Needs Pecks? = False }
SetFlagF('3') { CRC active? = Flase }
NegateZ
ReverseYZArcs
NoIJKSigns
SetFlood
SetMaxRPM('3000')
SetMaxFeed('50')
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
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
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
ReTag


Wyszukiwarka

Podobne podstrony:
Fanuc 10M MVJr[G43r] M192 87
Tosnuc 600M BMC 40 M440 87
Fanuc 6M [MC] M710 87
G&L Numeripath 800M M713 87 1
04 Ayn Rand Wiek zawisci
pref 87
87 Omow znaczenie czynnika geometrycznego dla przeplywu krwi
G & L Numeripath 8000 M499 87
Mazatrol M32 [CKC] M709 87
Fanuc 11M Okuma M124 87

więcej podobnych podstron