{Change Comments ***********************************************************}
{6/1/95
Copied: Fanuc 6M M001.81.2f
Created: D&M 4s/6s M798.81.2
For: Mid West Tech
Machine: D&M 4s/6s CNC Mill
Control: D&M Level 3s Software
Versions: ncCad 4.33.01/ncCAM 4.33.01/ncPost 4.33.05/Catalyst v2.14.40/Compost 4.21.28
Changes made per conversations with Jeff Cooper of D&M Computer, Inc. and training manual.
Numerous modifications made per manual.
DWB}
{9/26/95
Updated and Modified: D&M 4s/6s M798.81.2
For: Mid West Tech
Versions: ncCad 4.33.01/ncCAM 4.33.01/ncPost 4.33.06/Catalyst v2.22/Compost 4.21.32/1.0a
Changes made per Wyman of Mid West Tech.
Updated for Catalyst v2.20 per Fanuc 6M M001.85 Format.
Changed all occurances of literal M07 to G94 for Mac FeedRates.
Commented out FormatNameComment at FirstOperation.
Commented out StartToolComment at FirstOperation.
Deleted literal '?' at FirstOperation and NewTool.
Moved 'G70' block from before DoOpComments to after at FirstOperation and NewTool.
Deleted 'G80' block at FirstOperation and NewTool.
Deleted ToolChng OpToolID block at FirstOperation and NewTool.
Added call to GetFeedEnt prior to StrtPos block at FirstOperation, NewTool and SameTool.
Moved ZCP1 from StrtPos block to block by itself following StrtPos block at FirstOperation,
NewTool and SameTool.
Deleted CoolOn at FirstOperation, NewTool and SameTool.
Deleted CoolOff at NewTool, SameTool and end of Prog.
Deleted SpinOff at NewTool, SameTool and end of Prog.
Deleted call to GetFeedEnt at IF Drilling.
Added ReTag at end of Prog.
Commented out File Length Comments as end of Prog.
DWB}
{1/17/96, Updated .85 to .86 version, MPK}
{3/22/96, Tested ZOnlyRepAutoCycle, Changed version # to .89, MPK}
{Prog Numeric Format Definitions *******************************************}
#1 = '#.00'
#2 = '###.###;0'
#3 = '*###.###;0'
#4 = '###.###;0.'
#5 = '#######0'
#6 = '####^##0'
#7 = '###0'
#8 = '##0.000;0.000'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ToolDiameter#,4) {.72}
FORMAT(CallMasterNum#,5)
FORMAT(Program2#,5)
FORMAT(Program#,5) {.72}
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(Parts#,5) {.72}
FORMAT(Dwell#,6) {.72}
FORMAT(Recall#,7)
FORMAT(FeedContour#,7)
FORMAT(FeedEntry#,7)
FORMAT(ArcFeed#,7)
FORMAT(DecelFeed#,7)
FORMAT(SUB#,8)
FORMAT(XStockMax#,8)
FORMAT(YStockMax#,8)
FORMAT(ZStockMax#,8)
FORMAT(ZStockMin#,8)
{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?
SetLineStrtChr('')
'\ SUB NUMBER: ' Program# EOL
IF NOT MinimizeSequencing?
SetLineStrtChr('?')
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 ToolTypeComment?
'\ TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ EOL
END
IF ToolComment?
'\ ' ToolComment$ EOL
END
RestoreScale
END
RETURN
PSInit: {reset flags}
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN
PSStuff: {revised.72}
IF FourthCW?
FORMAT(FourthDegree#,2)
' A' FourthDegree# EOL
FourthCWF {reset flag}
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
' A' FourthDegree# EOL
FourthCCWF {reset flag}
END
IF FifthCW?
FORMAT(FifthDegree#,2)
' B' FifthDegree# EOL
FifthCWF {reset flag}
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
' B' FifthDegree# EOL
FifthCCWF {reset flag}
END
RETURN
DoPostScript:
PSInit
EachPS
PostScript EOL {literals}
PSStuff {commands}
NextPS
RETURN
DoEndOpPS:
PSInit
EachEOPS
EndOpPS EOL {literals}
PSStuff {commands}
NextPS
RETURN
GetFeedEnt:
' G94 ' FeedEntry# EOL { Feed Parameter Setting }
Save# Num#('1') FeedEntry#
RETURN
GetFeedEntC:
IF NotEqual? Recall# Num#('1') FeedEntry#
GetFeedEnt
END
RETURN
GetFeedRate:
' G94 ' FeedContour# EOL { Feed Parameter Setting }
Save# Num#('1') FeedContour#
RETURN
GetFeedRateC:
IF NotEqual? Recall# Num#('1') FeedContour#
GetFeedRate
END
RETURN
GetDecelFeed:
' G94 ' DecelFeed# EOL { Feed Parameter Setting }
Save# Num#('1') DecelFeed#
RETURN
GetDecelFeedC:
IF NotEqual? Recall# Num#('1') DecelFeed#
GetDecelFeed
END
RETURN
GetArcFeed:
' G94 ' ArcFeed# EOL { Feed Parameter Setting }
Save# Num#('1') ArcFeed#
RETURN
GetArcFeedC:
IF NotEqual? Recall# Num#('1') ArcFeed#
GetArcFeed
END
RETURN
EntryMove:
IF FeedEntry?
IF Repeats? OR AutoCycle?
GetFeedEnt
END
Feed EOL
ZIn EOL
ELSE
RapidC EOL
ZIn EOL
END
RETURN
StartSub:
OpenSub
' M98 ' Program# EOL
DoSubComment
RETURN
SubWarning:
IF NOT FeedConnect?
IF AnyZshift?
SetLineStrtChr('')
' ' EOL
'\ WARNING Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT' EOL
' ' EOL
IF NOT MinimizeSequencing?
SetLineStrtChr('?')
END
END
END
RETURN
StdSub:
SubCall ' ' Program# EOL
StartSub
RETURN
FinishSub1: {part 1}
LoadFeat Num#('0') Num#('0') ClearancePlane3#
IF ZMove?
IF NOT FeedConnect?
IF AutoCycle?
ZCP3C EOL
ELSE
IF FIFO? {.81}
GetFeedEntC
FeedC EOL
ZCP3C EOL
ELSE
RapidC EOL
ZCP3C EOL
END
END
END
END
RETURN
FinishSubG92: {part 2}
Preset EOL
ShiftRC EOL
EndSub EOL
CloseSub
EachRep
IF NOT FirstCycle?
SubCall ' ' Program2# EOL
END
NextRep
' G93' EOL { Axis Reset option }
RETURN
OpenMP:
IF NOT WorkFixtureOffsets?
NewProg
SubCall ' ' Program# EOL
StartSub
END
RETURN
CloseMP:
IF NOT WorkFixtureOffsets?
Preset EOL
ShiftPC EOL
EndSub EOL
CloseSub
EachPart
IF NOT FirstCycle?
SubCall ' ' Program# EOL
END
NextPart
' G93' EOL { Axis Reset option }
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?
AbsValue EOL
END
RETURN
FormatArc:
DoAbsOrInc EOL
IF Flag?('3') { First Arc Quadrant }
SetFlagF('3')
IF ArcCW?
CWArc EOL
ELSE
CCWArc EOL
END
ArcIJ EOL
END
IF XMove? OR YMove? OR ZMove?
MoveXYZC EOL
END
RETURN
CkCRC: { 4.2 }
{ NOTE: This Post Processor does not support CutterRadiusCompensation }
RETURN
FormatLine:
DoAbsOrInc EOL
FeedC EOL
MoveXYZC EOL
RETURN
ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
MoveSXYC EOL
SubCall ' ' Program# EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
DoDrillAbsOrInc EOL
MoveSXYZC EOL {.80.01}
END
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
DoAbsOrInc EOL
RapidC EOL
MoveXYZC EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
IF Decelerate?
IF RoomToDecel?
DecelMove1
GetFeedRateC
FormatLine
DecelMove2
END
GetDecelFeedC
FormatLine
ELSE
GetFeedRateC
FormatLine
END
END
ELSE
IF ArcFeat?
SetFlag('3') { First Arc Quadrant }
IF XMove? OR YMove? OR ZMove?
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
GetArcFeedC
FormatArc
DecelMove2
END
GetDecelFeedC
FormatArc
ELSE
GetArcFeedC
FormatArc
END
NEXTQuadrant
ELSE
FormatArc
' G05' EOL { Full Arc }
END
END
END
END
END
NEXTFeat
RestoreAbsOrInc
RETURN
WFOStuff:
{ NOTE: This Post Processor does not support WorkFixtureOffsets }
RETURN
AutoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
StartSub
SetSRXYtoSP
IncValue EOL
RETURN
AutoCycCutSub2: {part 2}
ToolPath
AbsOrInc EOL
IF Repeats? AND FeedConnect? AND ZshiftOnly?
{.69 removed RapidC} {.71.2 removed CRCOffC, gets turned off in ToolPath}
ELSE
IF FIFO? {.81}
GetFeedEntC
FeedC EOL
ZCP2 EOL
ELSE
RapidC EOL
ZCP2 EOL
END
END
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
SaveProgNum2 { Simple TagDown }
AbsOrInc EOL
Connect EOL
StrtPos EOL
Milling
FinishSub1
FinishSubG92
RETURN
ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
NewProg
EachCycle
SetSRXYtoEP
IF FeedConnect?
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
Feed IncValue StrtPosC EOL
AbsOrInc
ELSE
Feed
END
ELSE
Feed
END
ZInPlusInc FeedEnt EOL
ELSE
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
Rapid IncValue StrtPosC EOL
IF FeedEntry?
AbsOrInc ZCP2PlusInc EOL
Feed ZInPlusInc FeedEnt EOL
ELSE
AbsOrInc ZInPlusInc EOL
END
ELSE
IF FeedEntry?
Rapid ZCP2PlusInc EOL
Feed ZInPlusInc FeedEnt EOL
ELSE
Rapid ZInPlusInc EOL
END
END
ELSE
IF FeedEntry?
Feed ZInPlusInc FeedEnt EOL
ELSE
Rapid ZInPlusInc EOL
END
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
SubCall ' ' Program# 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}
GetFeedEnt
Feed EOL {.69}
ZCP2 EOL
ELSE
Rapid EOL {.69}
ZCP2 EOL
END
END {.69}
EndSub EOL
CloseSub
{Element shift, not pattern}
RETURN
ZonlyRep:
EachCycle
IF NOT FirstCycle?
Connect EOL {.71.2, added Connect}
StrtPos EOL
END
IF FeedConnect?
GetFeedEnt
FeedC EOL {.71.2, changed to FeedC}
ZInPlusInc EOL
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
RapidC EOL {can't call for cycle =1} {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
ZCP2PlusIncC EOL
END
GetFeedEnt
Feed EOL
ZInPlusInc EOL
ELSE
RapidC EOL {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
ZInPlusInc EOL
END
END
SubCall ' ' Program# EOL
NextCycle
StartSub
TrackZNO# FIRST SPZ#
ToolPath
FinishSub1
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:
SetLineStrtChr('')
DoOpComments
DoPostScript
Plane { No Output }
CheckPass
IF NOT MinimizeSequencing?
SetLineStrtChr('?')
END
RETURN
{Start of executable Prog **************************************************}
{setup and initializations}
InitProg
ReverseXZArcs
InitWFONum
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('2800')
SetMaxFeed('500')
SetLineStrtChr('')
Save# Num#('1') Num#('0') { Current FeedEnt, FeedRate, DecelFeed or ArcFeed value in effect }
SetFlagF('1') { Milling ZShiftOnly SepSubs }
SetFlagF('3') { First Arc Quadrant }
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 FirstOperation?
IF ToolChangeAtHome?
SetHome
END
'@A=Virtual Gibbs' EOL
'@D=' Program# EOL
'@X=' XStockMax# ' IN.' EOL
'@Y=' YStockMax# ' IN.' EOL
'@Z=' SUB# ZStockMax# ZStockMin# ' IN.' 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
RestoreScale
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
Plane { No Output }
SetLineStrtChr('')
DoOpComments
DoPostScript
IF NOT MinimizeSequencing?
SetLineStrtChr('?')
END
' G70' EOL { Inches }
Speed EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
IF Drilling? OR FeedEntry?
GetFeedEnt
END
CheckPass
AbsOrInc EOL
Rapid EOL
StrtPos EOL
ZCP1 EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
StrtPos EOL
END
ELSE
IF NewTool?
{Finish off last Operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
LAST ZCP1C EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF ToolChangeAtHome?
AbsOrInc EOL
Rapid EOL
Home EOL
END
{Start new Operation}
Plane { No Output }
SetLineStrtChr('')
DoOpComments
DoPostScript
IF NOT MinimizeSequencing?
SetLineStrtChr('?')
END
Speed EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
IF Drilling? OR FeedEntry?
GetFeedEnt
END
CheckPass
AbsOrInc EOL
Rapid EOL
StrtPos EOL
ZCP1 EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
StrtPos EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
LAST ZCP1C EOL
{Start new Operation}
GetStartOfSameTool
Speed EOL
IF Drilling? OR FeedEntry?
GetFeedEnt
END
AbsOrInc EOL
Rapid EOL
StrtPos EOL
ZCP1 EOL
ELSE
IF NewToolOffset?
LAST ZCP1C EOL
{Start new Operation}
GetStartOfSameTool
SpeedC EOL
IF Drilling? OR FeedEntry?
GetFeedEnt
END
AbsOrInc EOL
Rapid EOL
StrtPos EOL
ZCP1 EOL
ELSE
{Start new Operation}
GetStartOfSameTool
SpeedC EOL
IF Drilling? OR FeedEntry?
GetFeedEnt
END
AbsOrInc EOL
Rapid EOL
StrtPos EOL
END
END
END
END
END {common point for all operations}
IF Milling?
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?
ZCP3C EOL
ELSE
LoadFeat Num#('0') Num#('0') ClearancePlane3#
IF ZMove?
IF FIFO? {.81}
GetFeedEntC
FeedC EOL
ZCP3C EOL
ELSE
RapidC EOL
ZCP3C EOL
END
END
END
ELSE
IF Drilling?
IF Repeats?
NewProg
StdSub
AbsOrInc EOL
Rapid EOL
StrtPos EOL
END
IF RetractToCP1? {.81}
ZCP1C EOL
ELSE
ZCP2C EOL
END
GetCycle
Cycle EOL
StrtPos ZDepth EOL
IF CallMasterOp?
SubCall ' ' CallMasterNum# EOL
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') {std sep sub Zreps in effect}
NewMasterProg
SubCall ' ' Program# EOL
StartSub
ToolPath
EndSub EOL
CloseSub
SetFlagF('1') {not std sep sub Zreps in effect}
ELSE
ToolPath
END
END
SetDrillEndOpZ
' G80' EOL
LoadFeat Num#('0') Num#('0') ClearancePlane3#
IF ZMove?
Rapid EOL
ZCP3C EOL
END
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
ZCP1C EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
AbsOrInc EOL
Rapid EOL
FirstHome EOL
END
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
EOP EOL
CloseSub
Post2 {organize Subs into one program}
Close
SetLineStrtChr('')
IF NOT MinimizeSequencing?
Retag
END
{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:
D&M 4s 6s [IBM] MY62 89 3Bandit IV AB [DM] MV32 89 1Fadal Format 2 [MM] MW60 89Fadal Format 2 [PEP] M116 89 1Fanuc MF M4 MS NS SSI M421 89 2Fanuc 10M MVJR [DM] M740 89Yasnac MX1 MS [BI] M076 89 2Cin Acr 900V2 [KM] MT25 89Mit Meldas 320M [SAV] MY34 89 189 90 by darog83Fadal Format 2 [HM] MV16 89 1mwięcej podobnych podstron