Hi Tom,

To be honest the FFV value was just trial and error. I didn't take it much higher in fear of causing instability. I have however tried your value of 0.0122 for the Z axis and funnily enough calculated the same value for X. This value gave me the following step result plots:

Z:


X:


Both axis are now giving me a max following error of about 16 counts, which to seems minimal. I feel like I'm going to be unable to smooth out the dither anymore because of stiction / external forces etc. I've increased I-gain slightly to try and pull the error down further, but I don't thin the system would benefit from increasing I anymore.

What are your thoughts?

I've also settled on KmotionCNC for my controller. I've generated my initial startup perimeter file from the axis calibrations, and defined my axis accordingly. As you know the spindle is operating from a closed loop (encoder feedback) DAC axis, but I haven't defined this is the DefineCoordSystem command. Axis velocities / acceleration and counts so far have been loaded into tools, trajectory etc for Z and X. I can now successfully JOG my axis using the on-screen arrow buttons!!

I've setup spindle control as described here: https://dynomotion.com/Help/KMotionC...dleControl.htm
And adjusted MySpindleDefs.h accordingly.

I can now control my spindle CW and CCW using the KmotionCNC spindle controls!! It also shows the RPM reading! When I click 'On CW' the spindle rotates CCW if I am looking straight at it. Vice versa for clicking 'On CCW'. I'm guessing the view is that I should be looking from behind the spindle? I do however feel the spindle will take more tuning as at low speed it will judder as if it's not to sure where it's supposed to be.

At the bottom of the init file I have adjusted and added the following for spindle threading control, which I'm hoping will work.

Code:
    
DefineCoordSystem(1,-1,2,-1);
ConfigureSpindle(1,0,0.1,0.1,4096.0);
I need to try various G-code to test threading CSS etc. My problem now is with KmotionCNC. When I try to manually execute G-code I get the error below. This also applies to loading in complete G-code from the samples and trying to run:



Can you shed any light on this Tom?

Another thing, I need to add to my initialization file the following IF or case statements for the safety circuit. But in honesty I'm not to sure how to implement this into the file, or where abouts:

IF OPTO 0 (bit 136) = LOW then disable SW7
IF OPTO 1 (bit 137) = LOW then disable SW7
IF OPTO 2 (bit 138) = LOW then disable SW7
IF OPTO 3 (bit 139) = LOW then disable SW7

I suppose I could do:

IF ALL (the above) bits = HIGH then enable SW7, else SW7 = LOW?

I'll do some more reading tonight on C code. But if you can point me in the right direction on where to place this code in the init file that would be spot on!

As always, thanks Tom! Things are progressing