Fanuc 15M MTS [ABE] CV14.12m.txt

(26 KB) Pobierz
{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}

{
	Format: Fanuc 15M Matsuura M695.81.4
	Upgraded to C Style post per C001.05
TH}

{	Added ClearCSOffset to SubCSMP		TH}

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

{2/12/96, Updated .10 number to .11, no changes necessary, MPK}

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

{2/23/98,
	Initial :	Fanuc 15M Matsuura C695.12m
	Created:	Fanuc 15M MTS [ABE] CV12.12m for Mitsui Seiki
	Customer:	Industri AB Elos, Sweden

	***********                                                             ***********
	**** CUSTOM CHANGES TO SUB'S. ALL SUB'S ARE IN ONE SUB NUMBER AND 2nd, 3rd ETC ****
	**** SUB'S ARE IDENTIFY WITH BLOCK NUMBER 'N', ENDED WITH GOTO 9999 AND CALLED ****
	**** WITH GOTO #1. CHANGES MADE ONLY WHEN FIXTURE OFFSET ARE BEING USED.       ****
	***********                                                             ***********

	Changes to "Form":

	1. Under Defaut Formats, added format ####.# to F. 

	Changes to "Prog":

	1. Removed NewProg from ZonlyRep sub-routine.
	2. Changed Seq to SeqC in two places (FirstOp1 & NewTool3).
	3. Added to OpenToolMP a block #1=Program# and removed IF WorkFixtureOffsets? check.
	4. Added Flag('2') to flag the 1st sub call and definition. Setting the flag to False
	   after the first sub definition at the end of StartSub.
	5. Added saving the 1st program number (SaveProgNum2) and added FORMAT for Program2#.
	6. Changes to StartSub to output GOTO #1 and 'N'Program# for the 1st sub and 'N'Program#
	   to the 2nd and all consecutive sub calls.
	7. Changed all EndSub (M99) to GOTO 9999.
	8. Added to End3 to close all the subs with a N9999 M99 line.
	9. Changed the Max number of Fixture Offset to 48.
	10. Changed fixture offset and sub call from one block into two (2 places).
	11. Changed the sub call number to be Program2# in CloseMP sub routine.
	12. Changed SetMaxFeed to 2500.
JHE}


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

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ToolDiameter#,4)    {.72}
FORMAT(Program#,5)         {.72}
FORMAT(Program2#,5)        {Added - JHE}
FORMAT(Operation#,5)       {.72}
FORMAT(Tool#,5)            {.72}
FORMAT(NewWFO#,5)          {.72}
FORMAT(Parts#,5)           {.72}
FORMAT(Dwell#,6)           {.72}
FORMAT(CSOffsetX#,4)
FORMAT(CSOffsetY#,4)
FORMAT(CSOffsetZ#,4)
FORMAT(CSOffsetA#,8)
FORMAT(CSOffsetB#,8)
FORMAT(TrackZNO#,4)
FORMAT(ADD#,5)
FORMAT(CS#,5)

{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

OutputWFO:
	'G54.1P' ADD# CS# SUB# NewWFO# Num#('1')
RETURN

CSWFO:
	'G54.1P' ADD# CS# SUB# NewWFO# Num#('1')
RETURN

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

CSAngleA:
	IF AAxisAvail?
		'A' CSOffsetA#
	END
RETURN

CSAngleAC:
	IF AChange?
		CSAngleA
	END
RETURN

CSAngleB:
	IF BAxisAvail?
		'B' CSOffsetB#
	END
RETURN

CSAngleBC:
	IF BChange?
		CSAngleB
	END
RETURN

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

DoPostScript:
	EachPS
		SeqC PostScript EOL {literals}
	NextPS
RETURN

DoEndOpPS:
	EachEOPS
		SeqC EndOpPS EOL
	NextPS
RETURN

EntryMove:
	IF FeedEntry?
		SeqC Feed ZIn FeedEnt EOL
	ELSE
		SeqC RapidC ZIn EOL
	END
RETURN

StartSub:
	OpenSub
	ASCII('13') EOL
	IF Flag?('2')	{1st sub}					{Added this line - JHE}
		SubID EOL								{Removed DoToolComment - JHE}
		'GOTO #1' EOL							{Added this line - JHE}
		'N' Program# DoToolComment EOL			{Added this line - JHE}
	ELSE	{2nd and all consecutive subs}		{Added - JHE}
		'N' Program# DoToolComment EOL			{Added this line - JHE}
	END
	SetFlagF('2')								{Added this line - JHE}
	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

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

OpenToolMP:
	NewProg
	IF Flag?('2')	{1st sub}				{Added this check - JHE}
		SaveProgNum2						{Added this line - JHE}
	END
	{IF WorkFixtureOffsets? OR NOT MultipleParts?}	{Removed - JHE}
	NewWFO
	EachWFO
		SeqC 'G54.1' SetWFO EOL					{Broke to 2 lines - JHE}
		'#1=' Program# EOL						{Added this line - JHE}
		SeqC SubCall CallLabB Program2# EOL		{Changed this line - JHE}
		IncWFO
		SetLineStrtChr('/')
	NextWFO
	SetLineStrtChr('')
	NewWFO
	StartSub
RETURN

CloseToolMP:
	IF WorkFixtureOffsets? OR NOT MultipleParts?
		SeqC 'GOTO 9999' EOL				{Changed from EndSub - JHE}
		CloseSub
	ELSE
		SeqC Preset ShiftPC EOL
		SeqC 'GOTO 9999' EOL				{Changed from EndSub - JHE}
		CloseSub
		SeqC Preset UnshftPC EOL
	END
RETURN

OpenMP:
	IF WFOCS?
		NewProg
		IF Flag?('2')	{1st sub}		{Added this check - JHE}
			SaveProgNum2				{Added this line - JHE}
		END
		StartSub
		SaveCSProg
		SaveCSOpStart
		ClearCSOffset
	ELSE
		NewProg
		IF WorkFixtureOffsets? OR NOT MultipleParts?
			NewWFO
			EachWFO
				SeqC 'G54.1' SetWFO EOL				{Broke to 2 lines - JHE}
				SeqC SubCall CallLab EOL			{No change here - JHE}
				IncWFO
				SetLineStrtChr('/')
			Ne...
Zgłoś jeśli naruszono regulamin