{1/24/89
Copied & modified GN6M Acroloc M15 M097.54 for Angelus Can.
Changed CRCOffsetC in LineFeat section
of ToolPath to IF FirstFeat CRCOfst.
Deleted CRCOffsetC from ArcFeat section of ToolPath
as cutter comp is only output on line features anyway.
Using LastFeatExtend for CRCOff. Deleted 'T15' at end of prog.
Using EachPart-NextPart & EACHRep-NEXTRep loops instead of subroutines.
Deleted Rapid OfstOff 'H00M19' after each tool.
3/30/89
Add 'G91G28Y0' to end of prog.
Add PostScript codes.
Jim Radcliffe}
{added PostScript comments, deleted RunTime comments 5/17/89 JR}
{11/28/89
Modified: Fanuc 11M Acr M15L M173.57
For: Angelus Can
Delete program number.
Move "DoPostScript" to line before "StrPos" and after "SpinOn".
Updated.
Jim Radcliffe}
{7/19/90, Updated: Fanuc 11M Acr M15L M173.61 to .72.1 format, JR}
{7/24/90, Replaced all occurances of SetSRXYZero with SetSRXYtoSP, DWB}
{9/12/91, Updated Fanuc 11M Acr M15L M173.73 to .80 format, JR}
{Prog Numeric Format Definitions *******************************************}
#1 = '#.00'
#2 = '###.###;0.'
#3 = '*###.###;0.'
#4 = '####.####;0.'
#5 = '########;0'
#6 = '####^###;'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ToolDiameter#,4) {.72}
FORMAT(Program#,5) {.72}
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(Parts#,5) {.72}
FORMAT(Dwell#,6) {.72}
{Prog Subroutines **********************************************************}
DoSubComment:
IF UseComments? AND SubComment?
'( CYCLE START )' EOL
END
RETURN
DoPartSubComment:
IF UseComments? AND SubComment?
TagInc
'( Part Number: ' Tag# ' )' EOL
IF LastPart?
TagInit
END
END
RETURN
DoOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
'( OPERATION ' Operation# ': ' OperationType$ ' )' EOL
END
IF OperationComment?
'( ' OperationComment$ ' )' EOL
END
IF WorkGroupComment?
'( ' WorkGroupComment$ ' )' EOL
END
IF NOT SameTool?
IF ToolTypeComment?
'( TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
IF ToolComment?
'( ' ToolComment$ ' )' EOL
END
END
IF Metric?
SetScale('.03937007874') {convert metric CAM to English}
END
END
RETURN
PSInit: {reset flags}
RotateF
RETURN
PSStuff: {revised.72}
IF FourthCW?
SeqC 'M28' EOL {clamp off}
FORMAT(FourthDegree#,2)
SeqC AbsOrInc Rapid 'A' FourthDegree# EOL
FourthCWF {reset flag}
SeqC 'M29' EOL {clamp on}
END
IF FourthCCW?
SeqC 'M28' EOL {clamp off}
FORMAT(FourthDegree#,3)
SeqC AbsOrInc Rapid 'A' FourthDegree# EOL
FourthCCWF {reset flag}
SeqC 'M29' EOL {clamp on}
END
RETURN
DoPostScript:
PSInit
EachPS
SeqC PostScript EOL {literals}
PSStuff {commands}
NextPS
RETURN
DoEndOpPS:
PSInit
EachEOPS
SeqC EndOpPS EOL {literals}
PSStuff {commands}
NextPS
RETURN
FormatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXYZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
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
ToolPath2: {for AutoCycle element moves}
EACHFeat
IF RapidFeat?
IF LastFeat?
SeqC CRCOffC RapidC MoveXYZC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqC RapidC MoveXYZC EOL
END
END
ELSE
IF LineFeat?
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
StdLine {enables CRC on first call}
END
END
ELSE
IF ArcFeat?
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
END
END
END
NEXTFeat
RETURN
EntryMove:
IF FeedEntry?
SeqC FeedC ZInC FeedEntC 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 SR to 1st position value}
SetSRSubMove
ReSetPass2 {restore for positioning moves}
RETURN
ToolPath:
ResetCRCNum
EACHFeat
IF PointFeat?
SeqC MoveSXYC EOL
IF AutoCycle?
CutAutoCycle
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
END
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqC RapidC MoveXYZC EOL
END
ELSE
IF LineFeat?
StdLine
ELSE
IF ArcFeat?
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
END
END
END
END
NEXTFeat
RETURN
CheckPass:
IF AutoCycle? {use the correct StrtPos}
SetPass2
ELSE
SetPass1
END
RETURN
GetStartOfSameTool:
DoOpComments
DoPostScript
CheckPass
RETURN
{Start of executable Prog **************************************************}
{setup and initializations}
InitProg
ReverseXZArcs
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
' 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
END
EachOp {Start of post processing *********************}
IF FirstOperation?
EOR EOL
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
IF Metric?
SetScale('.03937007874') {convert metric CAM to English}
END
IF MultipleParts? AND AllToolsOnePart?
EACHPart
DoPartSubComment
END
Seq AbsOrInc DrillOff OfstOff CRCOff Plane Rapid 'H00' EOL
SeqC OpToolID EOL
DoOpComments
SeqC Speed SpinOn EOL
DoPostScript
IF MultipleParts? AND OneToolAllParts? AND FullUp?
EACHPart
DoPartSubComment
IF NOT FirstPart?
DoOpComments
END
END
CheckPass
SeqC AbsOrInc Rapid StrtPos EOL
SeqC OfstOn EOL
SeqC CoolOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
EACHPart
DoPartSubComment
IF NOT FirstPart?
DoOpComments
SeqC StrtPos EOL
END
END
ELSE
IF NewTool?
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
NEXTPart
END
SeqC CoolOff EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
IF NOT LastPart?
SeqC OfstOff EOL
END
NEXTPart
END
SeqC AbsOrInc DrillOff OfstOff CRCOff Plane Rapid 'H00' EOL
DoEndOpPS
IF LAST ProgStop?
SeqC 'M00' EOL
END
{Start new Operation}
Seq OpToolID EOL
DoOpComments
SeqC Speed SpinOn EOL
DoPostScript
IF MultipleParts? AND OneToolAllParts? AND FullUp?
EACHPart
DoPartSubComment
IF NOT FirstPart?
DoOpComments
END
END
CheckPass
SeqC AbsOrInc Rapid StrtPos EOL
SeqC OfstOn EOL
SeqC CoolOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
EACHPart
DoPartSubComment
IF NOT FirstPart?
DoOpComments
SeqC StrtPos EOL
END
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqC CoolOff EOL
SeqC OfstOff EOL
SeqC SpinOff EOL
SeqC 'M00' EOL
{Start new Operation}
GetStartOfSameTool
SeqC PlaneC AbsOrInc Rapid StrtPos SpeedC SpinOn EOL
SeqC OfstOn EOL
SeqC CoolOn EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF NewToolOffset?
SeqC OfstOff EOL
{Start new Operation}
GetStartOfSameTool
SeqC PlaneC AbsOrInc Rapid StrtPos SpeedC EOL
SeqC OfstOn EOL
ELSE
{Start new Operation}
GetStartOfSameTool
SeqC PlaneC AbsOrInc Rapid StrtPos SpeedC EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqC CoolOn EOL
END
END
END
END
END {common point for all operations}
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 EmptyLine?
FeedC LastFeatExtend
END
EOL
IF NOT FeedConnect?
SeqC RapidC PRIME ZCP3C EOL
END
EOL
NEXTRep
END
END
SeqC CRCOffC
IF NOT EmptyLine?
FeedC LastFeatExtend
END
EOL
SeqC RapidC ZCP3C EOL
ELSE
IF Drilling?
IF Repeats?
EACHRep
DoSubComment
IF NOT FirstCycle?
SeqC RapidC StrtPos EOL
END
END
SeqC DrillCP EOL
GetCycle
SeqC Cycle FromCP StrtPos ZDepth RLevel Dwell Peck Retract FeedEnt EOL
ToolPath
SeqC 'G80' EOL
IF Repeats?
SeqC RapidC ZCP3C EOL
NEXTRep
END
SeqC RapidC ZCP3C EOL
END
END
{NEXTOp} {modified to prevent endless looping in ncPOST}
IF MultipleParts?
IF LastOp?
IF OneToolAllParts? AND ExitClearancePlane?
NEXTPart
END
SeqC CoolOff EOL
IF OneToolAllParts? AND FullUp?
IF NOT LastPart?
SeqC OfstOff EOL
END
NEXTPart
END
SeqC AbsOrInc DrillOff OfstOff CRCOff Plane Rapid 'H00' EOL
DoEndOpPS
IF ProgStop?
SeqC 'M00' EOL
END
IF AllToolsOnePart?
NEXTPart
END
SeqC 'G91G28Y0' EOL
ELSE
NEXTOp
END
ELSE
NEXTOp
SeqC CoolOff EOL
SeqC AbsOrInc DrillOff OfstOff CRCOff Plane Rapid 'H00' EOL
DoEndOpPS
IF ProgStop?
SeqC 'M00' EOL
END
SeqC 'G91G28Y0' EOL
END
SeqC EOP EOL
Post
EOR EOL
Close
IF UseComments?
SetScale('1')
Reopen
IF FileBytesComment?
'( FILE LENGTH: ' FileBytes# ' CHARACTERS )' EOL
END
IF FileFeetComment?
'( FILE LENGTH: ' FileFeet# ' FEET )' EOL
END
IF FileMetersComment?
'( FILE LENGTH: ' FileMeters# ' METERS )' EOL
END
Close
END
Wyszukiwarka
Podobne podstrony:
Fanuc 11M MS [HM] M433 80Fanuc 11M MS [BTD] M432 80 1Fanuc 11M Acr 3000V M382 87Fanuc 3000C Acr [BM] M484 80Fanuc 11M Acr [A1] C046 15Fanuc 11M Acr 3000V RI M547 89Fanuc 11M Mazak Laser M454 80Fanuc 6M Acr MX15 M100 80Fanuc 11M Acr [A1] M046 89 2Fanuc 11M (JP) M313 80 1Fanuc 11M [TM] CQ07 16 2Fanuc 11M Okuma M124 87Fanuc 11M [EDMP] MW52 89Fanuc 11M MTS LH M059 13 1Fanuc 11M Toyoda [GS] MU04 89Fanuc 11M [FA] MZ02 89Fanuc 11M [JBT] M142 89 4Fanuc 11M MS [RE] M734 89 1Fanuc 11M Toyoda D434 15 1więcej podobnych podstron