{Change Comments ***********************************************************}
{11/6/95, M445.80.2, Updated for Catalyst v2.20 per Fanuc 6M M001.85 Format, DWB}
{2/12/96, Updated .85 number to .86, no changes necessary, MPK}
{3/25/96, Updated .86 to .89 version, TH}
{Prog Numeric Format Definitions *******************************************}
#1 = '#.00'
#2 = '###.###;0.'
#3 = '*###.###;0.'
#4 = '####.####;0.'
#5 = '#######0'
#6 = '###.#;0'
#7 = '###0'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(SPX#,4)
FORMAT(SPY#,4)
FORMAT(OriginShiftRX#,4)
FORMAT(OriginShiftRY#,4)
FORMAT(OriginUSRXCTP#,4)
FORMAT(OriginUSRYCTP#,4)
FORMAT(OriginShiftPX#,4)
FORMAT(OriginShiftPY#,4)
FORMAT(OriginUSPXCTP#,4)
FORMAT(OriginUSPYCTP#,4)
FORMAT(Retract#,4)
FORMAT(ToolDiameter#,4) {.72}
FORMAT(Recall#,5)
FORMAT(Tag#,5)
FORMAT(CallMasterNum#,5)
FORMAT(Program#,5) {.72}
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(Parts#,5) {.72}
FORMAT(RapidF#,6)
FORMAT(Dwell#,6) {.72}
FORMAT(FeedEntry#,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
Get$: { For conversational output }
IF NOT EmptyLine?
'$'
END
RETURN
TurnCRCOn:
IF CutterRadiusCompensation? AND NOT Flag?('2')
IF NOT LastFeat?
SetFlag('2')
SeqLab '(1)'
IF AutoCycle?
MoveSX '/' MoveSY '/'
ELSE
MoveSX MoveSY
END
CRCOff Get$ EOL
END
END
RETURN
TurnCRCOff:
IF CutterRadiusCompensation? AND Flag?('2')
SetFlagF('2')
SeqLab '(1)'
IF AutoCycle?
MoveX '/' MoveY '/'
ELSE
MoveXY
END
CRCOff Get$ EOL
END
RETURN
DoSubComment:
IF UseComments? AND SubComment?
SeqLab '(T) SUB NUMBER ' Tag# Get$ EOL
END
RETURN
DoOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
SeqLab '(T) OPERATION ' Operation# ' ' OperationType$ Get$ EOL
END
IF OperationComment?
SeqLab '(T) ' OperationComment$ Get$ EOL
END
IF WorkGroupComment?
SeqLab '(T) ' WorkGroupComment$ Get$ EOL
END
IF ToolTypeComment?
SeqLab '(T) TOOL# ' Tool# ' ' ToolDiameter# ' ' ToolType$ Get$ EOL
END
IF ToolComment?
SeqLab '(T) ' ToolComment$ Get$ EOL
END
RestoreScale
END
RETURN
PSInit: {reset flags}
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN
PSStuff: {revised.72}
IF FourthCW?
FORMAT(FourthDegree#,2)
SeqLab '(0)' 'A' FourthDegree# Get$ EOL
FourthCWF {reset flag}
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
SeqLab '(0)' 'A' FourthDegree# Get$ EOL
FourthCCWF {reset flag}
END
IF FifthCW?
FORMAT(FifthDegree#,2)
SeqLab '(0)' 'B' FifthDegree# Get$ EOL
FifthCWF {reset flag}
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
SeqLab '(0)' 'B' FifthDegree# Get$ EOL
FifthCCWF {reset flag}
END
RETURN
DoPostScript:
PSInit
EachPS
SeqLab PostScript Get$ EOL {literals}
PSStuff {commands}
NextPS
RETURN
DoEndOpPS:
PSInit
EachEOPS
SeqLab EndOpPS Get$ EOL {literals}
PSStuff {commands}
NextPS
RETURN
CycleOn: { EntryMove }
SeqLab '(9)' 'M8' Get$ EOL { Water On }
SeqLab '(9)' 'M10' Get$ EOL { Sand On }
SeqLab '(8)' 'L' FeedEntry# Get$ EOL { Dwell for water & sand to get it up }
RETURN
CycleOff:
SeqLab '(9)' 'M11' Get$ EOL { Sand Off }
SeqLab '(8)' 'L40' Get$ EOL { Dwell }
SeqLab '(9)' 'M9' Get$ EOL { Water Off }
SeqLab '(8)' 'L2' Get$ EOL { Dwell }
RETURN
StartSub:
OpenSub
DoSubComment
'>' Tag# EOL
RETURN
SubWarning:
IF NOT FeedConnect?
IF AnyZshift?
SeqLab '(T) ' Get$ EOL
SeqLab '(T) *** WARNING ***' Get$ EOL
SeqLab '(T) Z CLEARANCE WILL' Get$ EOL
SeqLab '(T) CHANGE WITH EACH' Get$ EOL
SeqLab '(T) CYCLE OF SUB!' Get$ EOL
SeqLab '(T) ' Get$ EOL
END
END
RETURN
StdSub:
'È' Tag# EOL
SeqLab '(7)FÅ‚' Tag# 'L²' Tag# Get$ EOL
SeqLab '(6)FÇ' Tag# 'T' RepsLess1 Get$ EOL
StartSub
RETURN
FinishSub1: {part 1}
{ Post does not support ZMoves }
RETURN
FinishSubG92: {part 2}
IF NotEqual? RepeatX# Num#('0')
SeqLab '(0)' 'X' OriginShiftRX#
IF NotEqual? RepeatY# Num#('0')
'Y' OriginShiftRY#
END
Preset Get$ EOL
ELSE
IF NotEqual? RepeatY# Num#('0')
SeqLab '(0)' 'Y' OriginShiftRY# Preset Get$ EOL
END
END
'<' Tag# EOL
TagDown
CloseSub
IF NotEqual? RepeatX# Num#('0')
SeqLab '(0)' 'X' OriginUSRXCTP#('1')
IF NotEqual? RepeatY# Num#('0')
'Y' OriginUSRYCTP#('1')
END
Preset Get$ EOL
ELSE
IF NotEqual? RepeatY# Num#('0')
SeqLab '(0)' 'Y' OriginUSRYCTP#('1') Preset Get$ EOL
END
END
RETURN
OpenMP:
IF EquallySpacedOffsets?
TagUp TagInc
'È' Tag# EOL
SeqLab '(7)FÅ‚' Tag# 'L²' Tag# Get$ EOL
SeqLab '(6)FÇ' Tag# 'T' PartsLess1 Get$ EOL
StartSub
END
RETURN
CloseMP:
IF EquallySpacedOffsets?
IF NotEqual? PartShiftX# Num#('0')
SeqLab '(0)' 'X' OriginShiftPX#
IF NotEqual? PartShiftY# Num#('0')
'Y' OriginShiftPY#
END
Preset Get$ EOL
ELSE
IF NotEqual? PartShiftY# Num#('0')
SeqLab '(0)' 'Y' OriginShiftPY# Preset Get$ EOL
END
END
'<' Tag# EOL
TagDown
CloseSub
IF NotEqual? PartShiftX# Num#('0')
SeqLab '(0)' 'X' OriginUSPXCTP#('1')
IF NotEqual? PartShiftY# Num#('0')
'Y' OriginUSPYCTP#('1')
END
Preset Get$ EOL
ELSE
IF NotEqual? PartShiftY# Num#('0')
SeqLab '(0)' 'Y' OriginUSPYCTP#('1') Preset Get$ EOL
END
END
END
RETURN
DoAbsOrInc:
{ Post does not support ZMoves }
RETURN
DoDrillAbsOrInc:
{ Post does not support ZMoves }
RETURN
RestoreAbsOrInc:
{ Post does not support ZMoves }
RETURN
GetPlane:
{ Not necessary }
RETURN
CheckMove:
IF Drilling?
IF Flag?('1') AND NOT AbsValue? { AbsoluteMoves? = TRUE }
IF XMove?
MoveSX '/'
END
IF YMove?
MoveSY '/'
END
ELSE
MoveSXYC
END
ELSE
IF AutoCycle? { Implies Incremental }
IF XMove?
MoveX '/'
END
IF YMove?
MoveY '/'
END
ELSE
IF Flag?('1') AND NOT AbsValue? { AbsoluteMoves? = TRUE }
IF XMove?
MoveX '/'
END
IF YMove?
MoveY '/'
END
ELSE
MoveXYC
END
END
END
RETURN
FormatArc:
DoAbsOrInc GetPlane CheckMove
IF AutoCycle?
ArcI '/' ArcJ '/'
ELSE
IF Flag?('1') AND NOT AbsValue? { AbsoluteMoves? = TRUE }
ArcI '/' ArcJ '/'
ELSE
ArcIJ
END
END
IF ArcCW?
CWArc
ELSE
CCWArc
END
RETURN
ckCRC:
IF CutterRadiusCompensation? AND Flag?('2')
IF NOT LastFeat?
CRCOnC
END
END
RETURN
FormatLine:
DoAbsOrInc GetPlane CheckMove ckCRC
RETURN
ckCRCNum:
{ Not supported }
RETURN
ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
IF NOT FirstFeat?
SeqLab '(0)' MoveSXYC Get$ EOL
END
SeqLab '(7)FÅ‚' Tag# 'L²' Tag# Get$ EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
IF NOT FirstFeat?
SeqLab '(0)' DoDrillAbsOrInc CheckMove Get$ EOL
END
{ Drilling CycleOn/CycleOff Sub }
SeqLab '(7)FÅ‚' Recall# Num#('1') 'L²' Recall# Num#('1') Get$ EOL
END
ELSE
IF RapidFeat?
IF XMove? OR YMove?
TurnCRCOn
IF CutterRadiusCompensation? AND Flag?('2')
SeqLab '(1)' FormatLine RapidFC Get$ EOL
ELSE
SeqLab '(0)' FormatLine Get$ EOL
END
END
ELSE
IF LineFeat?
IF XMove? OR YMove?
TurnCRCOn
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqLab '(1)' FormatLine FeedRateC Get$ EOL
DecelMove2
END
SeqLab '(1)' FormatLine DecelFeed Get$ EOL
ELSE
SeqLab '(1)' FormatLine FeedRateC Get$ 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
SeqLab '(2)' FormatArc ArcFeedC Get$ EOL
DecelMove2
END
SeqLab '(2)' FormatArc DecelFeed Get$ EOL
ELSE
SeqLab '(2)' FormatArc ArcFeedC Get$ EOL
END
NEXTQuadrant
END
END
END
IF LastFeat? { Exit Length Feature }
TurnCRCOff {.70}
END
END
NEXTFeat
RestoreAbsOrInc
RETURN
WFOStuff:
{ NOTE: This Post Processor doesn't support WorkFixtureOffsets. }
RETURN
AutoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
StartSub
SetSRXYtoSP
SetInc
RETURN
AutoCycCutSub2: {part 2}
CycleOn
ToolPath
CycleOff
SetAbs
'<' Tag# EOL
CloseSub
SetSRSubXY {restore SR to 1st position value}
SetSRSubMove
RETURN
AutoCycPat:
SetPass2 {position pattern}
ToolPath {call after TagInc for correct sub calls}
SetPass1 {reset}
RETURN
Milling:
IF AutoCycle?
TagUp TagInc
AutoCycCutSub1
AutoCycCutSub2
AutoCycPat
TagDown
ELSE
CycleOn
ToolPath
CycleOff
END
RETURN
G92Sub:
SubWarning
StdSub
SetAbs
IF FeedConnect?
'(1)'
ELSE
'(0)'
END
SeqLab StrtPos Get$ EOL
Milling
FinishSub1
FinishSubG92
RETURN
ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
TagUp TagInc
EachCycle
SeqLab '(9)' 'M0' Get$ EOL { Lower Spindle }
SeqLab '(7)FÅ‚' Tag# 'L²' Tag# Get$ EOL
NextCycle
SetStatusOn
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
{.69, removed FinishSub1}
TagDown
'<' Tag# EOL
CloseSub
{Element shift, not pattern}
TagDown
RETURN
ZonlyRep:
EachCycle
IF NOT FirstCycle?
IF FeedConnect?
'(1)'
ELSE
'(0)'
END
SeqLab StrtPos Get$ EOL
END
SeqLab '(9)' 'M0' Get$ EOL { Lower Spindle }
SeqLab '(7)FÅ‚' Tag# 'L²' Tag# Get$ EOL
NextCycle
StartSub
CycleOn
ToolPath
CycleOff
IF NOT FeedConnect?
SeqLab '(9)' 'M0' Get$ EOL { Raise Spindle }
END
'<' Tag# EOL
TagDown
CloseSub
IF FeedConnect?
SeqLab '(9)' 'M0' Get$ EOL { Raise Spindle }
END
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:
{ Post does not support ZMoves }
RETURN
GetStartOfSameTool:
Plane { no output }
DoOpComments
DoPostScript
CheckPass
RETURN
{Start of executable Prog **************************************************}
{setup and initializations}
InitProg
TagInit
SetAbs
SkipZ
ReverseXZArcs
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('10000')
SetMaxFeed('500')
SetFlagF('1') { Milling ZShiftOnly SepSubs }
SetFlagF('2') { CutterRadiusCompensation }
SetFlagF('3') { Drilling CycleOn/CycleOff Sub }
Save# Num#('1') Num#('0') { Drilling CycleOn/CycleOff Sub }
SetFlagF('4') { SubPrograms require 2nd M30 at end }
IF PSComment? AND UseComments?
SeqLab '(T) PostScript:' Get$ EOL
SeqLab '(T) Literals: put between single or double quotes.' Get$ EOL
SeqLab '(T) Separate commands and literals with at least one space.' Get$ EOL
SeqLab '(T) A CR ( RETURN key ) will start a new line.' Get$ EOL
SeqLab '(T) Commands: may be capital and/or lower case letters. Separate commands with a space.' Get$ EOL
SeqLab '(T) EndOP -' Get$ EOL
SeqLab '(T) all literals and commands before an ENDOP command' Get$ EOL
SeqLab '(T) will appear at the beginning of the operation. All' Get$ EOL
SeqLab '(T) literals and commands after an ENDOP command will appear' Get$ EOL
SeqLab '(T) at the end of the operation.' Get$ EOL
SeqLab '(T) NewWFO(56), NWFO(56) -' Get$ EOL
SeqLab '(T) The Work Fixture Offset # you specify will be used for all following operations.' Get$ EOL
SeqLab '(T) Do not use with the ncPost multiple part option.' Get$ EOL
SeqLab '(T) 4thAxisCW(12.5), 4ACW(12.5) -' Get$ EOL
SeqLab '(T) generates a + A move of the value you specify' Get$ EOL
SeqLab '(T) 4thAxisCCW(22.5), 4ACCW(22.5) -' Get$ EOL
SeqLab '(T) generates a - A move of the value you specify' Get$ EOL
SeqLab '(T) 5thAxisCW(30), 5ACW(30) -' Get$ EOL
SeqLab '(T) generates a + B move of the value you specify' Get$ EOL
SeqLab '(T) 5thAxisCCW(22.5), 5ACCW(22.5) -' Get$ EOL
SeqLab '(T) generates a - B move of the value you specify' Get$ EOL
END
EachOp {Start of post processing *********************}
IF FirstOperation?
'(' Program# ')' EOL
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
IF ProgramNameComment?
SeqLab '(T) PROGRAM ' ProgramName$ Get$ EOL
END
IF ProgramComment?
SeqLab '(T) ' ProgramComment$ Get$ EOL
END
IF FormatNameComment?
SeqLab '(T) FORMAT ' FormatName$ Get$ EOL
END
IF TimeComment?
SeqLab '(T) ' Date$ ' AT ' Time$ Get$ EOL
END
IF MovesComment?
SeqLab '(T) OUTPUT IN ABSOLUTE INCHES' Get$ EOL
END
IF PartsComment?
SeqLab '(T) PARTS PROGRAMMED ' Parts# Get$ EOL
END
IF StartToolComment?
SeqLab '(T) FIRST TOOL IN SPINDLE' Get$ EOL
END
END
OpenSub
RestoreScale
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
Plane { no output }
DoOpComments
DoPostScript
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
SeqLab '(0)' StrtPos Rapid Get$ EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqLab '(0)' StrtPos Rapid Get$ EOL
END
ELSE
IF NewTool?
{Finish off last Operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF LAST ProgStop?
SeqLab '(9)' 'M0' Get$ EOL
ELSE
IF OptionalStops?
SeqLab '(9)' ProgStop Get$ EOL
END
END
{Start new Operation}
Plane { no output }
DoOpComments
DoPostScript
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
SeqLab '(0)' StrtPos Rapid Get$ EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqLab '(0)' StrtPos Rapid Get$ EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqLab '(9)' 'M0' Get$ EOL
{Start new Operation}
GetStartOfSameTool
SeqLab '(0)' StrtPos Rapid Get$ EOL
ELSE
IF NewToolOffset?
{Start new Operation}
GetStartOfSameTool
SeqLab '(0)' StrtPos Rapid Get$ EOL
ELSE
{Start new Operation}
GetStartOfSameTool
SeqLab '(0)' StrtPos Rapid Get$ EOL
END
END
END
END
END {common point for all operations}
IF MultipleParts? OR Repeats? OR AutoCycle?
SetFlag('4') { SubPrograms require 2nd M30 at end }
END
IF Milling?
IF Repeats?
TagUp TagInc
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
ELSE
IF Drilling?
IF NOT Flag?('3') { Drilling CycleOn/CycleOff Sub }
SetFlag('3')
SetFlag('4') { SubPrograms require 2nd M30 at end }
TagUp TagInc
Save# Num#('1') Tag#
TagDown
END
IF Repeats?
TagUp TagInc
StdSub
SetAbs
SeqLab '(0)' StrtPos Get$ EOL
END
GetCycle
IF CallMasterOp?
SeqLab '(7)'
'FÅ‚' CallMasterNum#
'L²' CallMasterNum# Get$ EOL
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') {std sep sub Zreps in effect}
TagUp
NewMasterTag
SeqLab '(7)FÅ‚' Tag# 'L²' Tag# Get$ EOL
StartSub
ToolPath
'<' Tag# EOL
TagDown
CloseSub
SetFlagF('1') {not std sep sub Zreps in effect}
ELSE
ToolPath
END
END
SetDrillEndOpZ
SeqLab '(0)' Rapid Get$ 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
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
SeqLab '(0)' FirstHome Get$ EOL
END
IF ProgStop?
SeqLab '(9)' 'M0' Get$ EOL
END
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
SeqLab '(9)' EOP Get$ EOL
CloseSub
IF Flag?('3') { Drilling CycleOn/CycleOff Sub }
SetFlagF('3')
OpenSub
TagInc
IF UseComments? AND SubComment?
SeqLab '(T) SUB NUMBER ' Tag# Get$ EOL
END
'>' Recall# Num#('1') EOL
CycleOn
CycleOff
'<' Recall# Num#('1') EOL
CloseSub
END
Post2 {organize Subs into one program}
IF Flag?('4') { SubPrograms exist }
SetFlagF('4')
SeqLab '(9)' EOP Get$ EOL { This is required a second time, at end of all subs }
END
'END' EOL
Close
ReTag
IF UseComments?
SetScale('1') {restore scale for comments}
Reopen
IF FileBytesComment?
'N9997(T) FILE LENGTH: ' FileBytes# ' CHARACTERS' Get$ EOL
END
IF FileFeetComment?
'N9998(T) FILE LENGTH: ' FileFeet# ' FEET' Get$ EOL
END
IF FileMetersComment?
'N9999(T) FILE LENGTH: ' FileMeters# ' METERS' Get$ EOL
END
Close
END
Wyszukiwarka
Podobne podstrony:
Dynapath 10M [LD] M546 89Dynapath 10M [NSN] MY70 89Dynapath 10M (CDS) M922 89Dynapath 10M [SM] M632 89Dynapath 10M [MSM] MV47 89 1Dynapath 10M M078 89Fanuc 10M MS M031 89Fanuc 10M Kit M028 89 1Dynapath 10M [GM] M449 80 1Dynapath 10M QMC M224 85Dynapath 20M [PC] MW17 89Dynapath 10M [CM] M715 85 1Dynapath 40M [CP] M141 89 1Dynapath 50M [TM] MT75 89więcej podobnych podstron