Haas M573.85.txt

(20 KB) Pobierz
{Change Comments ***********************************************************}

{5/20/93
 Copied & modified: Fanuc 10M M008.81.2
 For: Haas Automation
 Combined OpToolID and ToolChng on one block at FirstOperation and NewTool.
 Combined WFOStuff Speed SpinOn AbsOrInc Rapid StrtPos and OfstOn on one block at FirstOperation,
  NewTool and SameTool.
 Added CkCRC sub to cancel CutterRadiusCompensation on LastFeature of ToolPath.
 Added literal 'G74' for Left-Handed Tapping at Drilling.
 Moved Canned Drill Cycle Block to Main Program when Repeats = TRUE at Drilling.
  Main program will output the Canned Drill Cycle, and the SubPrograms will contain only the
   positions from the second feature on.
DWB}

{8/2/93
 Modified: Haas M573.81.2
 For: Haas Automation
 Changes made per visit with Harold Moon at Haas Automation.
 Added ProgramName$ to SubID block at StartSub.
 Added blank lines between subs.
 Deleted RepLab OnePart at OpenMP.
 Moved Rapid, Feed and Connect Commands to be output in front of AbsOrInc on same block.
 Deleted colons from all Comments.
 Deleted Spaces following '(, and preceeding )' from ProgramNameComment at FirstOperation.
 Changed Seq to 'N' Tool# EOL at FirstOperation and NewTool, output on block by itself.
 Changed Safe Start block from G17G80G40 to G0G90G54G40G80G17 at FirstOperation and NewTool.
 Changed StrtPos block from WFOStuff Speed SpinOn AbsOrInc Rapid StrtPos OfstOn to
  Rapid AbsOrInc WFOStuff StrtPos Speed SpinOn at FirstOperation and NewTool.
 Added PlaneC to StrtPos block at NewTool.
 Moved OfstOn to beginning of CoolOn block at FirstOperation and NewTool.
 Changed WFOStuff PlaneC AbsOrInc Rapid to Rapid AbsOrInc WFOStuff PlaneC at SameTool StrtPos block.
 Added IF RetractToCP1 boolean at SameTool.
  This is to force output of ZCP1 or ZCP2 for Drilling.
 Changed RapidC ZCP3C to Rapid ZCP3 at Drilling.
 Moved 'G80' to Rapid ZCP3 at Drilling.
 Added literal 'M19', Spindle Orient, at OfstOff block at end of Prog.
 Added MasterOp/CallMasterOp PostScript Command support for Drilling.
  Routines have been added to call previously created subroutines.
  Added MasterOpF and CallMasterOpF at PSInit.
  Added PostScript Comments regarding MasterOp and CallMasterOp Commands.
  Added support of MasterOp and CallMasterOp Commands at Drilling.
  Added FORMAT for Recall# to output called sub.
DWB}

{10/22/96
 Updated & Modified: Haas M573.81.3
 Created: Haas M573.85
 For: Haas Automation
 Versions: ncCad 4.33.02/ncCAM 4.33.01/ncPost 4.33.10/Compost 4.21.37/v1.0b3
 Changes made per visit with Mike at Haas Automation.
 Updated for Catalyst v3.09C per Fanuc 6M M001.85 Format.
 Changed FORMAT#2 from '###.###;0.' to '###.###;0' at Prog Numeric Format Definitions.
 Changed FORMAT#3 from '*###.###;0.' to '*###.###;0' at Prog Numeric Format Definitions.
 Changed FORMAT#4 from '####.####;0.' to '####.####;0' at Prog Numeric Format Definitions.
 Added DoToolComment sub.
  Contains ToolComment from DoOpComments sub.
  Called from OpToolID ToolChng block at FirstOperation and NewTool.
 Added DoProgramComment sub.
  Called at StartSub.
 Added FeedEntC for SameTool Operations at EntryMove sub.
 Commented out ResetCRCNum at ToolPath sub.
  Customer only wants it output when it changes.
 Added condition at DoOpComments for partial output only at FirstOperation or NewTool.
 Added CkCoolOff sub.
  Outputs CoolOff at ZCP3 when needed.
  Called at end of IF Milling and IF Drilling.
 Moved SafeStart block prior to 'N' Tool# EOL block at FirstOperation.
 Added condition to output CoolOn in Sub for MultipleParts OneToolAllParts ExitClearancePlane at
  FirstOperation and NewTool.
   Due to CoolOff at ZCP3, it is necessary to make sure that CoolOn is output for additional
    parts.
 Deleted CoolOff at NewTool, SameTool and end of Prog.
 Added 'M19', Spindle Orient at OfstOff block at NewTool and end of Prog.
 Deleted SpinOff at NewTool and end of Prog.
 Added blank line prior to 'N' Tool# EOL block at NewTool.
 Deleted SafeStart block at NewTool.
 Added PlaneC to StrtPos block at NewTool.
 Changed Rapid to RapidC three places at SameTool.
 Deleted AbsoOrInc three places at SameTool.
 Added 'G28Y0', Bring Table Forward, prior to EOP block at end of Prog.
DWB}

{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(TrackZNO#,4)
FORMAT(CallMasterNum#,5)
FORMAT(Recall#,5)
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 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# ' )' EOL
	END
RETURN

DoOpComments:
	IF UseComments?
		SetScale('1')
		IF FirstOperation? OR NewTool?
			IF OperationIDComment?
				'( OPERATION ' Operation# ' ' OperationType$ ' )' EOL
			END
		END
		IF OperationComment?
			'( ' OperationComment$ ' )' EOL
		END
		IF FirstOperation? OR NewTool?
			IF WorkGroupComment?
				'( ' WorkGroupComment$ ' )' EOL
			END
			IF ToolTypeComment?
				'( TOOL ' Tool# ' ' ToolDiameter# ' ' ToolType$ ' )' EOL
			END
		END
		RestoreScale
	END
RETURN

DoToolComment:
	IF UseComments?
		SetScale('1')
		IF ToolComment?
			'( ' ToolComment$ ' )' EOL
		END
		RestoreScale
	END
RETURN

DoProgramComment:
	IF UseComments?
		IF ProgramNameComment?
			'(' ProgramName$ ')'
		END
	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

EntryMove:
	IF FeedEntry?
		IF FirstOperation? OR NewTool?
			SeqC Feed ZIn FeedEnt EOL
		ELSE
			SeqC Feed ZIn FeedEntC EOL
		END
	ELSE
		SeqC RapidC ZIn EOL
	END
RETURN

StartSub:
	OpenSub
	' ' EOL
	SubID DoProgramComment EOL
	DoSubComment
RETURN

SubWarning:
	IF NOT FeedConnect?
		IF AnyZshift?
			' ' EOL
			'( WARNING   Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT )' EOL
			' ' EOL
		END
	END
RETURN

StdSub:
	SeqC SubCall CallLab RepLab RepCycs EOL
	StartSub
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

FinishSubG92: {part 2}
	SeqC Preset ShiftRC EOL
	SeqC EndSub EOL
	CloseSub
	SeqC Preset UnshftRC EOL
RETURN

OpenMP:
	NewProg
	IF WorkFixtureOffsets?
		NewWFO
		EachWFO {simple eachPart}
			SeqC SetWFO EOL
			SeqC SubCall CallLab EOL
			IncWFO
		NextWFO {simple NextPart}
	ELSE
		SeqC SubCall CallLab RepLab Parts 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

DoAbsOrInc:
	IF Flag?('1') AND AbsoluteMoves?
		IF ZMove? AND Flag?('3') { AbsValue? }
			SetFlagF('3')
			IncValue
		ELSE
			IF NOT ZMove? AND NOT Flag?('3') { NOT AbsValue? }
				SetFlag('3')
				AbsValue
			END
		END
	END
RETURN

DoDrillAbsOrInc:
	IF Flag?('1') AND AbsoluteMoves?
		IF SPZMove? AND Flag?('3') { AbsValue? }
			SetFlagF('3')
			IncValue
		ELSE
			IF NOT SPZMove? AND NOT Flag?('3') { NOT AbsValue? }
				SetFlag('3')
				AbsValue
			END
		END
	END
RETURN

RestoreAbsOrInc:
	IF Flag?('1') AND AbsoluteMoves? AND NOT Flag?('3') { NOT AbsValue? }
		SetFlag('3')
		SeqC 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?
			SetFlag('2') { CRCOffsetC }
			CRCOnC
		END
	END
RETURN

FormatLine:
	DoAbsOrInc ckCRC FeedC MoveXYZC
RETURN

ckCRCNum:
	IF Flag?('2')
		SetFlagF('2')
		CRCOffsetC
	END
RETURN

ToolPath:
	{ResetCRCNum}
	EACHFeat
		IF PointFeat?
			IF AutoCycle?
				SeqC MoveSXYC EOL
				SeqC SubCall CallLab EOL
				CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
			ELSE
				SeqC DoDrillAbsOrInc MoveSXYZC EOL {.80.01}
			END
		ELSE
			IF RapidFeat?
				IF XMove? OR YMove? OR ZMove?
					SeqC DoAbsOrInc ckCRC RapidC MoveXYZC ckCRCNum EOL
				END
			ELSE
				IF LineFeat?
					IF XMove? OR YMove? OR ZMove?
						IF Decelerate?
							IF RoomToDecel?
								DecelMove1
								SeqC FormatLine FeedRateC ckCRCNum EOL
								DecelMove2
							END
							SeqC FormatLine DecelFeed ckCRCNum EOL
						ELSE
							SeqC FormatLine FeedRateC ckCRCNum EOL
						END
					END
				ELSE
					IF ArcFeat?
						EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
							IF LastQuadrant? AND...
Zgłoś jeśli naruszono regulamin