I have retrofitted a Thermwood C67 5 axis router with a KFLOP controller as it had a dead controller (we have two other 3 axis machines that I've already got running on KFLOP).

I'm having some issues getting the RTCP coordinated motion happening. I've followed a couple of the other threads on here to create my own Gimbal Kinematics code using axis C and B in their traditional locations, and have it all working as expected/desired up until the point of having a tool offset.

It appears the code that takes the tool offset from the tool table into the TCP calcs is reading it in inches, even though the units are set to mm, and the effect on the Z coordinate is in mm.

With a 0 length tool, the TCP rotates about the collet face as set by the offset in my CKinematics5AxisGimbalCB code.

However when I set a tool length in the tool table and do an G43 H# to call an offset of say 40mm, the TCP that the machine wants to rotate around is well under the bed (I'm assuming 40 inches away), and when i give a value in the tool table in inches 1.57" to give 40mm, the TCP rotates around the tip of the 40mm tool..... sort of.

It seems that at this point the KFLOP gets a bit confused as the offset applied to the Z position is only 1.57mm, and it's trying to rationalise rotating around a point 1.57 inches away to maintain this XYZ coordinate in mm, so the point drifts somewhat and we get some weird jerky movements. I haven't actually tried setting the interface in inches and trying again yet, i'm not at the machine, and everything is posted in mm, so didn't really think of it when I was in front of it.

Is my thinking correct? If so, is there a way to convert the tool offset into mm in the code, or do I need to make an inches post and run in inches for a while?

Also, when running 0 length tool, code runs fine, and jogging slowly works fairly smoothly, but rapid jogs about B in particular result in a some strange movements with the X Y and Z axes moving at different rates and jumping around, i'm assuming this is due to the different nature of calculating the motion when jogging compared to running code?

I will upload some videos, and my code in a little while if that helps too. (currently stored on my laptop, not the desktop i'm writing this on )

Oh, and i'm now running v4.34j.

Thanks in advance for any help!