Problem with tool offsets

More
27 Nov 2018 14:09 #121475 by tjd
Hi all,

Was running CamBam to produce Gcode, all was working fine.
Recently switched to FreeCAD, now program isn't recognizing multiple tool offsets.

Set up as normal, eg: T3 M6 G43, touch off tool on work piece.
Interrogated tool library, sure enough, there are all my tool offsets.
Run program, program seems to use the last offset, regardless of tool.
Example:
Set initial zero (G54) using T6 (6.1mm twist drill)
Proceeded to set offsets for 4 other subsequent tools. T7 (Centre drill - obviously significantly shorter than a 6.1mm twist drill!!) hence negative offset displayed in tool library. T31 (10.5mm slot drill), T3 (3mm Twist Drill), T23 (4mm Slot Drill)

First operation - Centre Drill T7, asks for tool - I acknowledge, machine proceeds to drill 50mm+ off the work piece.


Is this a FreeCAD issue (I noticed they inserted G49 at the start of their program - I removed that but problem remained)
Or do I just need to reload LinuxCNC??

All help gratefully received.

Please Log in or Create an account to join the conversation.

More
27 Nov 2018 18:45 #121481 by GeneRF
Replied by GeneRF on topic Problem with tool offsets
I use FreeCAD all the time. I highly recommend that you create a custom postprocessor based on the linuxcnc_post.py that is provided inside FreeCAD.

The settings in the generic FreeCAD postprocessor are just that, generic. They may not be the best for your application.

Python files are very easy to edit. In this case just go in and remove the offending G49. Change any other preamble or postamble codes you wish. I recommend saving the postprocessor under a different name and then calling it from inside FreeCAD when you are creating G-code files.

The name needs to be xxxxx_post.py to be recognized. You can place the file either in the FreeCAD folder that includes the generic linuxcnc_post.py or in your user folders where the configuration files and macros are stored. You did not say what OS you are using for FreeCAD, so I cannot give more detailed locations.

Gene

Please Log in or Create an account to join the conversation.

More
27 Nov 2018 19:01 #121482 by tjd
Replied by tjd on topic Problem with tool offsets
Thanks for the prompt reply - will definitely give that a go. However, have just run a test program from CamBam and it’s doing exactly the same thing.
Am going to have to re-install linuxcnc.

Is it possible to get just linuxcnc without the actual operating system? I’d rather not have to re-install all the other software I’ve got on here too.

Please Log in or Create an account to join the conversation.

More
29 Nov 2018 15:52 #121594 by andypugh
Replied by andypugh on topic Problem with tool offsets

Thanks for the prompt reply - will definitely give that a go. However, have just run a test program from CamBam and it’s doing exactly the same thing.
Am going to have to re-install linuxcnc.


That shouldn't be necessary.

First check if both posts are actually issuing the G43 command after the tool change. Perhaps they are assuming that T is enough (as it often is for lathes).

Also check that your INI file references the correct tool table.

Does M61 / G43 in MDI show the desired effect?

Please Log in or Create an account to join the conversation.

More
30 Nov 2018 04:58 #121623 by tjd
Replied by tjd on topic Problem with tool offsets
CamBam doesn’t issue a G43 on a tool change, but has never caused this problem before.
I only have the one tool table. And it must be accessing that one because on the first run of the program it told me that I hadn’t created the tools, which was correct as I’d just run pncconf without saving my previous tool table.

When I look at tool table, all the tool offsets are there, as set by
Tx M6 G43

But when I run the job it only uses the offset for the last tool I set up in the MDI, which is usually the first tool that the program should call,hence, first tool on job works great, second tool on job however is using first tools offset - with potentially disasterous consequences!

Please Log in or Create an account to join the conversation.

More
30 Nov 2018 13:15 #121632 by andypugh
Replied by andypugh on topic Problem with tool offsets
If the G-code doesn't contain a G43 after each tool change then this is to be expected. LinuxCNC is doing what it is being told to do, but it is being told to do the wrong thing.

Please Log in or Create an account to join the conversation.

Time to create page: 0.141 seconds
Powered by Kunena Forum