Servo Wiring and Tuning detailed How To example Mesa 7i77.

More
06 Mar 2021 16:51 #201198 by Gene1934
In this thread, are the terms torque mode and position mode interchangeable?

I'm having tuning trouble with a quadrature encoder on the motor, and 2 stages of worm drive, mounted on the side of a BS-1 clone.
And what appears to be both high friction due to motor brushes, and possibly high drag in the BS-1 worm engagement although that seems to be wearing in. The clone, on inspection. has not a real contoured bull gear or a good worm so the fit isn't exactly perfect and will wear in if I crank in a little drag to kill backlash.

Worm gear ratio in the motor was unk, so the overall was measured by recording encoder counts, running it 100 turns using the home switch to count turns, and dividing the subtraction result by 360*100=666.66666667 for a SERVO_SCALE per degree in the ini file.

Everything else is volatile at this point.

Should I be tuning P-I-D or FF# for a position servo?
And since I seem to be running in degree's but a full turn of the BS-1 is 360 degrees, whats a ballpark pid_a.FF0 value as that does not seem to have much effect here.

Thanks all.

Cheers, gene

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <geneslinuxbox.net:6309/gene>

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

More
07 Mar 2021 01:52 #201252 by andypugh

In this thread, are the terms torque mode and position mode interchangeable?


Not at all. They are opposite ends of the scale.

torque mode -> velocity mode -> position mode.

In torque mode the command from LinuxCNC is motor current.
In velocity mode it is a velocity command to the drive.
In position mode it is a position command to the drive.

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

More
07 Mar 2021 12:27 #201284 by Gene1934
ok, then describe exactly what defines these differences in the hal hookups. In my searches for example configs related to servo tuning, none describe the hal hookups to define the diffs.

Position mode is my target.

Thanks Andy.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <geneslinuxbox.net:6309/gene>

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

More
07 Mar 2021 18:55 #201325 by andypugh

ok, then describe exactly what defines these differences in the hal hookups.


The HAL is exactly the same. Encoder position comes in, numbers go out.
All that changes is what the numbers going out represent.

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

More
07 Mar 2021 21:44 #201368 by Gene1934
That also seems to be suspect, so I am re-running the code that calculates the scale from the passage of 100 revs according to the home switch. As its a bunch slower than your harmonic drive, it will take about an hour to do 100 turns.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <geneslinuxbox.net:6309/gene>

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

More
04 Jul 2022 18:19 #246589 by Monkey_boy
Hi I`m relatively new to Linuxcnc but not new to cnc machines.
 I am retrofitting a bench top cnc mill made by the Light Machine Corperation and I am in the process of testing the motors and drives,
the motors are Lifton 24V brushed servo motors with 1000 line quadrature encoders and the drives are Copley Controls 412`s.
My setup is a Mesa 6i25 and a 7i77 controller, I currently have two of the motors and drives setup as a lathe configuration in Pncconf.
The drives are adjusted so that when power is applied the motors are stationary in thier deadband without input, but the moment I connect
the inputs and enable the dirves the motors run away and cause a following error and also you can`t control them using the open loop test 
in Pncconf.
As for tuning I`m possibly doing somthing wrong or there is a hardware problem, my attempt at tuning with the calibration page and 
hal scope I have  set all the perameters to zero and 1000 with any number inbetween and I can`t change anythig all the motors do is run away and cause
a following error whatever setting I try !
Could someone please help and give me an idear of what to try next.
Thanks

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

More
04 Jul 2022 18:27 - 04 Jul 2022 18:46 #246592 by PCW
A runaway indicates that the feedback is backwards.

If the encoders read in the correct directions, you must change the sign
of the analog output:

For example, in the JOINT_N section of the .ini file, if

OUTPUT_SCALE = 10.0

Change it to

OUTPUT_SCALE = -10.0
Last edit: 04 Jul 2022 18:46 by PCW.

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

More
05 Jul 2022 14:07 #246650 by Monkey_boy
I have tried every combination of wires and scale -10 in the ini file.
I started by enabling the drive and the motor ran away CCW I then reversed the motor power wires and enabled again this time the motor ran away CW with +0.8V on the input. I then reversed the input wires and the motor ran CCW with again +0.8V and the last time reversed the motor power which then ran CW with -0.8V on the input. (the encoders stayed as they are). Any ideas ????

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

More
05 Jul 2022 14:54 - 05 Jul 2022 15:22 #246652 by PCW
Does the drive run away when enabled and its analog input is disconnected?

Sounds like a hardware or wiring error.

1. Do the encoders read the correct values and in the proper directions?
2. If enabled and with 0V input to the drive, do the motors hold position?
(they might drift slowly)

3. I would not bother with pncconfs open loop
tests but rather run LinuxCNC and use the calibrate pane.

4 If you set all PID parameters to 0 in the ini file (no feedback) the
analog output should be very close to 0V so no runaway should be possible.
If it still runs away (slow creeping is OK) you have a hardware issue

5. In general you should never swap the motor leads on velocity mode
drives as this reverses the drives velocity feedback, which guarantees
runaway in the drive itself.                                      


 
Last edit: 05 Jul 2022 15:22 by PCW.

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

More
05 Jul 2022 15:26 #246653 by Monkey_boy
no the motor just hums a little with no input and if you touch the ihput wires with your fingers you can get the motor to turn cw or ccw depending on which wire you touch.
I`m certain the drives, motors and encoders are working fine, it seems to me to be an input problem. Maybe I`m missing something in Pncconf !
Any ideas ??

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

Time to create page: 0.127 seconds
Powered by Kunena Forum