Fanuc lathe drilling and tapping post processor help required

Fanuc lathe drilling and tapping post processor help required

iporter6
Advocate Advocate
2,573 Views
20 Replies
Message 1 of 21

Fanuc lathe drilling and tapping post processor help required

iporter6
Advocate
Advocate

Hi good people of Fusion CAM world.  I posted this yesterday, but it got deleted, this is my second attempt.

 

I need some help with modifying my Fanuc post for my 2012 Doosan Lynx 220 2 axis, no live tool with Fanuc i.

 

Sorry if it’s a big long first question on the forum, but I’ll try to put as much info here as I can, if there is any info missing or any questions, please just say.  I have done a few basic changes to my post, but this is too much to work out myself.

 

So, the problem…….Drilling and tapping post needs 2 basic changes.

 

Current fusion post of peck drill with full retract using Fanuc general turning.  I need lines N17 and N23 to be posted differently.

(DRILL2)

N14 T0707

(6.9 DRILL)

N15 G54

N16 M8

N17 G98  (I want this to be G99)

N18 G97 S550 M3

N19 G0 X0. Z10.

N20 G0 Z5. (it seems to repeat these Z positions but no problem really)

N21 Z10.

N22 Z5.

N23 G83 X0. Z-16.5 R5. Q15. F44.  (Q NEEDS TO BE 15000 no decimal. F NEEDS TO BE IN MM/REV)

N24 G80

N25 Z10.

 

Proven hand written code for full retract peck drill cycle that I use in “pass through”

G28 U0. W0.   (HOME, expensive if you forget this!)

T0808 (8.8 drill)

G54

M8

G99 (FEED PER REV)

G97 S2500 M3

G0 X0. Z10.  (RAPID TO POSITION)

G83 X0. Z-16.5 R0. Q15000 F0.15 (SEE NOTES BELOW)

G80

Z10. M9

G28 U0. W0.

 

So the important bits are:

G99 = feed per rev

G83 = drill peck full retract

Z= drill depth in absolute

R= return plane in RELATIVE from current position

Q= peck depth in MICRONS WITH NO DECIMAL POINT (15mm)

F= feed per rev

 

 

Very similar story with the tapping cycle.

 

Fusion post

N29 T0909

(516-24 TAP)

N30 G54

N31 M8

N32 G98  (NEEDS TO BE G99)

N33 G97 S250 M3

N34 G0 X0. Z10.

N35 G0 Z5. (REPEATS, BUT NO PROBLEM)

N36 Z10.

N37 Z5.

N38 M29 S250

N39 G84 X0. Z-10. R5. P0 Q2. F264.5  (Q needs to be in microns with no decimal point, F in MM/REV)

N40 G80

N41 Z10.

 

MANY THANKS FOR READING THIS FAR!

 

Ivan

0 Likes
2,574 Views
20 Replies
Replies (20)
Message 2 of 21

s.noke71
Collaborator
Collaborator

Hi Ivan,

are you using the Doosan post? have you chosen Lynx correctly and not Puma?

0 Likes
Message 3 of 21

iporter6
Advocate
Advocate

Hi, thanks for the reply.

In the post library the only Doosan turning post is a mill/turn for a 31i.

Should I try this?  My control just says Fanuc i

I have been using the general Fanuc turning post.

Ivan

0 Likes
Message 4 of 21

engineguy
Mentor
Mentor

@iporter6 

 

From what I have been able to find the "Feed per Revolution" isn`t available on drilling operations, only turning operations.

The Doosan post mentioned by @s.noke71 will output the correct G83 line but will still only produce G98 as far as I can tell.

Have a look at this link for the Knowledge Base on this issue :-

http://help.autodesk.com/view/fusion360/ENU/?caas=caas/sfdcarticles/sfdcarticles/Can-NC-code-be-outp...

 

Here is a simple drill I did with the Fanuc post, I have modified it for the G28 line you wanted.

%
O8881
N10 G99 G18
N11 G21
N12 G50 S6000
N13 G28 U0. W0.

(DRILL3)
N14 T0101
N15 G54
N16 M8
N17 G98
N18 G97 S5000 M4
N19 G0 X0. Z10.
N20 G0 Z5.
N21 Z10.
N22 Z5.
N23 G83 X0. Z-20. R5. Q2. F180.
N24 G80
N25 Z10.

N26 M9
N27 G28 U0. W0.
N28 M30
%

 

I maodified line 729 in the post to look like this to generate the G28 U0 W0, the bit in Red is what I added.

 

writeBlock(gFormat.format(28), "U" + xFormat.format(0), "W" + zFormat.format(0)); // retract
forceXYZ();

 

Sorry, all I have I`m afraid, hope it is of some help !!

 

Regards

Rob

0 Likes
Message 5 of 21

s.noke71
Collaborator
Collaborator
Try it Ivan, chose lynx in post options
0 Likes
Message 6 of 21

iporter6
Advocate
Advocate

@s.noke71 @engineguy 

Thanks for taking the time to reply.

I tried modifying the fanuc post and also tried the Doosan post.  The Doosan post works with drilling and tapping perfectly.  The R,Q, and no decimal are spot on.  The problem is i can't work out how to stop it posting M codes for sub and live spindles.  eg G97 S1000 M3 P12

 

I found a way to force G99 in the fanuc post by looking here :

https://forums.autodesk.com/t5/fusion-360-computer-aided/lathe-drill-feed-post-in-fpm-not-ipr-how-ca...

 

I need to try it in the doosan post, but they seem to be written very differently.  For example, I found the bit about no decimal points for Q in the doosan post and copied it to the fanuc, but it removed decimals for the Z also.

 

So my new question is.... How do I define the Doosan post to output only a 2 axis lathe.  I can't be the only person wanting this?

 

Ivan

 

0 Likes
Message 7 of 21

seth.madore
Community Manager
Community Manager

The Doosan post is actually a few posts rolled together, more or less. Select the appropriate machine and it "should" stop posting out the extra M codes:

2019-02-21_08h22_38.png


Seth Madore
Customer Advocacy Manager - Manufacturing


0 Likes
Message 8 of 21

iporter6
Advocate
Advocate

hey @seth.madore , love your work! 

The problem is, you can get a Lynx with ALL the fruity bits.  C,Y, live tools, sub, etc, etc but as you show, there is only one option to pick.  Mine is a poverty spec 2 axis.

I tried removing the || MILLING || but it made absolutely no difference.  

I will give it some more effort as I really need to get this sorted.  

thanks

Ivan

0 Likes
Message 9 of 21

engineguy
Mentor
Mentor

@iporter6 

 

Here is some code from my endevours, have a look at it and let me know if it would work for you or how far away it is, it looks fine but for the B0, M34 (This is for disengage the C axis and swap to Main Spindle so maybe OK) and the P11 (Part catcher off so shouldn`t be a problem I think) outputs, I haven`t found out how to get rid of them so far. Do you get errors at the machine from any of these??

This is from the DOOSAN Post :-

%
O8881
G21

N1(DRILL3)
G0 G28 U0.
G28 W0.
M90
G54
G99
T0101
M8
G97 S1000 M4 P11
G0 Z10.
X0.
G80
G0 Z5.
G83 Z-20. R0. Q1500 F0.04
G80
G0 Z10.
M5 P11
M9

G0 G28 U0.
G28 W0.
M34
G54 M80

M30
%

 

 

 

 

 

The C axis was deleted from the Machine Configuration and that helped, it does mention in the Post that for the Lynx (I have made the Lynx the machine default BTW) that the "if Lynx" then it is the Machine Configuration that needs sorting but the Y axis is "Greyed out" so I haven`t found a way of removing that short of attacking the .XML file which I may get around to later today.

 

Regards

Rob

0 Likes
Message 10 of 21

seth.madore
Community Manager
Community Manager

I'm thinking we might be better off just starting with the Fanuc turning post and working from there. However, removing the sub spindle choices and whatnot shouldn't be too big of a deal. @engineguy if you want to keep playing with the post, knock yourself out. I don't want to duplicate the efforts, just let me know 🙂 


Seth Madore
Customer Advocacy Manager - Manufacturing


0 Likes
Message 11 of 21

engineguy
Mentor
Mentor

@seth.madore 

 

Seth, you could well be right, the Fanuc Post is (To me anyway) the simplest to use, the only thing as far as I can see that needs adressing in the Fanuc one is the G83 line to get the Q values to post as mili without a decimal and the F values to be in in/rev, I haven`t been able get it to work like that so if you are able to do that then please by all means feel free to do it, end of the day it`s about getting the OP @iporter6  off to the "chip making" races asap Smiley Happy 

 

I am a bit short on time today anyway !!

 

Regards

Rob

0 Likes
Message 12 of 21

seth.madore
Community Manager
Community Manager

Just wanted to update you on this post:

I've got the drill and taps running at feed per rev. All seems to be good. I still need to add in the other bits about depths not being posted in decimal.

Heading out shortly to go move an automatic CMM into my shop, so I will likely not get back to this until later today or tomorrow. 


Seth Madore
Customer Advocacy Manager - Manufacturing


0 Likes
Message 13 of 21

iporter6
Advocate
Advocate

@seth.madore @engineguy  thanks for your continued efforts.  A CMM seems like a much more interesting option than thrashing post code.

 

I haven't had time to try all the extra codes on the lathe, but it didn't seem to mind the extra P11 on the spindle command (P11 = main spindle as apposed to live or sub)

I'll try to see if it gets upset with some of the other M and P codes this weekend.

 

I'll obviously leave it up to you to decide which post to modify.  I like the fanuc as a starting point because it seems less complicated (to me).  But it doesn't handle the clearance plane, feed height or retract plane at all well.  The Doosan post does all of this 100% perfectly apart from feed per rev.

 

Appreciate all the help.  Have a great weekend.

Ivan

0 Likes
Message 14 of 21

iporter6
Advocate
Advocate

@seth.madore @engineguy 

I tried the Doosan post without any changes, just selecting "Lynx". 

It ignores the P11 & P12 when commanding the spindle, so no probs there.

It just hangs the lathe when it gets any of the M codes I don't need.  None of them are listed in my Doosan manual.

M34 M35 M89

It flags an NC address error when it reads G0 G28 G53 B0. (SUB SPINDLE RETURN) and I think it also didn't like "G0 C0"

 

N1(FACE1 2)
G0 G28 G53 B0. (SUB SPINDLE RETURN)
G28 U0.
G28 W0.
M90
G54
G99 G18 M34
G50 S5000
T0101
(VCMT R0.8)
G97 S1137 M3 P11
G0 Z11.............

 

T0909
(9.25 DRILL)
G97 S3420 M3 P12
M90
G0 C0.
M89
G0 Z16.
X0.
G80
G0 Z6.
G83 Z-20. R-1. Q10000 F727. M89
G80
G0 Z16.
M5 P12

 

Do we think its easier to delete these things from the Doosan post or correct the drilling in the Fanuc?

 

Is there a way to put this on the official list?  I'm not familiar with how this works.

thanks

Ivan

 

 

0 Likes
Message 15 of 21

s.noke71
Collaborator
Collaborator
Ivan,
You may have the drill set as a live drill in your tool library
for this line here i highlight it and use the find and replace function but
keep the replace line empty it will then delete all of these lines in the
prog.
It runs trouble free after that.

G0 G28 G53 B0. (SUB SPINDLE RETURN)
0 Likes
Message 16 of 21

iporter6
Advocate
Advocate

@s.noke71  thanks for the tip about live tool.

I have managed to switch off the sub spindle line by doing this on line 618:

gotSecondarySpindle = false;

 

the only thing now stopping the code run is the M34 that it puts at the start of the program only (I can delete it from the post manually I guess)

The G98 for drilling is far from ideal, but  SHOULD run on the machine.

The tapping is perfect.

 

I just need help now removing the M34 which is "C axis disable" 

 

thanks

Ivan

 

0 Likes
Message 17 of 21

seth.madore
Community Manager
Community Manager

At or around line 1685, we will find this line:

writeBlock(feedMode, gPlaneModal.format(18), cAxisEngageModal.format(getCode("DISABLE_C_AXIS", getSpindle(PART))));

We want to change it to this:

writeBlock(feedMode, gPlaneModal.format(18));

I personally prefer to copy and paste the whole line and toss a couple "//" in front of them. That way I have the original to go back to should I decide to change things or realize I made an error. Thus, the result would be this:

 writeBlock(wcsOut/*, mFormat.format(getSpindle(PART) == SPINDLE_SUB ? 83 : 80)*/);
      writeBlock(feedMode, gPlaneModal.format(18));
      //writeBlock(feedMode, gPlaneModal.format(18), cAxisEngageModal.format(getCode("DISABLE_C_AXIS", getSpindle(PART))));
    } else {
      writeBlock(feedMode);

That takes care of the M34 at the beginning of the code. Now, for the one at the end, we want to scoot on down to around the 4140 line and put a couple "//" in front of this line:

writeBlock(cAxisEngageModal.format(getCode("DISABLE_C_AXIS", getSpindle(PART))));

That will get rid of all M34's in your post. 

Ideally, setting it to "LYNX" should really be skipping those code, or at least give us the option to say "no sub spindle"


Seth Madore
Customer Advocacy Manager - Manufacturing


0 Likes
Message 18 of 21

iporter6
Advocate
Advocate

@seth.madore  that got rid of the M34's.  Thank you.

 

I just noticed its giving me M90 on every tool/ operation and an M80 at the end.

I have commented out dozens of lines I think are related, but haven't found the right one yet.  Any chance you could point me in the right direction?

 

Ivan

0 Likes
Message 19 of 21

seth.madore
Community Manager
Community Manager

Line 3813 (therabouts)

 

writeBlock(cAxisBrakeModal.format(getCode("UNLOCK_MULTI_AXIS", getSpindle(PART))));

Line 4146:

 

 

 writeBlock(gFormat.format(54), mFormat.format(80));

"//" both of those and you should be good to go.

 

 

Look up Visual Code Basic. The HSM team built a really nice extension that makes code modification a snap


Seth Madore
Customer Advocacy Manager - Manufacturing


0 Likes
Message 20 of 21

iporter6
Advocate
Advocate

@seth.madore  thanks again. 

I got all fancy and left the G54 in at the end as I think its safer.

I now have a useable "Doosan" post that I can now drill and tap with. Smiley Happy

I will now try to workout how the tapping uses feed per rev, but the drilling does not.

 

I agree with your previous comment about an option list for choosing your lathe, but that would be a major re-write of the post! The Lynx can be a simple 2 axis, or a twin spindle full live tool beast and everything in between.

I'll attach my post here later on after I have tested it as someone may find it useful.  Is that advised / allowed?

Ivan