PID Loop for stepper motors

More
10 Feb 2020 16:27 #156968 by Ameone
Replied by Ameone on topic PID Loop for stepper motors
Ok thanks! Regarding the encoder scale, I have a rotary encoder with a resolution of 2000 steps/rev. Since it's directly connected to the motor axis, I've concluded an encoder scale of 2000/360 = 5.55. Is it correct?

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

More
10 Feb 2020 17:13 #156972 by PCW
Replied by PCW on topic PID Loop for stepper motors
Is this a rotary axis?
Is it a 2000 PPR encoder?

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

More
10 Feb 2020 17:17 #156973 by Ameone
Replied by Ameone on topic PID Loop for stepper motors
Yes, rotary acis with a 2000 ppr encoder!

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

More
10 Feb 2020 17:24 #156975 by PCW
Replied by PCW on topic PID Loop for stepper motors
Right so the scale would be 22.2222222
(8000/360)

This is because a 2000 line (PPR) encoder has 8000 counts per turn
when using quadrature.

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

More
10 Feb 2020 17:26 #156976 by Ameone
Replied by Ameone on topic PID Loop for stepper motors
Ok thank you very much, tomorrow I’ll retest everything and let you know if it works.

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

More
11 Feb 2020 13:31 #157050 by Ameone
Replied by Ameone on topic PID Loop for stepper motors
Ok so my mistake, the encoder has 1000 PPR. I've tried to move the axis at 90 degrees using both 1000/360 and 4000/360 encoder scales. The scale 1000/360 gives the correct effective angle, is there some problem?
Also, do you know why the axis moves so slowly, without changing speed?

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

More
11 Feb 2020 13:38 #157051 by PCW
Replied by PCW on topic PID Loop for stepper motors
Maybe this is a terminology issue

A 1000 PPR encoder has 1000 slots and will generate 4000 counts per turn in quadrature 4X mode

A 250 PPR encoder has 250 slots and will generate 1000 counts per turn in quadrature 4X mode

Posting your hal/ini files would be the quickest way to diagnose your motion issues.

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

More
11 Feb 2020 13:56 #157054 by Ameone
Replied by Ameone on topic PID Loop for stepper motors
Ok thanks, I'm attaching the files!

File Attachment:

File Name: moveo_2020...11-2.ini
File Size:10 KB

File Attachment:

File Name: moveo_step...2-11.hal
File Size:12 KB
Attachments:

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

More
11 Feb 2020 14:17 #157060 by PCW
Replied by PCW on topic PID Loop for stepper motors
At first glance:

you still have statements like

setp pid.a.maxerror .0005

These all need to be removed

Also you have the maxvel on the rotary axis set to 11 degrees per second which is pretty slow

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

More
11 Feb 2020 14:39 #157062 by Ameone
Replied by Ameone on topic PID Loop for stepper motors
Yeah I modified only the x axis (axis 0) to speed up the configuration. I'll modify the other ones later on.
Sorry but where did you see that 11 degrees per second speed?

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

Time to create page: 0.068 seconds
Powered by Kunena Forum