Fanuc OT Post

T_Dubs

Active member
Joined
Apr 26, 2021
Messages
246
Reaction score
112
Location
DFW, TX
I hope someone can help me. I am new to Fanuc with my first lathe running Fanuc OT. I am using Fusion 360 for CAM. It generate a post with a lot of extra G code that I don't think is needed for Fanuc OT. I have written a couple of small programs at the control, but the buttons are quite annoying so I am trying to just have Fusion generate the code for me.

Question is, is there a way I can get a post to generate for this old of Fanuc or am I stuck editing before sending to the machine. I don't mind editing, but I just don't know enough of what is needed and what is not.

I keep getting a 010 and 011 alarm in the middle of programs but it isn't consistent with the code. Let's say I have a face, rough and finish cycle. All 3 have the same G54, G99 and G97 before calling the X/Z moves; facing works, roughing works and then I get an alarm after the tool change for finishing.

Thoughts? Hope that all makes sense. I am obviously new but trying to learn what to do here.
 

T_Dubs

Active member
Joined
Apr 26, 2021
Messages
246
Reaction score
112
Location
DFW, TX
Here is a simple program I am trying to learn with...

O1004 (LATHE PART 1)
N10 G98 G18
N15 G20
N20 G50 S2000
N25 G28 U0.
N30 G28 W0.

(FACE1)
N35 T0707
N40 G54
N45 G99
N50 G97 S579 M3
N55 G0 X3.3 Z0.05
N60 G50 S1700
N65 G96 S500 M3
N70 G0 Z0.0516
.
.
.
N280 Z0.05
N285 G97 S579 M3

(PROFILE ROUGHING1)
N290 G99
N295 G97 S579 M3
N300 G0 X3.3 Z0.05
N305 G50 S1700
N310 G96 S500 M3
N315 G0 Z0.0004
N320 X2.53
N325 G71 U0.03 R0.04
N330 G71 P335 Q355 U0.01 W0.002 F0.01
N335 G0 X1.4793
N340 G1 Z-0.0146
N345 X1.57 Z-0.06
N350 Z-1.3
N355 X2.5
N360 G0 X3.3 Z0.0004
N365 Z0.05
N370 G80
N375 G97 S579 M3
N380 G28 U0.
N385 G28 W0.

(PROFILE FINISHING1)
N390 M1
N395 T0505
N400 G54
N405 G99
N410 G97 S579 M3
N415 G0 X3.3 Z0.05
N420 G50 S1700
N425 G96 S500 M3
N430 G0 Z0.0608
N435 X1.4701
N440 G1 Z-0.0192 F0.005
N445 X1.5608 Z-0.0646
N450 G18 G3 X1.57 Z-0.0756 I-0.011 K-0.011
N455 G1 Z-1.3
N460 X1.9727
N465 X2.0859 Z-1.2434
N470 G0 Z0.0608
N475 X1.4701
N480 G1 Z-0.0192 F0.005
N485 X1.5608 Z-0.0646
N490 G3 X1.57 Z-0.0756 I-0.011 K-0.011
N495 G1 Z-1.3
N500 X1.9727
N505 X2.0859 Z-1.2434
N510 G0 X3.3
N515 Z0.05
N520 G97 S579 M3

N525 G28 U0.
N530 G28 W0.
N535 M30
%
 

Dualkit

Well-known member
Joined
Apr 8, 2021
Messages
1,259
Reaction score
672
Location
Beaverdam Virginia
I have a Fanuc OT, and with a 2 axis lathe feel no need to use a CAM program. I have an extensive program library and a program to do trig for radii and angles. 010 & 011 alarms look like they are probably from unusable characters or code. That probably has more to do with the options your machine came with not because of its age. My OT doesn't use I & K for radii or G18 plane selection, it also has very few canned cycles.
 

g-coder05

Administrator
Staff member
Joined
Feb 8, 2021
Messages
687
Reaction score
529
Location
Capones Island Philippines
Website
machinistboard.com
Canned cycles look good. I don’t like the code structure at all and not a single safety line even at the beginning of the program. Lots of G28 and no G90 after it would bother me.

you should edit to put a G0 G90 G80 G18 G20 G40 before each segment just as precautionary measure. The G50 SXXXX should come before any motion (that is a seriously important line). G28 on my Kia’s with Ot control automatically put the machine in G91 incremental mode so missing a G90 at the start of a new segment could get exciting real fast.

I know most programmers like G28 since it allows you to set up 4 different home positions but I use G53 instead just because it keeps the machine in absolute.

I can’t help with the Fusion post but maybe ring up AD and ask them to make the mods? Not sure how much of that they do but I would definitely get that changed.
 

Vancbiker

Administrator
Staff member
Joined
Mar 21, 2021
Messages
1,632
Reaction score
1,677
Location
Vancouver, Washington. USA
Unless
CanneLots of G28 and no G90 after it would bother me......
.......G28 on my Kia’s with Ot control automatically put the machine in G91 incremental mode so missing a G90 at the start of a new segment could get exciting real fast.

I know most programmers like G28 since it allows you to set up 4 different home positions but I use G53 instead just because it keeps the machine in absolute.
Unless the OPs machine is set to use G code group B or C, it won’t use G90 or G91. IME, 99% of Fanuc controlled lathes are set to G code group A where X and Z values are absolute addresses and U and W are the incremental addresses. The G28s in the OP’s sample code are correct. Any subsequent move if commanded by X and/or Z will be in absolute.
 

lobust

Moderator
Staff member
Joined
Mar 17, 2021
Messages
926
Reaction score
903
Location
Orkney Islands, UK
I have a Fanuc OT, and with a 2 axis lathe feel no need to use a CAM program. I have an extensive program library and a program to do trig for radii and angles. 010 & 011 alarms look like they are probably from unusable characters or code. That probably has more to do with the options your machine came with not because of its age. My OT doesn't use I & K for radii or G18 plane selection, it also has very few canned cycles.
The G18 struck me as the only odd thing too, but it's up there at the start of the program as well, and OP says it's fine with that... It's redundant on a 2 axis lathe, as it can only ever be in G18.

The control can almost certainly use IJK or R. My O/Oi lathe post uses IK instead of R.

OP, is that an actual program that you have posted and ran on the machine that has caused alarms? The code is at the very least consistent, and there's really very little wrong with it. It's hard to find anything incorrect in the finishing code that is not also present in the previous sections. The only thing is as I mentioned, the G18 being called explicitly before a circular motion, which doesn't strike me as incorrect, just redundant...
 

angelw

Well-known member
Joined
Mar 21, 2021
Messages
313
Reaction score
595
Question is, is there a way I can get a post to generate for this old of Fanuc or am I stuck editing before sending to the machine. I don't mind editing, but I just don't know enough of what is needed and what is not.

I keep getting a 010 and 011 alarm in the middle of programs but it isn't consistent with the code. Let's say I have a face, rough and finish cycle. All 3 have the same G54, G99 and G97 before calling the X/Z moves; facing works, roughing works and then I get an alarm after the tool change for finishing.
Hello T_Duds,
The program for your control, old as it may be, conforms to what is referred to as FS16 Format and is the same as late model controls parameter set to use FS16 Format. Later control are able to be set to use either FS15, or FS16 Format; your control can only use FS16 Format.

Alarm 010 (p/s010) refers to an unusable G Code being specified in your program. G80 is not a G code used with a two axis machine without Live tooling; accordingly, G80 may be the reason for the 010 (p/s010) alarm. Canned Cycles that do use G80 to cancel the cycle, typically Drilling, Boring and Tapping Cycles, are also cancelled by any G Codes from G Code Group 01, they being G00, G01, G02 and G03. If the G71 Cycle did require G80 to cancel it and as this cycle can include all of these G Codes, the cycle would be canceled at the first occurrence of any of the Group 01 G Codes in the Profile Definition between the P and Q Blocks, long before getting to the G80 in your program.

The p/s011 alarm refers to no Feed Rate being specified for a Feed Move, or is inadequate. It seems that you have Feeds specified, but starting the G71 Cycle from Z0.0004 and then having a Finishing Allowance for Z of 0.002 may be causing an issue.

If the Z+ end of the work-piece is Z Zero, starting the G71 cycle from Z0.0004 would probably result in the tool scraping the end of the work-piece on each occasion the tool moved in Rapid Traverse Mode to the next DOC. It's quite unlikely that the Z axis will consistently position to within 0.0004" of Z Zero.

Regards,

Bill
 
Last edited:

T_Dubs

Active member
Joined
Apr 26, 2021
Messages
246
Reaction score
112
Location
DFW, TX
Unless the OPs machine is set to use G code group B or C, it won’t use G90 or G91. IME, 99% of Fanuc controlled lathes are set to G code group A where X and Z values are absolute addresses and U and W are the incremental addresses. The G28s in the OP’s sample code are correct. Any subsequent move if commanded by X and/or Z will be in absolute.
This is how this machine is set...

OP, is that an actual program that you have posted and ran on the machine that has caused alarms? The code is at the very least consistent, and there's really very little wrong with it. It's hard to find anything incorrect in the finishing code that is not also present in the previous sections. The only thing is as I mentioned, the G18 being called explicitly before a circular motion, which doesn't strike me as incorrect, just redundant...
Yes, this is a code I ran and got the alarm at the beginning of the finishing cycle. That is what is baffling me, it doesn't stop it the first time it is called, but stops it later on.

Alarm 010 (p/s010) refers to an unusable G Code being specified in your program. G80 is not a G code used with a two axis machine without Live tooling; accordingly, G80 may be the reason for the 010 (p/s010) alarm. Canned Cycles that do use G80 to cancel the cycle, typically Drilling, Boring and Tapping Cycles, are also cancelled by any G Codes from G Code Group 01, they being G00, G01, G02 and G03. If the G71 Cycle did require G80 to cancel it and as this cycle can include all of these G Codes, the cycle would be canceled at the first occurrence of any of the Group 01 G Codes in the Profile Definition between the P and Q Blocks, long before getting to the G80 in your program.

The p/s011 alarm refers to no Feed Rate being specified for a Feed Move, or is inadequate. It seems that you have Feeds specified, but starting the G71 Cycle from Z0.0004 and then having a Finishing Allowance for Z of 0.002 may be causing an issue.

If the Z+ end of the work-piece is Z Zero, starting the G71 cycle from Z0.0004 would probably result in the tool scraping the end of the work-piece on each occasion the tool moved in Rapid Traverse Mode to the next DOC. It's quite unlikely that the Z axis will consistently position to within 0.0004" of Z Zero.

Regards,

Bill
I didn't pay attention to the z0.0004, not sure why it is doing that. The work piece was faced .050 so no issue of scraping the work, but also no reason there couldn't just be a z0.0. I will take a deeper look.

....

Last night, I did edit the program and removed the G90, G18 and G80's. The program didn't even start, but I didn't attempt again. I was at the end of my day and just quit.

I'll try again shortly because for some reason, depending where I hit the start button from, it will work sometimes and sometimes won't. Not sure on that. Sometimes I'll pull the program up, be at the first line, hit cycle start and off it goes. Sometimes I get the 010 alarm. Just messing around, I hit the "check" soft key and started the program from there, off it goes. However, it isn't consistent. Makes me wonder if something else is going on with getting the 010 alarm here and during the program running. Dunno.... wish I knew more.
 

T_Dubs

Active member
Joined
Apr 26, 2021
Messages
246
Reaction score
112
Location
DFW, TX
Also, thanks for everyone's help. I know a 2 axis lathe isn't rocket science by any stretch, I'm just slow haha...
 

angelw

Well-known member
Joined
Mar 21, 2021
Messages
313
Reaction score
595
I didn't pay attention to the z0.0004, not sure why it is doing that. The work piece was faced .050 so no issue of scraping the work, but also no reason there couldn't just be a z0.0. I will take a deeper look.
Hello T_Duds,
If the work-piece is faced at Z0.050 and you start the G71 Cycle at Z0.0004, that would ensure that the tool will interfere with the face and quite heavily so, at Rapid Traverse speed when the tool rapids to each DOC in the G71 Cycle. If the same tool is being used to Face and with the G71 Cycle, I can't see any way the tool wouldn't hit the end of the work-piece with each X move to the next DOC.

Regards,

Bill
 

Vancbiker

Administrator
Staff member
Joined
Mar 21, 2021
Messages
1,632
Reaction score
1,677
Location
Vancouver, Washington. USA
........depending where I hit the start button from, it will work sometimes and sometimes won't. Not sure on that. Sometimes I'll pull the program up, be at the first line, hit cycle start and off it goes. Sometimes I get the 010 alarm........
This is concerning. At this point in your learning, you should only start at the beginning of the program. After any intervention on the machine or control, ensure you position the turret to a safe start point then go to the Edit mode, press Reset, then back to memory and press Cycle Start.
 

T_Dubs

Active member
Joined
Apr 26, 2021
Messages
246
Reaction score
112
Location
DFW, TX
Hello T_Duds,
If the work-piece is faced at Z0.050 and you start the G71 Cycle at Z0.0004, that would ensure that the tool will interfere with the face and quite heavily so, at Rapid Traverse speed when the tool rapids to each DOC in the G71 Cycle. If the same tool is being used to Face and with the G71 Cycle, I can't see any way the tool wouldn't hit the end of the work-piece with each X move to the next DOC.

Regards,

Bill
My mistake, once again decimals and -/+ are important. I meant the part is faced at -0.050.
 

T_Dubs

Active member
Joined
Apr 26, 2021
Messages
246
Reaction score
112
Location
DFW, TX
This is concerning. At this point in your learning, you should only start at the beginning of the program. After any intervention on the machine or control, ensure you position the turret to a safe start point then go to the Edit mode, press Reset, then back to memory and press Cycle Start.
It is always my intention to start the program from the beginning. Even if a couple of toolpaths are already done, I clearly have the time to watch it cut air and continue to observe and learn.

Perhaps my procedure is flawed of how I go about it. I had about 10 mins of walk-through with the machine before we disconnected power and while I did record everything for reference, restarting a program was not something I have recorded. I will try what you suggested and hopefully that fixes my procedure. Probably simple, common sense to everyone reading, but these are the little tips/tricks I am looking for. Thank you!!
 

Herding Cats

Hardplates
Joined
Feb 1, 2021
Messages
2,235
Reaction score
1,999
Location
Primary: State of Confusion Secondary: PA
Website
speartoolandmachine.com
I'll be honest, I've only ever used canned cycles from drilling on a lathe. For the couple times a month I run the lathe it's too much info for me to forget.

If I post the code out as G00 G01 G02 G03 blah blah blah I can easily come from running mills all day and know exactly where the code is and what it is going to do next.
 

T_Dubs

Active member
Joined
Apr 26, 2021
Messages
246
Reaction score
112
Location
DFW, TX
Well, I just ran the program after removing all of the G18, G20, G54 and G80 lines. Worked perfectly. I don't know how to get fusion not to call a G54, but obviously my lathe doesn't have different offsets, so I wonder if that was causing confusion in the controller. Same with G18 and G80, my manual does not list them as capable G codes.

Either way, it works now, I guess I will just edit in the future. I appreciate the help from everyone. Thanks!!
 

angelw

Well-known member
Joined
Mar 21, 2021
Messages
313
Reaction score
595
Well, I just ran the program after removing all of the G18, G20, G54 and G80 lines. Worked perfectly. I don't know how to get fusion not to call a G54, but obviously my lathe doesn't have different offsets, so I wonder if that was causing confusion in the controller. Same with G18 and G80, my manual does not list them as capable G codes.
Hello T_Duds,
Would you mind Posting a picture of the Work-shift Offset page of the control, the page where you would set the Z Work-shift for the current job?

In your Post #9 you said that the program didn't even run with G90, G18 and G80's removed. I can't see any occurrences of G90 in the program example you Posted, but if your control is set to use G Code System "A", G90 is a parallel OD Turning and ID Boring Cycle. It is an unusual Fanuc Control that would not run a program with G18 omitted, as it's a Modal G Code that is retained even when power to the control is cycled. Whether the control starts up with G17, G18 or G19 Modal is set via parameter and if its omitted from the program, no error is raised until an Arc is programmed that uses a different G17 to G18 code than the one that's loaded by default when the control is powered up.

I can state with absolute certainty that G80 is not a code used by your two axis machine. The only drilling cycle your machine has is G74, which is a Face Grooving Cycle that can also be used as a Peck Drilling Cycle. It also requires no cancellation on completion of its operation.

My mistake, once again decimals and -/+ are important. I meant the part is faced at -0.050.
An extraordinarily strange way to program a part for a lathe where the end is faced off to a coordinate other than Zero, except if the Chuck end of the part is being used as Z Zero. The following code in your Profile Definition for the G71 Cycle describes a 0.045 chamfer, but if the part is faced to Z-0.05, the chamfer will only be 0.01". This may be your intention, but its an unusual way of programming and would make reading the program and relating it to a part drawing difficult.

N335 G0 X1.4793
N340 G1 Z-0.0146
N345 X1.57 Z-0.06

Regards,


Bill
 
Last edited:

T_Dubs

Active member
Joined
Apr 26, 2021
Messages
246
Reaction score
112
Location
DFW, TX
I already shut er down for today but I can snap a picture tomorrow.

I guess I didn't delete any G90 as you mentioned them not even being in my code, guess I just got keyboard happy while typing. Or maybe I meant to put G20.

Also, I think when my program didn't run was more of a problem with how I was trying to start it. I'm not exactly sure the steps I took, but I'm sure it'd be obvious to someone watching over my shoulder. However, I started it today as vancbiker suggested and it started without issues. I did it on 8 parts today with no issue.

And I will admit the way I programmed the part is unusual. My logic comes from my only other experience with the mill where the part is hidden under .050 (or whatever) of stock so it can be faced. That is the intuitive way presented in fusion. I suppose I could program normal and just start the facing at -.050 which would make the code easier to read and easier to trouble shoot. I'll admit today while I was trying to read the code just for my own learning, it did throw me for a loop for a sec.

In the future, ill just write the code at the machine, or even in me post editor and then transfer it. I now understand why EVERYONE says they program at the machine. I just wanted to be able to CAM for more complex parts and I thought it'd be easier. I was wrong haha.
 
Top Bottom