What's new
What's new

Fanuc PS0041 G41/G42 fun, need guidance please

rb1

Cast Iron
Joined
Nov 10, 2008
Location
AB, Canada
New to Fanuc (from Fagor), had a program that used to run fine, changed the post (via OneCNC on both) and am getting two issues, one is a PS0041 Interference in G41/G42. It is choking on line N500 it seems, anything look amiss there? I remember having some issues with G41/G42 unhappiness on the Fagor with some programs, but I could get around it with a smaller radius in the tool offset. I tried that <fanuc is diameter, fagor is radius> taking from .500 to .499 but no help there... maybe I have to go more? Ran out of time today. Here is the code:

N450 G01 X1.5847 Y-4.3462
N460 G00 Z1.
N470 X1.7623 Y-3.7348
N480 Z0.05
N490 G01 Z-1.05 F28.0
N500 G41 X1.4706 Y-3.6028 D3 F44.0
N510 G03 X1.2221 Y-3.8938 I0.227 J-0.4455
N520 X1.1805 Y-4.1565 I0.8084 J-0.2627
N530 X2.8805 Y-4.1565 I0

Second problem is on the same program, first tool is T6, a 4" facing mill, then it should change over to T3, a 1/2" end mill. It completes T1 machining op, then goes to change the tool and blows past the toolchange height and gives a Z travel alarm. Here is the code for that part of the program:

N160 M05 G40 G49 G80
N170 M09
N180 (4.0 INCH INSERT FACE MILL)
N190 T6 M06
N200 G00 G90 G55 X1.5124 Y-9.2678 S3000 M03
N210 G43 H6 Z0.2
N220 G00 X1.5124 Y-9.2678 Z0.2
N230 Z0.05
CODE SNIPPED
N270 X4.5124 Y-9.2678
N280 Z0.05
N290 G01 Z-0.008 F30.0
N300 Y1.2322 F60.0
N310 G00 Z0.2
N320 M01
N330 M05 G40 G49 G80
N340 M09
N350 (.500 CARBIDE END MILL ALUM)
N360 T3 M06
N370 G00 G90 G55 X6.3 Y-7.7788 S6000 M03
N380 G43 H3 Z1.
N390 M08
N400 G00 X6.3 Y-7.7788 Z3.
N410 Z-0.525
N420 G01 X6.2983 Y-7.7759 Z-0.5509 F27.5 S6000
N430 X6.2934 Y-7.7672 Z-0.575

This is the first I've used the machine, so lots of proving things out here, and learning for me!! But the wierd thing here is that I have another program that toolchanges just fine, and the code seems identical, here is the toolchange on that one (which completes just fine).

N20 M05 G40 G49 G80
N25 M09
N30 (.2874 SPOT DRILL COBALT MARI)
N35 T9 M06
N40 G00 G90 G54 X0.25 Y-0.25 S500 M03
N45 G43 H9 Z0.4
N55 G00 X0.25 Y-0.25 Z0.4
N60 Z0.05
N65 G01 Z-0.0417 F16.0 S500
CODE SNIPPED
N125 G00 Z0.4
N130 M01
N135 M05 G40 G49 G80
N140 M09
N145 (5/16 X 18 FORM TAP)
N150 T7 M06
N155 G00 G90 G54 X0.25 Y-0.25 S600 M03
N160 G43 H7 Z0.4
N165 M08
N170 G00 X0.25 Y-0.25 Z0.4

You folks rock, thank you!!
 
Your lead-in move needs to be smaller than your tool radius or it will alarm. Your lead-in appears to be .320, so as long as your tool is smaller than .640 it should work.

It could be alarming because a bad move got read into the buffer, so check the next few lines for arcs smaller than your tool radius. Also could be your lead out move (G40) which you don't show. This also needs to be larger than your tool radius.

Your tool change problem? Don't know. A 4" facemill is pretty heavy. Maybe inertia is taking past the toolchange level. Does it happen if you turn the rapids down?
 
Cutter Radius Compensation for Fanuc is in radius. If you are using a .5 tool enter .25 in the offset register.
I'm shocked Kevin! That's parameter dependent. #5004 on Oi's.

I found that when I put my Chevalier on the floor. I oversized a cutout because I entered the radius of the tool in like normal, but the machine was set to take diameters.

My thought was "who the hell uses diameters?" :willy_nilly:
 
I found my lead in/out in the cam program for that circular interpolated op was set to .250 radius(tool is .500 EM), so I changed that to .275, and will retry it today. Maybe it is picky?

Good info on the heavy tool... yes it is. I did have rapids at 25% (lowest setting), and after the alarm, when I call up a tool change, (M6 Txx), it changes without any issues at the same rapid speeds... I will however, run it today with NO tool in the spindle to see if any different.

thanks
 
Cutter Radius Compensation for Fanuc is in radius. If you are using a .5 tool enter .25 in the offset register.

I'm shocked Kevin! That's parameter dependent. #5004 on Oi's.

I found that when I put my Chevalier on the floor. I oversized a cutout because I entered the radius of the tool in like normal, but the machine was set to take diameters.

My thought was "who the hell uses diameters?" :willy_nilly:

My fagor had the radius for the tool offsets, but this one (Fanuc OiMD) clearly shows diameter, unless I am missing something? Maybe that is my problem, because this is the first program I have run that uses machine compensation on the tool.... hmmmm... the other programs so far are simple drill / tap.

I am just cutting air, so maybe I should indeed put .250 in there....
 
My fagor had the radius for the tool offsets, but this one (Fanuc OiMD) clearly shows diameter, unless I am missing something? Maybe that is my problem, because this is the first program I have run that uses machine compensation on the tool.... hmmmm... the other programs so far are simple drill / tap.

I am just cutting air, so maybe I should indeed put .250 in there....
OiMD, look at parameter 5004.1 (ORC). If it's 0 it's set for diameter in the offset register, if it's 1 it is set for radius.

5004.2 (ODI) should be 0 for radius and 1 for diameter for the amount of compensation.

Changes to these parameters requires a power cycle of the control to take effect.
 
OiMD, look at parameter 5004.2 (ODI). If it's 1 it's set for diameter in the offset register, if it's 0 it is set for radius.

I am not familiar yet with navigating to parameters, I'll grab the manual and check it out, thank you!
 
I'm shocked Kevin! That's parameter dependent. #5004 on Oi's.

I found that when I put my Chevalier on the floor. I oversized a cutout because I entered the radius of the tool in like normal, but the machine was set to take diameters.

My thought was "who the hell uses diameters?" :willy_nilly:

I knew that one could set to diameter by parameter, but I've never seen a machine set that way. Your Chevalier was set to diameter when new?
 
N450 G01 X1.5847 Y-4.3462
N460 G00 Z1.
N470 X1.7623 Y-3.7348
N480 Z0.05
N490 G01 Z-1.05 F28.0
N500 G41 X1.4706 Y-3.6028 D3 F44.0
N510 G03 X1.2221 Y-3.8938 I0.227 J-0.4455
N520 X1.1805 Y-4.1565 I0.8084 J-0.2627
N530 X2.8805 Y-4.1565 I0

Second problem is on the same program, first tool is T6, a 4" facing mill, then it should change over to T3, a 1/2" end mill. It completes T1 machining op, then goes to change the tool and blows past the toolchange height and gives a Z travel alarm. Here is the code for that part of the program:

N160 M05 G40 G49 G80
N170 M09
N180 (4.0 INCH INSERT FACE MILL)
N190 T6 M06
N200 G00 G90 G55 X1.5124 Y-9.2678 S3000 M03
N210 G43 H6 Z0.2
N220 G00 X1.5124 Y-9.2678 Z0.2
N230 Z0.05
CODE SNIPPED
N270 X4.5124 Y-9.2678
N280 Z0.05
N290 G01 Z-0.008 F30.0
N300 Y1.2322 F60.0
N310 G00 Z0.2
N320 M01
N330 M05 G40 G49 G80
N340 M09
N350 (.500 CARBIDE END MILL ALUM)
N360 T3 M06
N370 G00 G90 G55 X6.3 Y-7.7788 S6000 M03
N380 G43 H3 Z1.

Hello rb1,
With regards to your first issue (Tool Rad Comp), you can only omit an address of the Circular Interpolation Vector pair (any pairing of I,J and K) if the address value is Zero. It may be a Typo when preparing your Code Example for Posting here, but the Circular Interpolation Block shown in Red above will be interpreted as the following:

N530 X2.8805 Y-4.1565 I0 J0

If the above Block is actually entered in your program as it appears in Red above, then that will certainly cause an error.

Although not chiseled in rock, the typical default setting of parameter #5004.2 is "0" for specifying Tool Compensation in terms of Radius. Accordingly, if you have not checked the setting of this parameter bit, you may well be specifying a 0.5 Radius for the cutter. With a Fanuc Control, if you specify a Tool Radius equal to the Radius of a Concave Circular Move, an interference alarm will be raised. The Tool Radius specified only needs to be the Least Programmable Increment of the Control less than a Concave Radius Feature of a Tool Path and there will be no interference alarm. In the case of your Lead In circular move, the Radius is 0.49999925 and therefore would be seen by the Control as a 0.5 Radius. Accordingly, a Tool Radius Offset registered a 0.499 should not cause an alarm to be raised with a 0.5 Radius feature.

If your control has Parameter Bit #5004.2 set to "0" (Radius specification) then your Start Up move of 0.3202" will raise an Interference Alarm. Therefore, its highly likely that, as Kevin suggests, you're specifying the Diameter of the Tool when the Control is expecting a Radius value.

With regards to your Tool Change issue, you're leaving the Tool down at the level the Tool was sent to when applying the Tool Length Offset. This is a very dangerous thing to do unless you know exactly how your machine operates. How G49 (cancel of Tool Length Offset) executed is parameter specific and whether your Tool Length Offsets are Plus or Minus values. A Plus value Offset and parameters set so that the Tool Comp is cancelled with movement can cause the tool to slam into the Workpiece, or other immovable object.

It would seem that the Z axis is controlled either via a Tool Change Macro, or the PLC (PMC in Fanuc speak). Normally if a Tool Change Macro is used being called by M06, the M06 will precede to T code. In this case the Tool Number will be passed as an Argument. However, a Tool Change Macro called with M06 will still work with the T Code before the M06 if System Variable #4120 is used in the Macro.

Look in the parameters #6080 to #6089 for the registration of the numeral "6". If so, Post a copy of the correspond program from O9020 to O9029 respectively so that the Forum can offer further help.

Regards,

Bill
 
I knew that one could set to diameter by parameter, but I've never seen a machine set that way. Your Chevalier was set to diameter when new?
I would be very surprised if it it was= I didn't buy it new and it never even occurred to me to check before I started running parts.

I just pulled a program from the Haas, made a couple minor edits, and let'er rip.

Didn't take very long to figure out something was amiss. :o
 
...My fagor had the radius for the tool offsets, but this one (Fanuc OiMD) clearly shows diameter, unless I am missing something?
If you are looking at the offset page, Fanuc controls say "Diameter (D)" in that column, no matter if it's set for radius or diameter. At least every one I've ever ran...

The parameter is where you have to look to see what is really needs.

I am just cutting air, so maybe I should indeed put .250 in there....
Yep.
 
If you are looking at the offset page, Fanuc controls say "Diameter (D)" in that column, no matter if it's set for radius or diameter.

I believe that has to do with the fact the address "D" appearing in a comp call in a program looks in that column. You'll likely notice "H" in the ones next to it for tool length. Same thing. Not sure how well this holds on every Fanuc with any offset type. (A/B/C)

I'm thinking you already knew all that. Just a slip of the tongue.
 
update... OK, tried no tool in the spindle for the tool change problem (thinking inertia / weight may be an issue...), with no tool, or even a different tool in the program (changed it to T11 with the G43 having H11 also) and still blows past the Z height for toolchange, and alarms out. Going to try another program momentarily, but I know I get toolchanges without issue on the first program I tried (all generated with OneCNC).

As for the G41/G42, I tried a program mod, that used a radius of .275 instead of .250 (with a .500 end mill) and that did not fix anything, so I went into the tool offsets and changed the Diameter to .249 and viola, no problem! - editing for clarity here, for the tool offset, first I had .500, then when I got the alarm, I tried .499, still alarms, now when I use .249 it is fine. Even tho the page is asking for D, the program is using that number as the radius. Digging deeper, just making sure I was not misleading.
 
huh... completely new program now blows past the Z tool change height... and if I go back to the first trial program, it changes fine.

Must be something in the post... going to dig deeper here.
 
update... OK, tried no tool in the spindle for the tool change problem (thinking inertia / weight may be an issue...), with no tool, or even a different tool in the program (changed it to T11 with the G43 having H11 also) and still blows past the Z height for toolchange, and alarms out. Going to try another program momentarily, but I know I get toolchanges without issue on the first program I tried (all generated with OneCNC).

As for the G41/G42, I tried a program mod, that used a radius of .275 instead of .250 (with a .500 end mill) and that did not fix anything, so I went into the tool offsets and changed the Diameter to .249 and viola, no problem! - editing for clarity here, for the tool offset, first I had .500, then when I got the alarm, I tried .499, still alarms, now when I use .249 it is fine. Even tho the page is asking for D, the program is using that number as the radius. Digging deeper, just making sure I was not misleading.

So where does a radius of .275 instead of .250 even come into it? Of the three circular moves you have shown in your listed program in Post #1, the first Radius is 0.49999925", rounded to the Least Programmable Increment it will be 0.5", the second Radius is 0.8500" and the third, according to how its listed in your Post, has a Radius of Zero. The issue will be the length of your TRC Start Up Move with a 0.5 Tool Radius registered.

huh... completely new program now blows past the Z tool change height... and if I go back to the first trial program, it changes fine.

Must be something in the post... going to dig deeper here.

With regards to your Tool Change problem, did you even bother to see if your control uses a Tool Change Macro, or by what means the Control is getting the Tool to the Tool Change position?

With a program sequence as in the following, leading into a Tool Change, I wouldn't be happy with the CAM Post.

N310 G00 Z0.2
N320 M01
N330 M05 G40 G49 G80
N340 M09
N350 (.500 CARBIDE END MILL ALUM)
N360 T3 M06

But, if the Tool Change was successful just once with that sequence, I would be looking at how the Control carries out the Tool Change. Just generating new programs and seeing what happens is tantamount to Pissing into the Wind.

In the above program sequence, the Tool is being left close to Z Zero of the Workpiece (N310 G00 Z0.2). G49 may move the Tool Up if your Tool Length Offsets are Minus Values and that parameters are set so that axis movement is executed with G49. Accordingly, any movement required for Tool Change must be being carried out by a Tool Change Macro program, or by the PMC program. So the digging you refer to is required at the Control level.
 
I believe that has to do with the fact the address "D" appearing in a comp call in a program looks in that column. You'll likely notice "H" in the ones next to it for tool length. Same thing. Not sure how well this holds on every Fanuc with any offset type. (A/B/C)

I'm thinking you already knew all that. Just a slip of the tongue.
My bad. I was trying to say if the parameter is set to radius, the header on offset page doesn't change. OP said the fanuc "clearly shows diameter". I assumed he was inferring that from the offset page.

But I was mixing up the headers with my VF2. It does say "diameter" on the offset page, but the fanuc only says "geom" or "wear" in those columns. :o
 
First off, I appreciate everyone's thoughtful comments, and helpful suggestions. I will update fully later tonight, but I just found the problem with the toolchange. I am new at this, so go easy on me... Thank you angelw for your awesome advice... Because I had one program that worked fine, I was comparing line by line what the two programs looked like... BUT I had forgotten that the tech had edited (at the machine) a few lines of code, (it was all a blur that day) ... I sent the file from the machine back to the computer and when comparing, I found that he had removed the M01 (from line 130) and M49 (from 135):
N125 G00 Z0.4
N130 M01
N135 M05 G40 G49 G80
N140 M09
N145 (5/16 X 18 FORM TAP)

I removed the M49 on one of the new programs and everything seems to be working fine now. I will dive into the other forum posts that have come in, but have to get a few things done now before end of day, cheers!!
 
First off, I appreciate everyone's thoughtful comments, and helpful suggestions. I will update fully later tonight, but I just found the problem with the toolchange. I am new at this, so go easy on me... Thank you angelw for your awesome advice... Because I had one program that worked fine, I was comparing line by line what the two programs looked like... BUT I had forgotten that the tech had edited (at the machine) a few lines of code, (it was all a blur that day) ... I sent the file from the machine back to the computer and when comparing, I found that he had removed the M01 (from line 130) and M49 (from 135):
N125 G00 Z0.4
N130 M01
N135 M05 G40 G49 G80
N140 M09
N145 (5/16 X 18 FORM TAP)

I removed the M49 on one of the new programs and everything seems to be working fine now. I will dive into the other forum posts that have come in, but have to get a few things done now before end of day, cheers!!

I don't see any M49, so I suspect that you mean G49. Removing the M01 is going to achieve Zero with regards rectifying any issue with a Tool Change. In fact, its common and good practice to have M01 (Optional Stop) at the end of each Tool Operation, as it allows for a controlled and orderly halt to a program for whatever reason, usually to check a dimension.

The fact that removing the G49 stopped the Z axis from running into Over-travel makes sense. Your Tool Length Offsets must be Minus Values, representing the Air Gap between the tip of the Tool when at Z Reference Return and the setting device being used. The fact that the Tool Length Offset is being Cancelled from a Z Coordinate above Zero will just about ensure that the Z axis will hit Z+ Over-travel. You can thank your Lucky Starts that your Offsets weren't set as plus values, typically the distance from the Tool Tip to the Spindle Nose. In that case, cancelling the Offset when the tool is at Z0.2 and Z0.4, as shown in your program listing, would have resulted in the Z axis driving the Tool as deep into the Workpiece that it could before the Servo System was overloaded.

Basically, the syntax of your program is rubbish, when you appear to be relying on the Tool Change routine, whether its a Macro Program, or part of the PMC program, to get the Tool Home. Doing so may be well and good if you knew exactly what the Tool Change routine was doing, but that seems not to be the case with your experience with this machine. If the tech was cognizant of your CAM Post output and set the machine up in that manner without explaining the Tool Change routine, he would last but a couple of minutes on my team.

Regards,

Bill
 
Last edited:








 
Back
Top