how to synchronize two servomotors
13 Jun 2017 15:46 #94448
by Jasper 3
Replied by Jasper 3 on topic how to synchronize two servomotors
Hey,
ok I will try this Master branch, when I have again Internet on my Linux CNC computer.
Today I've tried to Tune my Servo-drives via Linux CNC.
So If I use the Ecoderfeedback to close the loop I always get following erros when I accelerate to fast. I also tuned PID and FF1 to reasonable values. But the max velocity is only 1000mm/min. In an open Loop system I can run 15 000 mm/min without problems.
The reason for this slow travel speed is in my opinion the encoder feedback which causes a f-error. I think the motor can't accelerate as fast as needed. But reducing the acceleration means that the axis only reached a maximum velocity of maybe 3000mm/min. (The axis travel is only 400mm.
The Probelm is that I need to close the Loop with LinuxCNC to synchronize my Axis.
I hope you can help me accelerate much faster in the closed loop system.
Here to pictures of the tuning of my X-Axis
ok I will try this Master branch, when I have again Internet on my Linux CNC computer.
Today I've tried to Tune my Servo-drives via Linux CNC.
So If I use the Ecoderfeedback to close the loop I always get following erros when I accelerate to fast. I also tuned PID and FF1 to reasonable values. But the max velocity is only 1000mm/min. In an open Loop system I can run 15 000 mm/min without problems.
The reason for this slow travel speed is in my opinion the encoder feedback which causes a f-error. I think the motor can't accelerate as fast as needed. But reducing the acceleration means that the axis only reached a maximum velocity of maybe 3000mm/min. (The axis travel is only 400mm.
The Probelm is that I need to close the Loop with LinuxCNC to synchronize my Axis.
I hope you can help me accelerate much faster in the closed loop system.
Here to pictures of the tuning of my X-Axis
Please Log in or Create an account to join the conversation.
13 Jun 2017 16:05 #94451
by PCW
Replied by PCW on topic how to synchronize two servomotors
FF1 seems really wrong here
If the encoder and step scale are setup properly so encoder position and stepgen position are the same,
FF1 should be 1.000
If the encoder and step scale are setup properly so encoder position and stepgen position are the same,
FF1 should be 1.000
Please Log in or Create an account to join the conversation.
13 Jun 2017 17:21 #94455
by Jasper 3
Replied by Jasper 3 on topic how to synchronize two servomotors
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 ?
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.
13 Jun 2017 17:31 - 13 Jun 2017 17:32 #94456
by PCW
Replied by PCW on topic how to synchronize two servomotors
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
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: 13 Jun 2017 17:32 by PCW.
Please Log in or Create an account to join the conversation.
13 Jun 2017 17:56 #94459
by Jasper 3
Replied by Jasper 3 on topic how to synchronize two servomotors
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?
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.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
13 Jun 2017 18:02 #94460
by Todd Zuercher
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.)
Replied by Todd Zuercher on topic how to synchronize two servomotors
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.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
13 Jun 2017 18:05 - 13 Jun 2017 18:06 #94462
by Todd Zuercher
Replied by Todd Zuercher on topic how to synchronize two servomotors
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: 13 Jun 2017 18:06 by Todd Zuercher.
Please Log in or Create an account to join the conversation.
13 Jun 2017 18:08 #94464
by Jasper 3
Replied by Jasper 3 on topic how to synchronize two servomotors
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.
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.
13 Jun 2017 18:08 - 13 Jun 2017 18:09 #94465
by PCW
Replied by PCW on topic how to synchronize two servomotors
you can't drive the signal x-pos-fb from two sources so
net x-pos-fb <= hm2_5i25.0.encoder.02.position #loop closed with encoder
net x-pos-fb <= hm2_5i25.0.stepgen.08.position-fb #loop closed with local stepgen feedback
Cannot both be present in the hal file, you would select one or the other based on whether you were
using encoder feedback or local stepgen feedback
Also #net x-pos-fb => axis.0.motor-pos-fb
must be uncommented or you will get an immediate following when you move, since LinuxCNCs
feedback position will not be updated and therefore not match the commanded position
net x-pos-fb <= hm2_5i25.0.encoder.02.position #loop closed with encoder
net x-pos-fb <= hm2_5i25.0.stepgen.08.position-fb #loop closed with local stepgen feedback
Cannot both be present in the hal file, you would select one or the other based on whether you were
using encoder feedback or local stepgen feedback
Also #net x-pos-fb => axis.0.motor-pos-fb
must be uncommented or you will get an immediate following when you move, since LinuxCNCs
feedback position will not be updated and therefore not match the commanded position
Last edit: 13 Jun 2017 18:09 by PCW.
Please Log in or Create an account to join the conversation.
13 Jun 2017 18:22 #94466
by Jasper 3
Replied by Jasper 3 on topic how to synchronize two servomotors
yeah sry I allready correct me I # out the right one. In open loop everything is fine an I can get high velocitys. In closed loop I have the following error issues.
Please Log in or Create an account to join the conversation.
Time to create page: 0.146 seconds