Motor encoder scaling

More
31 Oct 2020 21:00 #187946 by PMCD
Replied by PMCD on topic Motor encoder scaling
Does it matter that the Y and Z motor are 3 pole pair and the X is a four pole pair.

Peter

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

More
01 Nov 2020 04:02 #187978 by cmorley
Replied by cmorley on topic Motor encoder scaling
It does not matter to linuxcnc how many poles the motor has, only the motor drive might care.
i am assuming you are making a metric based machine.

so taking Z axis:

I think you said the encoder has 8000 counts per revolution.
Its direct drive with a 5mm pitch. (meaning 1 turn moves the axis 5mm)

So to get 1mm of axis movement you need to turn the screw 1/5 or .20 of a turn.
so that means the encoder will also only turn 1/5 of it's 8000 counts as well.
so the Z scale should be set to: 8000 X .2 = 1600 counts.

This tells linuxcnc that when the encoder moves 1600 counts the axis has moved 1mm.

You can confirm this is right by moving the axis 1mm and looking at the encoder counts - it should be very close to 1600 (depending on how accurate you measure the 1mm of travel)
Probably easiest by moving the axis by hand with the power to the motor off or use pncconf's open loop test to move the axis slowly.
Once you have the scaling right the DRO in linuxcnc should be right too.

The other axes are similar - you measure or calculate how many encoder counts are in 1mm of movement and use that as the scale.

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

More
01 Nov 2020 05:11 #187989 by PMCD
Replied by PMCD on topic Motor encoder scaling
Thanks Chris and Tommy,

After confirming the raw encoder counst and working out the correct encoder scale I was able to play with more confidence this morning.

A little bit of googling had the PID numbers go from 50 down to around 4 for P and FF1 was 10 down to 0.03 (a lot different from Pncconf). From here I was able to jog the 3 axis around smoothly and accurately.

I still have a couple more question though:

The servo motors still drift when the drives are enabled via a manual push button on the console and of course they stop when I hit F2 on Linuxcnc. Will tuning the motors properly stop this or should I be looking elsewhere?

The Y and Z motors are exactly the same except the Z has a brake. Should these motors have the same PID tune or is this where the black magic kicks in?

Peter

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

More
01 Nov 2020 17:54 #188023 by Todd Zuercher
Replied by Todd Zuercher on topic Motor encoder scaling
No two motor plants are ever exactly the same. They won't be moving the same weight or have the same friction. So the tune will not be the same.

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

More
01 Nov 2020 22:40 #188060 by tommylight
Replied by tommylight on topic Motor encoder scaling


The servo motors still drift when the drives are enabled via a manual push button on the console and of course they stop when I hit F2 on Linuxcnc. Will tuning the motors properly stop this or should I be looking elsewhere?

No it will not, the wiring has to be made so that only LinuxCNC can enable the drives, but since you have a push button to power the drives i have to assume you have the drive enable pins set to always enabled and that must change.
Unfortunately i can not help much without knowing how the wiring is set up.

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

More
02 Nov 2020 00:03 #188074 by PMCD
Replied by PMCD on topic Motor encoder scaling
I hope I can explain this properly.

This is a retro fit to a Weeke Homag BP80.

The drive enable (control on) is part of the Estop chain.

I have Output 0 Estop out. Linuxcnc Estop to close the loop.

Input 0 Estop in. Control on Console button drive enable. and configured in hal and classic ladder. (I take no credit)

I copied of Andrew at CARBIDE CUTTER NZ youtube channel


I don't expect you to watch it but about halfway through on is what I have done and it works well and is safe.

Just one thought,

Should I have the 7i77 neutral common connected to the machine Neutral common. The ground is already connected,

Peter

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

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