{Change Comments ***********************************************************}
{added separate sub call code and warning for not separate, 7/5/88 WFG}
{separate sub calls turned off in this post- 'UseSeparateSubCalls' commented out}
{ncPost3ż24 or better}
{added IF ToolChangeAtHome?, & SetHome 9/26/88 WFG}
{added PostScript commands 3/11/89 WFG}
{added PostScript command comments 5/9/89, WFG, use ncPost 3.10Ś9 or better}
{removed run time comments, 5/9/89, WFG}
{added "must be all capital letters when typed in" to Postscript Command comment, 5/17/89, JR}
{added metric, 6/5/89, WFG}
{suppressed first cycle StrtPos for sep subs,7/17/89 WFG}
{last tool now goes to FirstHome when finished, 7/26/89, WFG}
{changed to Sep Sub standard}
{.65, corrected Sep sub problem if 1st cut <> Z step, 9/14/89 WFG, requires ncPost 3.19Ś5}
{.66, added name comment to Prog ID # line, 10/30/89, WFG}
{.67, new prog commands, 11/20/89, WFG}
{*.68, AutoCycles and 3.2 support, 12/4/89, WFG (Good luck on the upgrades to other posts)}
{.69, corrected 2 repeat op/autocycle problems, 12/21/89, WFG}
{1/8/90-2/7/90
Changes to M001.69
Moved DoPostScript command to very beginning of NewTool & SameTool op's, same as FirstOp.
Deleted last line of NewWFO PostScript comment, it no longer applies.
Move DoEndOpPS command in NewTool & end of prog to end of operation outside of Full-up MP.
Restucture to have M01 or M00 in New Tool.
Deleted ProgStop? from end of prog, not neccesary.
Check for ProgStop at beginning AND end of operation does not work, it comes out both places,
only using for end of operation. Reflected in PSComments.
Deleted StopProg sub.
Re-wrote SameTool section for many reasons.
Deleted ClearancePlane3# prog format it is no longer needed.
New sub CheckPass to replace statement in main for SetPass.
Modified WFOStuff sub to include SameTool.
Deleted StrtPos from OpenMP sub and added to main where needed.
Updated to .70 format.
Jim Radcliffe}
{.71.1, added InitProg, 4/11/90, JR}
{.71.2, FIRST modifier, no CRCOffC in AutoCycCutSub2, add Connect for ZOnlyRep, 4/23/90, JR}
{.71.2.NoNest, modified for example of no nesting subroutines, 5/22/90, JR}
{.72.1.NoNest, Updated to .72.1 format & minor corrections, 6/6/90, JR}
{.76.1.NoNest, Updated to .76.1 format, 7/18/91, JR}
{.80.NoNest, Updated to .80 format, 9/10/91, JR}
{.81.NoNest, Updated to .81 format, 4/17/92, JR}
{.81.2.NoNest, Updated to .81.2 format, 6/3/93, JR}
{.81.3.NoNest, StdRapid & StdArc subs, 12/6/93, JR}
{.81.4.NoNest, Minor layout improvments & Update stuff, 6/1/94, JR}
{9/28/94
Copied & modified: Fanuc 6M NoNest M001.81.4
For: Walker
Control: Fanuc 15M
Machine: Matsuura Horizontal MC-700H-50-PC25
Custom Processor per Sample Readouts and verbal instructions.
Jim Radcliffe}
{12/14/94
Modified: Fanuc 15M Matsuura M695.81.4
For: Walker
Added SpinOff between tools.
All output is output as MultipleParts ExitClearancePlane WorkFixtureOffsets.
Added logic to handle if MultipleParts was not selected.
Corrected NoNest checks so everything else is output long hand.
Jim Radcliffe}
{2/9/96, Updated .81 number to .84, no changes necessary, MPK}
{3/22/96, Tested ZOnlyRepAutCycle, Incremented number to .87, MPK}
{Prog Numeric Format Definitions *******************************************}
#1 = '#.00'
#2 = '#####.###;0'
#3 = '*#####.###;0'
#4 = '#####.###;0'
#5 = '#######0'
#6 = '#####^##0'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ToolDiameter#,4) {.72}
FORMAT(Program#,5) {.72}
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(NewWFO#,5) {.72}
FORMAT(Parts#,5) {.72}
FORMAT(Dwell#,6) {.72}
{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
DoSubComment:
IF UseComments? AND SubComment?
'( SUB NUMBER: ' Program# ' )' EOL
END
RETURN
DoToolComment:
IF UseComments? AND ToolComment?
'( ' ToolComment$ ' )'
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 SameTool? { it is called on OpToolID line for FirstOperation and NewTool }
DoToolComment EOL
END
IF ToolTypeComment?
'( TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
RestoreScale
END
RETURN
CheckIndex1:
IF Rotate?
SeqC 'M22' EOL { unclamp B axis }
END
RETURN
CheckIndex2:
IF Rotate?
SeqC 'M21' EOL { clamp B axis }
END
RETURN
DoIndex:
IF FourthCW?
FORMAT(FourthDegree#,2)
'B' FourthDegree#
FourthCWF {reset flag}
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
'B' FourthDegree#
FourthCCWF {reset flag}
END
IF FifthCW?
FORMAT(FifthDegree#,2)
'C' FifthDegree#
FifthCWF {reset flag}
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
'C' FifthDegree#
FifthCCWF {reset flag}
END
RETURN
PSInit: {reset flags}
NewWFOF
RotateF
RETURN
PSStuff: {revised.72}
RETURN
DoPostScript:
PSInit
EachPS
SeqC PostScript EOL {literals}
PSStuff {commands}
NextPS
RETURN
DoEndOpPS:
PSInit
EachEOPS
SeqC EndOpPS EOL
PSStuff
NextPS
RETURN
EntryMove:
IF FeedEntry?
SeqC Feed ZIn FeedEnt EOL
ELSE
SeqC RapidC ZIn EOL
END
RETURN
StartSub:
OpenSub
ASCII('13') EOL
SubID DoToolComment EOL
DoSubComment
IF UseComments? { output the operation comments of the first operation used in the sub }
IF OperationIDComment?
'( OPERATION ' Operation# ': ' OperationType$ ' )' EOL
END
IF OperationComment?
'( ' OperationComment$ ' )' EOL
END
END
RETURN
FinishSub1: {part 1}
SeqC CRCOffC
IF NOT FeedConnect?
IF AutoCycle?
ZCP3C
ELSE
IF FIFO? {.81}
FeedC ZCP3C FeedEntC
ELSE
RapidC ZCP3C
END
END
END
EOL
RETURN
OpenMP:
NewProg
IF WorkFixtureOffsets? OR NOT MultipleParts?
NewWFO
EachWFO
SeqC 'G54.1' SetWFO SubCall CallLab EOL
IncWFO
SetLineStrtChr('/')
NextWFO
SetLineStrtChr('')
ELSE
SeqC SubCall CallLab RepLab Parts EOL
END
StartSub
RETURN
CloseMP:
IF WorkFixtureOffsets? OR NOT MultipleParts?
SeqC EndSub EOL
CloseSub
ELSE
SeqC Preset ShiftPC EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshftPC EOL
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 XMove? OR YMove? OR ZMove?
SeqC RapidC MoveXYZC EOL
END
END
RETURN
StdLine: {enables CRC on first call, .70}
IF LastFeat?
SeqC CRCOffC 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
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: {NoNesting} {.72.1, this is for AutoCycles only}
EACHFeat
IF RapidFeat?
StdRapid
ELSE
IF LineFeat?
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqC FeedC MoveXYZC FeedRateC EOL
ELSE
StdLine {enables CRC on first call}
END
ELSE
IF ArcFeat?
StdArc
END
END
END
NEXTFeat
RETURN
CutAutoCycle: {NoNesting}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
SetSRXYtoSP
Seq IncValue EOL
IF Repeats? AND ZshiftOnly?
EachRep
EntryMove
ToolPath2
IF NOT FeedConnect?
IF FIFO? {.81}
SeqC FeedC PRIME ZCP2 FeedEntC EOL
ELSE
SeqC RapidC PRIME ZCP2 EOL
END
END
NextRep
ELSE
EntryMove
ToolPath2
END
IF FIFO? {.81}
SeqC AbsOrInc FeedC ZCP2 FeedEntC EOL
ELSE
SeqC AbsOrInc RapidC ZCP2 EOL
END
SetSRSubXY {restore tool position}
SetSRSubMove
ReSetPass2 {restore for positioning moves}
RETURN
ToolPath:
ResetCRCNum {.72}
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqC MoveSXYC EOL
CutAutoCycle {NoNesting}
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
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?
'*** WARNING *** DO NOT USE NEWWFO() WITH NCPOST MULTIPLE PARTS'
ELSE
'G54.1P' NewWFO#
END
ELSE
IF NOT SameTool?
IF NeedWFO1?
'G54.1P' NewWFO#
END
END
END
RETURN
Milling:
IF AutoCycle?
ToolPath {NoNesting}
ELSE
EntryMove
ToolPath
END
RETURN
G92Sub: {NoNesting}
EachRep
IF AutoCycle?
ToolPath
ELSE
IF FirstCycle?
EntryMove
ELSE
IF FeedConnect? {.72.1, minor changes to entry}
SeqC FeedC StrtPosC EOL
SeqC ZInC FeedEntC EOL
ELSE
SeqC RapidC StrtPosC EOL
SeqC ZCP2C EOL
IF FeedEntry?
SeqC FeedC ZInC FeedEntC EOL
ELSE
SeqC RapidC ZInC EOL
END
END
END
ToolPath
FinishSub1
END
NextRep
RETURN
ZonlyRepAutoCycle: {NoNesting}
ToolPath
RETURN
ZonlyRep: {NoNesting}
NewProg
EachCycle
IF NOT FirstCycle?
SeqC Connect StrtPos EOL {.71.2, added Connect}
END
IF FeedConnect?
SeqC FeedC ZInPlusInc FeedEnt EOL {.71.2, changed to FeedC}
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqC RapidC ZCP2PlusIncC EOL {can't call for cycle =1} {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqC RapidC ZInPlusInc EOL {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
END
SkipZ
ToolPath
UnSkipZ { Moved from FinishSub1 }
FinishSub1
NextCycle
RETURN
CheckPass:
IF AutoCycle? {use the correct StrtPos}
SetPass2
ELSE
SetPass1
END
RETURN
GetStartOfSameTool:
DoOpComments
DoPostScript
IF LAST ProgStop?
SeqC CoolOn EOL
ELSE
IF NOT CoolOff? AND LAST CoolOff?
SeqC CoolOn EOL
END
END
CheckPass
RETURN
{Start of executable Prog **************************************************}
{setup and initializations}
InitProg
ReverseXZArcs
InitWFONum
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('4500')
SetMaxFeed('196')
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(2), NWFO(2) -' EOL
' The Work Fixture Offset # you specify will be used for all following operations.' EOL
' It will be preceeded by a G54.1P' EOL
' The example shown will output G54.1P2' EOL
' Do not use with the ncPost multiple part option.' EOL
' 4thAxisCW(12.5), 4ACW(12.5) -' EOL
' generates a + B move of the value you specify' EOL
' The above example would output B12.5' EOL
' 4thAxisCCW(22.5), 4ACCW(22.5) -' EOL
' generates a - B move of the value you specify' EOL
' The above example would output B-12.5' EOL
' 5thAxisCW(30), 5ACW(30) -' EOL
' generates a + C move of the value you specify' EOL
' 5thAxisCCW(22.5), 5ACCW(22.5) -' EOL
' generates a - C 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$ ' MILIMETERS )' 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 OpToolID ToolChng DoToolComment EOL
DoOpComments
DoPostScript
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
SeqC CoolOn EOL
CheckPass
CheckIndex1
SeqC AbsOrInc WFOStuff Plane Rapid StrtPos DoIndex Speed SpinOn EOL
CheckIndex2
SeqC OfstOn PreTool EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqC AbsOrInc Rapid StrtPos EOL
END
IF NOT MultipleParts? { output all tools in a subtoutine }
OpenMP
SeqC AbsOrInc Rapid StrtPos EOL
END
ELSE
IF NewTool?
{Finish off last Operation}
IF NOT MultipleParts? { output all tools in a subtoutine }
CloseMP
END
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
SeqC CoolOff EOL
SeqC IncValue OfstOff
IF MultipleParts? AND OneToolAllParts? AND FullUp?
EOL
CloseMP
SeqC
END
SpinOff EOL
DoEndOpPS
CheckIndex1
IF ToolChangeAtHome?
SeqC AbsOrInc Rapid Home DoIndex EOL
ELSE
IF Rotate?
SeqC AbsOrInc Rapid DoIndex EOL
END
END
CheckIndex2
IF LAST ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
END
{Start new Operation}
Seq OpToolID ToolChng DoToolComment EOL
DoOpComments
DoPostScript
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
SeqC CoolOn EOL
CheckPass
CheckIndex1
SeqC AbsOrInc WFOStuff Plane Rapid StrtPos DoIndex Speed SpinOn EOL
CheckIndex2
SeqC OfstOn PreTool EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqC AbsOrInc Rapid StrtPos EOL
END
IF NOT MultipleParts? { output all tools in a subtoutine }
OpenMP
SeqC AbsOrInc Rapid StrtPos EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqC CoolOff EOL
SeqC IncValue OfstOff EOL
CheckIndex1
IF ToolChangeAtHome?
SeqC AbsOrInc Rapid Home DoIndex EOL
ELSE
IF Rotate?
SeqC AbsOrInc Rapid DoIndex EOL
END
END
CheckIndex2
SeqC 'M00' EOL
{Start new Operation}
GetStartOfSameTool
CheckIndex1
SeqC AbsOrInc WFOStuff PlaneC Rapid StrtPos DoIndex SpeedC SpinOn EOL
CheckIndex2
SeqC OfstOn EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF NewToolOffset?
SeqC IncValue OfstOff EOL
CheckIndex1
IF Rotate?
SeqC AbsOrInc Rapid DoIndex EOL
END
CheckIndex2
{Start new Operation}
GetStartOfSameTool
CheckIndex1
SeqC AbsOrInc WFOStuff PlaneC Rapid StrtPos DoIndex SpeedC EOL
CheckIndex2
SeqC OfstOn EOL
ELSE
CheckIndex1
IF Rotate?
SeqC AbsOrInc Rapid DoIndex EOL
END
CheckIndex2
{Start new Operation}
GetStartOfSameTool
CheckIndex1
SeqC AbsOrInc WFOStuff PlaneC Rapid StrtPos DoIndex SpeedC EOL
CheckIndex2
END
END
END
END
END {common point for all operations}
IF Milling?
SeqC ZCP2C EOL
IF Repeats?
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?
SeqC ZCP3C EOL
ELSE
IF FIFO? {.81}
SeqC FeedC CRCOffC ZCP3C FeedEntC EOL
ELSE
SeqC RapidC CRCOffC ZCP3C EOL
END
END
ELSE
IF Drilling?
IF Repeats? {NoNesting}
EachRep
SeqC AbsOrInc Rapid StrtPos EOL
END
GetCycle
SeqC
IF Tap? AND NOT CWSpindle?
'G74'
ELSE
IF FIFO? AND Dwell?
'G89'
ELSE
Cycle
END
END
FromCP StrtPos ZDepth RLevel Dwell Peck Retract FeedEnt EOL
TrackZNO# ZDepth# {.81}
ToolPath
IF RetractToCP1? {.81}
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
SeqC 'G80' EOL
IF Repeats? {NoNesting}
NextRep
END
SeqC RapidC ZCP3C EOL
END
END
NextOp {loops back to EachOP until last Operation}
{End of program ************************************************************}
{finish last operation}
IF NOT MultipleParts? { output all tools in a subtoutine }
CloseMP
END
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
SeqC CoolOff EOL
SeqC IncValue OfstOff EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
CheckIndex1
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
SeqC AbsOrInc Rapid FirstHome DoIndex EOL
ELSE
IF Rotate?
SeqC AbsOrInc Rapid DoIndex EOL
END
END
CheckIndex2
IF ProgStop?
SeqC 'M0' EOL
END
IF MultipleParts? AND AllToolsOnePart?
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 15M Matsuura M695 87Fanuc 15M Matsuura C695 12Fanuc 15M Matsuura C695 12mFanuc 15M Matsuura C747 12Fanuc 15M Yoneda M832 87mFanuc 15M MTS [CP] NDU66 16 2mFanuc 15M Mitsui [EG] CW15 12Fanuc 6M Mazak M164 87mFanuc 15M [PIW] MW82 89 2Fanuc 15M Mat [IH] B958 12Fanuc 6M Matsuura TS M362 79Fanuc 15M [YTC] MY61 89 1mFanuc 15M Mat [IH] C958 12Fanuc 15M Krk [OT] NCQ16 16 2Fanuc 15M Krk [CGB] CT73 14 4Fanuc 15M HS HG400 M615 87Fanuc 15M Mts [JPL2A] CQ12 12 1więcej podobnych podstron