{Change Comments ***********************************************************}
{1/6/89
Copied & modified Yasnac 3000G-Mat M016.54 for Northwest Machining
Replaced G45 with G43 for OfstOn.
Deleted ProgStop before 1st tool and inserted before new tool.
Changed multiple parts & repeats to generic Retag system.
Added SubComment.
Added ProgNum to ProgramComment.
Jim Radcliffe}
{7/5/90, Updated: Yasnac M5G Matsuura M166.55 to .72.1 format, JR}
{7/24/90, Replaced all occurances of SetSRXYZero with SetSRXYtoSP, DWB}
{4/03/91
Modified: Yasnac M5G Matsuura M166.73
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 6M M001.80 Format.
DWB}
{9/4/92
Modified: Yasnac M5G Matsuura M166.79
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 6M M001.81 Format.
Changed to Metric Format.
KLM}
{2/9/96, Updated .81 version to .84, MPK}
{3/22/96, Tested ZOnlyRepAutoCycle, Incremented number to .87, MPK}
{Prog Numeric Format Definitions *******************************************}
#1 = '###^##0'
#2 = '*###^##0'
#3 = '#.00'
#4 = '####^###;'
#5 = '########;0'
FORMAT(FileFeet#,3)
FORMAT(FileMeters#,3)
FORMAT(Dwell#,4)
FORMAT(Program#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
{Prog Subroutines **********************************************************}
DoSubComment:
IF UseComments? AND SubComment?
'( SUB NUMBER: ' Tag# ' )' EOL
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 ToolTypeComment?
'( TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
IF ToolComment?
'( ' ToolComment$ ' )' EOL
END
IF NOT Metric? {CAM file is in english, tools and tool path}
SetScale('25.4') { change to Metric, this is an Metric post}
END
END
RETURN
PSInit: {reset flags}
RotateF
RETURN
PSStuff: {revised.72}
IF FourthCW?
FORMAT(FourthDegree#,1)
SeqLabC 'A' FourthDegree# EOL
FourthCWF {reset flag}
END
IF FourthCCW?
FORMAT(FourthDegree#,2)
SeqLabC 'A' FourthDegree# EOL
FourthCCWF {reset flag}
END
IF FifthCW?
FORMAT(FifthDegree#,1)
SeqLabC 'B' FifthDegree# EOL
FifthCWF {reset flag}
END
IF FifthCCW?
FORMAT(FifthDegree#,2)
SeqLabC 'B' FifthDegree# EOL
FifthCCWF {reset flag}
END
RETURN
DoPostScript:
PSInit
EachPS
SeqLabC PostScript EOL {literals}
PSStuff {commands}
NextPS
RETURN
DoEndOpPS:
PSInit
EachEOPS
SeqLabC EndOpPS EOL
PSStuff
NextPS
RETURN
EntryMove:
IF FeedEntry?
SeqLabC Feed ZIn FeedEnt EOL
ELSE
SeqLabC RapidC ZIn EOL
END
RETURN
StartSub:
OpenSub
DoSubComment
'>' Tag# EOL
SeqLab {drop unconditional sequence number to insure proper tagging}
RETURN
SubWarning:
IF NOT FeedConnect?
IF AnyZshift?
' ' EOL
'( WARNING Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT )' EOL
' ' EOL
END
END
RETURN
StdSub:
SubWarning
SeqLabC SubCall 'Pł' Tag# RepLab RepCycs EOL
StartSub
SeqLabC AbsOrInc Connect StrtPos EOL
RETURN
FinishSub1: {part 1}
UnSkipZ
SeqLabC CRCOffC
IF NOT FeedConnect?
IF AutoCycle?
ZCP3C
ELSE
IF FIFO? {.81}
FeedC ZCP3C FeedRateC
ELSE
RapidC ZCP3C
END
END
END
EOL
RETURN
FinishSubG92: {part 2}
SeqLabC Preset ShiftRC EOL
SeqLabC EndSub EOL
CloseSub
SeqLabC Preset UnshftRC EOL
RETURN
OpenMP:
NewProg TagInc
SeqLabC SubCall 'Pł' Tag# RepLab Parts EOL
StartSub
RETURN
CloseMP:
SeqLabC Preset ShiftPC EOL
SeqLabC EndSub EOL
CloseSub
SeqLabC Preset UnshftPC EOL
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
SeqLabC CRCOnC FeedC MoveXYZC FeedRateC CRCOffsetC EOL
DecelMove2
END
SeqLabC CRCOnC FeedC MoveXYZC DecelFeed CRCOffsetC EOL
ELSE
SeqLabC CRCOnC FeedC MoveXYZC FeedRateC CRCOffsetC EOL
END
RETURN
ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqLabC MoveSXYC EOL
SeqLabC SubCall 'Pł' Tag# EOL
ELSE
SeqLabC MoveSXYC EOL {.80.01}
END
ELSE
IF RapidFeat?
IF LastFeat? AND AutoCycle? {.70}
SeqLabC CRCOffC RapidC MoveXYZC EOL
ELSE
SeqLabC RapidC MoveXYZC EOL
END
ELSE
IF LineFeat?
IF AutoCycle? {.70}
IF LastFeat?
SeqLabC CRCOffC FeedC MoveXYZC FeedRateC EOL
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
StdLine
END
ELSE
IF ArcFeat?
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
END
END
END
END
NEXTFeat
RETURN
AutoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
StartSub
SetSRXYtoSP
SeqLab IncValue EOL
SeqLabC StrtPosC EOL
RETURN
AutoCycCutSub2: {part 2}
ToolPath
IF Repeats? AND FeedConnect? AND ZshiftOnly?
SeqLabC AbsOrInc EOL {.69 removed RapidC} {.71.2 removed CRCOffC, gets turned off in ToolPath}
ELSE
IF FIFO? {.81}
SeqLabC AbsOrInc FeedC ZCP2 FeedRateC EOL
ELSE
SeqLabC AbsOrInc RapidC ZCP2 EOL {.71.2 removed CRCOffC, gets turned off in ToolPath}
END
END
SeqLabC EndSub EOL
CloseSub
SetSRSubXY {restore tool position}
SetSRSubMove
RETURN
AutoCycPat:
SetPass2 {position pattern}
ToolPath {call after NewProg for correct sub calls}
RETURN
Milling:
IF AutoCycle?
NewProg TagInc
AutoCycCutSub1
EntryMove
AutoCycCutSub2
AutoCycPat
ELSE
EntryMove
ToolPath
END
RETURN
G92Sub:
StdSub
Milling
FinishSub1
FinishSubG92
RETURN
ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
NewProg TagInc
SetPass1 {for correct Z's}
EachCycle
SetSRXYtoEP
IF FeedConnect?
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqLabC Feed IncValue StrtPosC EOL
SeqLabC AbsOrInc
ELSE
SeqLabC Feed
END
ELSE
SeqLabC Feed
END
ZInPlusInc FeedEnt EOL
ELSE
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqLabC Rapid IncValue StrtPosC EOL
IF FeedEntry?
SeqLabC AbsOrInc ZCP2PlusInc EOL
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLabC AbsOrInc ZInPlusInc EOL
END
ELSE
IF FeedEntry?
SeqLabC Rapid ZCP2PlusInc EOL
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLabC Rapid ZInPlusInc EOL
END
END
ELSE
IF FeedEntry?
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLabC Rapid ZInPlusInc EOL
END
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
SeqLabC SubCall 'P' Tag# EOL
NextCycle
SetStatusOn
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
{.69, removed FinishSub1}
IF FeedConnect? {there is no Z up in the sub, .69}
IF FIFO? {.81}
SeqLabC Feed ZCP2 FeedRate EOL {.69}
ELSE
SeqLabC Rapid ZCP2 EOL {.69}
END
END {.69}
SeqLabC EndSub EOL
CloseSub
{Element shift, not pattern}
RETURN
ZonlyRep:
EachCycle
IF NOT FirstCycle?
SeqLabC Connect StrtPos EOL {.71.2, added Connect}
END
IF FeedConnect?
SeqLabC FeedC ZInPlusInc FeedEnt EOL {.71.2, changed to FeedC}
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqLabC RapidC ZCP2PlusIncC EOL {can't call for cycle =1} {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLabC RapidC ZInPlusInc EOL {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
END
SeqLabC SubCall 'Pł' Tag# EOL
NextCycle
StartSub
SkipZ
ToolPath
FinishSub1
SeqLabC EndSub EOL
CloseSub
RETURN
CheckPass:
IF AutoCycle? {use the correct StrtPos}
SetPass2
ELSE
SetPass1
END
RETURN
GetStartOfSameTool:
DoOpComments
DoPostScript
CheckPass
RETURN
{Start of executable Prog **************************************************}
InitProg
ReverseXZArcs
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls ('50') {?}
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?
'( PROGRAM NUMBER: ' ProgNum ' ' ProgramComment$ ' )' EOL
END
IF FormatNameComment?
'( FORMAT: ' FormatName$ ' )' EOL
END
IF TimeComment?
'( ' Date$ ' AT ' Time$ ' )' EOL
END
IF MovesComment?
'( OUTPUT IN ' MoveType$ ' )' EOL
END
IF PartsComment?
'( PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
'( FIRST TOOL NOT IN SPINDLE )' EOL
END
END
OpenSub
IF NOT Metric? {CAM file is in english, tools and tool path}
SetScale('25.4') { change to Metric, this is an Metric post}
END
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
SeqLabC Plane DrillOff CRCOff EOL
SeqLab OpToolID EOL
SeqLabC ToolChng EOL
DoOpComments
DoPostScript
SeqLabC Speed SpinOn EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
SeqLabC AbsOrInc Rapid StrtPos EOL
SeqLabC OfstOn EOL
SeqLabC CoolOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqLabC StrtPos EOL
END
ELSE
IF NewTool?
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
SeqLabC CoolOff EOL
SeqLabC IncValue OfstOff EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF ToolChangeAtHome?
SeqLabC AbsOrInc Rapid Home SpinOff EOL
ELSE
SeqLabC SpinOff EOL
END
IF LAST ProgStop?
SeqLabC 'M00' EOL
ELSE
SeqLabC ProgStop EOL
END
{Start new Operation}
SeqLab OpToolID EOL
SeqLabC ToolChng EOL
DoOpComments
SeqLabC Plane DrillOff CRCOffC EOL
DoPostScript
SeqLabC Speed SpinOn EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
SeqLabC AbsOrInc Rapid StrtPos EOL
SeqLabC OfstOn EOL
SeqLabC CoolOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqLabC StrtPos EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqLabC CoolOff EOL
SeqLabC IncValue OfstOff EOL
SeqLabC SpinOff EOL
SeqLabC 'M00' EOL
{Start new Operation}
GetStartOfSameTool
SeqLabC PlaneC AbsOrInc Rapid StrtPos SpeedC SpinOn EOL
SeqLabC OfstOn EOL
SeqLabC CoolOn EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
IF NewToolOffset?
SeqLabC IncValue OfstOff EOL
{Start new Operation}
GetStartOfSameTool
SeqLabC PlaneC AbsOrInc Rapid StrtPos SpeedC EOL
SeqLabC OfstOn EOL
ELSE
{Start new Operation}
GetStartOfSameTool
SeqLabC PlaneC AbsOrInc Rapid StrtPos SpeedC EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqLabC CoolOn EOL
END
END
END
END
END {common point for all operations}
IF Milling?
SeqLabC ZCP2C EOL
IF Repeats?
NewProg TagInc
IF ZshiftOnly?
IF AutoCycle? {incremental Autocycle sub can have Z moves}
ZonlyRepAutoCycle
ELSE {Z shift only, NOT Auto Cycle}
IF UseSeparateSubCalls? AND CyclesLessThanMaxSubCalls?
FindAnyZMoves {for normal abs subroutine}
IF NoZMoves?
ZonlyRep
ELSE
G92Sub {pattern shift, not element}
END
ELSE {no sep subs desired}
G92Sub
END
END {end Auto Cycle IF}
ELSE {not Z only}
G92Sub
END {end Z only IF}
ELSE {no repeat OPs}
Milling
END
IF AutoCycle?
SeqLabC ZCP3C EOL
ELSE
IF FIFO? {.81}
SeqLabC FeedC CRCOffC ZCP3C FeedRateC EOL
ELSE
SeqLabC RapidC CRCOffC ZCP3C EOL
END
END
ELSE
IF Drilling?
IF Repeats?
NewProg TagInc
SeqLabC SubCall 'Pł' Tag# RepLab RepCycs EOL
OpenSub
DoSubComment
'>' Tag# EOL
SeqLabC AbsOrInc Rapid StrtPos EOL
END
SeqLabC DrillCP EOL
GetCycle
SeqLabC Cycle FromCP StrtPos ZDepth RLevel Dwell Peck Retract FeedEnt EOL
TrackZNO# ZDepth# {.81}
ToolPath
IF RetractToCP1? {.81}
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
SeqLabC DrillOff EOL
IF Repeats?
SeqLabC Preset ShiftRC EOL
SeqLabC EndSub EOL
CloseSub
SeqLabC Preset UnshftRC EOL
END
SeqLabC RapidC ZCP3C EOL
END
END
NextOp {loops back to EachOP until last Operation}
{End of program ************************************************************}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
SeqLabC CoolOff EOL
SeqLabC IncValue OfstOff EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
SeqLabC AbsOrInc Rapid FirstHome SpinOff EOL
ELSE
SeqLabC SpinOff EOL
END
IF ProgStop?
SeqLabC 'M00' EOL
END
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
SeqLabC EOP EOL
Post
EOR EOL
Close
Retag
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:
Yasnac M5G Mat [BM] M485 87mYasnac MX1 Matsuura M021 89 3Yasnac MX2 Matsuura M017 89mFanuc 15M Matsuura M695 87mYasnac M5G Mat [BM] M485 87Yasnac MX1 Matsuura M021 89 3mYasnac MX1 Matsuura PM021 17 3mYasnac MX2 Matsuura M017 89Yasnac FX Transema M899 87mYasnac M5G Mat [FN] M529 89Yasnac M5G Mat [Dec] M600 87Yasnac M5G Mat [SP] PM884 17 5Yasnac M5G Mat [SP] M884 89Yasnac MX1 Matsuura PM021 17 3Yasnac M5G Mat [FN] M529 81 2mYasnac MX1 Matsuura C021 15więcej podobnych podstron