Does anyone here have a dual (rotary & linear encoders on same axis) loop setup with a Kflop that is working well?

I have tuned my single loops (rotary motor encoders) and they work quite well, but nothing seems to be stable when adding in a outer loop with the linear encoders.

I am using the ch1->Dest += ch0->Output in a C program to add the loops together, but it is very hard to get anything to move stable.

I have set the outer loop to be encoder input and no output in the config settings.

Am I supposed to match the acceleration / velocity settings between the axis channels?
I think the outer loop should be all P and I and the inner loop should be all D for stability, but how would this work?
If you make an axis with only D values then it will not work, and having P values in both loops makes it unstable.

What kind of limits should the ch0 output and integrator have?

If I understand this theory it should be:
A motion command is send to Ch0, this output is conditioned with the PI values.
The output is then sent to the Ch1 destination.
Ch1 combines this with is encoder and adds D to stabilize the axis.


Any help would be appreciated.


Dave