Hi
i would like to implement Tool- Change in a Postprocessor.
I.e, the LinuxCNC_post.
Meanwhile I know that I’ve to change something in Line 99 and 330.
Where will I get the information for the Tool to use?
packmers… ![]()
Hi
i would like to implement Tool- Change in a Postprocessor.
I.e, the LinuxCNC_post.
Meanwhile I know that I’ve to change something in Line 99 and 330.
Where will I get the information for the Tool to use?
packmers… ![]()
As you’ve probably already figured out, the system keeps track of which tool controller is being used for the operation. If it detects a tool change it adds an M6 command to the command list. When the post-processor is doing its thing, it can insert additional commands right before this. The tool change commands are inserted around line 330. and defined in a string constant at the beginning:
TOOL_CHANGE = ''''''
This is pretty basic and was meant to give some flexibility. For example, if you want the spindle to fully retract and move to a safe position so the operator can complete the change, you could add the necessary gcode to that string and it’ll be inserted for every change.
What exactly are you trying to achieve?
You find the tool number in
c.Parameters['T']
I modified the linuxcnc post to tune it for my shop, and with a few lines change of code, it works well for manual tool changes–and presumable could be modded for ATC. I posted it here about 8 months ago. Basic change was to look at current tool versus next tool from OP to OP, and suppress adding tool change actions if no change.
One thing that would be nice–and I’ve screwed it up a number of cases–is to be able to see Tool number of OP from the OP or Job-Work-plan areas so that it’s easy to see that operations are grouped by tool. It’s not always the case, but generally when I have to go back and forth to the same tool, when milling, it’s not intentional. It’s particularly easy to introduce this because all new ops are appended and as the job grows, if you missed an op…
Best,
-j
I am just testing Tool Change with bCNC. Using grbl as the post processor and I would like FreeCAD to generate g-code which includes the M6 tool change command, currently it is commented out.
Can I modify the config for the grbl post processor or create a new one? If so where do I find it? If I do that will it get over-written at the next update?
OS: Linux Mint 19 Tara
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13959 (Git) AppImage
Build type: None
Branch: master
Hash: 2f18182b6dff87f8857787c854e39ca4d441f993
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedKingdom (en_GB)
If you want to create your own post processor you do the following:
I made a slightly customized version of linuxcnc_post.py for similar reasons. It is stored in the Macro folder under the higher level folder that holds your config files. (I am using Windows, so I do not know where that folder would be in Mint.)
The Path WB will automatically look in both the Mod/Path/PathScripts/post folder as well as the Macro folder noted above. Just pick your custom version of the postprocessor and there will be no effect from the frequently updated versions in the Mod/./././././. folder.
Gene
Where do I find the existing post processors? I have searched my system and cannot find any files that look like the right ones.
Below the install directory of FreeCAD (I don’t know where it is on Mint) you find a Mod directory. The relative path to the post processors is
Mod/Path/PathScripts/post/
I realized that you use the Appimage, where it is all compiled in one file.
You find the post processors on Github: https://github.com/FreeCAD/FreeCAD/tree/master/src/Mod/Path/PathScripts/post
When we added the grbl post processor bCNC had no support for tool change and grpl itself chokes on it. If you get this to work it would be great if you could report back and we add support into the next version.
Thank you both, I have it working now, it was a fairly simple change. Had to put the new file in .FreeCAD/Macro
Mick
Further update. I have done some more testing and bCNC ToolChange rocks!!
I believe that FreeCAD should be changed to accommodate this by either
I found the info on the subject a bit sketchy so I started to make my own notes, then I thought I may as well do the job properly and create a document, which is attached. Hope it helps someone.
ToolChangeV01.doc (825 KB)
No *.doc reader here, so I’m a bit guessing. If you can switch the toolchange with a commandline parameter both variants can live in one version.
Once PR-1621 is merged there is a new option for the grbl post processor
--tool-change=x
where x can be any of
Let me know how it works
PS: and if you figure out how to add line breaks into tooltips that are set from python - please also let me know
That sounds like a really good addition!
Just looked at PR-1621 and it says it is merged, however I just downloaded the latest AppImage, revision 14448, and can’t see anything in there for tool change. Has it not made it through to AppImage yet?
Hi
finaly I found how it works, but I find it strange:
To get the tool-change it’s necessary to select the tools additional to the operations, when I start the post-processor,
after this it implements the tool-change and the Spindle-Speed.
But its not 100% sorted.
For my understandig, it should be enough to select the operations, because the tool- information is there too, and its in the right order.
How should it operate?
Greetings
PACKMERS ![]()