Motor encoder scaling

More
29 Oct 2020 22:38 #187731 by tommylight
Replied by tommylight on topic Motor encoder scaling
If the motor is drifting while enabled, there is something wrong with the wiring or configuration, so:
Check if the drive is set to output INCREMENTAL values,
open halshow and check the number of raw encoder counts while the drive is disabled by moving the motor exactly one turn by hand,
And since it seems to me there might be more than one issue there, have a read through this, especially the wiring and checking parts:
forum.linuxcnc.org/10-advanced-configura...ning-detailed-how-to

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

More
30 Oct 2020 00:03 - 30 Oct 2020 00:07 #187738 by PMCD
Replied by PMCD on topic Motor encoder scaling
H Tommy,

I think the wiring is ok.

I have had some success this morning since my last post.
Here is what I did
I changed these figures in the ini file.

Z MKD041 encoder scale 21000 (PncConf had these at 600 800 and 1600)
Y MKD041 encoder scale 21000
X MKD071 encoder scale 32000

Now when I enable the servos I get a small amount of drift until I toggle F2 then they stop and I am able to jog each axis around. The direction is correct but the DRO does not match the machine movement now (which I expected)

I have done what you said and rotated the y axis one turn, 8000 was the count.
Last edit: 30 Oct 2020 00:07 by PMCD.

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

More
30 Oct 2020 00:44 - 30 Oct 2020 00:49 #187741 by cmorley
Replied by cmorley on topic Motor encoder scaling
You can't change the scale to tune the axes.
You must set the scale so the DRO and movement are in agreement.
Then you tune the PID
Last edit: 30 Oct 2020 00:49 by cmorley.

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

More
30 Oct 2020 02:06 #187745 by PMCD
Replied by PMCD on topic Motor encoder scaling
When I did that the motors went nuts. 3 tonnes of machine jumping around aint pretty. I don't know where to start in PID when they are doing that.

So after checking the raw encoder count of 8000 (as Tommy instructed) how do I utilize that in the axis scaling? I'm obviously missing something.

This is the last setup I tried and would continue on PID tuning but the DRO/Machine scaling is way out.
Z MKD041 encoder scale 24000
Y MKD041 encoder scale 24000
X MKD071 encoder scale 32000

Peter

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

More
30 Oct 2020 02:25 #187746 by cmorley
Replied by cmorley on topic Motor encoder scaling
See my last message :)
Axis scaling is what linuxcnc uses to know how much to move to get to a requested position. It must be correct and there is only one correct setting.

PID tuning is what linuxcnc uses to correct the requested command based on the current feedback position (ie smooth accurate movement)

Untuned position loop can be very violent.

I suggest googling linuxcnc PID tuning.
Unfortunately it's a little black magic and the best information is spread around in wikis and forum posts
eg:
wiki.linuxcnc.org/cgi-bin/wiki.pl?PWM_Servo_Amplifiers

Chris

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

More
30 Oct 2020 02:40 #187747 by PMCD
Replied by PMCD on topic Motor encoder scaling
Does the raw encoder (8000/rev) count have anything to do with how I scale the axis.
Peter.

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

More
30 Oct 2020 04:38 #187751 by cmorley
Replied by cmorley on topic Motor encoder scaling
yes. scale means counts per unit of travel ie 20000 counts per inch

This 'counts' includes any encoder counts, gearing, lead screw pitch and or electronic dividing of the encoder counts.

ie A motor with a 2000 counts per revolution encoder tied directly to a 10 revolution per inch lead screw(10 tpi) = 20000 scale

2000 X 10 = 20000 counts per inch

same thing but wiih a 2:1 gear ratio added between the motor and lead screw:

2000 (encoder counts) X 10 (10 TPI) X 2 (gear ratio) = 40000 counts per inch

Chris

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

More
30 Oct 2020 06:25 #187753 by PMCD
Replied by PMCD on topic Motor encoder scaling
I understand what your saying but I cant get to work in Pncconf.

Peter

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

More
30 Oct 2020 11:50 #187787 by cmorley
Replied by cmorley on topic Motor encoder scaling
So I'd need more information about the machine to guide you.
I find it confusing too as you said you had the DRO correct at one time.

Lets start a bit back -
Are you using the drive in analog mode (+-10 volt input)?
if in analog mode, does the drive analog input control torque or speed (speed is usual)

What Mesa cards are you using?
pick an axis:
-What is the thread TPI or lead of the lead screw?
-is there any gearing/belt drive, if so what is the ratio?

Anything else you think may be pertinent to set the scaling of one axis.

Chris

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

More
30 Oct 2020 20:33 - 30 Oct 2020 22:00 #187830 by PMCD
Replied by PMCD on topic Motor encoder scaling
Hi Chris thanks for being patient and I appreciate your help.

I'm using Mesa 5i25/7i77 Pack and go the the 2.8 buster preemmpt iso.

The servo drives are +-10v analogue. The model I have are DKC11.1-040-7-FW

If you don't mind have a look in the attached PDF section 4-25.

I have X3. wire 1 and 2 connected to 7i77 AOUT and GND.

The Z and Y are the easiest to work with and I uncoupled them from the lead screws.

The Z axis is direct drive 5mm lead screw pitch

The Y axis is 24-60 teeth belt drive, motor to lead screw. The lead screw is a four start thread 25mm pitch

The x axis is rack and pinion. Rack 30 teeth in 200mm. Pinion 20 teeth. The motor drives this through a planetary gear (I will see if I can work out the reduction now). Edited 10:1 ratio

Note: this manual also cover the model with the stepper module.

This browser does not support PDFs. Please download the PDF to view it: Download PDF



Peter
Attachments:
Last edit: 30 Oct 2020 22:00 by PMCD.

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

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