{4/11/89
Copied & modified; Fanuc 0M Leadwell M075.55, for Triple T.
Add 'X0' to machine home move at end of program.
Add 'Home' for 1st tool change.
Delete ' G0 G91 G28 G49 X2. Y-2. Z-2.'
Add 'G49' to 1st line of program.
Jim Radcliffe}
{7/24/90, Added InitProg globally to posts with this remark, DWB}
{2/22/94, Updated Fanuc 0M Leadwell (TT) M188.56 to .81.2 format, JR}
{2/16/95
Copied & modified: Fanuc 0M Leadwell (TT) M188.81
For: Murtaugh Represents / Aero Precision
Control: Fanuc 16M
Added to saftey start block.
Moved WFOStuff call to StrtPos line.
Removed spaces between codes.
Spindle and StrtPos on same line.
OfstOn and CoolOn on same line. Block delete CoolOn.
String ZCP3 move at end of operation to CoolOff command.
Changed MachSpec format L from 0000 to ###0 to change 'M98P00010001' to 'M98P10001'.
Changed MachSpec CRC label from an H to a D.
Jim Radcliffe}
{3/16/95, Modified Fanuc 16M M00B.81.2 Rigid Tapping, JR}
{8/19/95, Updated Fanuc 16M [AP] M789.81.3 to .85 format per Fanuc 6M M001.85.01.02, JR}
{9/12/95
Initial: Fanuc 16M [AP] M789.85
Created: Fanuc 16M [AP] M789.85.1
Comment: Added Single Direction positioning with PosApp.
Jim Radcliffe}
{1/17/96, Updated .85 to .86 version, MPK}
{3/22/96, Tested ZOnlyRepAutoCycle, Changed version # to .89, MPK}
{11/13/97
Initial: Fanuc 16M [AP] M789.89
Created: Fanuc 16M Daewoo Mxxx.89
ForUser: Williams Precision Machine
Control: Fanuc 16M
Machine: Daewoo ( Vertical Knee Mill )
Develop: ComPost2 1.1b2, Virtual 4.21.14
Comment: New processor per marked up readout and conversation with Chris O'Flynn
Moved ToolChng to line after OpToolID.
Added AbsOrInc and Rapid and PreTool to StrtPos line at beginning of each tool.
Removed block delete from CoolOn.
Deleted Y0 from OfstOff lines, this is a vertical machine and does not need it.
Moved ProgStop/OptionalStop to be after ToolChng.
Deleted M29 line from Rigid Tap, output same as reqular Tap.
Deleted G60 PosApproach.
Subprograms for Multiple Parts Only.
Jim Radcliffe}
{Prog Numeric Format Definitions *******************************************}
#1 = '#.00'
#2 = '###.###;0.'
#3 = '*###.###;0.'
#4 = '####.####;0.'
#5 = '#######0'
#6 = '####^##0'
#7 = '0000'
#8 = '#;'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ToolDiameter#,4) {.72}
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(NewWFO#,5) {.72}
FORMAT(Parts#,5)
FORMAT(Dwell#,6) {.72}
FORMAT(Program#,7)
FORMAT(RapidF#,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?
'( SUB NUMBER: ' Program# ' )'
END
RETURN
DoRepComment:
IF UseComments? AND SubComment?
'( CYCLE START )' 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
RestoreScale
END
RETURN
AbsValueC:
IF NOT AbsValue?
AbsValue
END
RETURN
IncValueC:
IF AbsValue?
IncValue
END
RETURN
AbsOrIncC:
IF AbsoluteMoves?
AbsValueC
ELSE
IncValueC
END
RETURN
PSInit: {reset flags}
NewWFOF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
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 {literals}
PSStuff {commands}
NextPS
RETURN
DoEndOpPS:
PSInit
EachEOPS
SeqC EndOpPS EOL {literals}
PSStuff {commands}
NextPS
RETURN
StartSub:
OpenSub
ASCII('13') SubID DoSubComment EOL
RETURN
OpenMP:
NewProg
IF WorkFixtureOffsets?
NewWFO
EachWFO
SeqC SetWFO EOL
SeqC SubCall CallLabB OnePart Program# EOL
IncWFO
NextWFO
ELSE
SeqC SubCall CallLabB Parts Program# EOL
END
StartSub
RETURN
CloseMP:
IF WorkFixtureOffsets?
SeqC EndSub EOL
CloseSub
SeqC WFO1 EOL
ELSE
SeqC Preset ShiftPC EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshftPC EOL
END
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 LastFeat?
SeqC CRCOffC RapidC MoveXYZC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqC RapidC MoveXYZC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqC CRCOnC RapidC MoveXYZC CRCOffsetC EOL
END
END
END
RETURN
StdLine: {enables CRC on first call, .70}
IF LastFeat?
SeqC CRCOffC FeedC MoveXYZC FeedRateC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqC FeedC MoveXYZC FeedRateC EOL
ELSE
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqC CRCOnC FeedC MoveXYZC FeedRateC CRCOffsetC EOL
DecelMove2
END
SeqC CRCOnC FeedC MoveXYZC DecelFeed CRCOffsetC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqC CRCOnC FeedC MoveXYZC FeedRateC CRCOffsetC EOL
END
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?
StdRapid
ELSE
IF LineFeat?
StdLine
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 IncValueC EOL
IF Repeats? AND ZshiftOnly?
EachRep
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
IF FeedConnect?
SeqC FeedC StrtPosC EOL
ELSE
SeqC RapidC StrtPosC EOL
END
END
END
EntryMove
ToolPath2
IF NOT FeedConnect?
SeqC ExitType PRIME ZCP2 ExitFeed EOL
END
NextRep
ELSE
EntryMove
ToolPath2
END
SeqC AbsOrIncC ExitType ZCP2 ExitFeed EOL
SetSRSubXY {restore tool position}
SetSRSubMove
ReSetPass2 {restore for positioning moves}
RETURN
ToolPath:
ResetCRCNum
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqC
IF FIFO? AND NOT FirstFeat?
Rapid
END
MoveSXYC EOL
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
WFOStuff:
IF NewWFO?
IF MultipleParts?
EOL
'*** WARNING *** DO NOT USE NEWWFO() WITH NCPOST MULTIPLE PARTS'
EOL
ELSE
'G' NewWFO#
END
ELSE
IF NOT SameTool?
IF NeedWFO1?
'G' NewWFO#
END
END
END
RETURN
CheckPass:
IF AutoCycle? {use the correct StrtPos}
SetPass2
ELSE
SetPass1
END
RETURN
{Start of executable Prog **************************************************}
{setup and initializations}
InitProg
ReverseXZArcs
InitWFONum
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
' 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?
EOR EOL
ProgID1
IF UseComments? AND ProgramNameComment?
'( ' ProgramName$ ' )'
END
EOL
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
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
Seq Rapid Plane CRCOff 'G49' 'G98' AbsOrInc DrillOff EOL
SeqC OpToolID EOL
SeqC ToolChng EOL
SeqC ProgStop EOL
DoOpComments
DoPostScript
CheckPass
SeqC AbsOrInc WFOStuff Rapid StrtPos Speed SpinOn
IF NOT LastTool?
PreTool
END
EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
SeqC AbsOrInc Rapid StrtPos EOL
END
SeqC OfstOn CoolOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqC Rapid StrtPos EOL
END
ELSE
IF NewTool?
{Finish off last Operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
EOL
CloseMP
SeqC
END
CoolOff EOL
SeqC IncValueC OfstOff
IF MultipleParts? AND OneToolAllParts? AND FullUp?
EOL
CloseMP
SeqC
END
IF ToolChangeAtHome?
SpinOff EOL
DoEndOpPS
SeqC AbsOrIncC Rapid Home ASCII('13') EOL
ELSE
SpinOff ASCII('13') EOL
DoEndOpPS
END
{Start new Operation}
Seq Rapid Plane CRCOff 'G49' 'G98' AbsOrInc DrillOff EOL
SeqC OpToolID EOL
SeqC ToolChng EOL
IF LAST ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
END
DoOpComments
DoPostScript
CheckPass
SeqC AbsOrInc WFOStuff Rapid StrtPos Speed SpinOn PreTool EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
SeqC AbsOrInc Rapid StrtPos EOL
END
SeqC OfstOn CoolOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqC Rapid StrtPos EOL
END
ELSE
IF SameTool?
{Finish off last Operation}
IF LAST ProgStop?
CoolOff
ELSE
IF CoolOff? AND LAST NOT CoolOff?
CoolOff
END
END
EOL
IF LAST ProgStop? OR NewToolOffset?
SeqC IncValueC OfstOff EOL
END
DoEndOpPS
IF LAST ProgStop?
SeqC SpinOff EOL
SeqC 'M0' EOL
END
{Start new Operation}
DoOpComments
DoPostScript
CheckPass
SeqC AbsOrIncC WFOStuff PlaneC Rapid StrtPos SpeedC
IF LAST ProgStop?
SpinOn
END
EOL
SeqC
IF LAST ProgStop? OR NewToolOffset?
OfstOn
END
IF LAST ProgStop?
CoolOn
ELSE
IF NOT CoolOff? AND LAST CoolOff?
CoolOn
END
END
EOL
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
DoRepComment
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
ELSE
SeqC CRCOffC ExitType ZCP3C ExitFeed
END
ELSE
IF Drilling?
IF Repeats?
EACHRep
DoRepComment
END
SeqC DrillCP EOL
GetCycle
SeqC Cycle FromCP StrtPos ZDepth RLevel Dwell Peck Retract FeedEnt EOL
TrackZNO# FIRST SPZ#
ToolPath
IF RetractToCP1?
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
SeqC DrillOff
IF Repeats?
EOL
NEXTRep
SeqC
END
ZCP3
END
END
NextOp {loops back to EachOP until last Operation}
{End of program ************************************************************}
{finish last operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
EOL
CloseMP
SeqC
END
CoolOff EOL
SeqC IncValueC OfstOff
IF MultipleParts? AND OneToolAllParts? AND FullUp?
EOL
CloseMP
SeqC
END
SpinOff EOL
DoEndOpPS
IF FIRST ToolChangeAtHome?
SeqC AbsOrIncC Rapid FirstHome EOL
END
IF MultipleParts? AND AllToolsOnePart?
IF ProgStop?
SeqC 'M0' EOL
END
CloseMP
END
SeqC EOP EOL
CloseSub
Post2 {organize Subs into one program}
EOR EOL
Close
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:
Fanuc 16M Rodrill [GTR] MZ23 89Fanuc 16M Rodrill G10 MZ24 89Fanuc 16M Roku [SM] MT38 89 2Fanuc 16M [NM] M834 89 5mFanuc 10M MVJR [DM] M740 89Fanuc 0T DP [TTT] L567 85Fanuc 16M Edgetec L570 85Fanuc 3M Enshu [DLT] M414 89Fanuc 10M Kit [LM] M904 89Fanuc 0M Supermax [AM] MW17 89Fanuc 0T DP [HP] L497 85 1Fanuc 6M Makino [NRC] M869 89Fanuc 3000C HS [NI] M384 89Fanuc 16M Makino [EE] NMT56 16Fanuc 11M Toyoda [GS] MU04 89więcej podobnych podstron