{Change Comments ***********************************************************}
{7/24/90, Added InitProg globally to posts with this remark, DWB}
{11/20/90, Updated: Yasnac 3000G Mat M016.55 to .76.1 format, JR}
{4/3/91
Modified: Yasnac 3000G Mat M016.76.1
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 6M M001.80 Format.
DWB}
{6/16/92
Modified: Yasnac 3000G Mat M016.79
For: Gibbs & Associates
Updated to Version 4.1 per Fanuc 6M M001.81 Format.
DWB}
{2/16/94
Copied & modified: Yasnac 3000G Mat M016.81
For: Braden Eng / Delta Tech Mold, Inc.
Control: Yasnac 3000G
Machine: Matsuura MC-500V
Changed MachSpec to decimal format.
Added program start up blocks, establishes zero.
Deleted Saftey Start blocks from beginning of tools.
Moved OfstOn line before StrtPos line.
Added Preset line after OfstOn line.
Changed Tool Length Offset Cancel and Enable code to G43.
Deleted IncValue from OfstOff line and added H00.
At end of tool, move to Home before OfstOff.
Added move to machine home at end of program.
Jim Radcliffe}
{3/18/94, .81.3 created NoSubs, 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'
#5 = '#######0'
#6 = '####^##0'
#7 = '#;'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ToolDiameter#,4) {.72}
FORMAT(Tag#,5)
FORMAT(Program#,5) {.72}
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(Parts#,5) {.72}
FORMAT(ADD#,5)
FORMAT(Dwell#,6) {.72}
FORMAT(RapidF#,7)
{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}
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
ExitType:
IF FIFO?
FeedC
ELSE
RapidC
END
RETURN
ExitFeed:
IF FIFO?
FeedEntC
END
RETURN
FormatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXYZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
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
IF EmptyLine?
FeedC MoveXYZC FeedRateC EOL
ELSE
FeedC MoveXYZC FeedRateC 'D' ADD# NUM#('30') Tool# EOL
END
DecelMove2
END
SeqC CRCOnC
IF EmptyLine?
FeedC MoveXYZC DecelFeed EOL
ELSE
FeedC MoveXYZC DecelFeed 'D' ADD# NUM#('30') Tool# EOL
END
ELSE
IF XMove? OR YMove? OR ZMove?
SeqC CRCOnC
IF EmptyLine?
FeedC MoveXYZC FeedRateC EOL
ELSE
FeedC MoveXYZC FeedRateC 'D' ADD# NUM#('30') Tool# EOL
END
END
END
RETURN
StdArc:
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
RETURN
ToolPath2: {for AutoCycle element moves}
EACHFeat
IF RapidFeat?
IF LastFeat?
SeqC RapidC CRCOffC MoveXYZC EOL
ELSE
StdRapid
END
ELSE
IF LineFeat?
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
IF ArcFeat?
StdArc
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?
IF FIFO?
SeqC FeedC PRIME ZCP2 FeedEntC EOL
ELSE
SeqC RapidC PRIME ZCP2 EOL
END
END
NextRep
ELSE
EntryMove
ToolPath2
END
IF FIFO?
SeqC AbsOrInc FeedC ZCP2 FeedEntC EOL
ELSE
SeqC AbsOrInc RapidC ZCP2 EOL
END
SetSRSubXY {restore tool position}
SetSRSubMove
ReSetPass2 {restore for positioning moves}
RETURN
ToolPath:
ResetCRCNum {.72}
EACHFeat
IF PointFeat?
IF AutoCycle?
IF NOT FirstFeat?
SeqC
IF FIFO?
Rapid
END
MoveSXYC EOL
END
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
CutAutoCycle
ELSE
SeqC MoveSXYZC EOL {.80.01}
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
DoOp:
IF FirstOperation?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
IF FullUp?
SeqC CoolOff EOL
SeqC RapidC Home EOL
SeqC OfstOff 'H00' EOL
END
DoOpComments
ELSE
Seq OpToolID EOL
SeqC ToolChng EOL
DoOpComments
DoPostScript
SeqC Speed SpinOn EOL
END
CheckPass
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? AND NOT FirstPart?
SeqC PlaneC Rapid StrtPos EOL
ELSE
SeqC OfstOn EOL
SeqC Preset Home ZCP1 EOL
SeqC PlaneC Rapid StrtPos EOL
SeqC 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
SeqC RapidC Home EOL
SeqC OfstOff 'H00' EOL
DoEndOpPS
SeqC SpinOff EOL
IF LAST ProgStop?
SeqC 'M00' EOL
ELSE
SeqC ProgStop EOL
END
END
{Start new Operation}
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
IF FullUp?
SeqC CoolOff EOL
SeqC RapidC Home EOL
SeqC OfstOff 'H00' EOL
END
DoOpComments
ELSE
Seq OpToolID EOL
SeqC ToolChng EOL
DoOpComments
DoPostScript
SeqC Speed SpinOn EOL
END
CheckPass
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? AND NOT FirstPart?
SeqC PlaneC Rapid StrtPos EOL
ELSE
SeqC OfstOn EOL
SeqC Preset Home ZCP1 EOL
SeqC PlaneC Rapid StrtPos EOL
SeqC CoolOn EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqC CoolOff EOL
SeqC RapidC Home EOL
SeqC OfstOff 'H00' EOL
SeqC SpinOff EOL
SeqC 'M00' EOL
{Start new Operation}
GetStartOfSameTool
SeqC OfstOn EOL
SeqC Preset Home ZCP1 EOL
SeqC PlaneC Rapid StrtPos EOL
SeqC CoolOn EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF NewToolOffset?
SeqC OfstOff 'H00' EOL
{Start new Operation}
GetStartOfSameTool
SeqC OfstOn EOL
SeqC Preset ZCP1 EOL
SeqC PlaneC Rapid StrtPos EOL
ELSE
{Start new Operation}
GetStartOfSameTool
SeqC PlaneC Rapid StrtPos EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqC CoolOn EOL
END
END
END
END
END
{ Common Point for All Operations }
RapidF# {forces the output of a conditional feedrate for each operation}
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?
ExitType PRIME ZCP3C
END
ExitFeed
EOL
NEXTRep
END
END
IF AutoCycle?
SeqC ZCP3C EOL
ELSE
SeqC ExitType CRCOffC ZCP3C ExitFeed EOL
END
ELSE
IF Drilling?
IF Repeats?
EACHRep
DoSubComment
END
SeqC DrillCP EOL
GetCycle
SeqC Cycle FromCP StrtPos ZDepth RLevel Dwell Peck Retract FeedEnt EOL
TrackZNO# ZDepth# {.81}
ToolPath
IF RetractToCP1? {.81}
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
SeqC DrillOff ZCP3 EOL
IF Repeats?
NEXTRep
END
SeqC RapidC ZCP3C EOL
END
END
RETURN
FinishLastOp:
SeqC CoolOff EOL
SeqC RapidC FirstHome EOL
SeqC OfstOff 'H00' EOL
DoEndOpPS
SeqC SpinOff EOL
IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart? {no tool change after doing last part}
IF ProgStop?
SeqC 'M00' EOL
ELSE
SeqC ProgStop EOL
END
ELSE
SeqC 'G28X0Y0Z0' EOL
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('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
' 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
SeqC Rapid Plane DrillOff CRCOff AbsOrInc EOL
SeqC IncValue 'G28X0Y0Z0' EOL
SeqC AbsOrInc Preset 'X0Y0Z0' EOL
SeqC 'G98G43X0H62' EOL
SeqC 'G43Y0H63' EOL
SeqC Preset Home 'Z0' EOL
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
Wyszukiwarka
Podobne podstrony:
Yasnac 3000G Mat M016 87Yasnac M5G Mat [BM] M485 87Yasnac MX3 Mat [MM] M553 87Yasnac 3000G Mat ATT MX27 89 1Yasnac 3000G Mat [CC] M619 89Yasnac MX3 Mat [RP] MY23 87Yasnac MX3 Mat [RP] MY23 87Yasnac MX3 Mat RA 1 M412 87Yasnac M5G Mat [Dec] M600 87Yasnac MX1 Mat [DTM] M649 81 3Yasnac MX3 Mat [PP] CU03 13Yasnac J300 Mat NMT93 12mYasnac MX3 Mat [MM] C553 13Yasnac MX3 Mat 1000 M265 89Yasnac I80 Mat [ATT] CY59 12 1Yasnac I80 Mat 510VF M797 89 1mYasnac 3000G [LM] M504 81 2Yasnac MX1 Mat [f] M038 80więcej podobnych podstron