What's new
What's new

Fanuc OM G54 G55 height issue

voicurob

Plastic
Joined
Jun 18, 2021
Hi, thanks for the reply. To reiterate what I said in a previous post, when I Postprocess the program with order by operation checked on G54, G55, G56 etc Z heights works like a charm but I have more tool changes since it makes all the operation from one part before moving the the next coordintate system. On the other hand if I Postprocess with order by tool checked on as soon as it finishes the first operation and tries to move to the next coordinate system the Z height is in the wrong place.
I can't figure out why this behaviour occurs.
Hope it was clear.
Thanks
 

13engines

Hot Rolled
Joined
Jun 30, 2015
Location
Saint Paul
Hi, thanks for the reply. To reiterate what I said in a previous post, when I Postprocess the program with order by operation checked on G54, G55, G56 etc Z heights works like a charm but I have more tool changes since it makes all the operation from one part before moving the the next coordintate system. On the other hand if I Postprocess with order by tool checked on as soon as it finishes the first operation and tries to move to the next coordinate system the Z height is in the wrong place.
I can't figure out why this behaviour occurs.
Hope it was clear.
Thanks

Show us two samples of your post processor output concerning the same part. One with Order by Operation checked and one with Order by Tool checked. Include at least two tools across at least two Work Offsets.

Do something basic like you're going to spot drill and drill two holes on two parts. That or cut two short slots with two different tools on two parts. Something simple so it's not super long.

Let's see your code.
 

sinha

Stainless
Joined
Sep 25, 2010
Location
india
G00 is not needed with G53. May delete it. This is, however, not related to your issue.

Try changing the sequence:
G55;
T4 M06; (even if the spindle has T4)
G43 H04;
etc
 

voicurob

Plastic
Joined
Jun 18, 2021
G00 is not needed with G53. May delete it. This is, however, not related to your issue.

Try changing the sequence:
G55;
T4 M06; (even if the spindle has T4)
G43 H04;
etc

Hi, I tried that, it did not work. Also when i use G49 the machine just stops when it reaches that G49.
 

voicurob

Plastic
Joined
Jun 18, 2021
Preserve order program

%
O2001
(T2 D=6. CR=0. TAPER=120DEG - ZMIN=27. - SPOT DRILL)
(T3 D=8. CR=0. TAPER=118DEG - ZMIN=0. - DRILL)
G90 G94 G17 G80
G21
G53 G00 Z0.

(DRILL3)
T2 M06
S5700 M03
G54
M08
G00 X-30. Y-23.
G43 Z55. H02
G00 Z45.
G98 G81 X-30. Y-23. Z27. R33.5 F171.
G80
Z55.
M05
G53 G00 Z0.

(DRILL4)
M09
M01
T3 M06
S3638 M03
G54
M08
G00 X-30. Y-23.
G43 Z55. H03
G00 Z45.
G81 X-30. Y-23. Z0. R33.5 F437.
G80
Z55.
M05
G53 G00 Z0.

(DRILL3)
M09
M01
T2 M06
S5700 M03
G55
M08
G00 X-30. Y-23.
G43 Z55. H02
G00 Z45.
G81 X-30. Y-23. Z27. R33.5 F171.
G80
Z55.
M05
G53 G00 Z0.

(DRILL4)
M09
M01
T3 M06
S3638 M03
G55
M08
G00 X-30. Y-23.
G43 Z55. H03
G00 Z45.
G81 X-30. Y-23. Z0. R33.5 F437.
G80
Z55.

M09
G53 G00 Z0.
G53 X0. Y0.
M30
%

Order by tool program
%
O3001
(T2 D=6. CR=0. TAPER=120DEG - ZMIN=27. - SPOT DRILL)
(T3 D=8. CR=0. TAPER=118DEG - ZMIN=0. - DRILL)
G90 G94 G17 G80
G21
G53 G00 Z0.

(DRILL3)
T2 M06
S5700 M03
G54
M08
G00 X-30. Y-23.
G43 Z55. H02
G00 Z45.
G98 G81 X-30. Y-23. Z27. R33.5 F171.
G80
Z55.
G53 G00 Z0.

(DRILL3)
G55
G00 X-30. Y-23.
G43 Z55. H02
G00 Z45.
G81 X-30. Y-23. Z27. R33.5 F171.
G80
Z55.
M05
G53 G00 Z0.

(DRILL4)
M09
M01
T3 M06
S3638 M03
G54
M08
G00 X-30. Y-23.
G43 Z55. H03
G00 Z45.
G81 X-30. Y-23. Z0. R33.5 F437.
G80
Z55.
G53 G00 Z0.

(DRILL4)
G55
G00 X-30. Y-23.
G43 Z55. H03
G00 Z45.
G81 X-30. Y-23. Z0. R33.5 F437.
G80
Z55.

M09
G53 G00 Z0.
G53 X0. Y0.
M30
%
 

13engines

Hot Rolled
Joined
Jun 30, 2015
Location
Saint Paul
Hi Voicurob,

I ran your code on my OM. (See below)

One question: What version of OM are you running. A?B?C?

Not sure if you resurrected your machine from battery death and had to reload parameters at one time, but you might want to review parameters 1 thru 3. Some of them have to do with how G43 acts and what happens at RESET. Also how your RELATIVE position acts.

I only ran your 2nd batch of code as that's the one a person would normally want to use.

As I figured, my machine over-traveled in +Z after the G53Z0. move and the subsequent recall of G43. Your program ran fine after I removed all the garbage.

Here's the parts of your code that worked as it should. (with parts removed and a few things cleaned up)

%
O3001
(T2 D=6. CR=0. TAPER=120DEG - ZMIN=27. - SPOT DRILL)
(T3 D=8. CR=0. TAPER=118DEG - ZMIN=0. - DRILL)
G90 G17 G80 G21

(DRILL3)
T2 M06
S5700 M03
G54
G00 X-30. Y-23.
G43 Z45. H02
M08
G98 G81 Z27. R33.5 F171.
G55
X-30. Y-23.
G80
M09
G0Z55.
G53 Z0. M5

(DRILL4)
M01
T3 M06
S3638 M03
G54
G00 X-30. Y-23.
G43 Z45. H03
M08
G81 Z0. R33.5 F437.
G55
X-30. Y-23.
G80
M09
G0Z55.
G53 Z0.Y0.M5
M30
%

In all the post processor outputs I've seen on machining forums, I'm still waiting to see one without a whole lot of garbage tagging along. Just once I'd like to see that.

Another question: If you have all three axis of your machine at roughly mid travel, what happens when you MDI say T2M06? If the machine head goes up and does a tool change, then you can easily remove all G53 or any other Home type moves before going for a new tool. All the preliminary stuff needed for a tool change is probably included in the Tool Change Macro or Program, so why duplicate it in the main program? The occasional need to move in X or Y before a tool change to avoid high sitting fixtures is another thing. Program accordingly there.

A little note of caution when moving between work offsets with differing Z heights. It is critical to be mindful of when the Z setting of the newly called Work Offset will take effect. In the case of your current drilling program, using G98 instead of G99 is a good way of playing it safe, especially because your Initial Level is higher then your R level. In the program above, when the program went from G54 to G55 and the G55 XY coordinate was called and realized, the Z display showed 60mm and not 45mm, which was the Retract to Initial Level height, plus the 15mm that my G55 setup was lower then my G54 one. (A safe move) With the next push of the green button, the tool lowered itself to the correct R level, (33.5) with full consideration of the G55 Z setting.

Try the program above. It should work if your setup is correct. Sinha is right about G49. Shouldn't be a problem.
 

voicurob

Plastic
Joined
Jun 18, 2021
Hi 13engines,

It is an O-MC controller.

I do not know the history of the machine, since i have it, i did not have to reload the parameters or anything of the kind.

The code you provided works like a charm, so thank you very much, but I still do not understand what in the original code made it behave like that (as I said, i am new to this).

Regarding the tool change, it does not matter were it is, it just goes straight to tool change position.
 

13engines

Hot Rolled
Joined
Jun 30, 2015
Location
Saint Paul
Hi Voicurob,

Glad to hear you haven't had to deal with parameter loss. I hope you're all backed up parameter wise.

I think the the biggest problem with your code is all the G53's and the multiple G43 calls. That and canceling the drilling routine before moving to the next Work Offset and then starting it up again once you get there.

Curious when you said that G49 causes your machine to hang. Not sure if when you tried it you may have had something like a drill cycle active or something else that was blocking it. Did you simply type G49 in MDI and hit Start? Curious if it would act differently in Auto mode.

I'd like to introduce to you the idea of a safety line at the beginning of each tool. It does much to make sure the machine is in a neutral state where nothing is left over or left to chance. Each tool starts clean so to speak. Below is a copy of how all my tools start. Whether drill or mill it doesn't matter. I know nothing about scripts or computer programming, but I was able to go into the post processor file and find the areas that matched what was being output, and change them to what I wanted. Below is a sample of my tool startup. (modified for Metric) I put the initial Work Offset in there too, (in this case G54) but if you were uncomfortable with that you could always enter on the next line before G0.

T1M6 (SPOT DRILL)
G17G21G40G49G54G80G90G98

G0 X0.00 Y0.00
G43 Z3. H1 S1500 M3 T2
M8

Below is a sample of your code. My critiques of it added.

O3001
(T2 D=6. CR=0. TAPER=120DEG - ZMIN=27. - SPOT DRILL)
(T3 D=8. CR=0. TAPER=118DEG - ZMIN=0. - DRILL)

G90 G94 G17 G80 (These first two lines could be combined into one.)
G21
G53 G00 Z0. (None of this line is needed)

(DRILL3) (Put this on the same line as your tool change)
T2 M06
S5700 M03
G54
M08(Wait until the head is down near the work before turning on the coolant)
G00 X-30. Y-23.
G43 Z55. H02 (Why not Z45. here. That's where your Initial Level is being set to anyway?)
G00 Z45.(G0 is Modal. No need to repeat it. Also why the 2nd Z move? Not needed.)
G98 G81 X-30. Y-23. Z27. R33.5 F171.(You're already at this XY location. No need to repeat it.)
G55 X-30. Y-23. (If you were adding a 2nd fixture move you'd put it here)

G80
M9 (Don't forget to turn off the coolant. May be part of your tool change Macro but better here.)
Z55.
G53 G00 Z0.(This line is not needed. Your tool change Macro will handle this.)

G53Z0.Y0.M5 (Good way to end program. Puts head up and brings table forward to reload.)
M30

A sample if using previous suggestion.

O3001
(T2 D=6. CR=0. TAPER=120DEG - ZMIN=27. - SPOT DRILL)
(T3 D=8. CR=0. TAPER=118DEG - ZMIN=0. - DRILL)

T2M6 (SPOT DRILL)
G17G21G40G49G54G80G90G98

G0X30. Y-23.
G43Z45.H2S5700M3T3
M8
G98G81Z27.R33.5F171.
G55X30.Y-23.
G80
M9

T3M6 (8MM DRILL)
G17G21G40G49G54G80G90G98

G0X30. Y-23.
G43Z45.H3S3638M3T2
M8
G98G81Z0.R33.5F437.
G55X30.Y-23.
G80
M9
G53Z0.Y0.M5
M30

Of course do what works for you. Double check that G49 problem. Seems odd.

Good luck with your new machine programming. I got to get back to work...
 

voicurob

Plastic
Joined
Jun 18, 2021
Hi Voicurob,

Glad to hear you haven't had to deal with parameter loss. I hope you're all backed up parameter wise.

I think the the biggest problem with your code is all the G53's and the multiple G43 calls. That and canceling the drilling routine before moving to the next Work Offset and then starting it up again once you get there.

Curious when you said that G49 causes your machine to hang. Not sure if when you tried it you may have had something like a drill cycle active or something else that was blocking it. Did you simply type G49 in MDI and hit Start? Curious if it would act differently in Auto mode.

I'd like to introduce to you the idea of a safety line at the beginning of each tool. It does much to make sure the machine is in a neutral state where nothing is left over or left to chance. Each tool starts clean so to speak. Below is a copy of how all my tools start. Whether drill or mill it doesn't matter. I know nothing about scripts or computer programming, but I was able to go into the post processor file and find the areas that matched what was being output, and change them to what I wanted. Below is a sample of my tool startup. (modified for Metric) I put the initial Work Offset in there too, (in this case G54) but if you were uncomfortable with that you could always enter on the next line before G0.

T1M6 (SPOT DRILL)
G17G21G40G49G54G80G90G98

G0 X0.00 Y0.00
G43 Z3. H1 S1500 M3 T2
M8

Below is a sample of your code. My critiques of it added.

O3001
(T2 D=6. CR=0. TAPER=120DEG - ZMIN=27. - SPOT DRILL)
(T3 D=8. CR=0. TAPER=118DEG - ZMIN=0. - DRILL)

G90 G94 G17 G80 (These first two lines could be combined into one.)
G21
G53 G00 Z0. (None of this line is needed)

(DRILL3) (Put this on the same line as your tool change)
T2 M06
S5700 M03
G54
M08(Wait until the head is down near the work before turning on the coolant)
G00 X-30. Y-23.
G43 Z55. H02 (Why not Z45. here. That's where your Initial Level is being set to anyway?)
G00 Z45.(G0 is Modal. No need to repeat it. Also why the 2nd Z move? Not needed.)
G98 G81 X-30. Y-23. Z27. R33.5 F171.(You're already at this XY location. No need to repeat it.)
G55 X-30. Y-23. (If you were adding a 2nd fixture move you'd put it here)

G80
M9 (Don't forget to turn off the coolant. May be part of your tool change Macro but better here.)
Z55.
G53 G00 Z0.(This line is not needed. Your tool change Macro will handle this.)

G53Z0.Y0.M5 (Good way to end program. Puts head up and brings table forward to reload.)
M30

A sample if using previous suggestion.

O3001
(T2 D=6. CR=0. TAPER=120DEG - ZMIN=27. - SPOT DRILL)
(T3 D=8. CR=0. TAPER=118DEG - ZMIN=0. - DRILL)

T2M6 (SPOT DRILL)
G17G21G40G49G54G80G90G98

G0X30. Y-23.
G43Z45.H2S5700M3T3
M8
G98G81Z27.R33.5F171.
G55X30.Y-23.
G80
M9

T3M6 (8MM DRILL)
G17G21G40G49G54G80G90G98

G0X30. Y-23.
G43Z45.H3S3638M3T2
M8
G98G81Z0.R33.5F437.
G55X30.Y-23.
G80
M9
G53Z0.Y0.M5
M30

Of course do what works for you. Double check that G49 problem. Seems odd.

Good luck with your new machine programming. I got to get back to work...

Thank you very much. I manage to make it run as it should thanks to you.
 

Don Davis 87

Aluminum
Joined
Mar 7, 2014
Location
Houston, TX
I assume your G54 work fixture offset is set at Z 0.000, What is your G55 Z offset set at ? if it's anything positive it's wrong, if the top of your part at the G55 location is lower than the G54 location, the G55 Z must be a negative number which adds to the Z negative numbers which are your Tool Length Offsets. Capishe ?
 








 
Top