{Change Comments ***********************************************************}
{8/24/95,
Updated for Catalyst v2.20 per Fanuc 6M M001.85.02 Format.
DWB}
{1/17/96, Updated .85 to .86 version, MPK}
{3/25/96, Updated .86 to .89 version, TH}
{4/14/98
Updated & Modified: Fadal 2 [EMTD.4] M628.89m
Created: Fadal 2 [EMTD.4] M628.89.1m
For: Eisen Machine Tool Co. LTD.
Versions: Catalyst v4.23.13(mac)/ComPost2 1.1b3
Changes made per Jacob Atlas at Eisen Machine Tool Co. LTD., Fax and 108 ZRep Passes.VNC
Updated for Catalyst v3.35C per Fanuc 6M M001.89b Format.
Customer reported bad Format for G92Sub Operations with more than 99 Repeats.
In 108 ZRep Passes.VNC, Post was outputting L019.000000.
Should have been L0109.
Added Recall# to FORMAT#6 at Prog Numeric Format Definitions.
Increased SetMaxSeparateSubCalls from 50 to 500.
DWB}
{Prog Numeric Format Definitions ****}
#1 = '#.00'
#2 = '#####.###;0.'
#3 = '*#####.###;0.'
#4 = '####.####;0.'
#5 = '#######0'
#6 = '00'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ToolDiameter#,4)
FORMAT(Dwell#,4)
FORMAT(TrackZNO#,4)
FORMAT(Program#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Recall#,6)
FORMAT(CallMasterNum#,6)
{Prog Subroutines ****}
RestoreScale:
IF NOT Metric? {CAM file is in English, tools and tool path}
SetScale('25.4') { change to Metric, this is a Metric post}
END
RETURN
WFONum:
'E' NewWFO#
RETURN
WFOStuff:
IF NewWFO?
IF MultipleParts? AND WorkFixtureOffsets?
EOL
'*** WARNING *** DO NOT USE NEWWFO() WITH MULTIPLE PARTS AND WORK FIXTURE OFFSETS' EOL
ELSE
WFONum
END
ELSE
IF Flag?('2')
IF NOT SameTool?
IF MultipleParts?
IF WorkFixtureOffsets?
WFO1
ELSE
WFONum
END
ELSE
WFONum
END
END
END
END
SetFlagF('2')
RETURN
DoSubComment:
IF UseComments? AND SubComment?
SeqLabC '* SUB NUMBER: ' Program# EOL
END
RETURN
DoOpComments:
IF UseComments?
SetScale('1')
SeqLabC '* OPERATION ' Operation#
IF OperationIDComment?
': ' OperationType$
END
EOL
IF OperationComment?
SeqLabC '* ' OperationComment$ EOL
END
IF WorkGroupComment?
SeqLabC '* ' WorkGroupComment$ EOL
END
SeqLabC '* TOOL ' Tool#
IF ToolTypeComment?
': ' ToolDiameter# ' ' ToolType$
END
EOL
IF ToolComment?
SeqLabC '* ' ToolComment$ EOL
END
RestoreScale
END
RETURN
PSInit:
NewWFOF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN
PSStuff:
IF FourthCW?
FORMAT(FourthDegree#,2)
SeqLabC 'A' FourthDegree# EOL
FourthCWF
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
SeqLabC 'A' FourthDegree# EOL
FourthCCWF
END
IF FifthCW?
FORMAT(FifthDegree#,2)
SeqLabC 'B' FifthDegree# EOL
FifthCWF
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
SeqLabC 'B' FifthDegree# EOL
FifthCCWF
END
RETURN
DoPostScript:
PSInit
EachPS
SeqLabC PostScript EOL
PSStuff
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
SeqLabC SubIDF EOL
DoSubComment
RETURN
SubWarning:
IF NOT FeedConnect?
IF AnyZshift?
' ' EOL
SeqLabC '* WARNING Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT' EOL
' ' EOL
END
END
RETURN
StdSub:
{ SeqLabC CallLab RepCycs EOL }
Save# Num#('10') Num#('0')
EachRep
Save# Num#('10') ADD# Recall# Num#('10') Num#('1')
IF GreaterThan? Recall# Num#('10') Num#('99')
SeqLabC CallLab '99' EOL
Save# Num#('10') Num#('1')
END
NextRep
SeqLabC CallLab Recall# Num#('10') EOL
StartSub
RETURN
FinishSub1: {part 1}
SeqLabC CRCOffC
IF NOT FeedConnect?
IF AutoCycle?
ZCP3C
ELSE
IF FIFO?
FeedC ZCP3C FeedEntC
ELSE
RapidC ZCP3C
END
END
END
EOL
RETURN
FinishSubG92: {part 2}
SeqLabC Preset ShiftR EOL
SeqLabC EndSub EOL
CloseSub
SeqLabC Preset UnshiftR EOL
RETURN
OpenMP:
NewProg
IF WorkFixtureOffsets?
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('5') { Suppress Redundant WFO for MP-OTAP-ECP }
END
NewWFO
EachWFO {simple eachPart}
IF Flag?('5')
SetFlagF('5') { Suppress Redundant WFO for MP-OTAP-ECP }
ELSE
SeqLabC Rapid StrtPos SetWFO EOL
END
SeqLabC CallLab OnePart EOL
IncWFO
NextWFO {simple NextPart}
ELSE
{ SeqLabC CallLab Parts EOL }
Save# Num#('10') Num#('0')
EachPart
Save# Num#('10') ADD# Recall# Num#('10') Num#('1')
IF GreaterThan? Recall# Num#('10') Num#('99')
SeqLabC CallLab '99' EOL
Save# Num#('10') Num#('1')
END
NextPart
SeqLabC CallLab Recall# Num#('10') EOL
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('2') { WFOStuff }
END
END
StartSub
RETURN
CloseMP:
IF WorkFixtureOffsets?
SeqLabC EndSub EOL
CloseSub
ELSE
SeqLabC Preset ShiftP EOL
SeqLabC EndSub EOL
CloseSub
SeqLabC Preset UnshiftP EOL
END
RETURN
DoAbsOrInc:
IF Flag?('1') AND AbsoluteMoves?
IF ZMove? AND AbsValue?
IncValue
ELSE
IF NOT ZMove? AND NOT AbsValue?
AbsValue
END
END
END
RETURN
DoDrillAbsOrInc:
IF Flag?('1') AND AbsoluteMoves?
IF SPZMove? AND AbsValue?
IncValue
ELSE
IF NOT SPZMove? AND NOT AbsValue?
AbsValue
END
END
END
RETURN
RestoreAbsOrInc:
IF Flag?('1') AND AbsoluteMoves? AND NOT AbsValue?
SeqLabC AbsValue EOL
END
RETURN
FormatArc:
DoAbsOrInc
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXYZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
RETURN
ckCRC:
IF LastFeat?
CRCOffC
ELSE
IF NOT ZMove?
CRCOnC
END
END
RETURN
ckCRCNum:
IF NOT LastFeat? AND Equal? SPZ# EPZ#
CRCOffsetC
END
RETURN
ToolPath:
ResetCRCNum
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqLabC MoveSXYC EOL
SeqLabC CallLab '01' EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
SeqLabC DoDrillAbsOrInc MoveSXYZC EOL
END
ELSE
IF FirstFeat?
SeqLabC 'G8' EOL
END
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqLabC DoAbsOrInc ckCRC RapidC MoveXYZC ckCRCNum EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqLabC DoAbsOrInc ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL
DecelMove2
END
SeqLabC DoAbsOrInc ckCRC FeedC MoveXYZC DecelFeed ckCRCNum EOL
ELSE
SeqLabC DoAbsOrInc ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL
END
END
ELSE
IF ArcFeat?
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
SeqLabC ckCRC FormatArc ArcFeedC ckCRCNum EOL
DecelMove2
END
SeqLabC ckCRC FormatArc DecelFeed ckCRCNum EOL
ELSE
SeqLabC ckCRC FormatArc ArcFeedC ckCRCNum EOL
END
NEXTQuadrant
END
END
END
END
NEXTFeat
RestoreAbsOrInc
RETURN
AutoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
StartSub
SetSRXYtoSP
SeqLabC IncValue EOL
RETURN
AutoCycCutSub2: {part 2}
ToolPath
SeqLabC AbsOrInc
IF Repeats? AND FeedConnect? AND ZshiftOnly?
ELSE
IF FIFO?
FeedC ZCP2 FeedEntC
ELSE
RapidC ZCP2
END
END
EOL
SeqLabC EndSub EOL
CloseSub
SetSRSubXY {restore SR to 1st position value}
SetSRSubMove
RETURN
AutoCycPat:
SetPass2 {position pattern}
ToolPath {call after NewProg for correct sub calls}
SetPass1 {reset}
RETURN
Milling:
IF AutoCycle?
NewProg
AutoCycCutSub1
EntryMove
AutoCycCutSub2
AutoCycPat
ELSE
EntryMove
ToolPath
END
RETURN
G92Sub:
SubWarning
StdSub
SeqLabC AbsOrInc Connect StrtPos EOL
Milling
FinishSub1
FinishSubG92
RETURN
ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
NewProg
EachCycle
SetSRXYtoEP
IF FeedConnect?
Feed
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqLabC IncValue StrtPosC EOL
AbsOrInc
END
END
SeqLabC ZInPlusInc FeedEnt EOL
ELSE
IF NOT FirstCycle?
Rapid
IF SPXMove? OR SPYMove?
SeqLabC IncValue StrtPosC EOL
AbsOrInc
END
IF FeedEntry?
SeqLabC ZCP2PlusInc EOL
END
END
IF FeedEntry?
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
IF FirstCycle?
Rapid
END
SeqLabC RapidC ZInPlusInc EOL
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
SeqLabC CallLab '01' EOL
NextCycle
SetStatusOn
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
IF FeedConnect? {there is no Z up in the sub}
IF FIFO?
SeqLabC Feed ZCP2 FeedEnt EOL
ELSE
SeqLabC Rapid ZCP2 EOL
END
END
SeqLabC EndSub EOL
CloseSub
{Element shift, not pattern}
RETURN
ZonlyRep:
EachCycle
IF NOT FirstCycle?
SeqLabC Connect StrtPos EOL
END
IF FeedConnect?
SeqLabC FeedC ZInPlusInc FeedEnt EOL
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqLabC RapidC ZCP2PlusIncC EOL
END
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLabC RapidC ZInPlusInc EOL
END
END
SeqLabC CallLab '01' EOL
NextCycle
StartSub
TrackZNO# FIRST SPZ#
ToolPath
FinishSub1
SeqLabC EndSub EOL
CloseSub
RETURN
CheckPass:
IF AutoCycle? {use the correct StrtPos}
SetPass2
ELSE
SetPass1
END
RETURN
SkipToLastFeat:
EachFeat
IF LastFeat?
TrackXNO# SPX#
TrackYNO# SPY#
END
NextFeat
RETURN
SetDrillEndOpZ:
IF RetractToCP1?
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
RETURN
GetStartOfSameTool:
DoOpComments
DoPostScript
CheckPass
RETURN
GetSpinOn:
IF Drilling?
GetCycle
IF RigidTap?
IF FirstOperation? OR NewTool?
SeqLabC Speed EOL
SeqLabC 'G84.2' EOL
ELSE
IF LAST ProgStop?
SeqLabC SpeedC EOL
SeqLabC 'G84.2' EOL
ELSE
SeqLabC SpeedC EOL
END
END
ELSE
IF FirstOperation? OR NewTool?
SeqLabC Speed SpinOn EOL
ELSE
IF LAST ProgStop?
SeqLabC SpeedC SpinOn EOL
ELSE
SeqLabC SpeedC EOL
END
END
END
ELSE
IF FirstOperation? OR NewTool?
SeqLabC Speed SpinOn EOL
ELSE
IF LAST ProgStop?
SeqLabC SpeedC SpinOn EOL
ELSE
SeqLabC SpeedC EOL
END
END
END
RETURN
{Start of executable Prog **************************************************}
{setup and initializations}
InitProg
ReverseXZArcs
InitWFONum
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('500')
SetMaxRPM('15000')
IF Metric?
SetMaxFeed('9999.999')
ELSE
SetMaxFeed('393.7007480315')
END
SetFlagF('1') { Milling ZShiftOnly SepSubs }
SetFlagF('2') { WFOStuff }
SetFlagF('5') { Suppress Redundant WFO for MP-OTAP-ECP }
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
' NewWFO(56), NWFO(56) -' EOL
' The Work Fixture Offset # you specify will be used for all following operations.' EOL
' Do not use with the ncPost multiple part option.' 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 MultipleParts?
IF AllToolsOnePart?
IF EquallySpacedOffsets?
SetFlag('2') { WFOStuff }
END
ELSE {implied OneToolAllParts?}
IF FullUp?
IF EquallySpacedOffsets?
SetFlag('2') { WFOStuff }
END
ELSE {implied ExitClearancePlane?}
SetFlag('2') { WFOStuff }
END
END
ELSE
SetFlag('2') { WFOStuff }
END
IF FirstOperation?
EOR EOL
SeqLabC 'O' Program#
IF UseComments? AND ProgramNameComment?
'*' ProgramName$
END
EOL
IF ToolChangeAtHome?
SetHome
END
SetProgNum('0')
IF UseComments?
IF ProgramComment?
SeqLabC '* ' ProgramComment$ EOL
END
IF FormatNameComment?
SeqLabC '* FORMAT: ' FormatName$ EOL
END
IF TimeComment?
SeqLabC '* ' Date$ ' AT ' Time$ EOL
END
IF MovesComment?
SeqLabC '* OUTPUT IN ' MoveType$ ' MILLIMETERS' EOL
END
IF PartsComment?
SeqLabC '* PARTS PROGRAMMED: ' Parts# EOL
END
IF StartToolComment?
SeqLabC '* FIRST TOOL NOT IN SPINDLE' EOL
END
END
OpenSub
SeqLabC 'G21' EOL {* Specify metric output *}
RestoreScale
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
SeqLab OpToolID ToolChng EOL
DoOpComments
DoPostScript
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
GetSpinOn
CheckPass
SeqLabC Plane AbsOrInc Rapid StrtPos WFOStuff EOL
SeqLabC OfstOn CoolOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
GetSpinOn
SeqLabC AbsOrInc Rapid StrtPos WFOStuff EOL
END
ELSE
IF NewTool?
{Finish off last Operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
SeqLabC Rapid AbsOrInc SpinOff CoolOff EOL
SeqLabC 'G53Z0' EOL { OfstOff }
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF ToolChangeAtHome?
SeqLabC 'G53' Home EOL
END
IF LAST ProgStop?
SeqLabC 'M0' EOL
ELSE
SeqLabC ProgStop EOL
END
{Start new Operation}
SeqLab OpToolID ToolChng EOL
DoOpComments
DoPostScript
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
GetSpinOn
CheckPass
SeqLabC Plane AbsOrInc Rapid StrtPos WFOStuff EOL
SeqLabC OfstOn CoolOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
GetSpinOn
SeqLabC AbsOrInc Rapid StrtPos WFOStuff EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqLabC Rapid 'H0Z0' CoolOff SpinOff 'M0' EOL
{Start new Operation}
GetStartOfSameTool
GetSpinOn
SeqLabC PlaneC AbsOrInc Rapid StrtPos WFOStuff EOL
SeqLabC OfstOn CoolOn EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
IF NewToolOffset?
{Start new Operation}
GetStartOfSameTool
SeqLabC Rapid 'H0Z0' EOL
GetSpinOn
SeqLabC PlaneC AbsOrInc Rapid StrtPos WFOStuff EOL
SeqLabC OfstOn EOL
ELSE
{Start new Operation}
GetStartOfSameTool
GetSpinOn
SeqLabC PlaneC AbsOrInc Rapid StrtPos WFOStuff 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
IF ZshiftOnly?
IF AutoCycle? {incremental Autocycle sub can have Z moves}
ZonlyRepAutoCycle
ELSE {Z shift only, NOT Auto Cycle}
IF UseSeparateSubCalls? AND CyclesLessThanMaxSubCalls?
SetFlag('1') { Milling ZShiftOnly SepSubs }
ZonlyRep
SetFlagF('1')
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
SeqLabC CRCOffC EOL
IF FIFO?
SeqLabC FeedC ZCP3C FeedEntC EOL
ELSE
SeqLabC RapidC ZCP3C EOL
END
END
ELSE
IF Drilling?
IF Repeats?
NewProg
StdSub
SeqLabC AbsOrInc Rapid StrtPos EOL
END
IF Pulse? { Positive Approach }
SeqLabC 'M46' EOL
END
SeqLabC DrillCP EOL
GetCycle
SeqLabC
IF RigidTap?
'G84.1'
ELSE
Cycle
END
FromCP StrtPos ZDepth RLevel Dwell Peck Retract FeedEnt
IF RigidTap?
Speed
END
EOL
IF CallMasterOp?
SeqLabC SubCall 'L' CallMasterNum# '01' EOL
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') {std sep sub Zreps in effect}
NewMasterProg
SeqLabC CallLab '01' EOL
StartSub
ToolPath
SeqLabC EndSub EOL
CloseSub
SetFlagF('1') {not std sep sub Zreps in effect}
ELSE
ToolPath
END
END
SetDrillEndOpZ
IF Pulse?
SeqLabC 'M47' EOL
ResetCool
END
SeqLabC Rapid 'G80' ZCP3 EOL
IF Repeats?
FinishSubG92
END
END
END
NextOp {loops back to EachOP until last Operation}
{End of program ************************************************************}
{finish last operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
SeqLabC Rapid AbsValue SpinOff CoolOff EOL
SeqLabC 'G53Z0' EOL { OfstOff }
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
SeqLabC AbsOrInc Rapid FirstHome EOL
END
IF ProgStop?
SeqLabC 'M0' EOL
END
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
SeqLabC 'X0Y0Z0E0H0' EOL
SeqLabC EOP EOL
EndSubs
CloseSub
Post2 {organize Subs into one program}
EOR EOL
Close
Reseq
IF UseComments?
SetScale('1') {restore scale for comments}
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:
Fadal 2 [EMTD 3] M627 89 1mFadal Format 2 [HM] MV16 89 1mFadal 2 [E RT P] M759 89Yasnac MX1 3 MS M315 89 1mFadal Guardala M063 89Okuma 700M [SMH] MW08 89 1mFagor 8025 [PI] MY79 89 1mFadal 2 [AIM] MY43 89 1Fadal [BM] M480 89Mazatrol M2 Mzk [ST] M630 89 1mFadal [EI] M605 89Fanuc 15M [YTC] MY61 89 1mFadal [SDP E] M608 89Heid 415 BR [ST] MX50 89 1mFadal [WD] MZ74 89 1Yasnac I80 Mat 510VF M797 89 1mHeid TNC 155 [PB] M550 89 1mwięcej podobnych podstron