Resolution and speed with servo motor

More
06 Jan 2025 06:39 #318199 by rairsa
Hello guys,
I have a rpi5 + parralel port rpi hat + 5 axis cnc interface adapter and  asdab2 servo driver 

my hal file
steplen 1
stepspace 0
dirhold and dirsetup 60000
scale is 20 (1 motor rotation = 10 mm = 200 pulse)

max velocity is 30000 mm/min is equal 500 in ini file

the problem is in scale and speed
if i make jog speed to 30000 servo graphic is in attachments 
when i increase the "scale" speed is going down and sometimes linuxcnc has following 0 error
for example scale is 20 and 15000mm/min speed i take

if i decrase the "scale" for example 8 speed is going to high but i think resolution is not enough

i tried to change steplen, stepspace, maxaccel etc but nothing changed. generally program give me following error

and also one thing pid is not in my hal and ini file
Attachments:

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

More
06 Jan 2025 11:36 #318207 by rairsa
Replied by rairsa on topic Resolution and speed with servo motor
anyone update?

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

More
06 Jan 2025 17:49 #318245 by PCW
Replied by PCW on topic Resolution and speed with servo motor
It's likely that you base thread period is limiting the maximum step rate
What is you base thread period?

Not sure if the GPIO connected stepgen can do reset mode like a
PC parallel port, but that that would help.

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

More
06 Jan 2025 21:13 #318263 by ihavenofish
Replied by ihavenofish on topic Resolution and speed with servo motor
dirhold and dirsetup are the restrictions i think

I have the same issue on mine. I had to increase them to 20000 which in turn restricted my top speed to 12m/m (with my screw and steps per turn of course)

I need to refine this. 5000 drops steps, but 20k is overkill.

60000 seems very extreme. is there a reason you have it set that high?

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

More
06 Jan 2025 21:31 #318264 by PCW
Replied by PCW on topic Resolution and speed with servo motor
Direction setup and hold timing should have no effect on maximum speed
as the direction is only changed at zero velocity. Step length and Step space
do affect the maximum step rate.

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

More
06 Jan 2025 21:39 #318265 by ihavenofish
Replied by ihavenofish on topic Resolution and speed with servo motor
gah. yes, i got those backwards.
"nevermind'

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

More
08 Jan 2025 06:31 #318379 by rairsa
Replied by rairsa on topic Resolution and speed with servo motor
hello
base period = 100 000
servo period = 1 000 000


steplen = 1
step space = 0
scale is 10

my one rotation is 10mm

so that scale*1 rotation is 100 pulse
i need to make >500 pulses for one rotation

if i make 100 scale
the speed is going down and linuxcnc give me following 0 error(axis x following error)

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

More
08 Jan 2025 13:57 #318406 by rairsa
Replied by rairsa on topic Resolution and speed with servo motor
anyone was find solution?

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

More
08 Jan 2025 16:53 #318425 by PCW
Replied by PCW on topic Resolution and speed with servo motor
With your existing hardware, lowering the base thread value
is the only thing you can do. How low you can lower it depends
on the kernel (turbo mode etc) and isolcpu settings.

Did you run a latency test? (why did you choose such a long base thread period?)

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

More
09 Jan 2025 09:02 #318516 by rairsa
Replied by rairsa on topic Resolution and speed with servo motor
hello PCW
Actually i download ini and hal file from byte2bot com because i bought parallel port rpi hat card from there

the latency test writing

Servo thread(1ms) max interval : 1003960ns | max jitter 3960 ns | last interval ~ 1 000 000 ns

Base thread (25 us) max interval : 30111ns | max jitter 5686 ns | last interval 25000ns

Should I change the base period and servo period values?

Thanks

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

Time to create page: 0.072 seconds
Powered by Kunena Forum