Hello Andy,
I moved exactly in the direction you describe. I already added to following fields to the joint-ini-section and have them now available in the homing routines:
Code:
# HOME_DISTANCE_CODED enables / disables support for homing of distance coded glasscales
HOME_DISTANCE_CODED = 1
# HOME_DISTANCE_CODED_N specifies the nominal number of steps the coding marks are separated
HOME_DISTANCE_CODED_N = 1000
# HOME_DISTANCE_CODED_SP specifies the signal period of the analog signal coming from the glasscale
HOME_DISTANCE_CODED_SP = 0.02
Further I added another input pin called
Code:
joint.N.motor-pos-raw-fb
to the joint. I choose 'motor' because the input could be either an absolute rotary encoder sitting on the motor or as in our case a linear glasscale. I'm not conclusive on that though. Longer term I think there should be added the concept to the joint of having motor-encoder as well as direct-encoder feedback as some more recent machines have. This allows to auto-calibrate for backlash etc and even gives the option to fall back on the servo-encoders should the direct encoders fail.
Even the Mikron at hand has rotary encoders on the servos but they are only used within the Bosch drives and not forwarded to the control.
Next step is now to add the math for distance coded homing. But after that it will probably be some time until we can test as we did not connect / test the servos controlled from LinuxCNC yet.
Best regards,
Marc
PS: @gaston48: As you already figured out the analog servo control of your Mikron would you be willing to share your PID parameters with us. This would probably help us quite a bit.