Encoder Scale Problem - Reporting Wrong RPM

More
10 years 3 months ago - 10 years 3 months ago #77799 by russtuff
I'm running 1024ppr encoder, with an overdrive pulley ratio of about 1:1.8. Taking some measurements I've worked out 562.934 PPR. My machine HAL file looks like this.
Code:
# 1024 SPINDLE PPR BUT WITH BELT DRIVE ITS 562.6 PPR setp encoder.0.position-scale 562.9335782 setp encoder.0.counter-mode 1 net spindle-position encoder.0.position => motion.spindle-revs net spindle-velocity encoder.0.velocity => motion.spindle-speed-in net spindle-index-enable encoder.0.index-enable <=> motion.spindle-index-enable

I'm running channels 'A' and 'Z' (index) so maybe I should be counting index pulses to report RPM to pyVCP?
Now here is the weird part.

When I M3 S1800 I can measure exactly 1800RPM at the spindle (not the motor) so the VFD is right. pyVCP reports about 800RPM.
When I M3 S3600 i can measure exactly 3600RPM and pyVCP reports 600RPM. That's right, actual spindle speed goes up and pyVCP shows a lower RPM. Also, when dropping form the incorrect 800 to the more incorrect 600 it dips to 0 RPM first (quickly) then comes back up. There is no belt slip or other mechanical problem, so it has to be my config.

My whole config is online at drive.google.com/open?id=0B1zl3WgbwjPGT0ZWSGNKMUprS0U
Any help would be appreciated.
Last edit: 10 years 3 months ago by russtuff.

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

More
10 years 3 months ago - 10 years 3 months ago #77805 by PCW
1800 RPM is too fast for a software encoder counter to accurately
count an encoder with 562 PPR at your ~ 25 KHz base thread

If you run your spindle at lower speeds you should find that the RPM is correct
(Up to about 1200 RPM by my calculations assuming near perfect encoder signals and negligible jitter)

One fix would be to lower your encoders resolution (some encoders have this option)
or swap the encoder for one with say 100 PPR

Another fix is to add a hardware encoder counter
Last edit: 10 years 3 months ago by PCW.

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

More
10 years 3 months ago #77806 by russtuff
Thanks. That's disheartening to hear. It's an expensive encoder that came installed on a new motor. It doesn't allow for variable PPR. I'll research my options.

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

More
10 years 3 months ago - 10 years 3 months ago #77808 by russtuff
I know almost nothing about this sort of thing, but it looks like I could use a 74hc4020 counter as a frequency divider.
Thanks again for your help.

Edit: Looks like if I were running a Mesa card this would be a non-issue. May be time to upgrade.
Last edit: 10 years 3 months ago by russtuff.

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

More
10 years 3 months ago - 10 years 3 months ago #77834 by andypugh

rusmannx wrote: Edit: Looks like if I were running a Mesa card this would be a non-issue. May be time to upgrade.


The pulley ratio means that you may need to supply a separate index pulse if you want to do any spindle-synchronised motions.
Can you swap to a 1:1 ratio? Mesa (or Pico) hardware would still be able to cope.
Last edit: 10 years 3 months ago by andypugh.

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

More
10 years 3 months ago #77835 by russtuff

andypugh wrote: The pulley ratio means that you may need to supply a separate index pulse if you want to do any spindle-synchronised motions.
Can you swap to a 1:1 ratio? Mesa (or Pico) hardware would still be able to cope.


My encoder is quadrature, but it looks like I'm stuck with only using index until I can divide my resolution down. Or get another encoder which I prefer not to do.

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

Time to create page: 0.326 seconds
Powered by Kunena Forum