Shopbot quirk

22 views
Skip to first unread message

Boulder Hackerspace

unread,
Dec 21, 2017, 12:28:50 AM12/21/17
to Boulder Hackerspace Public
Hi, all.

The shopbot works, however we found a glitch when using gcode generated by Fusion 360. Fusion 360 generates commands related to tool changes (we encountered errors with T1 and G43) with an automatic tool changer, and this caused the LinuxCNC interface to display an error message. We fixed the error by commenting out the offending lines. This fix is fine as long as G41 and G42 codes don't appear anywhere in the program. I suspect that the "correct" fix is to setup the tool table before trying to run your program.

-Tim


Sebastian Kuzminsky

unread,
Dec 21, 2017, 1:21:48 AM12/21/17
to boulder-hacke...@googlegroups.com, Boulder Hackerspace
This is not a glitch or a LinuxCNC quirk, this is standard G-code. If
you program "Tx M6", the machine will switch to tool number "x". If that
tool number does not appear in the machine's tool table, it's an error. 
How could it be otherwise?

http://linuxcnc.org/docs/devel/html/gcode/other-code.html#sec:select-tool

If you want to use cutter compensation (G41/G42) you have a couple of
choices:

1. Put your tools in the tool table, then "Tx M6" to switch to the tool,
then G41/G42 to enable cutter comp, as Fusion 360 tried to do above. 
Since we're holding our tools using a collet the tool's stick-out length
will be different each time you load it, so Z touch-off is still needed.

2. Don't bother setting up the tool table, don't bother with "Tx M6",
and instead program the tool's diameter using dynamic cutter
compensation: "G41.1 Dy", for a "y" inch diameter cutter.

http://linuxcnc.org/docs/devel/html/gcode/g-code.html#gcode:g41.1-g42.1


--
Sebastian Kuzminsky

Andrew Adare

unread,
Dec 21, 2017, 12:17:20 PM12/21/17
to boulder-hacke...@googlegroups.com, Boulder Hackerspace
Thanks for these solutions. One thing Tim didn't exactly mention is that LinuxCNC refused to open the gcode file, emitting a cryptic popup error message. I don't remember its exact content, but it did at least provide a line number, so that was helpful for troubleshooting. 

I suspect we won't be the last people to encounter this, so I'll look into documenting it. And it would be great if, in future versions, LinuxCNC would at least open the file and indicate the problem more clearly.

Thanks,
Andrew




--
You received this message because you are subscribed to the Google Groups "Boulder Hackerspace Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boulder-hackerspace-public+unsubsc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sebastian Kuzminsky

unread,
Dec 21, 2017, 1:56:08 PM12/21/17
to boulder-hacke...@googlegroups.com
When I try to open a g-code file that references a tool that doesn't appear in the tool table, the error message I get is this:

G-Code error in test.ngc
Near line 2 of test.ngc:
Requested tool 9 not found in the tool table

That's a pretty good error message, I think, but then yes, it does fail to load the file.



To unsubscribe from this group and stop receiving emails from it, send an email to boulder-hackerspace-public+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Sebastian Kuzminsky

Oleg Mazurov

unread,
Dec 21, 2017, 2:02:01 PM12/21/17
to boulder-hacke...@googlegroups.com
In linuxcnc, isn't there a tool that always exists in a tool table? Zero, perhaps?
/felis

Sebastian Kuzminsky

unread,
Dec 21, 2017, 4:35:24 PM12/21/17
to boulder-hacke...@googlegroups.com
Sort of, Oleg.  Tool 0 means "no tool", and "T0" will be accepted even if tool 0 doesn't appear in the tool table.  After "T0 M6" the controller will consider the spindle to be empty (ie to have no tool in it).  At that point "G41" and "G42" will work, but a cutter radius compensation of 0 inches will be used.


To unsubscribe from this group and stop receiving emails from it, send an email to boulder-hackerspace-public+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Boulder Hackerspace Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boulder-hackerspace-public+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Sebastian Kuzminsky

--
You received this message because you are subscribed to the Google Groups "Boulder Hackerspace Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boulder-hackerspace-public+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Gary M

unread,
Dec 23, 2017, 4:00:49 AM12/23/17
to Boulder Hackerspace Public
The message I observed was the file could not be opened with a reference to the line number.

To unsubscribe from this group and stop receiving emails from it, send an email to boulder-hackerspace-public+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Boulder Hackerspace Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boulder-hackerspace-public+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Sebastian Kuzminsky

Andrew Adare

unread,
Dec 23, 2017, 4:37:18 PM12/23/17
to boulder-hacke...@googlegroups.com
Right Gary, that's what we saw. I captured the attached image on Thursday.

As a third option to those mentioned by Seb, it is possible to customize the CAM postprocessor in Fusion 360 to omit the problematic lines from the gcode file. I think Carter had some luck with this, but I haven't yet tried it myself. I looked at linuxcnc.cps provided with my installation. It is a javascript file that appears to allow modification of just about anything.

-Andrew

To unsubscribe from this group and stop receiving emails from it, send an email to boulder-hackerspace-public+unsubsc...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Boulder Hackerspace Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boulder-hackerspace-public+unsubsc...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Sebastian Kuzminsky

--
linuxcnc-err.jpg

Gary M

unread,
Dec 26, 2017, 11:55:34 PM12/26/17
to Boulder Hackerspace Public
The cam profile in fusion360 is called "emc".     F-360 also has some tunable feature to control generated g-code.. 

I'm not sure of F-360's emc profile compatibility to current LinuxCNC command set and capabilities.  I think we may need to create an interface template and library for the shopbot and tools.  

Attached is the F360 post processing script for emc2.  I'm not sure how this all fits to the LinuxCNC configuration.  I'm hoping to get a mapping between the f360 script functions and linuxcnc 

  

To unsubscribe from this group and stop receiving emails from it, send an email to boulder-hackerspace-public+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Boulder Hackerspace Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boulder-hackerspace-public+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Sebastian Kuzminsky
emc.cps

Sebastian Kuzminsky

unread,
Dec 27, 2017, 12:05:11 AM12/27/17
to boulder-hacke...@googlegroups.com
On 12/26/2017 09:55 PM, Gary M wrote:
> The cam profile in fusion360 is called "emc".  F-360 also has some
> tunable feature to control generated g-code..
>
> I'm not sure of F-360's emc profile compatibility to current LinuxCNC
> command set and capabilities.  I think we may need to create an
> interface template and library for the shopbot and tools.
>
> Attached is the F360 post processing script for emc2.  I'm not sure
> how this all fits to the LinuxCNC configuration.  I'm hoping to get a
> mapping between the f360 script functions and linuxcnc

Any g-code that is valid on EMC or EMC2 should also be valid on
LinuxCNC.  LinuxCNC's g-code dialect is intended to be a superset of
emc's and emc2's.


--
Sebastian Kuzminsky

Reply all
Reply to author
Forward
0 new messages