Forum Header

lathe encoder

More
5 years 7 months ago - 5 years 7 months ago #204363 by jbraun
lathe encoder was created by jbraun
I'm having some trouble understanding the encoder on a lathe project. The spindle readout in Axis drops to approx 10 rpm fairly quick when the spindle stops but takes about 10 seconds to drop to 0.1 and never returns to zero.
encoder.0.velocity-rpm reads 0.1397 at stand-still
encoder.0.position-interpolated bounces around crazy on the 3rd decimal and the only way I've found to stop this is increasing min-speed-estimate to many times the default. That doesn't feel like a proper solution and none of the above seems normal.
I've tried both a CUI capacitive and an Omron (knock-off) optical encoder with identical results. Only A channel and index are hooked-up. No synchronisation has been tested as the lathe is still in the build stage. The wiring is very basic since I don't know electronics, wired straight to parallel port..
Is what's described above typical and if not any clues why ?
A HAL file is attached.
btw the spindle speed is manual control.

File Attachment:

File Name: little_lathe.hal
File Size:3.52 KB

File Attachment:

File Name: pyvcp_options.hal
File Size:1.12 KB
Last edit: 5 years 7 months ago by jbraun.

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

More
5 years 7 months ago #204366 by cmorley
Replied by cmorley on topic lathe encoder
is 100 for encoder.0.position-interpolated the large value you tried?

that's 1.6 RPM - pretty low for a lathe spindle.
From the manual:

encoder.<chan>.position-interpolated (float, Out) - Position in scaled units, interpolated between encoder counts. The position-interpolated attempts to interpolate between encoder counts, based on the most recently measured velocity. Only valid when velocity is approximately constant and above min-speed-estimate. Do not use for position control, since its value is incorrect at low speeds, during direction reversals, and during speed changes. However, it allows a low ppr encoder (including a one pulse per revolution encoder) to be used for lathe threading, and may have other uses as well.

encoder.<chan>.min-speed-estimate (float, in) - Determine the minimum true velocity magnitude at which velocity will be estimated as nonzero and postition-interpolated will be interpolated. The units of min-speed-estimate are the same as the units of velocity . Scale factor, in counts per length unit. Setting this parameter too low will cause it to take a long time for velocity to go to 0 after encoder pulses have stopped arriving.


Seems to discuss your exact problem. I don't have real world experience with this setting so can't definitively say this is typical.

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

More
5 years 7 months ago #204393 by jbraun
Replied by jbraun on topic lathe encoder

is 100 for encoder.0.position-interpolated the large value you tried?

Yes, StepConf .hal doesn't include that line so it defaults to 1.0
The spindle doesn't seem to lose track of accumulated position, it's the velocity that's a bit wonky.
If velocity plays no part in sync for thread cutting I can live with the rpm display being a bit unresponsive. The thing is I don't know enough to know if this is a real problem.

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

More
5 years 7 months ago #204395 by cmorley
Replied by cmorley on topic lathe encoder
I think the manual explains it well enough - there is only so much you can do with a single pulse per rotation.

Real world testing will tell the story - please revisit this thread when you get an answer so others will know.

Chris
The following user(s) said Thank You: jbraun

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

More
5 years 7 months ago - 5 years 7 months ago #204398 by jbraun
Replied by jbraun on topic lathe encoder
Okay thanks. This project will need the big mill and it's still sub-freezing in that space. In other words this won't be completed any time real soon. I could connect the B channel but don't foresee a real need for the intended use. I don't think of it as a single pulse per rev since the A channel is 100 ppr.
Last edit: 5 years 7 months ago by jbraun.

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

More
5 years 6 months ago - 5 years 6 months ago #204570 by andypugh
Replied by andypugh on topic lathe encoder
I think that using only the A-channel is likely to cause problems.

If the spindle is sat on an edge, and vibrating, then the system will see lots of spurious pulses and the position will count monotonically up.

With full quadrature ( A and B ) this doesn't happen, the on-pulse counts up, then the off-pulse counts down.

If there is any chance that you would want to do rigid tapping on the lathe then you absolutely need all three encoder channels.
Last edit: 5 years 6 months ago by andypugh.
The following user(s) said Thank You: jbraun

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

Time to create page: 0.064 seconds
Powered by Kunena Forum