spindle via step/dir servo and Mesa card

More
24 Mar 2022 23:09 #238291 by robertspark
loosing my marbles... sure I had it working right before.

I've got / had my lathe spindle set up via a asda2 servo drive, with a 2:1 reduction drive.

it is / was set on joint4 as step and dir
it is set as 2880 steps per rev.

it was set as 41.666r rev per second.  max Vel.
i set all this up using pncconf under ~2.8
I have now switched to 2.9 / master
and my RPMS were very low.

read the docs under the ini section and it seems that spindles are set up as RPM.... not RPSec.....
(spindle section seems new and not listed under 2.8docs in ini section).

no problem me thinks.... change max Vel to 2500.
now getting an error 
hm2/hm2 stepgen.04maxvel is too big for current step timings & position-scale, clipping to max possible

but it now runs at the right RPMS....

I understand the message..... I do have the 7i76 wired into the high speed <4hmz step and dir inputs.... and although my step timings were conservative I didn't think they were a problem given 2500 rpm X 2880 steps per rev / 60 = 120khz..... which is a little more than 4000nSec for the pulse width settings.... and I tried lowering my setting and still got the error message.

has something changed from 2.8x to master on the spindle settings and the ini file or have I truly lost my marbles?

all other settings are in units per sec.... it appears that spindle settings have been changed to revs / min?

linuxcnc.org/docs/devel/html/config/ini-...#sec:spindle-section
no spindle section in 2.8x docs in sect
linuxcnc.org/docs/stable/html/config/ini-config.html


wondering if I should put a scaling factor in the ini file before the max velocity setting is passed to the mess card from the hall file?

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

More
25 Mar 2022 00:11 #238299 by PCW
The drivers hardware stepgen settings would be in RPS rather than RPM
so the stepgen maxvel should be 41.666 (RPS)

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

More
25 Mar 2022 07:25 #238307 by robertspark
thanks but that does not seem to be the way 2.9 is working plus the ini section that has been added denotes rpm not rps as given in the links in my previous post

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

More
25 Mar 2022 09:43 #238317 by rodw
To get your stepper frequency to fit, you can adjust your ini settings. This was about as fast as I could get them with 25x microstepping and they have never faltered in years
# these are in nanoseconds
DIRSETUP   = 500
DIRHOLD    = 500
STEPLEN    = 1500
STEPSPACE  = 1500

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

More
25 Mar 2022 12:25 - 25 Mar 2022 12:26 #238332 by robertspark
thanks rod, but it depends on your drives

a 1500ns step (and space) indicates 333khz capable drives.

most are 100khz, some are 200khz for steppers. if you are not driving them near their maximum, you are better to use a more chunky step spacing so they don't get missed potentially, imo YMMV.

servos are in another league. I think my asda2 drive is 2 or 4mhz

_____________________
​​​​​​
none of the above is my problem..... someone has changed the max velocity of the spindle speed in 2.9 from rps to rpm and now stuff is throwing a wobbly
Last edit: 25 Mar 2022 12:26 by robertspark.

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

More
25 Mar 2022 14:16 - 25 Mar 2022 14:18 #238340 by PCW
The driver to the hardware stepgen has not changed, Velocity there has
always been specified in units per second (just checked in current master)
Last edit: 25 Mar 2022 14:18 by PCW.

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

More
25 Mar 2022 14:52 #238342 by robertspark
Could it be that something has changed within Linuxcnc its self before it passes the "Sxxxx" value back to the mesa hardware.

I don't for a minute think that there is a problem with the Mesa hardware or hal component.

But it seems strange that if I set the Sprindle Max Vel as 41.66666 (for 2500rpm), that when I type into the MDI (in axis + gmoccapy, both same),
S1000
then
M3
The spindle seems to run very slow (like 41rpm....)
but when I change the setting for the Spindle Max Vel to 2500, and do the same thing again, the spindle now does 1000rpm and it's not clipped at 1000rpm. If I type in S2500 into the MDI, it will do 2500 rpm.

Note this all worked just fine before under 2.8 when I used PNCCONF to set up the spindle on Joint4 as Step/Dir and it set the max velocity to 41.6666 (rps)

I'm going to have a look at github and see if I can figure out where the spindle is controlled and what may have changed

Was hoping maybe someone else was running 2.9 with a servo as a spindle to see if they had a similar issue or could test a RIP 2.9 with 2.8 config to see if it all goes wrong or its just me thats totally lost my marbles and somehow broken something

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

More
25 Mar 2022 14:59 - 25 Mar 2022 14:59 #238343 by PCW
I would just look at your hal file and look at the spindle speed pins/parameters with halshow
Last edit: 25 Mar 2022 14:59 by PCW.

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

More
25 Mar 2022 15:03 #238344 by robertspark
Will do, thank you, much appreciated.

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

More
18 Feb 2023 15:16 - 18 Feb 2023 15:18 #264753 by 0x2102
Robert, did you manage to figure out what the issue was?

I am having the exact same problem. I have a working 2.8 setup with a servo spindle controlled via step/dir.
Right now I am testing 2.9/2.10 and I see the same issue.My spindle is limited to 600rpm, unless I change the MAX_VELOCITY setting.

When I change MAX_VELOCITY = 2000, I can run the spindle up to 2000rpm. MAX_VELOCITY = 6000...same here max 6000rpm.

When I try to set it to 28000, I get the same error "hm2/hm2 stepgen.04maxvel is too big for current step timings & position-scale, clipping to max possible".

Also M4 is no longer working for me. Really strange, because an M19 can position the spindle cw and ccw without a problem.

Anybody any idea or should I submit this as an issue on GitHub?

[SPINDLE_0]
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
MAX_VELOCITY = 600
MAX_ACCELERATION = 100
STEPGEN_MAXVEL = 750.00
STEPGEN_MAXACCEL = 350

# StepGen / Encoder Scale
ENCODER_SCALE = 3200
# these are in nanoseconds
DIRSETUP = 1000
DIRHOLD = 1000
STEPLEN = 200
STEPSPACE = 200
STEP_SCALE = 800
# Output Scale in RPS: 466.66677 = 28000RPM
OUTPUT_SCALE = 595.238
OUTPUT_MIN_LIMIT = -466.667
OUTPUT_MAX_LIMIT = 466.667
Last edit: 18 Feb 2023 15:18 by 0x2102.

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

Time to create page: 0.110 seconds
Powered by Kunena Forum