how to synchronize two servomotors

More
9 years 4 months ago #94455 by Jasper 3
I'm sure that encoder nd stepscale are set correct. But I will double check it.

If FF1 is 1 I can only drive arround 100mm/min or so.

Or do you mean FF1 should be 1000 ?

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

More
9 years 4 months ago - 9 years 4 months ago #94456 by PCW
No, if the scales are set properly, FF1 _is_ 1

This means without feedback (only feedforward), the PID output will command the correct
stepgen velocity

That is, if you command a move at 100 mm/sec, and FF1 is 1, the PID output will command the stepgenerator
to generate a 100 mm/sec move even before any feedback is applied. This is the same whether you close the loop
using the stepgenerator feedback pin or use an encoder for feedback
Last edit: 9 years 4 months ago by PCW.

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

More
9 years 4 months ago #94459 by Jasper 3
Aaah thanks a lot! now I get it.

So there must be anther reason for my acceleration problem.

I'm using step/dir driven Servos in combination with a MESA card 7i85s

In my first setup
P was 5
FF1 was 1

and I had to # one of these lines out.

net x-pos-fb <= hm2_5i25.0.encoder.02.position
net x-vel-fb <= hm2_5i25.0.encoder.02.velocity
net x-pos-fb <= hm2_5i25.0.stepgen.08.position-fb
#net x-pos-fb => axis.0.motor-pos-fb

so with this set up my Axis should run in closed loop right?
But also I get a following 0 error.
I searched a bit and found out that I should tune the PID values first. right?

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

More
9 years 4 months ago #94460 by Todd Zuercher

Jasper 3 wrote: and I had to # one of these lines out.

net x-pos-fb <= hm2_5i25.0.encoder.02.position
net x-vel-fb <= hm2_5i25.0.encoder.02.velocity
net x-pos-fb <= hm2_5i25.0.stepgen.08.position-fb
#net x-pos-fb => axis.0.motor-pos-fb


Of course you will get following errors with the above setup.
The line you should have commented out when you added encoder feedback should have been.

net x-pos-fb <= hm2_5i25.0.stepgen.08.position-fb

Because you are no longer using the sudo feed back from the hardware stpegen (you are using the encoder.)

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

More
9 years 4 months ago - 9 years 4 months ago #94462 by Todd Zuercher
On second thought with the hal commands you posted above, Linuxcnc should not have even started, it should have shutdown with complaints about not being able to connect two output pins to a signal.
Last edit: 9 years 4 months ago by Todd Zuercher.

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

More
9 years 4 months ago #94464 by Jasper 3
Of course my fault sorry!
I my hal file I've it correct

net x-pos-fb <= hm2_5i25.0.encoder.02.position
net x-vel-fb <= hm2_5i25.0.encoder.02.velocity
#net x-pos-fb <= hm2_5i25.0.stepgen.08.position-fb
net x-pos-fb => axis.0.motor-pos-fb

but still the following error.

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

Time to create page: 0.476 seconds
Powered by Kunena Forum