First, I'm really happy to see someone tackling a Fanuc post. Fanuc is so widely used that it should definitely be a candidate to merge in master.jkv wrote: ↑Wed Jul 17, 2019 11:54 am I have tried to implement the G43 tool length compensation in a first simple attempt by changing the linuxcnc postprocessor. Three days ago (Sun Jul 14) I published it in my post titled 'Fanuc 15m post and several questions'. As sliptonic has mentioned the G43 must be given after every tool change for the first z move with the syntax G43 Z___ H __ e.g. G43 Z4.356 H27, whereby H is the machine register for the tool with the number 27. So, an arbitrary tool number has to be defined and the first Z move must be isolated. As far as I can see that's all. As I have written in my post isolationg the first move is a problem in FreeCAD. I my opinion the G43 tool length compensation should be handled in the post. What do you think about that?
I think a post-processor flag is an excellent way to do this. That way tool length compensation is handled job-wide and user doesn't have to add additional operations or configure the tool controllers individually.
The Tool Length Offset stored in the Tool Table doesn't really have anything to do with G43. It might be useful in the future for calculating whether a tool can reach a feature but it isn't used at all right now. As jkv clarified, the H-word never carries the length measurement itself, it only tells the control which offset value (tool/register) in its own table to apply as an offset to the current tool.