Fanuc 6M MS [PW] D953.12m.txt

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

{
	10/24/94	[cwh]
	B001.81.4	( from B001.81.3 )
	
	Made changes to ZOnlyRep and FinishSub1 subs to properly handle
		Feed connects and clearance moves.
}

{11/8/94
 Modified: Fanuc 6M (FW) B001.81.4
 For: Gibbs & Associates
 Versions: Catalyst v2.14.12C/Compost 4.21.23
 Changes made per Pete Jackson
 Charles reported a problem involving operations that do not change coordinate systems from
  previous operations.
  Added ClearCSOffset at NotSameToolWFO and SameToolWFO subs.
DWB}

{
	12/01/94
	B001.81.6
	Changed FirstOp3 to call out A0B0 to move to the first CS.
		When possible, this should be changed to check the MDD and only call out the axes that
		make sense.

	Added RecallWFO sub-routine to NotSameToolWFO and SameToolWFO to ouput the current fixture offset 
	and A0B0.  Added for easier restarts at the machine. Both are only called from NoMPs.
		When possible, this should be changed to check the MDD and only call out the axes that
		make sense.
}

{
	12/02/94
	Changed version number to .00 from .81
TH}

{
	Format: Fanuc 6M (FW) B001.00.01
	12/08/94
	Added AAxisAvail? and BAxisAvail? checks to CSAngleA and CSAngleB subs
	Added WFO1 and A0B0 if AxisAvail to End2:
TH}

{
	Format: Fanuc 6M (FW) B001.00.01
	12/09/94
	Fixed RecalWFO to check AAxisAvail? and BAxisAvail?
	Cleaned up FirstOp3 to use new checks placed in CSAngleA and CSAngleB
TH}	

{
	Format: Fanuc 6M (FW) B001.00.03
	12/19/94
	Added ClearCSOffset to OpenMP: CloseMP: and SubCSMP:
	Added if AChange? OR BChange? to home postition call-out in SameToolOp1
	Started using Flag('3') to determine toggle between incrementing through MPs and decrementing through MPs
	Changed CloseMP to check Flag('3'). If true, the WFOs will increment from first to last. If false, the WFOs will
		decrement from last to first. 
		Example:
			TRUE for 4 parts: G54P1, G54P2, G54P3, G54P4
			FALSE for 4 parts:  G54P4, G54P3, G54P2, G54P1
		This is most useful for tombstone machining on rotary tables. With this method, the code will machine part1, rotate, part2,
		rotate, part3, rotate, part4, tool change, part4, part3, part2, part1, toolchange, etc. It minimizes the rotation and also
		stops the machine from "winding up".
		To do this a new sub was created called ToggleIncDecWFO. The flag is set to true in ProgStart and toggled inside CloseMP
		after running through the parts
	Replaced SetZRepInc and RestoreAbsOrInc with one sub called DoAbsOrInc. Any line with SetZRepInc now
		has DoAbsOrInc as the first command after the SeqC.
TH}

{
	Format: Fanuc 6M (FW) B001.00.04
	1/10/95
	NewToolOp3 now has an AbsOrInc on the line that calls out the Plane 'G80' CRCOff
	NewToolOp5 no longer has the AbsOrInc command
	NewToolOp5b has been created and has the AbsOrInc command
	Changed MP1ToollAllPfu to call NewToolOp5b
	Added AbsOrInc and Rapid to the FirstOperation? section of MP1ToollAllPXcp
	Added Rapid to the NewTool? section of MP1ToollAllPXcp
	Started using Flag ('4') to turn on Inc/Dec WFO's (See above). True means use Inc/Dec WFO's.
	MP1ToollAllPXcp, MP1ToollAllPFU, and MPallTools1P now output WFO if NOT WorkFixtureOffsets?
TH}

{
	Format: Fanuc 6M (FW) B001.00.05
	1/13/95
	Replaced TrackZNO# ZDepth# with TrackZNO# FIRST SPZ# in the drilling section
	Formatted TrackZNO# to #4
}

{
	Format: Fanuc 6M (FW) B001.00.06
	2/15/95
	Fixed RecallWFO: to output correct WFO# if WFOCS
TH}

{	Added ClearCSOffset to SubCSMP		TH}

{
	Format: Fanuc 6M (FW) B001.10
	7/27/95
	Added G52 style output for too many coordinate systems
	Updated to .10 format
TH}

{1/17/96, Updated .10 to .11 version, MPK}

{2/26/96
	Initial: Fanuc 6M (FW) B001.11
	Created: Fanuc 6M (FW) B001.11.01
	Develop: ComPost 4.21.34, Catalyst68K v3.02.02C
	Comment: Corrections to Processor.
		Corrected format of CSOffsetA# and CSOffsetB#.
		To correct multiple parts output:
			Added "OR Flag?('2')" to "IF WFOCS?" in "SubCSMP:".
		To Simplify prog subs and correct errors in MP1ToollAllPXcp:
			Changed FirstOp3a/NewToolOp5a to FirstOp4/NewToolOp6
			Deleted NewToolOp5b sub and changed call to NewToolOp5 (they were identical!)
			Deleted OfstOn and Cool On from FirstOp3/NewToolOp5
			Added calls to FirstOp4/NewToolOp6 after calls to FirstOp3/NewToolOp5.
			Changed StrtPos in MP1ToollAllPXcp to FirstOp3/NewToolOp5.
		To correct a literal number 2 from being output when processing multiple parts:
			Changed order of booleans from:
				IF WFOCS? OR Flag?('2')
			to:
				IF Flag?('2') OR WFOCS?
		Modified WFO Handling:
			Changes:
				Deleted RecallWFO sub.  It was not used!
				Deleted NotSameToolWFO & SameToolWFO subs.
				Added WFOStuff sub.
				Changed all WFO calls in main loops to WFOStuff.
			Results:
				Changes do not effect Multiple Parts output.
				Correct WFO is output by default at the beginning of each tool.
				G52, if used,  is output by default at the beginning of each tool.
				G52, without WFO, is output at SameTool only if there is a change.
Jim Radcliffe}

{3/1/96
	Initial: Fanuc 6M (FW) B001.11.01
	Created: Fanuc 6M MS [PW] Dxxx.11.01
	ForUser: Petroline Wireling
	Control: Fanuc 15M ??   /    Moric-M6Y ??
	Machine: Mori Seiki MV65/50  with Niken 4th&5th axis
	Develop: ComPost 4.21.34, Catalyst68K v3.02.02C
	Comment: New Processor per example readout and instructions.
		This should be a good rough first draft to get a marked up readout to fine tune!
Jim Radcliffe}

{3/4/96, Created metric version, R Format Arcs, JR}

{3/25/96, Tested ZOnlyRepAutoCycle, Changed version # to .12, MPK}

{Prog Numeric Format Definitions ****}

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(CSOffsetA#,3)
FORMAT(CSOffsetB#,3)
FORMAT(ToolDiameter#,4)
FORMAT(CSOffsetX#,4)
FORMAT(CSOffsetY#,4)
FORMAT(CSOffsetZ#,4)
FORMAT(TrackZNO#,4)
FORMAT(Program#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(ADD#,5)
FORMAT(CS#,5)
FORMAT(Parts#,5)
FORMAT(CallMasterNum#,5)
FORMAT(Dwell#,6)

{Prog Subroutines ****}

RestoreScale:
	IF NOT Metric? {CAM file is in English, tools and tool path}
		SetScale('25.4') { change to Metric, this is an Metric post}
	END
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
		RestoreScale
	END
RETURN

CSWFO:
	'G' ADD# CS# SUB# NewWFO# Num#('1')
RETURN

CalcCSWFO: {(iPart-1)*NumOfCS#)}
	'G' ADD# MUL# NumOfCS# SUB# PartNum# Num#('1') ADD# CS# SUB# NewWFO# Num#('1')
RETURN

CSAngleA:
	IF AAxisAvail?
		SeqC 'M11' EOL
		SeqC 'A' CSOffsetA# EOL
		SeqC 'M10' EOL
	END
RETURN

CSAngleAC:
	IF AChange?
		CSAngleA
	END
RETURN

CSAngleB:
	IF BAxisAvail?
		SeqC 'M69' EOL
		SeqC 'B' CSOffsetB# EOL
		SeqC 'M68' EOL
	END
RETURN

CSAngleBC:
	IF BChange?
		CSAngleB
	END
RETURN

DoCSWFOComment:
	'( CS#' CS# ' - ' CSComment$ ' )' EOL
	'( ' CalcCSWFO '= X' CSOffsetX# ' Y' CSOffsetY# ' Z' CSOffsetZ# ' )' EOL
RETURN

DoCSG52Comment:
	'( CS#' CS# ' - ' CSComment$ ' )' EOL
RETURN

PSInit:
	MasterOpF
	CallMasterOpF
RETURN

PSStuff:
RETURN

DoPostScript:
	PSInit
	EachPS
		SeqC PostScript EOL
		PSStuff
	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
	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?
		IF AutoCycle?
			ZCP3C
		ELSE
			IF FIFO?
				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

ToggleIncDecWFO:
	IF Flag?('3')
		SetFlagF('3')
	ELSE
		SetFlag('3')
	END
RETURN

OpenMP:
	IF Flag?('2') OR WFOCS?
		NewProg
		StartSub
		SaveCSProg
		SaveCSOpStart
		ClearCSOffset
	ELSE
		NewProg
		IF WorkFixtureOffsets?
			NewWFO
			EachWFO {simple eachPart}
				SeqC SetWFO EOL
				SeqC SubCall CallLab RepLab OnePart EOL
				IncWFO
			NextWFO {simple NextPart}
		ELSE
			SeqC SubCall CallLab RepLab Parts EOL
		END
		StartSub
	END
RETURN

CloseMP:
	IF Flag?('2') OR WFOCS?
		SeqC EndSub EOL
		CloseSub
		IF Flag?('3')
			NewWFO
			EachWFO {simple eachPart}
				IF Flag?('2')
					SeqC SetWFO EOL
					EachCSOp
						DoCSG52Comment
						ClearCSOffset
						SeqC 'G52X' CSOffsetX# 'Y' CSOffsetY# 'Z' CSOffsetZ# EOL
						SeqC SubCall CallLabB CSSubID# RepLab OnePart EOL
					NextCSOp
				ELSE
					EachCSOp
						DoCSWFOComment
						ClearCSOffset
						SeqC CalcCSWFO EOL
						SeqC SubCall CallLabB CSSubID# RepLab OnePart EOL
					NextCSOp
				END
				ClearCSOffset
				IncWFO
			NextWFO {simple NextPart}
		ELSE
			LastWFO
			EachWFO {simple eachPart}
				IF Flag?('2')
					SeqC SetWFO EOL
					EachCSOp
						DoCSG52Comment
						ClearCSOffset
						SeqC 'G52X' CSOffsetX# 'Y' CSOffsetY# 'Z' CSOffsetZ# EOL
						SeqC SubCall CallLabB CSSubID# RepLab OnePart ...
Zgłoś jeśli naruszono regulamin