I set Cn-28 to 1 for the traces you see with the motor off the lathe, this seemed to help.
The range is 1 to 100, try with another values to see what happens.
Ok ... lets try “Chapter 3-5-8: Torque Feed-forward Function”
So, I use one of the 6 servo analogue outs connected to Tref.
I’m guessing something like:
net x-enable => pid.x.enable
net x-output => pid.x.output
net x-pos-cmd => pid.x.command
net x-vel-fb => pid.x.feedback-deriv
net x-pos-fb => pid.x.feedback
net x-Torque_Feed-forward => pid.x?????????????
HAL connection example:
net x-torque-ff pid.x.commandDD => hm2_5i25.0.7i77.0.1.analogout1
or
net x-torque-ff pid.x.errorD => hm2_5i25.0.7i77.0.1.analogout1
setp hm2_5i25.0.7i77.0.1.analogout0-scalemax [AXIS_0] Torque_Feed-forward_OUTPUT_SCALE
setp hm2_5i25.0.7i77.0.1.analogout0-minlim [AXIS_0] Torque_Feed-forward_OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i77.0.1.analogout0-maxlim [AXIS_0] Torque_Feed-forward_OUTPUT_MAX_LIMIT
net x-Torque_Feed-forward => hm2_5i25.0.7i77.0.1.analogout1
[AXIS_0]Torque_Feed-forward_OUTPUT_SCALE must be in INI file and in this case must be analogout1 not analogout0
Manual says:
loadrt pid .... debug=1. I have never used that, so check to see what happens.
pid.N.errorD float ro (only if debug=1) Derivative of error. This is the value that is multiplied by Dgain to produce the Derivative term of the output.
pid.N.commandDD float ro (only if debug=1) Second derivative of command. This is the value that is multiplied by FF2 to produce the second order feed-forward term of the output.
Connect the hal oscilloscope to check to have values only on the accelerating/decelerating phase of the move. Must be 0 during the constant velocity phase of the trajectory. If this is not OK, we have to choose another output parameter of the PID or correct them doing some mathematics.