Adding linear encoders for higher positioning accuracy

Moderators: TomKerekes, dynomotion

Post Reply
Mateusz
Posts: 34
Joined: Thu Jun 06, 2019 8:36 pm

Adding linear encoders for higher positioning accuracy

Post by Mateusz » Sun Dec 21, 2025 10:06 pm

Hello Tom,

I have a heavy and stable 3-axis machine for tool machining that has been operating on the KFLOP platform for several years.
Three servos and the spindle are configured for control via DAC.
The time has come to involve optical linear encoders with a final resolution of 1um.
Before I stop the machine, I would like to discuss the possibilities.

I am not sure which path I should choose.... I see three options:

Option 1 - replace the current measurement system coming from the servo drives with direct reading of linear encoders and tune the axes, but according to my knowledge, if I want to achieve a positioning resolution of 1um in that case, I should use a measurement system with at least 10 times higher resolution...(servo loop dependent)

Option 2 - leave the current DAC configuration and shaft encoders readings and just add linear encoders for each axis - not sure how to configure this setup - probably I could swap 0 index signals to any other signals...excluding KONNECT board due to lower refresh rate.

Option 3 - control the servos using a step/direction signal and close the final positioning on the linear encoders- quite a lot of wiring job and not the same dynamics i suppose?


Below is a list of signals on the KANALOG board:
JP1 -
CHA/B_0 - X axis
CHA/B_1 - Y axis
CHA/B_2 - Z axis
CHA/B_3 - spindle position

JP2 -
CHA_4 - X axis - 0 index
CHB_4 - Y axis - 0 index
CHA_5 - Z axis - 0 index
CHB_5 - spindle position 0
CHA/B_6 - MPG
CHA/B_7 - free


Best regards, Mateusz

User avatar
TomKerekes
Posts: 2890
Joined: Mon Dec 04, 2017 1:49 am

Re: Adding linear encoders for higher positioning accuracy

Post by TomKerekes » Sun Dec 21, 2025 10:59 pm

Hi Mateuse,

It’s best to utilize both the rotary encoders and the linear encoders. For example there may be cases where the motors move which is observed by the rotary encoders but because of backlash or compliance the linear encoders do not observe anything. So the rotary encoders can really help to avoid overshooting and with stability.

Can your motor drives accept encoder signals and operate in velocity mode?
Regards,

Tom Kerekes
Dynomotion, Inc.

Mateusz
Posts: 34
Joined: Thu Jun 06, 2019 8:36 pm

Re: Adding linear encoders for higher positioning accuracy

Post by Mateusz » Mon Dec 22, 2025 6:24 am

Hi Tom,

Thank you for answer
I agree that two encoders will give better control stability,

unfortunately these motor drives have no option to work in fully closed loop. they are Estun PRONET 17-bit resolution.

User avatar
TomKerekes
Posts: 2890
Joined: Mon Dec 04, 2017 1:49 am

Re: Adding linear encoders for higher positioning accuracy

Post by TomKerekes » Mon Dec 22, 2025 9:09 pm

Hi Mateuse,

In that case you might do a dual loop approach. 2 KFLOP Axes will be required for each motor axis. Keep the existing rotary encoder axis and create a new linear encoder position loop which causes the other axis to move. A small C Program is required to tie the two loops together. It takes the output of the linear encoder loop and applies it as a velocity to the rotary axis loop. Here is an example:

Code: Select all

#include "KMotionDef.h"

// Creates dual feeback loops for cases such as rotary motor encoder feedback
// with linear scale encoder feedback.  Two KFLOP Servo Axes are required,
// one for each loop.  Output of the outer loop is applied as a velocity
// to the inner loop 

int main()
{
    for (;;)  // loop forever
    {
    	WaitNextTimeSlice();
		ch0->Dest += ch2->Output;  // move ch0 at speed of ch2 output
    }
}
I think you will just have enough axes channels. XYZ x 2 = 6, plus encoder and MPG
Regards,

Tom Kerekes
Dynomotion, Inc.

Mateusz
Posts: 34
Joined: Thu Jun 06, 2019 8:36 pm

Re: Adding linear encoders for higher positioning accuracy

Post by Mateusz » Mon Dec 22, 2025 9:46 pm

Hi Tom,

I'm happy that there is a solution for it. I'm going to give a go for one axis first. It will take me some time to get this installed.
As far I understand loop tuning will be carried out as normal for rotary encoder as it is now - no change ?
Having this C code running my DRO reading will show linear encoder position instead rotary ?
Obviously I'll be informing about changeover progress...

Thank you
Mateusz

User avatar
TomKerekes
Posts: 2890
Joined: Mon Dec 04, 2017 1:49 am

Re: Adding linear encoders for higher positioning accuracy

Post by TomKerekes » Mon Dec 22, 2025 11:29 pm

Hi Mateuse,
As far I understand loop tuning will be carried out as normal for rotary encoder as it is now - no change ?
Correct
Having this C code running my DRO reading will show linear encoder position instead rotary ?
Yes. When defining the Coordinate System define the axes for the linear encoder Axis not the rotary Axis.
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply