-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
encoder Z auto config error #41
Comments
thanks, i removed the rpm part from the generator, |
how do you get the spindle speed registered? holy cow the linuxcnc docs are confusing |
Maybe this is a G96 issue, here is some gcode for you to test
|
sorry, my experience with lathes is very limited, so many things have not yet been implemented. thanks for the test code |
from the research i did yesterday there needs to be some notion of velocity that can then be used as feedback for G96. Do you use Discord? maybe easier to collaborate there. |
i have no Discord, sorry. for G96, we 'only' need to feed the 'spindle.0.speed-in' with the encoder RPS (revolutions per second) |
ok, testrun with your file looks ok, the z-axis movements are dependent on the spindle speed :) . what are the lines for: i have no U or W axis configured, do i need this axis ??? |
comment those out, not sure why fusion360 post put them in |
can you send me your json config ? |
I decided to try to write a hal module to calculate the velocity, turns out I'm a terrible programmer..
hal config (rio.hal)
it kinda works but when i try to update the cntr->vel value it coredumps. |
sorry, I'm a bit busy at the moment, mostly due to uninitialized pointers or divisions by 0 |
I have it sorta working but I don't understand a few thing about how the encoder is expected to work in linuxcnc. One question I had for you regarding the fpga component is that it seems to count in 1x mode not quadrature mode. do I need to set QUAD_TYPE, it isn't clear what that is. also wondering how revolutions are tracked and how rollovers are dealt with. |
the quadType do only divide the counter by 4 to have the 'normal' resolution like in other software libs.
if you set it to 0, you have a 4 times higher resolution (each state change will count (A/B)) rollovers are not handled, it use the full 32bit (+- 2 147 483 647) range, on a lathe with 1200RPM and an encoder resolution of 2400 steps/rev, you need 12.4 hour inside a G33 operation to reach this value :) for the speed, you have each 12.4 hour a wrong calculation for 1/1000 second, don't know if this is an issue |
if is set the encoder scale to 1 the raw counts are 360 per revolution with the default quadType = 0 setting. The datasheet on my encoder says it is 360 CPR, 1440 PPR. |
this auto generated config line in custom_postgui.hal seems to throw a pin not found error
Also the docs for vin_quadencoderz don't' seem up to date or document all the options.
my config is:
The text was updated successfully, but these errors were encountered: