Mazatrol M32 Mazak PM368.17.3.txt

(25 KB) Pobierz
{
MILL=T
LATHE=F
SIMPLE_ROT_POS=T
ROTARY_MILL=F
ADV_MILL=F
SUBS=T
MILLTURN_Y-AXIS=F
METRIC=F
}

{Change Comments ***********************************************************}

{1/3/89
 Copied & modified Fanuc 10M M008.54 for R.C.H. Eng.
 Machine is a Mazak VQC 20/40A with Mazatrol M-2 control.
 Calling the OpToolID cancels the offset & sends Z home &
 puts the tool in the spindle & calls the length offset.
 Replaced OfstOff with OpToolID or UnTool at end of prog
 so first tool is in spindle at prog start.
 Added GearRange. Deleted tool changes & length offset calls.
 Deleted Home & SpinOff commands
 Put ZCP1 and CoolOn on StrtPos line.
 Changed sequence numbers to 3 fixed places.
 Jim Radcliffe}

{3/6/89
 Modified; Mazatrol M2 Mazak M162.55, for RCH Eng.
 Add 'G92Z0.' to end of Prog.
 Jim Radcliffe}

{5/23/90, corrected tool call for for multiple parts full up, see above notes, JR}
{5/23/90, Updated: Mazatrol M2 Mazak M162.56  to .72.1 format, JR}
{7/24/90, Replaced all occurances of SetSRXYZero with SetSRXYtoSP, DWB}
{12/12/90, Updated: Mazatrol M2 Mazak M162.73  to .76.1 format, JR}

{12/12/90
 Copied & modified: Mazatrol M2 Mazak M162.76.1
 For: Precision Machine
 Control: Mazatrol M-32
 Move ProgramComment & TimeComment to Before EOR code at beginning of prog.
 Add AbsOrInc to beginning of prog.
 Move WFOStuff to StrtPos line.
 First tool not in spindle format.
 Deleted GearRange.
 Deleted ZCP1 from StrtPos line & added OfstOn.
 Move coolant to OfstOn line.
 Changed length offset cancel to typical stuff.
 Put CRCOff on line by itself after Z move unless AutoCycle.
 Add tool change positions 'G28X0Y0'.
 Delete UnTool from end of prog.
 Added PreTool.
 Changed Tapping feed to IPR.
Jim Radcliffe}

{4/3/91
 Modified: Mazatrol M-32 Mazak M368.76
 For: Gibbs & Associates
 Updated to Version 4.0 per Fanuc 6M M001.80 Format.
DWB}

{6/3/91
 Modified: Mazatrol M-32 Mazak M368.79
 For: Precision Machine
 Changed EOR at beginning of program to '='.
 Suppress custom ProgramComment & TimeComment before '=' when UseComments? is false.
 Modified Saftey Start & Tool Change blocks at beginning of each tool.
Jim Radcliffe}

{10/31/91
 Modified: Mazatrol M-32 Mazak M368.79.1
 For: Precision Machine
 Added ResetCRCNum at beginning of Toolpath to correctly set cutter comp number.
Kim Michelman}

{1/3/92
 Modified: Mazatrol M-32 Mazak M368.79.2
 For: Precision Machine
 Deleted date and time line prior to the ProgID1 per customer request.
Kim Michelman}

{12/22/94
 Updated: Mazatrol M-32 Mazak M368.79.3
 For: Gibbs & Associates/ASKO
 Versions: ncCad 4.33/ncCAM 4.33/ncPost 4.33.04/Compost 4.21.23
 Changes made per Pete Jackson
 Updated to Version 4.2 per Fanuc 6M M001.81.2f Format.
  Corrected FORMAT5 from '########;0' to '#######0'.
  Corrected FORMAT6 for Dwell# from '####^###;' to '####^##0'.
  Added RestoreScale Sub per 4-Axis Post Processor.
  Moved UnSkipZ from FinishSub1 to ZOnlyRep where SkipZ is set.
  Added FIFO? at FinishSub1, AutoCycCutSub2, ZonlyRepAutoCycle subs and end of IF Milling.
  Added CkCRC sub for CRCOffC per version 4.2.
   CutterRadiusCompensation ExitLength will output G40 on LastFeat AND LineFeat at StdLine sub.
   Added logic to output CRCOnC in OneFeat ToolPath.
   Added logic to suppress output of CRCOnC on ZMove Feature.
  Added support of CRC during multiple pocket dog-bone operation.
   Added condition to output CRCOnC for XMove OR YMove only at CkCRC sub.
    Outputs G41/G42 on First LineFeat after Z Plunge.
   Modified condition to output CRCOffC for LastFeat AND AutoCycle at ToolPath RapidFeat.
    Assures that G40 is not output prior to LastFeat.
   Added CRCOffC to RapidFeat at ToolPath.
    Outputs G40 at all ZMoveOnly Feature Retract blocks.
  Deleted CRCOnC and CRCOffsetC from ToolPath ArcFeat.
  Added TrackZNO# FIRST SPZ# at IF Drilling? section to allow for conditionality of MoveSXYZC command.
DWB}

{9/27/95, Updated Mazatrol M32 Mazak M368.81.2 to .85 format per Fanuc 6M M001.85.01.03, JR}

{1/17/96, Updated .85 to .86 version, MPK}

{3/22/96, Tested ZOnlyRepAutoCycle, Changed version # to .89, MPK}

{2/4/99
	Initail: Mazatrol M32 Mazak M368.89
	Created: Mazatrol M32 Mazak PM368.17.3
	Comments: created simple 4th positioning post per Fanuc 6M PM001.17.3
MPK}

{Prog Numeric Format Definitions *******************************************}

#1 = '#.00'
#2 = '#####.###;0.'
#3 = '*#####.###;0.'
#4 = '####.####;0.'
#5 = '#######0'
#6 = '####^##0'
#7 = '#'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(TrackC#,3)
FORMAT(TrackCNO#,3)
FORMAT(MoveC#,3)
FORMAT(UnitAngle#,3)
FORMAT(Recall#,4)
FORMAT(ADD#,4)
FORMAT(ToolDiameter#,4)
FORMAT(TrackXNO#,4)
FORMAT(TrackYNO#,4)
FORMAT(TrackZNO#,4)
FORMAT(FeedEntIPR#,4)
FORMAT(TRUNC#,5)
FORMAT(Program#,5)
FORMAT(Program2#,5)
FORMAT(CallMasterNum#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
FORMAT(RapidF#,7)

{Added Subroutines ****}

report:
	IF PalletIn?
		'------------------------------------' EOL
			'Num#(1) xEP = ' Recall# Num#('1') EOL
			'Num#(2) yEP = ' Recall# Num#('2') EOL
		'------------------------------------' EOL
	END
RETURN

resetSP: {update to the correct StartPos}
	IF Rotations? OR Repeats? OR AutoCycle?
		IF AbsValue?
			TrackXNO# SPX#
			TrackYNO# SPY#
		ELSE
			SetAbs
			TrackXNO# SPX#
			TrackYNO# SPY#
			SetInc
		END
	END
RETURN

saveEP: {save the correct EndPos}
	IF PointFeat?
		IF AutoCycle?
			SetACSPCompF
			Save# Num#('1') ADD# Recall# Num#('1') SPX#   { xOpEP }
			Save# Num#('2') ADD# Recall# Num#('2') SPY#   { yOpEP }
			SetACSPComp
		ELSE
			Save# Num#('1') SPX#   { xOpEP }
			Save# Num#('2') SPY#   { yOpEP }
		END
	ELSE
		Save# Num#('1') EPX#   { xOpEP }
		Save# Num#('2') EPY#   { yOpEP }
	END
RETURN

getEP: {save the correct EndPos}
	IF Rotations? OR Repeats? OR AutoCycle?
		IF AbsValue?
			saveEP
		ELSE
			SetAbs
			saveEP
			SetInc
		END
		report
	END
RETURN

setSRXYtoACEP:
	TrackXNO# Recall# Num#('1') { xOpEP }
	TrackYNO# Recall# Num#('2') { yOpEP }
RETURN

{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

wfo:
	'G' NewWFO#
RETURN

wfoStuff:
	IF NewWFO?
		IF MultipleParts? AND WorkFixtureOffsets?
			EOL
			'*** WARNING *** DO NOT USE NEWWFO() WITH MULTIPLE PARTS AND WORK FIXTURE OFFSETS' EOL
		ELSE
			wfo
		END
	ELSE
		IF Flag?('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
			IF NOT SameTool?
				IF MultipleParts?
					IF WorkFixtureOffsets?
						WFO1
					ELSE
						wfo
					END
				ELSE
					wfo
				END
			END
		END
	END
	SetFlagF('2') { Do not output WFO second time wfoStuff is called for MP-WFO-OTAP-ECP }
RETURN

doSubComment:
	IF UseComments? AND SubComment?
		'( SUB NUMBER: ' Program# ' )' 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

psInit:
	NewWFOF
	FourthCWF
	FourthCCWF
	RotateF
	OptCyc1F
	MasterOpF
	CallMasterOpF
	PalletInF
RETURN

psStuff:
	IF FifthCW?
		FORMAT(FifthDegree#,2)
		SeqC 'B' FifthDegree# EOL
		FifthCWF
	END
	IF FifthCCW?
		FORMAT(FifthDegree#,3)
		SeqC 'B' FifthDegree# EOL
		FifthCCWF
	END
RETURN

doPostScript:
	psInit
	EachPS
		SeqC PostScript EOL
		psStuff
	NextPS
RETURN

doEndOpPS:
	psInit
	EachEOPS
		SeqC EndOpPS EOL
		psStuff
	NextPS
RETURN

absValueC:
	IF NOT AbsValue?
		AbsValue
	END
RETURN

incValueC:
	IF AbsValue?
		IncValue
	END
RETURN

absOrIncC:
	IF AbsoluteMoves?
		absValueC
	ELSE
		incValueC
	END
RETURN

setAngleUnder360: {sets status register and machine to current rotary position between -360 and 360 deg}
	IF AAxisAvail?
		SetAbs
		IF GTEqual? MoveC# Num#('360') {reset the A-axis to be between 0 and 359.999}
			ResetAngle
			SeqC Preset 'A' TrackC# UnitAngle# EOL
		ELSE
			IF LTEqual? MoveC# Num#('-360')
				IF Equal? UnitAngle# Num#('0') {reset the A-axis to be 0}
					ResetAngle
					SeqC Preset 'A' TrackC# UnitAngle# EOL
				ELSE {reset the A-axis to be between -0.001 and -359.999}
					ResetAngle
					SeqC Preset 'A' TrackC# SUB# UnitAngle# Num#('360') EOL
				END
			END
		END
		SetInc { Because we call setAngleUnder360 right after incValueC OfstOff }
	END
RETURN

doStartPos:
	StrtPos
	IF AAxisAvail?
		CalcSCAng MoveC
	ELSE
		TrackCNO# Num#('0')
	END
RETURN

entryMove:
	IF FirstOperation? OR NewTool?
		RapidF# { Forces FeedEnt/FeedRate }
	ELSE
		IF LAST Rotations? OR LAST Repeats?
			RapidF# { Forces FeedEnt/FeedRate }
		END
	END
	IF FeedEntry?
		SeqC Feed ZIn FeedEntC EOL
	ELSE
		SeqC RapidC ZIn EOL
	END
RETURN

startSub:
	OpenSub
	SubID 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?
		RapidC ZCP3C
	END
	EOL
RETURN

finishSubG92: {part 2}
	SeqC Preset ShiftRC EOL
	SeqC EndSub EOL
	CloseSub
	Seq...
Zgłoś jeśli naruszono regulamin