Encoder position verification - Mesa 5i25 + 7i85

More
13 Apr 2019 13:13 #130767 by DOHC
Hello,

I have a question about Mesa HostMot2 driver - I think. In my milling maschine I have stepper motors driving ball screws via htd5 belts. On the ball screws I've instaled encoders 2500 ppr and in linux I've created a closed loop setup. It works very fine but somethimes during hard milling on Z axis i think that encoder incidentally loses its position.

Is there a chance to implement in HostMot2 mechanism which will controll Index signal position vs encoder actual position? When machine is homing on index, position counter is reset. On every next index signal position counter should be on position 0 +/- (ball screw pitch)*(number of revolutions) so it is very easy to verify if encoder didn't lost its position. I tried to do that with external component but without a succes. It would be great if modified driver can correct automaticly actual position and leave the info about error occured. (error counter or something like that.) It may be even more needed on machines with optical linear encoders were part of dust or droplet of coolant will couse problems. How to start with that?
Regards Kamil

Please Log in or Create an account to join the conversation.

More
13 Apr 2019 14:59 #130774 by PCW
I think its possible to do what you are asking, basically by having the index hardware always enabled
(and re-enabled when an index event is discovered) so it always latches the count at index
(the index hardware does not actually clear the count at index) then index-enable would just work at a
software level in the driver (only actually clearing the hal position pin if index-enable is set)
and the latched count could be used for error detection.

However there are enough driver mods lined up that I'm not sure when this could be implemented

Also if you do think you have miscounts, have you tried setting the encoder filters so they are only about 50%
higher than the maximum count frequency? The default maximum count rat is much higher than most encoders can generate
so if you have an issue with spindle motor noise for example, its likely you can filter it out. Using differential mode
encoder signaling helps with noise immunity as well.

Please Log in or Create an account to join the conversation.

More
13 Apr 2019 21:51 #130793 by DOHC
Thank You for your respond. I've tryed to write component which have as input: encoder position
input/output: index enable
output: actual position

It's principle of operetion was something like this:

1) After homing encoder position was set as actual position untill index-enable occurs

2) When index-enable occurs encoder-position was reset, actual position was set as old actual position + encoder position (signs depends on axis travel directions)

It works almost good, but as I remember there was some problems when axis goes around index. I thought those calculation should be done in hostmot function, not as seperate function in a thread.

I didn't tryed playing with filters settings. The problem is not a nightmare for me but i think function like i described would be super usefull. Of course I'm using differential signals, on ttl it was so unstable that i couldn't do enything. Now the only problem is z axis I don't know if it is caused by vibration or big current during high spindle load (encoder cable and spindle motor goes in the same cable guide - but both are shielded)

Maybe there is a place where can I look at developers work and look at hostmot source file? Maybe i would be able to help a little bit with that ?

Regards Kamil

Please Log in or Create an account to join the conversation.

More
14 Apr 2019 00:02 - 14 Apr 2019 00:02 #130801 by PCW
Its part of the normal LinuxCNC source code, in src/hal/drivers/mesa-hostmot2/encoder.c

Note that if you had issues with single ended encoder signals, its pretty likely you can
fix your problem by enabling the filter and lowering the encoder sample rate.
Last edit: 14 Apr 2019 00:02 by PCW.

Please Log in or Create an account to join the conversation.

More
13 Jun 2020 14:02 #171453 by zz912
Dear Mr. DOHC Was it possible to finally check the encoder using the Z-signal?

Please Log in or Create an account to join the conversation.

Time to create page: 0.075 seconds
Powered by Kunena Forum