Community
HSM Post Processor Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Turning Post for LinuxCNC?

25 REPLIES 25
Reply
Message 1 of 26
russtuff
4196 Views, 25 Replies

Turning Post for LinuxCNC?

With the new update to CAM for turning in Fusion 360 I assume there are more posts on the way. I use LinuxCNC for a Grizzly G0602 I converted to CNC myself. I've been trying to use the Generic Fanuc post but so far haven't gotten any good code to try. Any idea if/when a LinuxCNC post will be released?

Thanks.
rus, making stuff
youtube.com/russtuff
25 REPLIES 25
Message 2 of 26
robnew
in reply to: russtuff

I would also like to know when a LinuxCNC turning post will be available.

Thank you. 
Message 3 of 26
scottmoyse
in reply to: russtuff

russtuff wrote:

With the new update to CAM for turning in Fusion 360 I assume there are more posts on the way. I use LinuxCNC for a Grizzly G0602 I converted to CNC myself. I've been trying to use the Generic Fanuc post but so far haven't gotten any good code to try. Any idea if/when a LinuxCNC post will be released?

Thanks.


I'm not in a position to do it. But if you have the programming manual for the turning for of Linux CNC, can you post it here? or post a link to it please?

Scott Moyse
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature


RevOps Strategy Manager at Toolpath. New Zealand based.

Co-founder of the Grumpy Sloth full aluminium billet mechanical keyboard project

Message 4 of 26
Anonymous
in reply to: russtuff

Hello,

I am using a Wabeco Lathe with LinuxCNC and i have been spending some time to change the Haas Turning Postprocessor in a way that is ouputs code that LinuxCNC understands. This is very alpha.. So check carefully the code that is being produced.
If you do not fancy things for this moment, like canned cyles for threading, it should work. I have been making parts with it today. 
Please note the following: I had to interchange M3 and M4 in the output. This is due to the fact that Fusion 360 expects that the tooling is at the back of the spindle. So clockwise in Fusion 360 outputs counterclockwise in my postprocessor. Also i was not able, at least not in this moment, to get tool radius compensation to work correctly. So in Fusion 360 i choose computer for radius compensation. With this setting it outputs coordinates that i can relate..

Cheers, Jan

Message 5 of 26
AchimN
in reply to: russtuff

The best posts for milling for LinuxCNC should be "emc.cps" or "eding.cps".


Achim.N
Principal Technology Consultant
Message 6 of 26
russtuff
in reply to: russtuff

Achim wrote:

The best posts for milling for LinuxCNC should be "emc.cps" or "eding.cps".

Yes the emc.cps for milling is quite good.
rus, making stuff
youtube.com/russtuff
Message 7 of 26
russtuff
in reply to: russtuff

JanHouwers wrote:

Hello,

I am using a Wabeco Lathe with LinuxCNC and i have been spending some time to change the Haas Turning Postprocessor in a way that is ouputs code that LinuxCNC understands. This is very alpha.. So check carefully the code that is being produced.

Cheers, Jan


I have been playing with this and it's been working quite well. Today I ran into an error code "!Error: Failed to post data" during a grooving operation, but its been fine otherwise.

Do we know if there is an update to an official post for LinuxCNC?
rus, making stuff
youtube.com/russtuff
Message 8 of 26
tomae
in reply to: russtuff

I've been using the Tormach PathPilot turning post discussed here:https://camforum.autodesk.com/index.php?topic=7452.msg35637#msg35637  on my Linux-based Emco lathe.  It works fine other than the tool change dialog.  I have to hand edit that.  PathPilot is based on the latest Linuxcnc and should be very very close.  I will probably change the tool change dialog at some point so I don't have to hand edit it.
-Tom
Message 9 of 26
russtuff
in reply to: russtuff

tomae wrote:

I've been using the Tormach PathPilot turning post discussed here:https://camforum.autodesk.com/index.php?topic=7452.msg35637#msg35637  on my Linux-based Emco lathe.  It works fine other than the tool change dialog.  I have to hand edit that.  PathPilot is based on the latest Linuxcnc and should be very very close.  I will probably change the tool change dialog at some point so I don't have to hand edit it.
-Tom


Thank you very much. I'll give this a shot right away.
rus, making stuff
youtube.com/russtuff
Message 10 of 26
tomae
in reply to: russtuff

The Tormach post outputs a tool change in some strange (to me) syntax like:  T0505

I changed my version of the post at this line:
writeBlock("T" + toolFormat.format(tool.number * 100 + compensationOffset));

To be instead these three lines:
writeBlock("G53 G0 X0");
writeBlock("G53 G0 Z0"),
writeBlock("M6 T" + toolFormat.format(tool.number) + " G43 H" + toolFormat.format(tool.number));

And now it writes:

G53 G0 X0
G53 G0 Z0 (to send my turret to the change position)
M6 T0005 G43 H0005

HOWEVER, this is a complete hack-job.  I don't know what compensationOffset is doing or why it is added ("+") to the toolnumber multiplied by 100....?  So buyer 😉  beware!  No warranties expressed or implied  😛

I can say that there is no difference in the posted code  (other than the tool change lines) between using the original post and my hacked post for the several parts I have used it with.

Also, the Tormach post doesn't use G76 for threading according to Linuxcnc documentation (http://linuxcnc.org/docs/2.6/html/gcode/gcode.html#sec:G76-Threading-Canned).  Not sure why - looks more like a Fanuc maybe?  Anyway, the threading code that the Tormach lathe post put out wouldn't run on my Linuxcnc (ver 2.7) controller.  I would love for someone to modify the post to implement the correct syntax for the Linuxcnc G76 canned cycle!!

-Tom
Message 11 of 26
russtuff
in reply to: russtuff

tomae wrote:

The Tormach post outputs a tool change in some strange (to me) syntax like:  T0505


The generic Fanuc post uses tool changes like this, so I'm guessing that is where it is from. I haven't tried threading with the Tormach post yet but everything else has been spot on (besides the bad tool changes). I'll try a hand edit like yours to get the fix, as with the tool changes being sorted I'll have zero hand editing (unless threading gives an issue) for posted code.

Thanks for "post"ing!
rus, making stuff
youtube.com/russtuff
Message 12 of 26
Anonymous
in reply to: russtuff

tomae wrote:

The Tormach post outputs a tool change in some strange (to me) syntax like:  T0505


Tormach use a modified version of LinuxCNC that accepts both tool and wear offsets in the T-word and does not require an M6.
This is reasonably standard in lathes where you can not normally pre-fetch a tool.

There is a sample config (sim / axis / remap / lathe-fanucy ) which remaps the T-command to work this way with the normal, unmodified LinuxCNC. You might find it convenient to configure your own lathe this way, so that a toolchange is T05 rather than M6 T5 G43.
Message 13 of 26
Rob.Lockwood
in reply to: russtuff

tomae wrote:

The Tormach post outputs a tool change in some strange (to me) syntax like:  T0505

I changed my version of the post at this line:
writeBlock("T" + toolFormat.format(tool.number * 100 + compensationOffset));

To be instead these three lines:
writeBlock("G53 G0 X0");
writeBlock("G53 G0 Z0"),
writeBlock("M6 T" + toolFormat.format(tool.number) + " G43 H" + toolFormat.format(tool.number));

And now it writes:

G53 G0 X0
G53 G0 Z0 (to send my turret to the change position)
M6 T0005 G43 H0005

HOWEVER, this is a complete hack-job.  I don't know what compensationOffset is doing or why it is added ("+") to the toolnumber multiplied by 100....?  So buyer 😉  beware!  No warranties expressed or implied  😛

I can say that there is no difference in the posted code  (other than the tool change lines) between using the original post and my hacked post for the several parts I have used it with.

Also, the Tormach post doesn't use G76 for threading according to Linuxcnc documentation (http://linuxcnc.org/docs/2.6/html/gcode/gcode.html#sec:G76-Threading-Canned).  Not sure why - looks more like a Fanuc maybe?  Anyway, the threading code that the Tormach lathe post put out wouldn't run on my Linuxcnc (ver 2.7) controller.  I would love for someone to modify the post to implement the correct syntax for the Linuxcnc G76 canned cycle!!

-Tom


A typical Fanuc lathe uses the T# to call the tool# and offset#, so calling T0505 = tool 5, offset register 5. T0105 = Tool 1 offset 5, etc. So the fanuc post is taking the tool number (for instance, 5), multiplying it by 100 (500) and adding the offset register (5) to achieve a final result of 505. It then outputs this using 4 digits and leading zeroes to get the proper formatting, provided the tool/offset numbers are below 99.

I'm actually a little curious how your setup works, using an H# on turning.. A mill "needs" just one offset measurement, length. A lathe NEEDS both an X offset and a Z offset to be of much use.. does the turning version of LinuxCNC contain two offset registers for the H value? It's odd to me that linuxcnc wouldn't have followed convention here, as they're usually pretty good.

Then again, i'm not sure if the Fanuc method actually sticks to rs274D either, come to think about it.

Anyway, I don't see anything particularly wrong or troublesome about the modifications you made to the post.


Rob Lockwood
Maker of all the things.
| Oculus | | Locked Tool | | Instagram |

Message 14 of 26
tomae
in reply to: russtuff

andypugh wrote:

tomae wrote:

The Tormach post outputs a tool change in some strange (to me) syntax like:  T0505


Tormach use a modified version of LinuxCNC that accepts both tool and wear offsets in the T-word and does not require an M6.
This is reasonably standard in lathes where you can not normally pre-fetch a tool.

There is a sample config (sim / axis / remap / lathe-fanucy ) which remaps the T-command to work this way with the normal, unmodified LinuxCNC. You might find it convenient to configure your own lathe this way, so that a toolchange is T05 rather than M6 T5 G43.


Thanks Andy, I'll have to investigate it...
-Tom
Message 15 of 26
tomae
in reply to: russtuff

Rob Lockwood wrote:

I'm actually a little curious how your setup works, using an H# on turning.. A mill "needs" just one offset measurement, length. A lathe NEEDS both an X offset and a Z offset to be of much use.. does the turning version of LinuxCNC contain two offset registers for the H value? It's odd to me that linuxcnc wouldn't have followed convention here, as they're usually pretty good.


Rob,
The Linuxcnc tool table contains offsets for every axis for each tool.  In the case of my lathe I am using X and Z offsets for each tool (you ignore the parts of the table that don't apply to your tool).  But, issuing G43 just enables the tool length compensation which in the case of my lathe is the X axis.  The Z offset for each tool is referenced from a fixed point on the machine and all tools are referenced to that location.  When I touch off a workpiece with any tool, all tools' Z offsets then know where the workpiece is.

It is described here: http://linuxcnc.org/docs/html/lathe/lathe-user.html#sec:lathe-tool-table
-Tom
Message 16 of 26
Anonymous
in reply to: tomae

I would definitely like to see a linuxcnc turning post.  I'm trying to cut my first thread since the upgrade to see if I succeeded and found that the g76 is wrong with the tormach post.  I tried unchecking the "use cycle" box and then it failed to post at all. 

Message 17 of 26
vilts
in reply to: Anonymous

I am working on a LinuxCNC lathe post for Fusion360 as I haven't seen an official one yet. I'd say it's alpha level now, needs a lot more testing (which I will do as my lathe build progresses). Currently all the movements work, tool change code is ok, and G76 canned cycle should be allright as well. That is for the manual type lathe I have converted. For other types, I have no idea and no way to test.


Patches welcome, of course.

 

https://github.com/vilts/linuxcnc-f360

Message 18 of 26
Anonymous
in reply to: vilts

Thanks.  Could you put the G30 back in without the z#5...  Being able to have a safe tool change position was one of the reasons I wanted to upgrade to linuxcnc.  Anyway I didn't make it to the g76 because I got a following error.  I haven't got the settings quite figured out for that yet.  At least it didn't give me any errors that made it refuse to run. 

Message 19 of 26
vilts
in reply to: Anonymous

I'll see what I can do with the G30.

 

Does the G30 goes before every tool change and at the end of the program? Are there any params that need to be configured with it as well, like X or Z moves that G30 can take?

Message 20 of 26
Anonymous
in reply to: vilts

It looks like I don't need those G30s.  I was just reading the linuxcnc gcode reference and it says it will move to G30 when M6 is programmed if you add the line TOOL_CHANGE_AT_G30=1 to the [EMCIO] section of the ini file.  I just tested it with mdi and it works.  Thanks. 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report