Closing the servo loop with HAL mesa 7i76

More
10 Jan 2020 16:22 #154557 by Clive S
Replied by Clive S on topic Closing the servo loop with HAL mesa 7i76

Yes
You should also be able to check the scale by commanding one turn worth of motion (say 5mm for 5mm pitch ballscrew) and verifying that the motor makes 1 turn. If this works, command 10 or 100 turns worth of motion and verify the the motor shaft ends up in the same place...


Ok I can verify that 1 turn on the shaft is 5mm on the DRO and encoder position also shows 5 with both going +ve

I have noticed that when using a feed rate of 1000mm/min then encoder velocity pin shows about 16.8 and half that with a feed rate of 500mm/min.

I am still getting following errors if I used above about 1000mm/min in open loop with P = 1000

File Attachment:

File Name: dean.hal
File Size:6 KB

File Attachment:

File Name: dean.ini
File Size:2 KB
Attachments:

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

More
10 Jan 2020 16:38 #154559 by PCW
MIN_FERROR = 1.0
MAX_VELOCITY = 35
MAX_ACCELERATION = 500
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Note the comment

STEPGEN_MAXVEL = 31.25
STEPGEN_MAXACCEL = 600
The following user(s) said Thank You: Clive S

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

More
10 Jan 2020 17:13 - 10 Jan 2020 17:14 #154560 by Clive S
Replied by Clive S on topic Closing the servo loop with HAL mesa 7i76

MIN_FERROR = 1.0
MAX_VELOCITY = 35
MAX_ACCELERATION = 500
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Note the comment

STEPGEN_MAXVEL = 31.25
STEPGEN_MAXACCEL = 600


Thank you I could not see the wood for the trees.
I have changed them to 43.75 and 625

Now I can get the the feed rate up to 2500mm/min it errors at about 2800mm/min
this is with closed loop and P10

Is this relevant "I have noticed that when using a feed rate of 1000mm/min then encoder velocity pin shows about 16.8 and half that with a feed rate of 500mm/min."
Last edit: 10 Jan 2020 17:14 by Clive S.

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

More
10 Jan 2020 18:18 - 10 Jan 2020 18:19 #154566 by PCW
16.8 is about correct (1000 mm/m = 16.666 mm/s)

43.75 mm/s = 2625 mm/m so 2800 mm/m is not reachable with that stepgen velocity limit
Last edit: 10 Jan 2020 18:19 by PCW.
The following user(s) said Thank You: Clive S

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

More
10 Jan 2020 19:03 #154568 by Clive S
Replied by Clive S on topic Closing the servo loop with HAL mesa 7i76
Ok Thanks

I have upped the stepgen to 100. I have a bit of oscillation of the third digit which of the P terms do I need to adjust ?

[AXIS_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 10
MIN_FERROR = 1.0
MAX_VELOCITY = 100
MAX_ACCELERATION = 500
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 125
STEPGEN_MAXACCEL = 625
P = 10.0
I = 0.01
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
ENCODER_SCALE = -2000

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

More
10 Jan 2020 19:28 #154569 by PCW
if the error is in the 1-2 encoder count range it may be normal dithering
You can reduce this with a small amount of deadband (say .001 mm)
The following user(s) said Thank You: Clive S

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

More
11 Jan 2020 19:11 #154631 by Clive S
Replied by Clive S on topic Closing the servo loop with HAL mesa 7i76
I am still struggling with this. This is my first time with a servo and not sure what to set the follow to
DIRSETUP = 1000
DIRHOLD = 1000
STEPLEN = 1000
STEPSPACE = 1000
STEP_SCALE = 2000 ENCODER_SCALE = -2000

I am getting an error " hm2/hms_5i25.0: stepgen.00.maxvel is too big for current step timings & position-scale, clipping to max possible
what do I need to adjust for this.

I would like to get 20mtr/min The servo rotates 1 rev when commanded 5mm the encoder position pin shows the same

The servo is new 1.8kw I believe 10000 count connected to 7i76 with differential step/dir when the servo is stationary and I try to move it. It returns back to position. So I assume that is correct.

File Attachment:

File Name: dean_2020-01-11.hal
File Size:6 KB

File Attachment:

File Name: dean_2020-01-11.ini
File Size:3 KB
Attachments:

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
11 Jan 2020 22:40 #154647 by tommylight
Replied by tommylight on topic Closing the servo loop with HAL mesa 7i76

I am getting an error " hm2/hms_5i25.0: stepgen.00.maxvel is too big for current step timings & position-scale, clipping to max possible
what do I need to adjust for this.

That is just a warning, it can be removed by lowering the max_velocity in the ini file for the X axis.
The following user(s) said Thank You: Clive S

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

More
11 Jan 2020 22:49 - 11 Jan 2020 22:51 #154650 by PCW
from the X axis section of your ini file:
MAX_VELOCITY = 250
STEPLEN = 1000
STEPSPACE = 1000
STEP_SCALE = 2000

With a max velocity of 250 mm/s and a step scale of 2000 steps/mm you are right at the
limit of the stepgens maximum rate at the current steplen and stepspace settings:

Maximum step rate = 1/(steplen+stepspace) so 500 Khz at your current settings
500 KHz is also stepscale * maxvel = 2000*250 = 500 KHz.

If you need higher velocities you will need to shorten the steplen and stepspace.
Last edit: 11 Jan 2020 22:51 by PCW.
The following user(s) said Thank You: Clive S

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

More
11 Jan 2020 23:31 #154654 by Clive S
Replied by Clive S on topic Closing the servo loop with HAL mesa 7i76
Thanks Tom have you checked your email or changed it?

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

Time to create page: 0.131 seconds
Powered by Kunena Forum