CNC Safety Lines-Examples needed
I have been teaching a class on CNC programming for many years now. The question came up about different safety line configurations. My general answer is that there are various types, depends upon the situation, shop you are in, machine you are on, and your programmer. I also mentioned that for the most part, safety lines have the same basic purpose - to set the machine parameters and to get tools and machines set in a safe operating state for operator use.
The discussion came about to "how do we edit or read various types of safety line configurations?" and then "could you get a few configurations for practice?".
Therefore my question and request. If some of you could provide examples of safety line configurations you use for start of program, end of tool, tool change and end of program, this would be helpful so I can show the similarities and differences. I have many on hand, but am always interested in more.
Fanuc 18MC, start of programs:
%O8305 (4.5 VALVE, MILL, DRILL AND C'BORE TOP PLATE)
(DATE CREATED 08/06/07)
(CYCLETIME IN MINUTES 19.66)
( T25 = 3.94 X 45 FACE MILL)
( T15 = 1/2 X 120 CARBIDE SPOT DRILL)
( T01 = 1/2 DRILL)
( T18 = 3/4 HSS 6 FLUTE)
( T09 = 1 INCH DRILL)
N10 G17 G40 G49 G80
N20 G91 G28 Z.0
N30 T25 (3.94 X 45 FACE MILL) M6
N50 G0 G90 X-14.1 Y-10.1 S387 M4
N60 G43 Z.1 H25 T15
Go to tool change:
M00 is changed to M01 once everything is proved out.
N550 G0 Z.1
N560 G28 G40 G91 Z.0 M09
N580 G28 Y.0
End of program:
N600 G0 G28 G40 G91 Z.0 M09
N620 G28 Y.0
we have 3 approaches depending on the machine being used
1. CNC lathes (all ours are Fanucs )
program 0001 is the safety return to be set when the machine is set
G0 X150 Z 200 ; these values are changed depending on the tools up
On all the other programs 0001 is called before each tool change, and when the program ends
2. TNC 370 VMCs (used mostly by the guys learning)
At the start of the program there is a label containing a safe postion
0 Begin pgm 3452-3
1 ;some part
2 Tool def 1 L+87 R+5
3 LBL 1
4 L Z+200 R0 FMAX M5
5 L X+50 Y+150 R0 FMAX
6 LBL 0
7 Stop M00
8....... <the program>
150 CALL LBL 1 REP 1000
151 END PGM 3452-3
This enables them to stop the machine mid program , press "goto 0" and hit the cycle start and the machine will do a safe return and stop
3. TNC530i powered 4 and 5 axis VMCs
Only used by the 2 skilled mill setters ( and maybe the younger guys when supervised)
No safety returns, just the line
L X0 Y0 Z0 A0 R0 FMAX M91 on the 3 and 4 axis, and the lines
L Z0 R0 FMAX M91
L X0 Y0 A0 C0 R0 FMAX M91 on the 5 axis
at the end of the program to put the machine in a safe spot for part change over
We change the values as needed to position the machine better
One command that I consider to be very important and should be included in a safety line at the start of every program, is the command to set the input unit to either metric of imperial according to the program being used. In a Fanuc control, this G Group is modal and non volatile when the control is powered down.
If the control is set to imperial input by G20 being programmed and then a metric program that does not include G21 to set the input unit to metric is loaded and run, then a command such as G00 Z10.000 will be read as Z10.000 inches. If the machine is a short length capacity machine with a tail stock, then interference with the that part of the machine would be probable.
basically I call these restart points. Every toolchange should have all the data required to restart the program IMHO. Only exception is if you are space limited....ever started a program in the middle and did the crash walk back to the toolcrib only to find it was your last ______ in the dang shop? an example off an acramatic 2100:
(MSG, OPERATION 1: CONTOUR )
(MSG, WORKGROUP )
(MSG, TOOL 222000: 2. FINISH ENDMILL )
(MSG, KENNAMETAL 2 INCH )
:1 G17 G70 G90 G94 G97 G0 F18. T222000 M6
N2 G0 X-1.125 Y5.976 Z2. S900 M3 D0 O0 H1 T222000
N5 G1 Z-.0391 F18.
For a Haas mill:
Beginning of program and tool changes (no G52 info at tool changes though):
G0 G17 G20 G40 G80 G90
G52 X0. Y0. Z0.
End of program:
G0 G40 G90 M9
G53 X-15. Y0. Z0. (Be careful with that one!)
Saftey lines are what you programme to send the machine away from the part (safe).
The first place your machine should go ,when you 'push the green button' is go safe.