Answers to Your Questions

 

 

 

 

 

 

 

 

 

 

 

 

   

The Collected Wisdom
of the Haas Answer Man

   

Programming

   

 

Pocket Milling

(early 2005
vol 9 # 32)

Dear Applications:

I’m a machining technology student at a community college. My latest assignment for the Haas CNC class involves pocket milling with G150. I put in G and M codes like the program in the workbook, and it worked fine on the simulator. Then my instructor and I tried another program, which is very simple but won’t work. Maybe you could look at this and tell us what’s wrong? Thank you.

Dave Martin
 

Dear Dave:

Your program is fine until the next-to-last line.

%
O00100
N1                      (1/2 dia drill)
T1 M06
G90 G56 G00 X3.25 Y1.0
S2000 M03
G43 H01 Z1.0 M08
G83 Z-2.0 R0.100 Q0.500 F10.
G80 G00 Z1.0 M09
G28 G91 Z0 M05
M01

 

N2                    (1/2 dia e’mill)
T2 M06
G90 G56 G00 X3.25 Y1.0
S2000 M03
G43 H02 Z1.0 M08
G01 Z0 F30.
G150 P101 J0.4 K0.02 G41 D02 Z-1.0 Q0.25 R0.1 F12.
G01 G40 X3.25 Y1.0
G00 Z0.100
G28 G91 Z0 Y0 M09
M30

 
O101                   (pocket sub-program)
G01 Y5.0
X1.0
G03 X0. Y4. R1.
G01 Y1.
G03 X1. Y0. R1.
G01 X4.
G03 X5. Y1. R1.
G01 Y4.
G03 X4. Y5. R1.
G01 X3.25
Y1.0             (You must remove this line.)
M99
%

This will cause an alarm.

 

With a pocket routine, you can’t take the tool all the way back to where you started from. The sub-program is only the pocket shape itself. If you try to drive the tool back to the center of it, you will get an alarm.

Sincerely,
Haas Applications

 

The last move (Y1.0) back to the
start point is causing the alarm.
The sub-program should end when
the pocket shape is complete.

• • •

Helical Milling

(early 2005
vol 9 # 32)

Dear Applications:

How do I program helical milling in the Z axis? Do I have to loop circular interpolation with a Z value added for each revolution (G02 X__, Y__, I__, J__, Z__)? Or is there a G code for helical milling or interpolation in the Haas control?

Chuck Wong

Dear Chuck:

The simplest way to achieve helical motion is by X and Y circular interpolation (G02 or G03) with a Z value added per revolution. Use an I command to specify the distance in X from the starting point to the center of the arc. To cut a complete circle of 360 degrees, do not specify an ending point for X or Y. If you use incremental positioning (G91), you can loop the cycle to achieve your depth using an L command. Here’s a sample program:

%
O1234;
(Helical Milling Example);
T1 M06;
G00 G90 G54 X0. Y0. S3000 M3;
G43 H01 Z0.1;
G00 X0.5;
G91;                                          (incremental positioning)
G02 I-0.5 Z-0.25 F20. L4;       (helical motion, 1 in. dia. x 1 in. deep)
G00 G90 X0;
G0 Z0.1 M09;
G53 Z0.;
G53 Y0.;
M30;
%

Sincerely,
Haas Applications

• • •

Engraving Error Message

(early 2005
vol 9 # 32)

Dear Applications:

I’m using G47 to engrave serial numbers, but I’m getting error message number 529: “Illegal G65 parameter. The addresses G, L, N, O, and P cannot be used to pass parameters.” What can I do to fix this? Here’s my program.

G47 P1.0 (5001) X0.5 Y0.75 J0.125 R0.05 Z-0.005 F25.0 E10.0

Thanks for your help.

Vijay Bakshi
 

Dear Vijay:

You need to take the decimal point out of the P command – in this case, P is an instruction (Engrave Sequential Numbers) rather than a value, so “P1” is the correct form of the command.

Sincerely,
Haas Applications

• • •

Circular Milling

(Fall 04
vol 8 # 31)

Dear Applications:

I need to do circular milling on my VF-3. I would like to know about I and J moves – how are they calculated? Are I and J arc segments of the circle?

Rod Lewis

Dear Rod:

The optional I, J and K commands represent the distance from the starting point to the center of the circle: I is the distance along the X axis; J is the distance in Y; K the distance in Z. (Typically, I and J are used in mill programming, while I and K are used with lathes.) Depending on your application, the R command may be used instead.

If you’re cutting an arc of less than 360 degrees, you should use X, Y, Z and R commands. The X, Y and Z values define the endpoint – which is different from the starting point – and the R value is the distance from the starting point to the center of the arc. Note that if R has a positive value, the control will generate a path of 180 degrees or less; to generate an arc of greater than 180 degrees, you must specify a negative R.

To cut a complete circle – a 360-degree arc – you must use I, J, K commands (if only one of these values is specified, the others are assumed to be zero). In this case, the starting point and ending point are the same, so you don’t need to specify X, Y or Z values.

Sincerely,
Haas Applications

• • •

Constant Surface Speed

(Summer 04
vol 8 # 30)

 

Dear Applications:

I have a question about one of the programming examples in your operator’s manual. Here’s the example in question:
  T200 B-2.0 
  G50 S2500 
  G97 S1042 M03
  G00 G99 X2.0 Z0.01
  T232 M08 
  G96 S600 
  G01 Z0 F.01

     What is the purpose of the program line that has G97 S1042 M03 in it? I ask because of the G96 S600 code that follows two lines down in the program. This just doesn’t make sense to me. Thanks.

     Joe Killeen
 

Dear Joe:

When you invoke G96, Constant Surface Speed (CSS), the machine will automatically increase or decrease spindle speed according to the radius being cut (distance from tool tip to spindle centerline). This is an excellent way to ensure the proper cutting speed for the material being used. The common practice is to program with G97 (turn off CSS) when rpm adjustment is not necessary, such as during any rapid moves to approach the part or during drilling. A G96, with its increasing or decreasing speed, can sometimes be inconvenient during non-cutting moves. For example, if your programmed feed is in inches per rev and the tool tip moves outward, everything will slow down – and your cycle time will increase.
    In conclusion: Use G96 only during cutting, and cancel it as soon as possible with a G97 command.

     Please feel free to contact us for further assistance.

     Sincerely,
     Haas Applications

• • •

Sub-Routines

(Spring 04
vol 8 # 29)

 

Dear Applications:

I have a question about subroutines on my VF-6. I want to mill the same contour in several places – a 10 x 10 mm rectangle, repeated 100 times. What’s the best way to do this?

     Gunnar Gustavson


Dear Gunnar:

     It’s pretty easy. Here is an example, in inches, of calling an incremental (G91) pocket subroutine from within a main program.

Main Program:
O01235
T1 M06
G90 G54 G00 X-9. Y5. S1500 M03
G43 H01 Z1. M08
G01 Z0.1 F50.
M97 P5000 
X-6. Y4.5
M97 P5000
X-3. Y4.
M97 P5000
X0. Y3.5
M97 P5000
X3. Y3.
M97 P5000
X6. Y2.5
M97 P5000
G00 Z1. M09
M05
G91 G28 Z0
G91 G28 Y0
M30




(first pocket location)


(first pocket subroutine call)
(second pocket location)
(second pocket call)
(third pocket location)
(third sub call)
 
(fourth sub call)

(fifth sub call)

(sixth sub call)




 

(Subroutine for pocketing)
N5000
G91
G01 Z-0.35 F30.
X-1. Y1. F7.
Y-2.
X2.
Y2.
X-2.
X1. Y-1.
G90
G00 Z0.1
M99

(must pre-drill)
(no cutter comp)

(depth of pass)
 

 

     TIP: Your machine [given serial number] has a powerful Haas option that allows you to manipulate subroutines using rotation and/or scaling. You will still have to program the subroutine in incremental mode. With this option enabled, G68 commands rotation at any angle from the designated center of the part or from the subroutine zero point, and G51 controls scaling. Your operator’s manual has details on the correct use of these G codes, or you can contact us for further assistance.

     Sincerely,
     Haas Applications

• • •

Three (Programs) in One

(Fall 03
vol 7 # 27)

 

Dear Applications:

I am trying to run a 3D program on my VF-3. It’s too big to fit on a floppy, and we cannot send files from PC to Haas yet. Is there a way that I can take the three programs that actually make up one part and combine them on the Haas? I am looking for a way I can run this part overnight, without having to come in and call up another program.

     Dave Bartlett
 

Dear Dave:

Yes, you can combine your three programs easily. Make a cover program like this:

  O0001;
  M98P101;       (first sub-program number is O101)
  M98P102;       (second sub-program)
  M98P103;       (third sub-program)
  M30;

     Be sure to put an M99 instead of an M30 at the end of each sub-program, so that it will return to the cover program.

     Sincerely,
     Haas Applications

 

 

Home ] MachineCare ] Communicate ] FeaturesOptions ] MiniMachines ] MiscTopics ] Offsets ] Productivity ] [ Programming ] Rotary ] Thread/Tap ]

 

    

Search CNC Machining On-line!