You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
for G96, we 'only' need to feed the 'spindle.0.speed-in' with the encoder RPS (revolutions per second)
the problem is to calculate this value. I have it now in the rewrite repository, but i have to 'backport' it to the main branch.
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.
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.
Activity
multigcs commentedon Jan 30, 2024
thanks, i removed the rpm part from the generator,
the config examples are only minimal setup's , this will be better in the next version :)
jschoch commentedon Jan 31, 2024
how do you get the spindle speed registered? holy cow the linuxcnc docs are confusing
jschoch commentedon Feb 1, 2024
Maybe this is a G96 issue,
here is some gcode for you to test
multigcs commentedon Feb 1, 2024
sorry, my experience with lathes is very limited, so many things have not yet been implemented.
I'll try to implement it at the weekend
thanks for the test code
jschoch commentedon Feb 1, 2024
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.
multigcs commentedon Feb 1, 2024
i have no Discord, sorry.
for G96, we 'only' need to feed the 'spindle.0.speed-in' with the encoder RPS (revolutions per second)
the problem is to calculate this value. I have it now in the rewrite repository, but i have to 'backport' it to the main branch.
multigcs commentedon Feb 1, 2024
ok, testrun with your file looks ok, the z-axis movements are dependent on the spindle speed :) .
what are the lines for:
N13 G28 U0.
N14 G28 W0.
i have no U or W axis configured, do i need this axis ???
jschoch commentedon Feb 1, 2024
comment those out, not sure why fusion360 post put them in
multigcs commentedon Feb 1, 2024
can you send me your json config ?
jschoch commentedon Feb 1, 2024
https://gist.github.com/jschoch/f0c0784faedfd22f2ebe4e3d1114410f
jschoch commentedon Feb 5, 2024
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.
multigcs commentedon Feb 5, 2024
sorry, I'm a bit busy at the moment, mostly due to uninitialized pointers or divisions by 0
jschoch commentedon Feb 7, 2024
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.
multigcs commentedon Feb 7, 2024
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,
i think it's hard to reach this value
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
jschoch commentedon Feb 7, 2024
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.