What's new
What's new

Fanuc Oi-M decimal rounding error

Philabuster

Diamond
Joined
Jul 12, 2006
Location
Tempe, AZ
Today my 2 year old CNC mill with Fanuc Oi-M cut an oval hole instead of a round hole when circular interpolating a Ø2.25 +/- 0.010" bore. One axis of the hole was 2.248" and the other was 2.228". After about 2 hours of head scratching, I discovered the issue. I was just happy I did not scrap a $$$ part in the process. :ill:

I normally just type in 0.312" for a 5/16" end mill when programming. On occasion, I will enter 0.3125" to be more precise as I did today. Cutter comp was not used or needed. Theoretical half of the end mill was now 0.15625" instead of 0.156". The bore radius was 1.125" - 1/2 of the end mill was 0.15625" = 0.96875" radius for tool path. Cad/Cam software rounded the 5 decimal place number up to 0.9688" as it has done for the last 19 years.

Bore was cut in two 180° arcs with R value. Machine would not follow correct tool path. I single blocked the program and slowly fed the tool to the 90° point of the 180° arc. The tool was off by 0.010" even though it was programmed correctly--at least to within 0.00005".

I added a line with G03 J-0.9688 to cut the bore in one 360° move and the tool went to the correct position. I then edited my old program and changed the R0.9688 to R0.96875 and it cut the part with no 0.010" error--even though I only changed the radius by 50 MILLIONTHS! :angry:

I have never seen an issue like this before. On some machines, if you are off by 0.0001", the machine will simply error out, but that only happens when programming manually. I have never had any issue running code with our CAM system rounding to the nearest tenth.

The only thing my search yielded about rounding errors was when programming macros to 8 decimal places.

What parameter needs to be edited to correct--or ignore--a 50 millionths of an inch rounding error?
 
Programming past 4 decimal places is not an option nor should it be an issue.

Again, what parameter needs to be edited on this mill to correct--or ignore--a 50 millionths of an inch rounding error? Please help. I'm going nuts on this one. :willy_nilly: None of our other Fanucs or Seicos controls had this issue.

Thanks. :cheers:
 
Programming past 4 decimal places is not an option nor should it be an issue.

Thanks. :cheers:

The least input increment and least command increment can be set to 0.00001 in Imperial mode, but this should not be necessary.

Personally, I don't like using the R address in circular interpolation. I've always felt that its a bit of a fudge. Using IJ and K tells the control exactly where the arc or circle center is, whereas with R, if your end point is wrong, the control will use the start point, end point and radius to calculate an arc center that will fit. The R address method also has the limitation of not being able to be used when programming a full circle in one block.

Some defend the use of the R as being easier, but its no big stretch to do the calcs for I,J, and K, and if a CAM system is is used, its no stretch at all.

However, having said all that, I'm surprised that such a small rounding would give such a large error. The formula for calculating the center of an arc, given 2 points and a radius is straight forward, and there are two solutions for each set of two points. The correct center depends on whether the path from start point to end point is less or greater than 180 degs. In your example, each arc is 180 degs so the center point for each should be the same, so long as the distance between the two points is twice the R value being used. So, I would check the distance between your start and end points and see how it relates to your R value.

There are no parameters that I'm aware of that will influence the result you're getting, particularly when you can get good results by just altering the R, or by using I and J format circular interpolation.

Regards,

Bill
 
On a Fanuc you can't cut a 180 degree arc using "R". Each arc segment has to be has to be less than 180 degrees.
 
This is actually kind of a common issue when your using R values in ur CAM Post. Seen it happen before. Saying this I Have Banished R values in my post. STRICTLY I's and J's. Its foolproof compared to guessin what ur machine is gonna do w/ R values
 
On a Fanuc you can't cut a 180 degree arc using "R". Each arc segment has to be has to be less than 180 degrees.

Actually, an arc greater than 180deg can be programmed with an R address. In this case the R is programmed as a minus value. An R address can't be used if the start coordinate and end coordinate are the same (full circle). In this case if an R address is used, the tool does not move.

Rstewart said:
This is actually kind of a common issue when your using R values in ur CAM Post. Seen it happen before. Saying this I Have Banished R values in my post. STRICTLY I's and J's. Its foolproof compared to guessin what ur machine is gonna do w/ R values

Absolutely, I couldn't agree more. particularly when using a CAM system to generate the program. There can't even be an agreement that using an R address saves code. Particularly when programming a complete circle, where it can only be completed with two blocks with an R address as opposed to one with I,J and K addresses.

Regards,

Bill
 
However, having said all that, I'm surprised that such a small rounding would give such a large error.

My point exactly. :wall:

I will edit the post to output I and Js and save it as a different post file. I am going to then repost the program and see if this works in the machine.

Thank you all for the suggestions. :)
 
Oi MB
B-63844EN/01
Page 45, last line

Yes that's right, it's written there but honestly:

1.) I worked on so many different machines with all kind of FANUC controllers and never ever ever ever I had a problem with an Arc programmed with "R".

and

2.) how big the error would be according to the manual is my next question?:rolleyes5:

Philabuster has a difference of 0.02 Inch (0.508mm).
There is something else:willy_nilly:
 
I believe this parameter applies to center method where both the start and end points must be equi-distant (radius) from the specified center.

The R system requires a start point, an end point and a radius. If the end point is not at the intended coordinate, but its geometrically possible for the arc to pass though the two points with the given radius, the control software moves the arc center. I had to prove this point to a client some time ago, and did so by cutting a number of arcs, with the same start point and radius, but with a varying end point, and then getting the arc center of the various arcs using a CMM. In every case the center coordinate was predictable.

If a complete circle was cut using the R system, therefore requiring at least two blocks of code to do so, then the only way I could imagine that an error in dimension would occur is if the start and, or the end points of the two arcs were not on the same circular path. Accordingly, the center of the two arcs would be different but the circle would still be cut without an error condition being generated.

Going on Philabuster's comments in his first post, I would be surprised if he hadn't checked that out, and particularly given that the program was created using a CAM system, its probable that the start and end points are correct.

Most control systems generate circular paths using
1. a signed start at angle
2. a signed traversing over angle. A positive sign denotes CCW and negative CW.
3. a radius, the unit of which are in counts

CNC code is merely passed parameters, and using an arc as an example, the control system would use the start point, end point and radius to calculate an arc center, which would be required to calculate the start at angel and traversing over angle.

Now I'm not saying that the following is the way Fanuc would calculate the arc center, but the math is quite straight forward, allowing accurate results. Accordingly, I'm surprised that Fanuc would use an algorithm that would give inaccurate results, particularly when the solution is so simple.

The mathematics required to calculate the center of a half circle, as is the case with Philabuster's program, only step 2 is required. With arcs <> 180degs, all steps are required. There are always two results for each set of two coordinates, and this is where the sign of the R used in the G02/G03 block comes in to select the correct result.

Regards,

Bill

Step One
'Get distance between 1st and 2nd points
q = Sqr((X2 - X1) ^ 2 + (Y2 - Y1) ^ 2)

Step Two - if 180deg arc this is the only math required to get arc center.
'Find mid point of q (X3,Y3)
X3 = (X1 + X2) / 2
Y3 = (Y1 + Y2) / 2

Step Three
'Find center point of circle - 1st result
X = X3 + Sqr(r ^ 2 - (q / 2) ^ 2) * (Y1 - Y2) / q
Y = Y3 + Sqr(r ^ 2 - (q / 2) ^ 2) * (X2 - X1) / q

'Find center point of circle - 2nd result
X = X3 - Sqr(r ^ 2 - (q / 2) ^ 2) * (Y1 - Y2) / q
Y = Y3 - Sqr(r ^ 2 - (q / 2) ^ 2) * (X2 - X1) / q
 








 
Back
Top