What's new
What's new

Simple programming format question

acncguy

Aluminum
Joined
Dec 8, 2012
Location
WI, USA
Hello -

I just wanted to be sure about this before I send this program to the machine and it doesn't work.

In the following program, does it matter if I write "W-[1.2893/67]" or "W[-1.2983/67]"? I can't remember all the rules and things like this bite me because I don't see a problem but for some reason there is a problem. The program is in incremental, helical milling...

G1G41X[2.2637/2](X[57.5/2])
G3X0Y0W-[1.2893/67](W-32.75)I[-2.2637/2](I[-57.5/2])J0
G3X0Y0W-[1.2893/67]I[-2.2637/2]J0
G3X0Y0W-[1.2893/67]I[-2.2637/2]J0
G3X0Y0W-[1.2893/67]I[-2.2637/2]J0

etc ...

Thanks for any clarification.

Regards,

Paul
 
Just a suggestion: You shouldn't have to keep repeating those G3's X0 Y0 etc. They're modal so leaving them out (after the first one) would shorten things up a bit.
 
Hello -

I just wanted to be sure about this before I send this program to the machine and it doesn't work.

In the following program, does it matter if I write "W-[1.2893/67]" or "W[-1.2983/67]"? I can't remember all the rules and things like this bite me because I don't see a problem but for some reason there is a problem. The program is in incremental, helical milling...

G1G41X[2.2637/2](X[57.5/2])
G3X0Y0W-[1.2893/67](W-32.75)I[-2.2637/2](I[-57.5/2])J0
G3X0Y0W-[1.2893/67]I[-2.2637/2]J0
G3X0Y0W-[1.2893/67]I[-2.2637/2]J0
G3X0Y0W-[1.2893/67]I[-2.2637/2]J0

etc ...

Thanks for any clarification.

Regards,

Paul

Hello Paul,
The "W" address would indicate that this is a Lathe with a Y axis. That being so, it appears that you're mixing Absolute with Incremental moves. That's quite legal with a lathe control, but without checking if your numbers are actually correct, the first Helical Block G3 X0 Y0 W-[1.2893/67] I[-2.2637/2] J0, would only swing the Helix 180deg to X0 Y0 (if indeed the start point was Y0.0). All successive G3 X0 Y0 W-[1.2893/67] I[-2.2637/2] J0 Blocks would swing a 360deg helix, but on the opposite side of X0 to the very first Helical Block that started at X[2.2637/2] (the "I" address would have to be positive signed to cut the remaining Helical Moves on the plus side of X Zero.

If you want to program a full 360deg Helical Path starting and ending at X[2.2637/2] Y0.0, then the following would apply

G1 G41 X[2.2637/2]
G3 X[2.2637/2] Y0 W-[1.2893/67] I[-2.2637/2] J0
G3 W-[1.2893/67] I[-2.2637/2] J0
G3 W-[1.2893/67] I[-2.2637/2] J0
G3 W-[1.2893/67] I[-2.2637/2] J0
etc.

or

G1 G41 X[2.2637/2]
G3 U0.0 Y0 W-[1.2893/67] I[-2.2637/2] J0
G3 W-[1.2893/67] I[-2.2637/2] J0
G3 W-[1.2893/67] I[-2.2637/2] J0
G3 W-[1.2893/67] I[-2.2637/2] J0

If this is a Lathe, and unless its set to be programmed in Radius for X, X[2.2637/2] will be at diameter 1.13185, 0.565925 Radius from X0. That being so, I[-2.2637/2] may not give you the result you're expecting.

Post a sketch of what you're trying to do.

Regards,

Bill
 
Hello -

Thank you for the replies. Actually, this is horizontal boring mill, the Z-axis is the quill and the W-axis the table/saddle. I should have given that information in the first post.

This was a program written by a customer that I am modifying. Their machine uses the same control (Fanuc 31i), however their control has the spiral/conical interpolation option, ours does not ($6,000 to turn this option on from the first quote!). This option, among other things, gives the ability to program helical interpolation with an L-code which would represent the amount of revolutions to perform before reaching the Z-axis value in that line of code. Their code looks like this, programmed in incremental mode while doing the helical interpolation:

G1G41X[2.2637/2](X[57.5/2])
G3X0Y0W-1.2893(W-32.75)I[-2.2637/2](I[-57.5/2])J0L67

So I'm just looking for a fastest safest way to program the same thing without the use of the L-code.

Thanks for your help.

Regards,

Paul
 
Hello Paul,
The "W" address would indicate that this is a Lathe with a Y axis. That being so, it appears that you're mixing Absolute with Incremental moves. That's quite legal with a lathe control, but without checking if your numbers are actually correct, the first Helical Block G3 X0 Y0 W-[1.2893/67] I[-2.2637/2] J0, would only swing the Helix 180deg to X0 Y0 (if indeed the start point was Y0.0). All successive G3 X0 Y0 W-[1.2893/67] I[-2.2637/2] J0 Blocks would swing a 360deg helix, but on the opposite side of X0 to the very first Helical Block that started at X[2.2637/2] (the "I" address would have to be positive signed to cut the remaining Helical Moves on the plus side of X Zero.

If you want to program a full 360deg Helical Path starting and ending at X[2.2637/2] Y0.0, then the following would apply

G1 G41 X[2.2637/2]
G3 X[2.2637/2] Y0 W-[1.2893/67] I[-2.2637/2] J0
G3 W-[1.2893/67] I[-2.2637/2] J0
G3 W-[1.2893/67] I[-2.2637/2] J0
G3 W-[1.2893/67] I[-2.2637/2] J0
etc.

or

G1 G41 X[2.2637/2]
G3 U0.0 Y0 W-[1.2893/67] I[-2.2637/2] J0
G3 W-[1.2893/67] I[-2.2637/2] J0
G3 W-[1.2893/67] I[-2.2637/2] J0
G3 W-[1.2893/67] I[-2.2637/2] J0

If this is a Lathe, and unless its set to be programmed in Radius for X, X[2.2637/2] will be at diameter 1.13185, 0.565925 Radius from X0. That being so, I[-2.2637/2] may not give you the result you're expecting.

Post a sketch of what you're trying to do.

Regards,

Bill


Thanks for the input, Bill. Always appreciated.

I didn't give enough information in my first post. This is a feed mill that is helical interpolating to rough a bore. Here is more of the program that I am modifying:

G43H100G91W.001D100
G200Z11.811(Z300)
G17G64G90G95M40
G0G17G64G95G54.1P25
M14
X27.7559Y32.9527(X705 Y837)B90S[1592*1.15]F[1.05*.080]M3
M13
G0W[76.4074+.3937](W[1940.75+10])
M7
N1000 G1G91G41X1.1811(X30)Y0
G3X0Y0W-.374(W-9.5)I-1.1811(I-30)J0L19(Z=AC[1940.75+0.5])
G3X0Y0I-1.1811(I-30)J0
G1G40X-1.1811(X-30)Y0(Z=AC[1940.75+0.5])
G1G41X[2.2637/2](X[57.5/2])
G3X0Y0W-1.2893(W-32.75)I[-2.2637/2](I[-57.5/2])J0L67
G3X0Y0I[-2.2637/2](I[-57.5/2])J0
G1G40X[-2.2637/2](X[-57.5/2])
G0G90W[76.4074+3.937](W[1940.75+100])

G0X27.7559Y[32.9527-15.2362](X705 Y[837-387])
G0W[76.4074+.7874](W[1940.75+20])

Block N1000 is when it goes into incremental mode. So, the tool is positioning to the center of the bore first, then picks-up radius comp (I just noticed there is no D-value) and positions while in incremental mode to the radius it will cut before engaging in the helical interpolation operation. This should produce a full 360 degree helix in the next block. I should have gave more information in my first post to eliminate the confusion.

So, it appears as though putting the minus sign before the bracket would work as in my original post, since you posted your code that way in your reply. So, that's good news.

Thanks again for your help.

Kind Regards,

Paul
 
Hello Paul,
The "W" address and the lack of "D" made be assume that it was a lathe.

A minus sign outside the the square brackets will change the sign of what is contained in the brackets, or the result of a math operation inside the brackets.

If this helical milling is something you may do a lot of, you could write a Macro that is called by a block similar to that of your customer's G3X0Y0W-1.2893(W-32.75)I[-2.2637/2](I[-57.5/2])J0L67 example. I would use something like G103 to call the Macro (so that G03 can be used when Helical Interpolation is not required), and pass the values for X, Y, W, I, J and F as arguments.

The "L" address can't be used to pass the number or 360deg Helical Paths to complete, but "L" can be used to specify the number repeats of the Macro. Personally, I would rather pass either a number 360deg Helical Paths to complete using, say, "K" as the argument address, or pass the Lead of the Helix plus the Full Depth and have the Macro do the math. You could make the Macro quite flexible, allowing either method to be used, with the Macro working out from the arguments passed the method to use.

Regards,

Bill
 
I do not use W on milling machines. It is always G91 Z_.
Hi Sinha,
The machine is a Horizontal Boring Mill. "W" is the Z movement of the table, and Z is the Spindle Quill. Horizontal Boring Mills use mostly the same Commands and Format as a machining Centre

Regards,

Bill
 
Hello Paul,
The "W" address and the lack of "D" made be assume that it was a lathe.

A minus sign outside the the square brackets will change the sign of what is contained in the brackets, or the result of a math operation inside the brackets.

If this helical milling is something you may do a lot of, you could write a Macro that is called by a block similar to that of your customer's G3X0Y0W-1.2893(W-32.75)I[-2.2637/2](I[-57.5/2])J0L67 example. I would use something like G103 to call the Macro (so that G03 can be used when Helical Interpolation is not required), and pass the values for X, Y, W, I, J and F as arguments.

The "L" address can't be used to pass the number or 360deg Helical Paths to complete, but "L" can be used to specify the number repeats of the Macro. Personally, I would rather pass either a number 360deg Helical Paths to complete using, say, "K" as the argument address, or pass the Lead of the Helix plus the Full Depth and have the Macro do the math. You could make the Macro quite flexible, allowing either method to be used, with the Macro working out from the arguments passed the method to use.

Regards,

Bill

Hi Bill,

Yes, I do this type of helical milling frequently on machines that do not have the ability to repeat lines of code with an L or P (or K), so it would be excellent if a macro could be made that I could use to do that. I am going to take a shot at it and post back, as I may need (probably will need) some help. This would be a great time saver (as well as giving less chance of error) and also give the ability to easily change the amount of passes to optimize the process. Thanks!

Regards,

Paul
 








 
Back
Top