Cin Acr 850SX [D&H] CY84.15m.txt

(22 KB) Pobierz
{Prog Comments ****}

{
	10/21/94	[cwh]
	M689.82
	
	Updated to new post prog format.

	11/29/94	[ws]
	Cin Acr A2100 M689.82.02	( from M689.82.01 )

	Modified so 'W'  value posted on all drill lines based on "W = zretract - top surface"
	Modified drilling 'R' value to be top surface via CalcZSurf#

	11/30/94	[ws]		
	Cin Acr A2100 M689.82.03	( from M689.82.02 )

	Modified G80 line to include a 'R' value where R = zretract.

	1/3/95	[ws]		
	Cin Acr A2100 M689.82.04	( from M689.82.03 )

	Modified so 'Z' value for drilling is calculated as "Z = Tip Depth - Top Surface"
	Modified so when using Post Script command for coolant change coolant reset back to the original

	2/15/95	[ws]		
	Cin Acr A2100 M689.82.05	( from M689.82.04 )

	Modified so output H word is not on a line by itself. (affects how MP NC code is output) 
}

{
	Format: Cin Acr 850SX Sabre C689.82.06
	5/23/95
	Upgraded to C Style Adv Mill post
	Added functions to make all rotations incremental in a CW direction
	Added functions to handle clamps if rotary motion
TH}

{ 8/29/95 - Updated to .10 format - TH}

{9/15/95 - Updated to include rigid tap changes made to M style post. - TH}

{
	Format: Cin Acr 850SX Sabre C689.10.02
	10/24/95
	Added MSG, to DoCSWFOComment
TH}

{1/17/96, Updated .10 to .11 version, MPK}
{3/22/96,
	Initial: Cin Acr 850SX Sabre C689.11
	Created: Cin Acr 850SX Sabre CXXX.11
	Put AbsOrInc at beginning of FormatArc sub on its own line (850SX control gave an error for
	helixes otherwise, added M60 before EOP at program end. MPK}
{3/25/96,
	Initial: Cin Acr 850SX Sabre C966.11
	Created: Cin Acr 850SX Sabre C966.12
	Undid previous move of AbsOrInc on FormatArc sub.
	Tested ZOnlyRepAutoCycle, incremented # to .12, removed all RestoreAbsOrInc, added RestoreAbsOrInc 
	before Return in ToolPath. Changed position of DoAbsOrInc as per Fanuc 6M M001.12, MPK}
{4/22/96, 
	Initial: Cin Acr 850SX [D&H] C966.12
	Created: Cin Acr 850SX [D&H] C966.12.1
	Added a move to home before first tool call, added M26 (Z full up) before all moves to home, corrected OpenMP
	sub by adding two lines to  output SP, spindle speed, and coolant on for equally spaced multiple parts, removed move to 
	home at end of program, removed M52 at end of program, MPK}
{5/20/96.
	Initial: Cin Acr 850SX [D&H] C966.12.1
	Created: Cin Acr 850SX [D&H] C966.12.2
	Eliminated tagging from post, now uses Program# instead. Changed remaining SubCall and EndSub commands to
	literals of the CMI commmands. Post formerly did not do multiple parts, One Tool all Parts, full up; added support for 
	this by adding M26 and StrtPos at the end of G92 Mulitple parts subs in the case of equally spaced offsets and M26
	with StrtPos after the WFO call for work fixture offsets. IMPORTANT: Multiple parts only works with 
	workfixture offsets if WFOCS? is true. MPK}
{7/3/96,
	Added NotSameToolWFO to FirstOp3b, deleted call to NotSameToolWFO in NoMPs, in NotSameToolWFO
	changed change 'H' NewWFO# to CSWFO when IF CahngeCS? is false, put DoCSWFOComment after CSWFO 
	call in NotSameToolWFO, deleted sequence label before CSWFO in NotSameToolWFO when IF CSWFO is true, MPK}

{7/16/96,
	Initial: Cin Acr 850SX [D&H] C966.12.3
	Created: Cin Acr 850SX [D&H] C966.12.4
	Added ResetCool To DoCool sub and added AND NOT CoolOff? to IF ThruSpin? boolean, MPK}

{2/10/97,
	Initial: Cin Acr 850SX [D&H] C966.12.4
	Created: Cin Acr 850SX [D&H] C966.12.5
	Formatted FeedTapIPR# with format #4, MPK}

{3/21/97, made metric version, MPK}

{4/22/97
	Initial: Cin Acr 850SX [D&H] C966.12.5m
	Created: Cin Acr 850SX [D&H] C966.15m
	ForUser: D&H
	Develop: ComPost2 68K 1.0b11, CatalystPPC v3.33C
	Comment: Changed to NoSubs output per Fanuc 6M NoSubs C877.15
Jim Radcliffe}

{Prog Numeric Format Definitions ****}

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(CSOffsetA#,2)
FORMAT(CSOffsetB#,2)
FORMAT(ADD#,4)
FORMAT(SUB#,4)
FORMAT(ClearancePlane1#,4)
FORMAT(ClearancePlane2#,4)
FORMAT(CalcZSurf#,4)
FORMAT(FeedTapIPR#,4)
FORMAT(ToolDiameter#,4)
FORMAT(CSOffsetX#,4)
FORMAT(CSOffsetY#,4)
FORMAT(CSOffsetZ#,4)
FORMAT(TrackZNO#,4)
FORMAT(CS#,5)
FORMAT(Tag#,5)
FORMAT(Program#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
FORMAT(RapidF#,7)
FORMAT(HelixPitch#,8)

{Command Subroutines ****}

AbsValueC:
	IF NOT AbsValue?
		AbsValue
	END
RETURN

IncValueC:
	IF AbsValue?
		IncValue
	END
RETURN

AbsOrIncC:
	IF AbsoluteMoves?
		AbsValueC
	ELSE
		IncValueC
	END
RETURN

DoCoolOn:
	ResetCool
	IF ThruSpin? AND NOT CoolOff?
		'M27'
	ELSE
		CoolOn
	END
RETURN

{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

CSWFO:
	'H' ADD# ADD# CS# MUL# NumOfCS# SUB# PartNum# Num#('1') Num#('0')
RETURN

WFOStuff:
	IF WFOCS?
		IF FirstOperation? OR NewTool? OR ChangeCS?
			CSWFO
		END
		ClearCSOffset
	ELSE
		IF NOT SameTool?
			IF MultipleParts?
				IF WorkFixtureOffsets?
					'H' ADD# PartNum# Num#('0')
				ELSE
					IF FirstPart?
						'H1'
					END
				END
			ELSE
				'H1'
			END
		END
	END
RETURN

DoSubComment:
	IF UseComments? AND SubComment?
		'(MSG, CYCLE START )' EOL
	END
RETURN

DoCSComment:
	IF AAxisAvail? OR BAxisAvail?
		'(MSG, CS#' CS# ' - ' CSComment$ ' )' EOL
	END
RETURN

DoCSWFOComment:
	IF AAxisAvail? OR BAxisAvail?
		'(MSG, ' CSWFO ' = X' CSOffsetX# ' Y' CSOffsetY# ' Z' CSOffsetZ# ' )' EOL
	END
RETURN

CSComments:
	IF FirstOperation? OR NewTool? OR ChangeCS?
		DoCSComment
		IF WFOCS?
			DoCSWFOComment
		END
	END
RETURN

DoOpComments:
	IF UseComments?
		SetScale('1')
		IF MultipleParts? AND SubComment?
			'(MSG, PART ' Tag# ' )' EOL
		END
		IF OperationIDComment?
			'(MSG, OPERATION ' Operation# ': ' OperationType$ ' )' EOL
		END
		IF OperationComment?
			'(MSG, ' OperationComment$ ' )' EOL
		END
		IF WorkGroupComment?
			'(MSG, ' WorkGroupComment$ ' )' EOL
		END
		IF ToolTypeComment?
			'(MSG, TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
		END
		IF ToolComment?
			'(MSG, ' ToolComment$ ' )' EOL
		END
		RestoreScale
	END
	CSComments
RETURN

CSAngleA:
	IF AAxisAvail?
		'A'
		IF LessThan? SUB# Recall# Num#('4') CSOffsetA# NUM#('0')
			ADD# NUM#('360') SUB# Recall# Num#('4') CSOffsetA#
		ELSE
			SUB# Recall# Num#('4') CSOffsetA#
		END
		Save# Num#('4') CSOffsetA#
	END
RETURN

CSAngleAC:
	IF Flag?('4')
		CSAngleA
	END
RETURN

CSAngleB:
	IF BAxisAvail?
		'B'
		IF LessThan? SUB# Recall# Num#('5') CSOffsetB# NUM#('0')
			ADD# NUM#('360') SUB# Recall# Num#('5') CSOffsetB#
		ELSE
			SUB# Recall# Num#('5') CSOffsetB#
		END
		Save# Num#('5') CSOffsetB#
	END
RETURN

CSAngleBC:
	IF Flag?('5')
		CSAngleB
	END
RETURN

ChkABMove:
	IF NotEqual? Recall# Num#('4') CSOffsetA#
		SetFlag('4')
		SetFlag('6')
		IncValueC
	ELSE
		IF NotEqual? Recall# Num#('5') CSOffsetB#
			SetFlag('5')
			SetFlag('6')
			IncValueC
		END
	END
RETURN

ChkClamp:
	IF Flag?('6')
		SetFlagF('4')
		SetFlagF('5')
		SetFlagF('6')
		'M10'
	END
RETURN

PSInit:
	NewWFOF
	FourthCWF
	FourthCCWF
	FifthCWF
	FifthCCWF
	RotateF
	OptCyc1F
	ResetCool
	MasterOpF
	CallMasterOpF
RETURN

PSStuff:
RETURN

DoPostScript:
	PSInit
	EachPS
		SeqLabC PostScript EOL
		PSStuff
	NextPS
RETURN

DoEndOpPS:
	PSInit
	EachEOPS
		SeqLabC EndOpPS EOL
		PSStuff
	NextPS
RETURN

ExitType:
	IF FIFO?
		FeedC
	ELSE
		RapidC
	END
RETURN

ExitFeed:
	IF FIFO?
		FeedEntC
	END
RETURN

ckHMove:
	SetStatusOff
	SetFlagF('9')
	IF YZPlane?
		IF NotEqual? SUB# SPY# ArcI# SUB# ArcI# EPY#
			SetFlag('9')
		END
	ELSE
		IF NotEqual? SUB# SPX# ArcI# SUB# ArcI# EPX#
			SetFlag('9')
		END
	END
	SetStatusOn
RETURN

ckVMove:
	SetStatusOff
	SetFlagF('9')
	IF XYPlane?
		IF NotEqual? SUB# SPY# ArcJ# SUB# ArcJ# EPY#
			SetFlag('9')
		END
	ELSE
		IF NotEqual? SUB# SPZ# ArcJ# SUB# ArcJ# EPZ#
			SetFlag('9')
		END
	END
	SetStatusOn
RETURN

ckMove:
	IF NOT FullArc?
		IF XYPlane? AND NOT ZMove?
			IF NOT XMove?
				ckVMove
			ELSE
				IF NOT YMove?
					ckHMove
				END
			END
		ELSE
			IF XZPlane? AND NOT YMove?
				IF NOT XMove?
					ckVMove
				ELSE
					IF NOT ZMove?
						ckHMove
					END
				END
			ELSE
				IF YZPlane? AND NOT XMove?
					IF NOT YMove?
						ckVMove
					ELSE
						IF NOT ZMove?
							ckHMove
						END
					END
				END
			END
		END
	END
RETURN

FormatArc:
	IF ArcCW?
		CWArcC
	ELSE
		CCWArcC
	END
	IF XYPlane?
		IF ZMove?
			MoveX MoveY MoveZ ArcIJ 'K' HelixPitch#
		ELSE
			MoveX MoveY ArcIJ
		END
	ELSE
	{ ??? what about incr subs here ??? }
		IF XZPlane?
			IF YMove?
				MoveX MoveY MoveZ ArcIJ 'J' HelixPitch#
			ELSE
				MoveX MoveZ ArcIJ
			END
		ELSE { YZPlane }
			IF XMove?
				MoveX MoveY MoveZ ArcIJ 'I' HelixPitch#
			ELSE
				MoveY MoveZ ArcIJ
			END
		END
	{ ??? }
	END
RETURN

ckCRC:
	IF LastFeat?
		CRCOffC
	ELSE
		IF NOT ZMove?
			CRCOnC
		END
	END
RETURN

ckCRCNum:
	IF NOT LastFeat? AND Equal? SPZ# EPZ#
		{CRCOffsetC}
	END
RETURN

StdRapid:
	IF XMove? OR YMove? OR ZMove?
		SeqLabC ckCRC RapidC MoveXYZC ckCRCNum EOL
	END
RETURN

StdLine: {enables CRC on first call, .70}
	IF XMove? OR YMove? OR ZMove?
		IF Decelerate?
			IF RoomToDecel?
				DecelMove1
				SeqLabC ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL
				DecelMove2
			END
			SeqLabC ckCRC FeedC MoveXYZC Decel...
Zgłoś jeśli naruszono regulamin