Commit "Merge pull request #3188 from Schildkroet/grbl-post" removed "enable spindle" command in gcode

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
gauna
Posts: 49
Joined: Fri Dec 04, 2015 8:20 pm

Commit "Merge pull request #3188 from Schildkroet/grbl-post" removed "enable spindle" command in gcode

Post by gauna »

Hi,

the commit "Merge pull request #3188 from Schildkroet/grbl-post" removed the "enable spindle" and also M6 for tool-change in the resulting gcode. The spindle is moving but not turning.



OS: openSUSE Tumbleweed (KDE//usr/share/xsessions/plasma5)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20116 (Git)
Build type: Release
Branch: master
Hash: a203eeef60e4268f8be81e066252be3e0a214676
Python version: 3.8.2
Qt version: 5.14.1
Coin version: 3.1.3
OCC version: 7.4.0.beta
Locale: German/Germany (de_DE)
gauna
Posts: 49
Joined: Fri Dec 04, 2015 8:20 pm

Re: Commit "Merge pull request #3188 from Schildkroet/grbl-post" removed "enable spindle" command in gcode

Post by gauna »

And here comes my file for testing.
Attachments
Job_Seite_links.FCStd
(64.99 KiB) Downloaded 34 times
User avatar
Wsk8
Posts: 182
Joined: Fri Dec 07, 2018 6:24 pm

Re: Commit "Merge pull request #3188 from Schildkroet/grbl-post" removed "enable spindle" command in gcode

Post by Wsk8 »

I looked into it and it seems that these operations do not have an "active" attribute at all, so they are overlooked in the post processor.

For the moment you can go to "Mod\Path\PathScripts\post\grbl_post.py" and delete these lines (around 263ff):

Code: Select all

    if not PathUtil.opProperty(obj, 'Active'):
        continue
I will make a new PR with an fix as soon as possible.

mfg
gauna
Posts: 49
Joined: Fri Dec 04, 2015 8:20 pm

Re: Commit "Merge pull request #3188 from Schildkroet/grbl-post" removed "enable spindle" command in gcode

Post by gauna »

Thanks. I already commented these lines out as a workaround. ;-)
User avatar
Wsk8
Posts: 182
Joined: Fri Dec 07, 2018 6:24 pm

Re: Commit "Merge pull request #3188 from Schildkroet/grbl-post" removed "enable spindle" command in gcode

Post by Wsk8 »

Hello,

does following tool changes are output for you? I made some tests now and for me only the first M6 is output, but not the following. It seems there is something else wrong.

mfg
User avatar
Gauthier
Posts: 123
Joined: Fri Jul 04, 2014 10:00 am
Location: Audenge, France

Re: Commit "Merge pull request #3188 from Schildkroet/grbl-post" removed "enable spindle" command in gcode

Post by Gauthier »

Hi @gauna,

As I reported here https://forum.freecadweb.org/viewtopic.php?f=15&t=44665, not only the spindle commands, but some other operations are missing in the final GCode file.
It seems that your problem is the same as mine, and the pull request you report here seems to be it's origine.

Comment of the line is a workaround, but all the disabled op will also output...

@++;
Gauthier.
User avatar
Wsk8
Posts: 182
Joined: Fri Dec 07, 2018 6:24 pm

Re: Commit "Merge pull request #3188 from Schildkroet/grbl-post" removed "enable spindle" command in gcode

Post by Wsk8 »

@Gaunthier
No, disabled operations are not outputted. This two lines prevent only output of comments and coolant (maybe also tool change). But the op itself is already discarded before.

Russ4262 wrote: Fri Mar 13, 2020 4:14 pm ping
sliptonic wrote: Wed Apr 10, 2019 12:58 pm ping
There seems to be a general problem in output. I did some test and found out these bad behaviours:
- Only first M6 is output
- The preview editor does not show all headers (preview != actual file)

Was there some changes for tool change or preview recently??

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20310 (Git)
Build type: Release
Branch: master
Hash: 2cac4898d7d62276fbbaaef5b4cecb9bfdd29a33
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: German/Germany (de_DE)
User avatar
Wsk8
Posts: 182
Joined: Fri Dec 07, 2018 6:24 pm

Re: Commit "Merge pull request #3188 from Schildkroet/grbl-post" removed "enable spindle" command in gcode

Post by Wsk8 »

OK, found out, the tool change problem only occurs if you use the default tool. If you use only your created tools, it works as expected. Seems to be a problem with tool tables etc.

mfg
User avatar
Wsk8
Posts: 182
Joined: Fri Dec 07, 2018 6:24 pm

Re: Commit "Merge pull request #3188 from Schildkroet/grbl-post" removed "enable spindle" command in gcode

Post by Wsk8 »

Gauthier wrote: Sun Mar 29, 2020 3:36 pm ping
Can you make a pull request?
This should fix the problem:

Code: Select all

    isActive = PathUtil.opProperty(obj, 'Active')
    if isActive == False:
        continue
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Commit "Merge pull request #3188 from Schildkroet/grbl-post" removed "enable spindle" command in gcode

Post by dubstar-04 »

Have a look at this PR for the LinuxCNC post:

https://github.com/FreeCAD/FreeCAD/comm ... 1f227be003

Thanks,

Dan
Post Reply