Motor encoder scaling

More
28 Oct 2020 02:39 #187491 by PMCD
Motor encoder scaling was created by PMCD
I'm in the process of configuring the servos on my 3 axis router but I need to control them before progressing to Tommylight's servo tuning tutorial.

The machine has Indramat motors:
MKD 071 on the X (resolver feedback, not absolute)
MKD 041 on the Y and Z (resolver feedback, not absolute)

I've been able to scale them so when I move each axis by hand the distance corresponds with the DRO. The trouble is I'm unsure what to use for the encoder scaling in PncConf. Encoder lines per revolution and encoder pulses per unit.
They jog around ok in the open loop test.

The attached image is an extract from the link below (page 130).







www.magnaproducts.com/wp-content/uploads...anual_compressed.pdf

Thanks as always
Peter
Attachments:

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

More
28 Oct 2020 04:23 #187495 by cmorley
Replied by cmorley on topic Motor encoder scaling
What did you use for scale setting to get the DRO to read right?
If you have figured out scaling even by hand you can enter that number in pncconf.
You don't need to 'calculate scale' - that's just for convenience.

The scaling should be in pules per unit.

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

More
28 Oct 2020 04:44 #187500 by PMCD
Replied by PMCD on topic Motor encoder scaling
So are you saying that the encoder lines per revolution and encoder pulses per unit aren't important as long as each axis movement matches the DRO.
Therefore if servos are jumping around it has nothing to do with the axis scale calculation in PncConf.

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

More
28 Oct 2020 04:53 #187503 by cmorley
Replied by cmorley on topic Motor encoder scaling
I'm saying you don't need to use pncconf's scale calculation pop up - you can enter scale directly.

servos jumping around can be many things. ie the default PID tuning in pncconf does no adjustments.

typically you would set the perimeters in pncconf motor page and then use the openloop test to confirm encoder/motor direction and you can confirm the scaling is at least close. Motor and encode direction is very important.

Chris

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

More
28 Oct 2020 06:48 #187517 by PMCD
Replied by PMCD on topic Motor encoder scaling

I'm saying you don't need to use pncconf's scale calculation pop up - you can enter scale directly.

servos jumping around can be many things. ie the default PID tuning in pncconf does no adjustments.

typically you would set the perimeters in pncconf motor page and then use the openloop test to confirm encoder/motor direction and you can confirm the scaling is at least close. Motor and encode direction is very important.

Chris


The motors work fine in the open loop test but there is no control at all working in axis so I can't even attempt to jog them.
They are powerful motors and very violent.

I'll recheck some wiring tomorrow.

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

More
28 Oct 2020 12:34 #187554 by cmorley
Replied by cmorley on topic Motor encoder scaling
When you say the motors work fine in the openloop test, does that mean you conformed the direction of the motor and the direction of the encoder count?

pushing the plus key should make the encoder count positively.
The motor should move the axis in the proper direction. The help diagram should help you figure out the proper direction.

very important as you can get a run away under PID control if not set up right.

After that it requires PID tuning which is easiest in AXIS using the calibration dialog.

Chris

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

More
28 Oct 2020 21:24 #187631 by PMCD
Replied by PMCD on topic Motor encoder scaling
Everything is correct as you have explained.

I have the analogue enables for x and y pulled from the 7I77 board.

Using only the z motor which is uncoupled from the axis, I enabled the servos and the motor drifts at about 2rpm then toggled F2. There is a quick jerk of the motor then a 'joint following error" on the screen.

should I play with PID tuning now?

Peter

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

More
28 Oct 2020 21:48 #187637 by PCW
Replied by PCW on topic Motor encoder scaling
If you get a quick move and a following error when enabled,
its likely you have the feedback reversed.

Here is a basic tuning sequence for velocity mode drives:

gnipsel.com/linuxcnc/tuning/servo.html

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

More
28 Oct 2020 23:31 - 28 Oct 2020 23:32 #187642 by PMCD
Replied by PMCD on topic Motor encoder scaling
This is how I have the encoders wired.



Peter
Attachments:
Last edit: 28 Oct 2020 23:32 by PMCD.

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

More
29 Oct 2020 20:21 #187719 by PMCD
Replied by PMCD on topic Motor encoder scaling
So I've been playing around with encoder scale in the INI file for the 'Z' axis and am get some better result The motor is still drifting (slower) and now there is a delay (3s) before I get the following error when I start Linuxcnc,

From the attached document in my original post is there a correct figure I should be using in the encoder scale.

The last number I tried was 24576 for MKD041 motor

Peter

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

Moderators: cmorley
Time to create page: 0.187 seconds
Powered by Kunena Forum