Siemens 840C Sermill DW30.15.4m.txt

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

{9/19/97
	Initial: Fanuc 6M (FW) B001.12.09 & Fanuc 6M (NW) D001.15 & Siemens 810M Union [GT] C395.15
	Created: Siemens 840C Seramill Dxxx.15m
	ForUser: MG Cutting Systems & Welding, Inc.
	Control: Siemens Sinumerik 840C
	Machine: Forest-Line Albert Seramill E 240 G
	Develop: ComPost2 1.1b2, Virtual Gibbs 4.21
	Comment: New processor per manuals.  Should be a good rough first draft!
		Set Up MDD for 4th X- and 5th Y-
		Part Faces:
			Variable number 3 stores which face is up
				1=Top 2=Front 3=Right 4=Bottom 5=Back 6=Left
			Variable number 5 stores a face orientation variable,
			as each face can be oriented up to 4 different ways!
		This processor does not support arcs outside the primary plane,
			they will be output as linear segments
Jim Radcliffe}

{11/4/97
	Initial: Siemens 840C Seramill DW30.15m
	Created: Siemens 840C Seramill DW30.15
	Develop: ComPost2 1.1b2, Virtual Gibbs 4.21.09
	Comment: Created Inch version.
Jim Radcliffe}

{11/17/97
	Initial: Siemens 840C Seramill DW30.15
	Created: Siemens 840C Seramill DW30.15.1
	Develop: ComPost2 1.1b3, Virtual 4.21.14
	Comment: Modified per marked up readouts from Dave Kreuser
		Added '@714' line before head rotation line.
		Added ' L9100' line after both head rotation.
		Moved Speed line to after head rotation.
		Changed A head position output -900 to 2700
		Changed Z0 output on OfstOff line to TCZ with default to 7.95 inches.
		Changed to use SeqLab and Retag to have a colon block at the start of tools.
Jim Radcliffe}

{1/20/98
	Initial: Siemens 840C Seramill DW30.15.1
	Created: Siemens 840C Seramill DW30.15.2
	Develop: ComPost2 1.1b3, Virtual 4.21.21
	Comment: Modified per fax and conversation with David Kreuser
		Changed tool change command from M6 to M70 for manual tool change.
		Cannot transfer a G code from main program to sub program!
			Changed use of Cycle in drilling to use R50 parameter.
			Moved DrillOff into drill sub.
		Added R4=0 for drill operations with no dwell.
		Changfed format of Dwell# to use decimal point.
Jim Radcliffe}

{2/17/98
	Initial: Siemens 840C Seramill DW30.15.2
	Created: Siemens 840C Seramill DW30.15.3
	Comment: Modified per fax and conversation with David Kreuser
		Swapped SetCSAngleA and SetCSAngleB to have M85 line output before M84 line.
		Output Speed & SpinOn for SameTool, something is the indexing is turning it off.
		Modified Rigid Tapping.
		Changed to Absolute arc Centers.
Jim Radcliffe}

{4/21/98
	Initial: Siemens 840C Seramill DW30.15.3
	Created: Siemens 840C Seramill DW30.15.4
	Comment: Modified during class for postprocessing.
		Modifications regarding rigid tapping only!
		Removed Speed and SpinOn
		Inserted new line "M18" before R1= R2= R3=...
		Inserted new line "M20" after G80
Dirk Oetmann}	

{4/21/98
	Initial: Siemens 840C Seramill DW30.15.4
	Created: Siemens 840C Seramill DW30.15.4m
	Comment: Created metric version
Dirk Oetmann}	

{Prog Numeric Format Definitions ****}

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(CSOffsetA#,2)
FORMAT(CSOffsetB#,2)
FORMAT(Recall#,2)
FORMAT(ToolDiameter#,4)
FORMAT(TrackZNO#,4)
FORMAT(Peck#,4)
FORMAT(FeedTapIPR#,4)
FORMAT(TCZ#,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(SpeedRPM#,5)
FORMAT(Dwell#,6)

{Added Subroutines ***}

SideReport:
	' ' EOL
	FORMAT(Recall#,2)
	' A = ' Recall# Num#('1') '/' CSOffsetA#
	' B = ' Recall# Num#('2') '/' CSOffsetB# EOL
	FORMAT(Recall#,5)
	' Op# ' Operation# ' - '
	IF FirstOperation?
		'   Starts at Num(3) ' Recall# Num#('3') ' '
	ELSE
		IF Equal? Recall# Num#('4') Recall# Num#('3')
			'    Stays at Num(4)=Num(3) ' Recall# Num#('4') '=' Recall# Num#('3') ' '
		ELSE
			'Indexes From Num(4) ' Recall# Num#('4') ' '
			IF Equal? Recall# Num#('4') Num#('1')
				'Top'
			ELSE
				IF Equal? Recall# Num#('4') Num#('2')
					'Front'
				ELSE
					IF Equal? Recall# Num#('4') Num#('3')
						'Right'
					ELSE
						IF Equal? Recall# Num#('4') Num#('4')
							'Bottom'
						ELSE
							IF Equal? Recall# Num#('4') Num#('5')
								'Back'
							ELSE
								IF Equal? Recall# Num#('4') Num#('6')
									'Left'
								ELSE
									'Unknown Side'
								END
							END
						END
					END
				END
			END
			EOL
			'                  To  Num(3) ' Recall# Num#('3') ' '
		END
	END
	IF Equal? Recall# Num#('3') Num#('1')
		'Top'
	ELSE
		IF Equal? Recall# Num#('3') Num#('2')
			'Front'
		ELSE
			IF Equal? Recall# Num#('3') Num#('3')
				'Right'
			ELSE
				IF Equal? Recall# Num#('3') Num#('4')
					'Bottom'
				ELSE
					IF Equal? Recall# Num#('3') Num#('5')
						'Back'
					ELSE
						IF Equal? Recall# Num#('3') Num#('6')
							'Left'
						ELSE
							'Unknown Side'
						END
					END
				END
			END
		END
	END
	EOL
	'                  ClearancePlane1# ' ClearancePlane1# EOL
	' ' EOL
RETURN

SaveFace:
	{ save to variable #4 the value of variable #3 to represent the previous ops face of the part }
	Save# Num#('4') Recall# Num#('3')
	{ save to variable #3 a value to represent the current face of the part }
	IF Equal? Recall# Num#('1') Num#('0')
		Save# Num#('5') Num#('1')
		IF Equal? Recall# Num#('2') Num#('0')
			Save# Num#('3') Num#('1') { Top }
		END
		IF Equal? Recall# Num#('2') Num#('90')
			Save# Num#('3') Num#('3') { Right }
		END
		IF Equal? Recall# Num#('2') Num#('180')
			Save# Num#('3') Num#('4') { Bottom }
		END
		IF Equal? Recall# Num#('2') Num#('270')
			Save# Num#('3') Num#('6') { left }
		END
	END
	IF Equal? Recall# Num#('1') Num#('90')
		Save# Num#('5') Num#('2')
		IF Equal? Recall# Num#('2') Num#('0')
			Save# Num#('3') Num#('2') { Front }
		END
		IF Equal? Recall# Num#('2') Num#('90')
			Save# Num#('3') Num#('3') { Right }
		END
		IF Equal? Recall# Num#('2') Num#('180')
			Save# Num#('3') Num#('5') { Back }
		END
		IF Equal? Recall# Num#('2') Num#('270')
			Save# Num#('3') Num#('6') { left }
		END
	END
	IF Equal? Recall# Num#('1') Num#('180')
		Save# Num#('5') Num#('3')
		IF Equal? Recall# Num#('2') Num#('0')
			Save# Num#('3') Num#('4') { Bottom }
		END
		IF Equal? Recall# Num#('2') Num#('90')
			Save# Num#('3') Num#('3') { Right }
		END
		IF Equal? Recall# Num#('2') Num#('180')
			Save# Num#('3') Num#('1') { Top }
		END
		IF Equal? Recall# Num#('2') Num#('270')
			Save# Num#('3') Num#('6') { left }
		END
	END
	IF Equal? Recall# Num#('1') Num#('270')
		Save# Num#('5') Num#('4')
		IF Equal? Recall# Num#('2') Num#('0')
			Save# Num#('3') Num#('5') { Back }
		END
		IF Equal? Recall# Num#('2') Num#('90')
			Save# Num#('3') Num#('3') { Right }
		END
		IF Equal? Recall# Num#('2') Num#('180')
			Save# Num#('3') Num#('2') { Front }
		END
		IF Equal? Recall# Num#('2') Num#('270')
			Save# Num#('3') Num#('6') { left }
		END
	END
	{SideReport}
RETURN

SetPlane:
	IF Equal? Recall# Num#('3') Num#('1') { Top }
		' G16 XYZ'
	END
	IF Equal? Recall# Num#('3') Num#('2') { Front }
		' G16 XZY-'
	END
	IF Equal? Recall# Num#('3') Num#('3') { Right }
		' G16 YZX'
	END
	IF Equal? Recall# Num#('3') Num#('4') { Bottom }
		{ We cannot do the bottom of the part }
	END
	IF Equal? Recall# Num#('3') Num#('5') { Back }
		' G16 ZXY'
	END
	IF Equal? Recall# Num#('3') Num#('6') { Left }
		' G16 ZYX-'
	END
RETURN

DoCP1:
	FORMAT(ClearancePlane1#,7)
	ClearancePlane1#
RETURN

DoNegCP1:
	FORMAT(ClearancePlane1#,8)
	ClearancePlane1#
RETURN

DoCP2:
	FORMAT(ClearancePlane2#,7)
	ClearancePlane2#
RETURN

DoNegCP2:
	FORMAT(ClearancePlane2#,8)
	ClearancePlane2#
RETURN

DoZDepth:
	FORMAT(SPZ#,7)
	FIRST SPZ#
RETURN

DoNegZDepth:
	FORMAT(SPZ#,8)
	FIRST SPZ#
RETURN

DoEPX:
	FORMAT(EPX#,7)
	EPX#
RETURN

DoNegEPX:
	FORMAT(EPX#,8)
	EPX#
RETURN

DoEPY:
	FORMAT(EPY#,7)
	EPY#
RETURN

DoNegEPY:
	FORMAT(EPY#,8)
	EPY#
RETURN

DoEPZ:
	FORMAT(EPZ#,7)
	EPZ#
RETURN

DoNegEPZ:
	FORMAT(EPZ#,8)
	EPZ#
RETURN

DoSPX:
	FORMAT(SPX#,7)
	SPX#
RETURN

DoNegSPX:
	FORMAT(SPX#,8)
	SPX#
RETURN

DoSPY:
	FORMAT(SPY#,7)
	SPY#
RETURN

DoNegSPY:
	FORMAT(SPY#,8)
	SPY#
RETURN

DoSPZ:
	FORMAT(SPZ#,7)
	SPZ#
RETURN

DoNegSPZ:
	FORMAT(SPZ#,8)
	SPZ#
RETURN

DoArcI:
	FORMAT(ArcI#,7)
	ArcI#
RETURN

DoNegArcI:
	FORMAT(ArcI#,8)
	ArcI#
RETURN

DoArcJ:
	FORMAT(ArcJ#,7)
	ArcJ#
RETURN

DoNegArcJ:
	FORMAT(ArcJ#,8)
	ArcJ#
RETURN

DoPartShiftX:
	FORMAT(PartShiftX#,7)
	PartShiftX#
RETURN

DoNegPartShiftX:
	FORMAT(PartShiftX#,8)
	PartShiftX#
RETURN

DoPartShiftY:
	FORMAT(PartShiftY#,7)
	PartShiftY#
RETURN

DoNegPartShiftY:
	FORMAT(PartShiftY#,8)
	PartShiftY#
RETURN

DoPartShiftZ:
	FORMAT(PartShiftZ#,7)
	PartShiftZ#
RETURN

DoNegPartShiftZ:
	FORMAT(PartShiftZ#,8)
	PartShiftZ#
RETURN

DoRepeatX:
	FORMAT(RepeatX#,7)
	RepeatX#
RETURN

DoNegRepeatX:
	FORMAT(RepeatX#,8)
	RepeatX#
RETURN

DoRepeatY:
	FORMAT(RepeatY#,7)
	RepeatY#
RETURN

DoNegRepeatY:
	FORMAT(RepeatY#,8)
	RepeatY#
RETURN

DoRepeatZ:
	FORMAT(RepeatZ#,7)
	RepeatZ#
RETURN

DoNegRepeatZ:
	FORMAT(RepeatZ#,8)
	RepeatZ#
RETURN

MoveHV:
	IF Equal? Recall# Num#('3') Num#('1') { Top }
		IF Equal? Recall# Num#('5') Num#('1')
			' X' DoEPX
			' Y' DoEPY
		END
		IF Equal? Recall# Num#('5') Num#('3')
			' X' DoNegEPX
			' Y' DoNegEPY
		END
	END
	IF Equal? Recall# Num#('3') Num#('2') { Front }
		IF Equal? Recall# Num#('5') Num#('2')
			' X' DoEPX...
Zgłoś jeśli naruszono regulamin