Re: [Emc-users] Advice on Tuning Servo System

2021-07-01 Thread Gene Heskett
On Thursday 01 July 2021 04:54:32 Les Newell wrote:

> > Re-reading that, linuxcnc will not even start if they don't match
> > exactly.
>
> That's not my experience. What error message do you get?

I can't show it ATM as I haven't yet gone out to reboot those machine yet 
this morning, I'm still a quart low on coffee and having a heart to 
heart discussion with a 3d printer. 

As I recall it fusses about it and exits before it even draws the gui. 
Running master or master-gtk3, and its been that way for years. I'll get 
both eyes open and go check in an hour or 2.

Thanks Les.

> Les

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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-07-01 Thread Les Newell




Re-reading that, linuxcnc will not even start if they don't match
exactly.


That's not my experience. What error message do you get?

Les


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-30 Thread Gene Heskett
On Wednesday 30 June 2021 21:31:28 Matthew Herd wrote:

> Gene, that’s very odd behavior.  My machine isn’t homed (still just
> working on basic tuning) when I’m doing my tests and your behavior
> sounds similar.  I wonder if we could determine the reason for this
> difference in behavior.
>
I'd love to find it Matthew, but everything I've looked at with a $3200 
scope, siglents best 350mhz 4 trace sampler hasn't given me a single 
clue, but I can't probe most of the stuff that the halscope can but the 
halscope is too slow to catch everything, basicly not enough sample 
depth to really investigate it well.

Are you servo or stepper? Thats the only servo I have out of 13 more 
steppers here. And I built it from scratch, using an estate gate PMDC 
motor with an indexless quadrateur encoder in it, its a worm output, 
driving the worm in a BS-1 clone. Very high combined gear ratio.

> > On Jun 30, 2021, at 9:25 PM, Gene Heskett 
> > wrote:
> >
> > On Wednesday 30 June 2021 14:47:57 Les Newell wrote:
> >> On 30/06/2021 12:52, Gene Heskett wrote:
> >>> This is good to know Les, thank you. But for those who don't know
> >>> how to achieve that, a 1 axis example would be a huge help.
> >>
> >> In your INI file, there are two places where you can set the
> >> MIN_LIMIT and MAX_LIMIT (joint and axis). Just make sure you hit
> >> the axis limit before the joint limit. The difference does not need
> >> to be much.* *
> >>
> >>> In making a servo for axis A/B/C in a stepper machine, there is a
> >>> huge differential in how it runs unhomed, and how it runs after
> >>> homed. Being a full rotation device, it has no limits set.
> >>
> >> In that case you won't be using soft limits, so it makes no
> >> difference.
> >
> > I agree. But thats not how it seems to work. I won't say its
> > unusable when unhomed, but its 10% of its homed speed of it is
> > jogged whle unhomed and it suffers from windup badly even running
> > that slow. It acts like it afraid to move if not homed. The rest of
> > the stepper motor driven stuff works well, homed or not. And it, "A"
> > does more reversals while homing, some times visibly away from the
> > switch, with no false switch stuff detected. Once homed it behaves
> > itself exactly, stopping within an arc-second of where I sent it, as
> > long as it can get stopped w/o any overshoot.  Thats dangerous
> > because the pwmgen, if coasting too far, will try to reverse it
> > while its still turning and that crowbars and shuts down its 24 volt
> > 10 amp supply for about a 2 minute cooldown before a power cycle by
> > the f2 key restores it. So I'm forced to use much slower (10% or
> > less) speeds while homing it, than it can run during normal, homed
> > operation.
> >
> >> Les
> >>
> >>
> >> ___
> >> Emc-users mailing list
> >> Emc-users@lists.sourceforge.net
> >> 
> >> https://lists.sourceforge.net/lists/listinfo/emc-users
> >> 
> >
> > 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)
> > If we desire respect for the law, we must first make the law
> > respectable. - Louis D. Brandeis
> > Genes Web page  > >
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > 
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> > 
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-30 Thread Curtis Dutton
I'm not familiar with the Pico interface. Basee upon the docs it looks to
be a velocity mode stepgen.

I have a mesa velocity mode Stephen to servo system on my router.

This site was helpful to me getting this set up.
https://gnipsel.com/linuxcnc/tuning/servo.html.

If I recall I had to tune the servos drives themselves and the velocity
control pid loops "simultaneously". Which in reality went somethijg like
this.

1. in servo drive use autotuning. this gets reasonable decent tuning in the
drive.

2. get the linuxcnc velocity pid tuning to the point where I could get
homing working properly.

3. make your Ferror values temporarily large.

3. follow the advice from the link above open up haltune and tune your
velocity loops. keep tuning as long as the results keep improving. (not
looking for perfect just improvement)

4. go back into your servo drives. modify the parameters for them...again
looking for improvements. halscope is your friend here too. halscope is
tough to learn how to use at first but important.

5. go back to step 3. repeat step 3 and 4 until things tighten up to your
liking.

6. readjust your homing setup and limits...

7. profit? :-)

-Curt

On Wed, Jun 30, 2021, 9:45 PM Gene Heskett  wrote:

> On Wednesday 30 June 2021 14:47:57 Les Newell wrote:
>
> > On 30/06/2021 12:52, Gene Heskett wrote:
> > > This is good to know Les, thank you. But for those who don't know
> > > how to achieve that, a 1 axis example would be a huge help.
> >
> > In your INI file, there are two places where you can set the MIN_LIMIT
> > and MAX_LIMIT (joint and axis). Just make sure you hit the axis limit
> > before the joint limit. The difference does not need to be much.*
> > *
> Re-reading that, linuxcnc will not even start if they don't match
> exactly. Unless that has been fixed in the month since I last played
> with it. I will dbl check that tomorrow but not tonight, its pretty
> noisy out at 21:30 here in north central WV. I've already had one
> failure of an hour and 45 minutes and it hasn't done me a lot of good to
> have the bios restart, due to my standby's start time of just over 5
> seconds, thats not enough time to do a cold reboot so it crashes until I
> go out and do a full powerdown from each machines switch.  And thats the
> condition of the three dell 7010's at the moment. :(
>
> Thanks Les. To becontinued...
> >
> > > In making a servo for axis A/B/C in a stepper machine, there is a
> > > huge differential in how it runs unhomed, and how it runs after
> > > homed. Being a full rotation device, it has no limits set.
> >
> > In that case you won't be using soft limits, so it makes no
> > difference.
> >
> > Les
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
>
>
> 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)
> If we desire respect for the law, we must first make the law respectable.
>  - Louis D. Brandeis
> Genes Web page 
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-30 Thread Gene Heskett
On Wednesday 30 June 2021 14:47:57 Les Newell wrote:

> On 30/06/2021 12:52, Gene Heskett wrote:
> > This is good to know Les, thank you. But for those who don't know
> > how to achieve that, a 1 axis example would be a huge help.
>
> In your INI file, there are two places where you can set the MIN_LIMIT
> and MAX_LIMIT (joint and axis). Just make sure you hit the axis limit
> before the joint limit. The difference does not need to be much.*
> *
Re-reading that, linuxcnc will not even start if they don't match 
exactly. Unless that has been fixed in the month since I last played 
with it. I will dbl check that tomorrow but not tonight, its pretty 
noisy out at 21:30 here in north central WV. I've already had one 
failure of an hour and 45 minutes and it hasn't done me a lot of good to 
have the bios restart, due to my standby's start time of just over 5 
seconds, thats not enough time to do a cold reboot so it crashes until I 
go out and do a full powerdown from each machines switch.  And thats the 
condition of the three dell 7010's at the moment. :(

Thanks Les. To becontinued...
>
> > In making a servo for axis A/B/C in a stepper machine, there is a
> > huge differential in how it runs unhomed, and how it runs after
> > homed. Being a full rotation device, it has no limits set.
>
> In that case you won't be using soft limits, so it makes no
> difference.
>
> Les
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-30 Thread Matthew Herd
Gene, that’s very odd behavior.  My machine isn’t homed (still just working on 
basic tuning) when I’m doing my tests and your behavior sounds similar.  I 
wonder if we could determine the reason for this difference in behavior.

> On Jun 30, 2021, at 9:25 PM, Gene Heskett  wrote:
> 
> On Wednesday 30 June 2021 14:47:57 Les Newell wrote:
> 
>> On 30/06/2021 12:52, Gene Heskett wrote:
>>> This is good to know Les, thank you. But for those who don't know
>>> how to achieve that, a 1 axis example would be a huge help.
>> 
>> In your INI file, there are two places where you can set the MIN_LIMIT
>> and MAX_LIMIT (joint and axis). Just make sure you hit the axis limit
>> before the joint limit. The difference does not need to be much.*
>> *
>> 
>>> In making a servo for axis A/B/C in a stepper machine, there is a
>>> huge differential in how it runs unhomed, and how it runs after
>>> homed. Being a full rotation device, it has no limits set.
>> 
>> In that case you won't be using soft limits, so it makes no
>> difference.
> 
> I agree. But thats not how it seems to work. I won't say its unusable 
> when unhomed, but its 10% of its homed speed of it is jogged whle 
> unhomed and it suffers from windup badly even running that slow. It acts 
> like it afraid to move if not homed. The rest of the stepper motor 
> driven stuff works well, homed or not. And it, "A" does more reversals 
> while homing, some times visibly away from the switch, with no false 
> switch stuff detected. Once homed it behaves itself exactly, stopping 
> within an arc-second of where I sent it, as long as it can get stopped 
> w/o any overshoot.  Thats dangerous because the pwmgen, if coasting too 
> far, will try to reverse it while its still turning and that crowbars 
> and shuts down its 24 volt 10 amp supply for about a 2 minute cooldown 
> before a power cycle by the f2 key restores it. So I'm forced to use 
> much slower (10% or less) speeds while homing it, than it can run during 
> normal, homed operation.
> 
>> Les
>> 
>> 
>> ___
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net 
>> https://lists.sourceforge.net/lists/listinfo/emc-users 
>> 
> 
> 
> 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)
> If we desire respect for the law, we must first make the law respectable.
> - Louis D. Brandeis
> Genes Web page  >
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/emc-users 
> 

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-30 Thread Gene Heskett
On Wednesday 30 June 2021 14:47:57 Les Newell wrote:

> On 30/06/2021 12:52, Gene Heskett wrote:
> > This is good to know Les, thank you. But for those who don't know
> > how to achieve that, a 1 axis example would be a huge help.
>
> In your INI file, there are two places where you can set the MIN_LIMIT
> and MAX_LIMIT (joint and axis). Just make sure you hit the axis limit
> before the joint limit. The difference does not need to be much.*
> *
>
> > In making a servo for axis A/B/C in a stepper machine, there is a
> > huge differential in how it runs unhomed, and how it runs after
> > homed. Being a full rotation device, it has no limits set.
>
> In that case you won't be using soft limits, so it makes no
> difference.

I agree. But thats not how it seems to work. I won't say its unusable 
when unhomed, but its 10% of its homed speed of it is jogged whle 
unhomed and it suffers from windup badly even running that slow. It acts 
like it afraid to move if not homed. The rest of the stepper motor 
driven stuff works well, homed or not. And it, "A" does more reversals 
while homing, some times visibly away from the switch, with no false 
switch stuff detected. Once homed it behaves itself exactly, stopping 
within an arc-second of where I sent it, as long as it can get stopped 
w/o any overshoot.  Thats dangerous because the pwmgen, if coasting too 
far, will try to reverse it while its still turning and that crowbars 
and shuts down its 24 volt 10 amp supply for about a 2 minute cooldown 
before a power cycle by the f2 key restores it. So I'm forced to use 
much slower (10% or less) speeds while homing it, than it can run during 
normal, homed operation.

> Les
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-30 Thread Les Newell

On 30/06/2021 12:52, Gene Heskett wrote:

This is good to know Les, thank you. But for those who don't know how to
achieve that, a 1 axis example would be a huge help.



In your INI file, there are two places where you can set the MIN_LIMIT 
and MAX_LIMIT (joint and axis). Just make sure you hit the axis limit 
before the joint limit. The difference does not need to be much.*

*



In making a servo for axis A/B/C in a stepper machine, there is a huge
differential in how it runs unhomed, and how it runs after homed. Being
a full rotation device, it has no limits set.



In that case you won't be using soft limits, so it makes no difference.

Les


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-30 Thread Gene Heskett
On Wednesday 30 June 2021 06:30:30 Les Newell wrote:

> On a trivkins machine I don't think it matters much. In coordinated
> mode the lowest speed/acceleration for a given axis will win. In joint
> mode (mainly jogging while unhomed) the joint's speed + acceleration
> are used.
>
> If you are using soft limits it pays to have to have the axis limits
> slightly before the joint limits. If you are about hit an axis limit
> the axis will decelerate to a stop. If you hit a joint limit the joint
> stops without any deceleration.
>
This is good to know Les, thank you. But for those who don't know how to 
achieve that, a 1 axis example would be a huge help.

In making a servo for axis A/B/C in a stepper machine, there is a huge 
differential in how it runs unhomed, and how it runs after homed. Being 
a full rotation device, it has no limits set.

> Les
>
> On 30/06/2021 11:09, Matthew Herd wrote:
> > A second question.  For velocity mode operation between LinuxCNC and
> > the USC board, do I need to add headroom to any speeds or
> > accelerations?  Right now I have the TRAJ section max speeds &
> > accelerations set higher than the max speeds & accelerations on the
> > joints and axes (which are set to be the same, since it’s a trivkins
> > machine).  Or should I be setting all max speeds and accelerations
> > to the same numbers (excepting if joint 2/Z might be set lower)?
> >
> > Thanks!
> > Matt
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-30 Thread Les Newell
On a trivkins machine I don't think it matters much. In coordinated mode 
the lowest speed/acceleration for a given axis will win. In joint mode 
(mainly jogging while unhomed) the joint's speed + acceleration are used.


If you are using soft limits it pays to have to have the axis limits 
slightly before the joint limits. If you are about hit an axis limit the 
axis will decelerate to a stop. If you hit a joint limit the joint stops 
without any deceleration.


Les

On 30/06/2021 11:09, Matthew Herd wrote:

A second question.  For velocity mode operation between LinuxCNC and the USC board, do 
I need to add headroom to any speeds or accelerations?  Right now I have the TRAJ 
section max speeds & accelerations set higher than the max speeds & 
accelerations on the joints and axes (which are set to be the same, since it’s a 
trivkins machine).  Or should I be setting all max speeds and accelerations to the same 
numbers (excepting if joint 2/Z might be set lower)?

Thanks!
Matt




___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-30 Thread Matthew Herd
Ahh, thanks Les.  I like the simulated encoder option.  The best part is it’s 
as easy as flipping a switch.  Unfortunately wiring up the drive is a bit more 
of an ordeal, although I do have a bunch of steppers and drives as they were 
what was replaced.  If I get desperate I’ll go that route.  I’d rather try to 
use my oscilloscope to take a look at the pulse train if necessary.  I hope to 
be able to test this tomorrow night.

A second question.  For velocity mode operation between LinuxCNC and the USC 
board, do I need to add headroom to any speeds or accelerations?  Right now I 
have the TRAJ section max speeds & accelerations set higher than the max speeds 
& accelerations on the joints and axes (which are set to be the same, since 
it’s a trivkins machine).  Or should I be setting all max speeds and 
accelerations to the same numbers (excepting if joint 2/Z might be set lower)?

Thanks!
Matt

> On Jun 30, 2021, at 5:40 AM, Les Newell  wrote:
> 
> John, Matt isn't using a stepgen. The Pico USC board uses it's own step 
> generator. Stepgen expects a position command. As far as I can tell from the 
> USC docs the USC step generator expects a velocity command, hence the need 
> for a PID loop.
> 
> Matt, Do you happen to have a spare stepper and drive kicking about? If so 
> I'd suggest temporarily hooking it up to one axis. That at least would let 
> you figure out if the step outputs are doing what you expect.
> 
> I see the USC has an option to simulate an encoder instead of using the 
> physical encoder. Try this mode with the PID parameters in the Pico systems 
> example hal files.
> 
> Les
> 
> 
> On 30/06/2021 05:32, John Dammeyer wrote:
>> 
>> That didn't work for me.  I think it was Andy that clued me in that I had to 
>> have P=0 and FF1=0 to disable the PID part of the LCNC.  Since the servo 
>> drive does it anyway and the acceleration (speed that step pulses change) is 
>> defined by the INI file.
>> 
>> These are from my Spindle.
>> 
>> MAX_VELOCITY = 50.0
>> MAX_ACCELERATION = 300.0
>> # 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 = 62.5
>> STEPGEN_MAXACCEL = 375.0
>> 
>> What type of drive is it and can you set the parameters easily?
>> 
>> John
>> 
>> 
>> 
>> 
>> ___
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> 
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/emc-users 
> 

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-30 Thread Les Newell
John, Matt isn't using a stepgen. The Pico USC board uses it's own step 
generator. Stepgen expects a position command. As far as I can tell from 
the USC docs the USC step generator expects a velocity command, hence 
the need for a PID loop.


Matt, Do you happen to have a spare stepper and drive kicking about? If 
so I'd suggest temporarily hooking it up to one axis. That at least 
would let you figure out if the step outputs are doing what you expect.


I see the USC has an option to simulate an encoder instead of using the 
physical encoder. Try this mode with the PID parameters in the Pico 
systems example hal files.


Les


On 30/06/2021 05:32, John Dammeyer wrote:


That didn't work for me.  I think it was Andy that clued me in that I had to 
have P=0 and FF1=0 to disable the PID part of the LCNC.  Since the servo drive 
does it anyway and the acceleration (speed that step pulses change) is defined 
by the INI file.

These are from my Spindle.

MAX_VELOCITY = 50.0
MAX_ACCELERATION = 300.0
# 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 = 62.5
STEPGEN_MAXACCEL = 375.0

What type of drive is it and can you set the parameters easily?

John




___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users





___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-29 Thread John Dammeyer
> From: Matthew Herd [mailto:herd.m...@gmail.com]
> Hi John,
> 
> I�m just confused, since I�m not clear on how the signal would then be 
> communicated if both parameters are set to 0.  I did try both
> with zero initially and didn�t observe any movement so I went to P=1. Then I 
> saw very slow movement.  That prompted me to tune
> for the limit of stability per some instructions I found.  But at the end of 
> the day the steady state jog ferror just increases for all
> reasonable P values in LinuxCNC regardless of the drive tune.  I was planning 
> to try P=0 and FF1=1 next.
> 
> Matt

That didn't work for me.  I think it was Andy that clued me in that I had to 
have P=0 and FF1=0 to disable the PID part of the LCNC.  Since the servo drive 
does it anyway and the acceleration (speed that step pulses change) is defined 
by the INI file.

These are from my Spindle.

MAX_VELOCITY = 50.0
MAX_ACCELERATION = 300.0
# 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 = 62.5
STEPGEN_MAXACCEL = 375.0

What type of drive is it and can you set the parameters easily? 

John




___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-29 Thread Matthew Herd
Hi John,

I’m just confused, since I’m not clear on how the signal would then be 
communicated if both parameters are set to 0.  I did try both with zero 
initially and didn’t observe any movement so I went to P=1. Then I saw very 
slow movement.  That prompted me to tune for the limit of stability per some 
instructions I found.  But at the end of the day the steady state jog ferror 
just increases for all reasonable P values in LinuxCNC regardless of the drive 
tune.  I was planning to try P=0 and FF1=1 next.

Matt

> On Jun 29, 2021, at 10:48 PM, John Dammeyer  wrote:
> 
> Hi Matt,
> I'm running the XYZ with a P1000 and FF1=1.  But the Servo Drives do the 
> rest.  Even the spindle is an AC Servo Drive with step/dir interface but for 
> it I'm running P=0 and FF1=0.  When I first started I had issues with P=0 and 
> FF1=1 and I had no motion at all.   Setting FF1=0 solved that problem.  
> 
> So try FF1=0 and P=0 and then only the drive should be involved in tuning.
> John
> 
> 
> [AXIS_X]
> MIN_LIMIT = -0.04
> MAX_LIMIT = 13.5
> MAX_VELOCITY = 3.0
> MAX_ACCELERATION = 12
> 
> [JOINT_0]
> TYPE = LINEAR
> HOME = 0.0
> FERROR = 0.5
> MIN_FERROR = 0.1
> MAX_VELOCITY = 3.0
> #MAX_ACCELERATION = 7.5
> MAX_ACCELERATION = 12
> # 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 = 3.75
> #STEPGEN_MAXVEL = 3.75
> #STEPGEN_MAXACCEL = 15.0
> STEPGEN_MAXACCEL = 24
> P = 1000.0
> I = 0.0
> D = 0.0
> FF0 = 0.0
> FF1 = 1.0
> FF2 = 0.0
> BIAS = 0.0
> DEADBAND = 0.0
> MAX_OUTPUT = 0.0
> # these are in nanoseconds
> DIRSETUP   = 1000
> DIRHOLD= 1000
> STEPLEN= 2000
> STEPSPACE  = 1000
> STEP_SCALE = 15000.0
> MIN_LIMIT = -0.04
> MAX_LIMIT = 13.5
> # tested backlash at 4.2" from home 14MAR2020
> BACKLASH = 0.0189
> 
> 
> HOME_OFFSET = -0.1
> #HOME_SEARCH_VEL = -0.8
> #HOME_LATCH_VEL = 0.01
> HOME_FINAL_VEL = 0.2
> HOME_IGNORE_LIMITS = YES
> HOME_VOLATILE = 1
> #HOME_SEQUENCE = 1
> 
> 
>> -Original Message-
>> From: Matthew Herd [mailto:herd.m...@gmail.com]
>> Sent: June-29-21 7:32 PM
>> To: Enhanced Machine Controller (EMC)
>> Subject: Re: [Emc-users] Advice on Tuning Servo System
>> 
>> I fiddled with the X axis servo drive and tuned the parameters with P=1 and 
>> jog speed set to 60 IPM.  The ferror always returned to
>> zero but did so at an exceedingly slow pace.  I tuned the drive to the 
>> limits of stability (or a little over) and the movement was always
>> so slow you couldn�t detect it.  I then went to LinuxCNC and turned up the P 
>> values until I saw instability.  The machine moved much
>> more quickly, but still lagged the commanded value.  As P increased the lag 
>> was lessened, but always increased with  constant
>> jogging.  The velocity command to the USC board was a clean acceleration 
>> ramp, constant velocity, and deceleration ramp.  I cannot
>> explain why my results are so poor, but I�m hoping that someone might have 
>> some suggestions on how to determine whether it�s a
>> problem with my settings in LinuxCNC or a problem with the drives.
>> 
>> Matt
>> 
>> 
>>> On Jun 29, 2021, at 8:55 AM, Matthew Herd  wrote:
>>> 
>>> Ok I thought so. I just want to confirm that setting all PID parameters to 
>>> 0 will allow the velocity commands to pass through. I�d
>> think I�d need P=1 or something along those lines?
>>> 
>>> I hope to try this one evening this week if I can get to the shop.
>>> 
>>> Thanks again!
>>> 
>>> Matthew Herd
>>> herd.m...@gmail.com
>>> 610-608-8930
>>> 
>>>> On Jun 29, 2021, at 8:31 AM, Les Newell  wrote:
>>>> 
>>>> ?I just checked the docs and you are correct. I assumed you were using a 
>>>> standard stepgen. I didn't realize Pico USC works
>> differently.
>>>> 
>>>> Les
>>>> 
>>>>> On 29/06/2021 13:18, Matthew Herd wrote:
>>>>> Hi Les,
>>>>> 
>>>>> I�m not sure if that will work with the Pico USC board.  If I�m not 
>>>>> mistaken LinuxCNC treats the motors as servos and the board
>> handles the step generation.
>>>>> 
>>>>> Matt
>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> ___
>>>> Emc-users mailing list
>>>> Emc-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/emc-users
>> 
>> 
>> 
>> ___
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-29 Thread John Dammeyer
Hi Matt,
I'm running the XYZ with a P1000 and FF1=1.  But the Servo Drives do the rest.  
Even the spindle is an AC Servo Drive with step/dir interface but for it I'm 
running P=0 and FF1=0.  When I first started I had issues with P=0 and FF1=1 
and I had no motion at all.   Setting FF1=0 solved that problem.  

So try FF1=0 and P=0 and then only the drive should be involved in tuning.
John


[AXIS_X]
MIN_LIMIT = -0.04
MAX_LIMIT = 13.5
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 12

[JOINT_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.1
MAX_VELOCITY = 3.0
#MAX_ACCELERATION = 7.5
MAX_ACCELERATION = 12
# 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 = 3.75
#STEPGEN_MAXVEL = 3.75
#STEPGEN_MAXACCEL = 15.0
STEPGEN_MAXACCEL = 24
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP   = 1000
DIRHOLD= 1000
STEPLEN= 2000
STEPSPACE  = 1000
STEP_SCALE = 15000.0
MIN_LIMIT = -0.04
MAX_LIMIT = 13.5
# tested backlash at 4.2" from home 14MAR2020
BACKLASH = 0.0189


HOME_OFFSET = -0.1
#HOME_SEARCH_VEL = -0.8
#HOME_LATCH_VEL = 0.01
HOME_FINAL_VEL = 0.2
HOME_IGNORE_LIMITS = YES
HOME_VOLATILE = 1
#HOME_SEQUENCE = 1


> -Original Message-
> From: Matthew Herd [mailto:herd.m...@gmail.com]
> Sent: June-29-21 7:32 PM
> To: Enhanced Machine Controller (EMC)
> Subject: Re: [Emc-users] Advice on Tuning Servo System
> 
> I fiddled with the X axis servo drive and tuned the parameters with P=1 and 
> jog speed set to 60 IPM.  The ferror always returned to
> zero but did so at an exceedingly slow pace.  I tuned the drive to the limits 
> of stability (or a little over) and the movement was always
> so slow you couldn�t detect it.  I then went to LinuxCNC and turned up the P 
> values until I saw instability.  The machine moved much
> more quickly, but still lagged the commanded value.  As P increased the lag 
> was lessened, but always increased with  constant
> jogging.  The velocity command to the USC board was a clean acceleration 
> ramp, constant velocity, and deceleration ramp.  I cannot
> explain why my results are so poor, but I�m hoping that someone might have 
> some suggestions on how to determine whether it�s a
> problem with my settings in LinuxCNC or a problem with the drives.
> 
> Matt
> 
> 
> > On Jun 29, 2021, at 8:55 AM, Matthew Herd  wrote:
> >
> > Ok I thought so. I just want to confirm that setting all PID parameters to 
> > 0 will allow the velocity commands to pass through. I�d
> think I�d need P=1 or something along those lines?
> >
> > I hope to try this one evening this week if I can get to the shop.
> >
> > Thanks again!
> >
> > Matthew Herd
> > herd.m...@gmail.com
> > 610-608-8930
> >
> >> On Jun 29, 2021, at 8:31 AM, Les Newell  wrote:
> >>
> >> ?I just checked the docs and you are correct. I assumed you were using a 
> >> standard stepgen. I didn't realize Pico USC works
> differently.
> >>
> >> Les
> >>
> >>> On 29/06/2021 13:18, Matthew Herd wrote:
> >>> Hi Les,
> >>>
> >>> I�m not sure if that will work with the Pico USC board.  If I�m not 
> >>> mistaken LinuxCNC treats the motors as servos and the board
> handles the step generation.
> >>>
> >>> Matt
> >>>
> >>>
> >>
> >>
> >>
> >> ___
> >> Emc-users mailing list
> >> Emc-users@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-29 Thread Matthew Herd
I fiddled with the X axis servo drive and tuned the parameters with P=1 and jog 
speed set to 60 IPM.  The ferror always returned to zero but did so at an 
exceedingly slow pace.  I tuned the drive to the limits of stability (or a 
little over) and the movement was always so slow you couldn’t detect it.  I 
then went to LinuxCNC and turned up the P values until I saw instability.  The 
machine moved much more quickly, but still lagged the commanded value.  As P 
increased the lag was lessened, but always increased with  constant jogging.  
The velocity command to the USC board was a clean acceleration ramp, constant 
velocity, and deceleration ramp.  I cannot explain why my results are so poor, 
but I’m hoping that someone might have some suggestions on how to determine 
whether it’s a problem with my settings in LinuxCNC or a problem with the 
drives.

Matt


> On Jun 29, 2021, at 8:55 AM, Matthew Herd  wrote:
> 
> Ok I thought so. I just want to confirm that setting all PID parameters to 0 
> will allow the velocity commands to pass through. I’d think I’d need P=1 or 
> something along those lines?
> 
> I hope to try this one evening this week if I can get to the shop. 
> 
> Thanks again!
> 
> Matthew Herd
> herd.m...@gmail.com
> 610-608-8930
> 
>> On Jun 29, 2021, at 8:31 AM, Les Newell  wrote:
>> 
>> I just checked the docs and you are correct. I assumed you were using a 
>> standard stepgen. I didn't realize Pico USC works differently.
>> 
>> Les
>> 
>>> On 29/06/2021 13:18, Matthew Herd wrote:
>>> Hi Les,
>>> 
>>> I’m not sure if that will work with the Pico USC board.  If I’m not 
>>> mistaken LinuxCNC treats the motors as servos and the board handles the 
>>> step generation.
>>> 
>>> Matt
>>> 
>>> 
>> 
>> 
>> 
>> ___
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-29 Thread Matthew Herd
Ok I thought so. I just want to confirm that setting all PID parameters to 0 
will allow the velocity commands to pass through. I’d think I’d need P=1 or 
something along those lines?

I hope to try this one evening this week if I can get to the shop. 

Matthew Herd
herd.m...@gmail.com
610-608-8930

> On Jun 29, 2021, at 8:31 AM, Les Newell  wrote:
> 
> I just checked the docs and you are correct. I assumed you were using a 
> standard stepgen. I didn't realize Pico USC works differently.
> 
> Les
> 
>> On 29/06/2021 13:18, Matthew Herd wrote:
>> Hi Les,
>> 
>> I’m not sure if that will work with the Pico USC board.  If I’m not mistaken 
>> LinuxCNC treats the motors as servos and the board handles the step 
>> generation.
>> 
>> Matt
>> 
>> 
> 
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-29 Thread Matthew Herd
Ok I thought so. I just want to confirm that setting all PID parameters to 0 
will allow the velocity commands to pass through. I’d think I’d need P=1 or 
something along those lines?

I hope to try this one evening this week if I can get to the shop. 

Thanks again!

Matthew Herd
herd.m...@gmail.com
610-608-8930

> On Jun 29, 2021, at 8:31 AM, Les Newell  wrote:
> 
> I just checked the docs and you are correct. I assumed you were using a 
> standard stepgen. I didn't realize Pico USC works differently.
> 
> Les
> 
>> On 29/06/2021 13:18, Matthew Herd wrote:
>> Hi Les,
>> 
>> I’m not sure if that will work with the Pico USC board.  If I’m not mistaken 
>> LinuxCNC treats the motors as servos and the board handles the step 
>> generation.
>> 
>> Matt
>> 
>> 
> 
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-29 Thread Les Newell
I just checked the docs and you are correct. I assumed you were using a 
standard stepgen. I didn't realize Pico USC works differently.


Les

On 29/06/2021 13:18, Matthew Herd wrote:

Hi Les,

I’m not sure if that will work with the Pico USC board.  If I’m not mistaken 
LinuxCNC treats the motors as servos and the board handles the step generation.

Matt






___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-29 Thread Matthew Herd
Hi Les,

I’m not sure if that will work with the Pico USC board.  If I’m not mistaken 
LinuxCNC treats the motors as servos and the board handles the step generation.

Matt

> On Jun 29, 2021, at 7:42 AM, Les Newell  wrote:
> 
> Hi Matt,
> 
> Use Stepconf to generate an example config. It creates a stepper config 
> without any PID. You can basically cut and paste from that to your hal files. 
> The drives themselves are doing the PID work in your setup.
> 
> Les
> 
> On 28/06/2021 22:31, Matthew Herd wrote:
>> Hi John and Les,
>> 
>> Thank you for the input.  I wasn’t sure how to tune the drives without the 
>> PID.  P=0 & FF1=0 will yield a commanded velocity calculated purely on the 
>> commanded velocity and maximum acceleration, then?  If so, that’s easy 
>> enough and may actually be all I need.
>> 
>> John, I am certain I’ve sized the motors correctly.  From all indications 
>> they’re way over-powered.  The machine came standard with NEMA42 steppers 
>> and these servos are the same frame size (110mm bolt circle diameter is a 
>> bolt on replacement).  They do not seem to lack for torque whatsoever.  I’m 
>> fine with turning them down as long as I get good results and high 
>> reliability.  I’m hoping to put the machine back to work as soon as I can 
>> get the bugs worked out.  I did some research on the critical speeds and I’m 
>> pretty sure I’m more than safe at anything under 400 inches per minute.  I 
>> don’t see any need to push it even that high.  I will probably turn down the 
>> Z axis to 150IPM as there are very few use cases where I need to go even 
>> that high.  The quill likely won’t tolerate extreme speeds and the travel is 
>> only 5" so I’m able to cover that distance very quickly regardless of max 
>> speed.
>> 
>> Matt
> 
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-29 Thread Les Newell

Hi Matt,

Use Stepconf to generate an example config. It creates a stepper config 
without any PID. You can basically cut and paste from that to your hal 
files. The drives themselves are doing the PID work in your setup.


Les

On 28/06/2021 22:31, Matthew Herd wrote:

Hi John and Les,

Thank you for the input.  I wasn’t sure how to tune the drives without the PID.  
P=0 & FF1=0 will yield a commanded velocity calculated purely on the commanded 
velocity and maximum acceleration, then?  If so, that’s easy enough and may 
actually be all I need.

John, I am certain I’ve sized the motors correctly.  From all indications they’re 
way over-powered.  The machine came standard with NEMA42 steppers and these servos 
are the same frame size (110mm bolt circle diameter is a bolt on replacement).  They 
do not seem to lack for torque whatsoever.  I’m fine with turning them down as long 
as I get good results and high reliability.  I’m hoping to put the machine back to 
work as soon as I can get the bugs worked out.  I did some research on the critical 
speeds and I’m pretty sure I’m more than safe at anything under 400 inches per 
minute.  I don’t see any need to push it even that high.  I will probably turn down 
the Z axis to 150IPM as there are very few use cases where I need to go even that 
high.  The quill likely won’t tolerate extreme speeds and the travel is only 5" 
so I’m able to cover that distance very quickly regardless of max speed.

Matt




___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-28 Thread John Dammeyer
Sorry meant to say noise comes from the angular contact of the two bevel gears. 
 The bearings are quiet.

> I swapped in a 750W Bergerda with 3.2:1 and now I get 150 ipm and that's 
> scary fast for the knee.  And I did upgrade the radial ball
> bearings and bushings for the horizontal shaft to angular contact bearings.  
> The noise now all comes from the angular contact.



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-28 Thread John Dammeyer
Hi Mathew,
I found with the knee that best I could do with a 1200 oz-in stepper on a 56VDC 
power supply and a Gecko driver was 24 ipm with 3:1 driving the right angle 
shaft, through a bevel gear into the 1" ACME screw with 4 TPI.

I swapped in a 750W Bergerda with 3.2:1 and now I get 150 ipm and that's scary 
fast for the knee.  And I did upgrade the radial ball bearings and bushings for 
the horizontal shaft to angular contact bearings.  The noise now all comes from 
the angular contact.To figure out what I needed I used the torque arm 
approach.  Hang an arm on the end of the shaft and then add weights X distance 
from the shaft centerline and see what it takes to move.  The 600 oz-in stepper 
I started with was adequate but torque fell off too much with velocity.

The reason I mention all that is although the absolute power might be the same 
for the stepper and the servo the servos tend to have far less continuous 
torque but have impressive peak torque values for overcoming say static 
friction.  After that the lower value kinetic friction and moving the load of 
course, would bring  you back into the continuous torque value.  

So where you are lucky if you get 1000 RPM with a Stepper of a particular power 
the Servo can do 3x that but with lower torque.  At the higher RPM the HP is in 
effect the same.  Ie. Lower RPM, more torque, Higher RPM with less Torque ends 
up the same power.

So I'd keep an eye on the following error from the drive to make sure that you 
aren't seeing issues due to lack of torque to spin the assembly up to speed.  
Does your servo drive have a display?  Can it show power consumption?

John


> -Original Message-
> From: Matthew Herd [mailto:herd.m...@gmail.com]
> Sent: June-28-21 2:32 PM
> To: Enhanced Machine Controller (EMC)
> Subject: Re: [Emc-users] Advice on Tuning Servo System
> 
> Hi John and Les,
> 
> Thank you for the input.  I wasn�t sure how to tune the drives without the 
> PID.  P=0 & FF1=0 will yield a commanded velocity
> calculated purely on the commanded velocity and maximum acceleration, then?  
> If so, that�s easy enough and may actually be all I
> need.
> 
> John, I am certain I�ve sized the motors correctly.  From all indications 
> they�re way over-powered.  The machine came standard
> with NEMA42 steppers and these servos are the same frame size (110mm bolt 
> circle diameter is a bolt on replacement).  They do not
> seem to lack for torque whatsoever.  I�m fine with turning them down as long 
> as I get good results and high reliability.  I�m hoping
> to put the machine back to work as soon as I can get the bugs worked out.  I 
> did some research on the critical speeds and I�m pretty
> sure I�m more than safe at anything under 400 inches per minute.  I don�t see 
> any need to push it even that high.  I will probably
> turn down the Z axis to 150IPM as there are very few use cases where I need 
> to go even that high.  The quill likely won�t tolerate
> extreme speeds and the travel is only 5" so I�m able to cover that distance 
> very quickly regardless of max speed.
> 
> Matt
> 
> > On Jun 28, 2021, at 12:47 PM, John Dammeyer  wrote:
> >
> > Hi Mathew,
> > I'll lend my two cents to this too.  I'm running DC servos on two axis and 
> > an AC Servo on the knee.
> > The DC Servo drives are HP_UHU kits with the CPU an add on card from Henrik 
> > Olsson in Sweden.
> > The AC knee is a Bergerda 750W drive already set up from the factory for 
> > that size motor.
> > All three motors are running step/dir and tuned internally.
> > In the case of X and Y given the motor specifications of 3000 RPM with 3:1 
> > or 4:1 the MAX_VELOCITY is based on the pulleys,
> motor and leadscrew pitch.
> >
> > The torque on servos compared to stepper motors is pretty low for the same 
> > size but as Les stated, it's pretty well constant over
> the entire RPM range.  Are you certain that you have actually sized the 
> motors correctly for the load?
> >
> > And I agree with Les.  Set step/dir, P=0, FF1=0 and first tune the drives 
> > without LCNC.
> >
> > John
> >
> >
> >> -Original Message-
> >> From: Les Newell [mailto:les.new...@fastmail.co.uk]
> >> Sent: June-28-21 8:03 AM
> >> To: emc-users@lists.sourceforge.net
> >> Subject: Re: [Emc-users] Advice on Tuning Servo System
> >>
> >> Hi Matthew,
> >>
> >> That FF1 is probably causing the increasing following error. Again I'd
> >> strongly recommend using just stepgen rather than a combination of
> >> stepgen and PID. At the moment LCNC and your drives are fighting each 
> >> other.
> >>
> >> The oscillation could be the drive t

Re: [Emc-users] Advice on Tuning Servo System

2021-06-28 Thread Matthew Herd
Hi John and Les,

Thank you for the input.  I wasn’t sure how to tune the drives without the PID. 
 P=0 & FF1=0 will yield a commanded velocity calculated purely on the commanded 
velocity and maximum acceleration, then?  If so, that’s easy enough and may 
actually be all I need.

John, I am certain I’ve sized the motors correctly.  From all indications 
they’re way over-powered.  The machine came standard with NEMA42 steppers and 
these servos are the same frame size (110mm bolt circle diameter is a bolt on 
replacement).  They do not seem to lack for torque whatsoever.  I’m fine with 
turning them down as long as I get good results and high reliability.  I’m 
hoping to put the machine back to work as soon as I can get the bugs worked 
out.  I did some research on the critical speeds and I’m pretty sure I’m more 
than safe at anything under 400 inches per minute.  I don’t see any need to 
push it even that high.  I will probably turn down the Z axis to 150IPM as 
there are very few use cases where I need to go even that high.  The quill 
likely won’t tolerate extreme speeds and the travel is only 5" so I’m able to 
cover that distance very quickly regardless of max speed.

Matt

> On Jun 28, 2021, at 12:47 PM, John Dammeyer  wrote:
> 
> Hi Mathew,
> I'll lend my two cents to this too.  I'm running DC servos on two axis and an 
> AC Servo on the knee.
> The DC Servo drives are HP_UHU kits with the CPU an add on card from Henrik 
> Olsson in Sweden. 
> The AC knee is a Bergerda 750W drive already set up from the factory for that 
> size motor.
> All three motors are running step/dir and tuned internally.
> In the case of X and Y given the motor specifications of 3000 RPM with 3:1 or 
> 4:1 the MAX_VELOCITY is based on the pulleys, motor and leadscrew pitch.  
> 
> The torque on servos compared to stepper motors is pretty low for the same 
> size but as Les stated, it's pretty well constant over the entire RPM range.  
> Are you certain that you have actually sized the motors correctly for the 
> load?  
> 
> And I agree with Les.  Set step/dir, P=0, FF1=0 and first tune the drives 
> without LCNC.
> 
> John
> 
> 
>> -Original Message-
>> From: Les Newell [mailto:les.new...@fastmail.co.uk]
>> Sent: June-28-21 8:03 AM
>> To: emc-users@lists.sourceforge.net
>> Subject: Re: [Emc-users] Advice on Tuning Servo System
>> 
>> Hi Matthew,
>> 
>> That FF1 is probably causing the increasing following error. Again I'd
>> strongly recommend using just stepgen rather than a combination of
>> stepgen and PID. At the moment LCNC and your drives are fighting each other.
>> 
>> The oscillation could be the drive tuning or the loops fighting each other.
>> 
>>> I�d be fine with a max rapid speed of 250 IPM but I�d hope to be able to 
>>> have enough torque to cut at the full 250 IPM
>> 
>> From your numbers I'd say you'll have plenty of torque at 250IPM. The
>> motor torque should be pretty flat from 0 to 250IPM.
>> 
>> As far as speeds are concerned the absolute limit is the critical speed
>> of the screws. You can calculate it using this calculator
>> <https://www.lintechmotion.com/sizing/critical-speed/critical-speed-inputs.php>.
>> Exceeding the critical speed is a really bad idea. The next limiting
>> factor is the nuts. If you spin the screws too fast the balls skid in
>> the nuts and you get accelerated wear. Without the manufacturer's data
>> sheets this is much harder to estimate. About all you can do is look up
>> data sheets from various manufacturers and make estimates based on their
>> numbers for similar sized screws. By the way the Z axis screw is a bit
>> of an oddity. It has a very large diameter and fairly fine pitch. It's
>> lubricated from the central lube system. The combination of large
>> diameter and thick way oil means you get a lot of viscous friction
>> losses in the nut. If I remember correctly I limited mine to somewhere
>> around 2 - 3m/min 80-120IPM.
>> 
>> Les
>> 
>> 
>> On 28/06/2021 15:27, Matthew Herd wrote:
>>> Hi Les,
>>> 
>>> I�m jogging at 60IPM, 120IPM, and 250IPM for testing purposes.  Depending 
>>> on the PID parameters I was seeing increasing ferror
>> with jog time at all three speeds.  The delay in stopping also seemed to 
>> correlate with the ferror.  Tuning eventually brought it down
>> to constant ferror, but results were still subpar.
>>> 
>>> The motors seem to be capable of far more than they�re currently doing 
>>> because when the ferror oscillated during a stop from
>> 250 IPM the machine would shake.  During normal jogging moves at 60 or 120 
&g

Re: [Emc-users] Advice on Tuning Servo System

2021-06-28 Thread John Dammeyer
Hi Mathew,
I'll lend my two cents to this too.  I'm running DC servos on two axis and an 
AC Servo on the knee.
The DC Servo drives are HP_UHU kits with the CPU an add on card from Henrik 
Olsson in Sweden. 
The AC knee is a Bergerda 750W drive already set up from the factory for that 
size motor.
All three motors are running step/dir and tuned internally.
In the case of X and Y given the motor specifications of 3000 RPM with 3:1 or 
4:1 the MAX_VELOCITY is based on the pulleys, motor and leadscrew pitch.  

The torque on servos compared to stepper motors is pretty low for the same size 
but as Les stated, it's pretty well constant over the entire RPM range.  Are 
you certain that you have actually sized the motors correctly for the load?  

And I agree with Les.  Set step/dir, P=0, FF1=0 and first tune the drives 
without LCNC.

John


> -Original Message-
> From: Les Newell [mailto:les.new...@fastmail.co.uk]
> Sent: June-28-21 8:03 AM
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] Advice on Tuning Servo System
> 
> Hi Matthew,
> 
> That FF1 is probably causing the increasing following error. Again I'd
> strongly recommend using just stepgen rather than a combination of
> stepgen and PID. At the moment LCNC and your drives are fighting each other.
> 
> The oscillation could be the drive tuning or the loops fighting each other.
> 
> > I�d be fine with a max rapid speed of 250 IPM but I�d hope to be able to 
> > have enough torque to cut at the full 250 IPM
> 
>  From your numbers I'd say you'll have plenty of torque at 250IPM. The
> motor torque should be pretty flat from 0 to 250IPM.
> 
> As far as speeds are concerned the absolute limit is the critical speed
> of the screws. You can calculate it using this calculator
> <https://www.lintechmotion.com/sizing/critical-speed/critical-speed-inputs.php>.
> Exceeding the critical speed is a really bad idea. The next limiting
> factor is the nuts. If you spin the screws too fast the balls skid in
> the nuts and you get accelerated wear. Without the manufacturer's data
> sheets this is much harder to estimate. About all you can do is look up
> data sheets from various manufacturers and make estimates based on their
> numbers for similar sized screws. By the way the Z axis screw is a bit
> of an oddity. It has a very large diameter and fairly fine pitch. It's
> lubricated from the central lube system. The combination of large
> diameter and thick way oil means you get a lot of viscous friction
> losses in the nut. If I remember correctly I limited mine to somewhere
> around 2 - 3m/min 80-120IPM.
> 
> Les
> 
> 
> On 28/06/2021 15:27, Matthew Herd wrote:
> > Hi Les,
> >
> > I�m jogging at 60IPM, 120IPM, and 250IPM for testing purposes.  Depending 
> > on the PID parameters I was seeing increasing ferror
> with jog time at all three speeds.  The delay in stopping also seemed to 
> correlate with the ferror.  Tuning eventually brought it down
> to constant ferror, but results were still subpar.
> >
> > The motors seem to be capable of far more than they�re currently doing 
> > because when the ferror oscillated during a stop from
> 250 IPM the machine would shake.  During normal jogging moves at 60 or 120 
> IPM they apparently struggled to keep up (per the
> ferror)
> >
> > The max rated RPM for these motors is 2500 RPM, which equals 500 IPM.  Max 
> > continuous is supposed to be 2000 RPM (400 IPM).
> I�d be fine with a max rapid speed of 250 IPM but I�d hope to be able to have 
> enough torque to cut at the full 250 IPM.  I�m hoping
> to achieve good high speed machining performance so I�d also like to get the 
> accelerations up pretty high if possible.  Cutting speed
> isn�t too big a concern, but the NEMA 42 steppers I used to use were quite 
> slow to accelerate.  Your max acceleration values (30
> in/s/s) seem like a good target for me.
> >
> > Unfortunately, although the drives support PWM and analog, my USC boards 
> > don�t support them.  In hindsight I would have gone
> with PWM or analog control of the drives, but I already had the USC boards.
> >
> > Matt
> >
> >> On Jun 28, 2021, at 9:51 AM, Les Newell  wrote:
> >>
> >> Hi Matthew,
> >>
> >> I'd recommend setting this up as a stepper system and ignore the encoder 
> >> feedback for now. The feedback loop inside the drive
> is likely to fight with the PID loop inside LinuxCNC. The encoders can be 
> used for position feedback but that's not essential and is just
> making it harder to figure out what is going on. Later once you have the 
> machine running you can come back to this.
> >>
> >> You can use Halscope and monitor the axis 

Re: [Emc-users] Advice on Tuning Servo System

2021-06-28 Thread Les Newell

Hi Matthew,

That FF1 is probably causing the increasing following error. Again I'd 
strongly recommend using just stepgen rather than a combination of 
stepgen and PID. At the moment LCNC and your drives are fighting each other.


The oscillation could be the drive tuning or the loops fighting each other.


I’d be fine with a max rapid speed of 250 IPM but I’d hope to be able to have 
enough torque to cut at the full 250 IPM


From your numbers I'd say you'll have plenty of torque at 250IPM. The 
motor torque should be pretty flat from 0 to 250IPM.


As far as speeds are concerned the absolute limit is the critical speed 
of the screws. You can calculate it using this calculator 
. 
Exceeding the critical speed is a really bad idea. The next limiting 
factor is the nuts. If you spin the screws too fast the balls skid in 
the nuts and you get accelerated wear. Without the manufacturer's data 
sheets this is much harder to estimate. About all you can do is look up 
data sheets from various manufacturers and make estimates based on their 
numbers for similar sized screws. By the way the Z axis screw is a bit 
of an oddity. It has a very large diameter and fairly fine pitch. It's 
lubricated from the central lube system. The combination of large 
diameter and thick way oil means you get a lot of viscous friction 
losses in the nut. If I remember correctly I limited mine to somewhere 
around 2 - 3m/min 80-120IPM.


Les


On 28/06/2021 15:27, Matthew Herd wrote:

Hi Les,

I’m jogging at 60IPM, 120IPM, and 250IPM for testing purposes.  Depending on 
the PID parameters I was seeing increasing ferror with jog time at all three 
speeds.  The delay in stopping also seemed to correlate with the ferror.  
Tuning eventually brought it down to constant ferror, but results were still 
subpar.

The motors seem to be capable of far more than they’re currently doing because 
when the ferror oscillated during a stop from 250 IPM the machine would shake.  
During normal jogging moves at 60 or 120 IPM they apparently struggled to keep 
up (per the ferror)

The max rated RPM for these motors is 2500 RPM, which equals 500 IPM.  Max 
continuous is supposed to be 2000 RPM (400 IPM).  I’d be fine with a max rapid 
speed of 250 IPM but I’d hope to be able to have enough torque to cut at the 
full 250 IPM.  I’m hoping to achieve good high speed machining performance so 
I’d also like to get the accelerations up pretty high if possible.  Cutting 
speed isn’t too big a concern, but the NEMA 42 steppers I used to use were 
quite slow to accelerate.  Your max acceleration values (30 in/s/s) seem like a 
good target for me.

Unfortunately, although the drives support PWM and analog, my USC boards don’t 
support them.  In hindsight I would have gone with PWM or analog control of the 
drives, but I already had the USC boards.

Matt


On Jun 28, 2021, at 9:51 AM, Les Newell  wrote:

Hi Matthew,

I'd recommend setting this up as a stepper system and ignore the encoder 
feedback for now. The feedback loop inside the drive is likely to fight with 
the PID loop inside LinuxCNC. The encoders can be used for position feedback 
but that's not essential and is just making it harder to figure out what is 
going on. Later once you have the machine running you can come back to this.

You can use Halscope and monitor the axis commanded position and encoder 
position to assist setting the PID values within the drive.

Alternatively if the drives can accept PWM torque commands I'd do that and have 
LinuxCNC doing all of the PID work.


Extended jogs tend to result in the machine moving awhile after I release the 
button and ferror is all over the place

That's a symptom of the machine not being able to keep up with the command. 
Either your speed or acceleration are too high. Looking at your numbers I'd 
guess you are maxing out the speed.


What is a reasonable acceleration value for a Bridgeport BOSS5 (Series 1 type 
factory CNC machine) with 1kW 5Nm AC servos?  Are my accelerations too low?  
Raising them by orders of magnitude seemed to have no effect.  I freely admit 
I’ve been too lazy to try to calculate it.

It depends on a huge number of variables. I generally work on trial and error. 
1kW is a bit overkill for a S1 BP so assuming your gearing is correct the 
limiting factor is probably your ball screws. I'd feel a bit uncomfortable 
going much over 250IPM. If you spin the screws too fast you'll damage them. How 
fast will your motors be running at that speed? Could you simply be running out 
of revs on your motors?

To give you a rough idea my Hurco, which is considerably bigger than a S1 CNC, 
uses 750W servos and does 10m/min (~400IPM) easily. From my ini file:
MAX_VELOCITY = 166.6
MAX_ACCELERATION = 750.0
Note these are metric so divide by 25.4 to get inches.

Looking at your ini file:

MAX_VELOCITY =  8.33
MAX_ACCELERATION =  10.0

Re: [Emc-users] Advice on Tuning Servo System

2021-06-28 Thread Matthew Herd
Hi Les,

I’m jogging at 60IPM, 120IPM, and 250IPM for testing purposes.  Depending on 
the PID parameters I was seeing increasing ferror with jog time at all three 
speeds.  The delay in stopping also seemed to correlate with the ferror.  
Tuning eventually brought it down to constant ferror, but results were still 
subpar.

The motors seem to be capable of far more than they’re currently doing because 
when the ferror oscillated during a stop from 250 IPM the machine would shake.  
During normal jogging moves at 60 or 120 IPM they apparently struggled to keep 
up (per the ferror)

The max rated RPM for these motors is 2500 RPM, which equals 500 IPM.  Max 
continuous is supposed to be 2000 RPM (400 IPM).  I’d be fine with a max rapid 
speed of 250 IPM but I’d hope to be able to have enough torque to cut at the 
full 250 IPM.  I’m hoping to achieve good high speed machining performance so 
I’d also like to get the accelerations up pretty high if possible.  Cutting 
speed isn’t too big a concern, but the NEMA 42 steppers I used to use were 
quite slow to accelerate.  Your max acceleration values (30 in/s/s) seem like a 
good target for me.

Unfortunately, although the drives support PWM and analog, my USC boards don’t 
support them.  In hindsight I would have gone with PWM or analog control of the 
drives, but I already had the USC boards.

Matt

> On Jun 28, 2021, at 9:51 AM, Les Newell  wrote:
> 
> Hi Matthew,
> 
> I'd recommend setting this up as a stepper system and ignore the encoder 
> feedback for now. The feedback loop inside the drive is likely to fight with 
> the PID loop inside LinuxCNC. The encoders can be used for position feedback 
> but that's not essential and is just making it harder to figure out what is 
> going on. Later once you have the machine running you can come back to this.
> 
> You can use Halscope and monitor the axis commanded position and encoder 
> position to assist setting the PID values within the drive.
> 
> Alternatively if the drives can accept PWM torque commands I'd do that and 
> have LinuxCNC doing all of the PID work.
> 
>> Extended jogs tend to result in the machine moving awhile after I release 
>> the button and ferror is all over the place
> 
> That's a symptom of the machine not being able to keep up with the command. 
> Either your speed or acceleration are too high. Looking at your numbers I'd 
> guess you are maxing out the speed.
> 
>> What is a reasonable acceleration value for a Bridgeport BOSS5 (Series 1 
>> type factory CNC machine) with 1kW 5Nm AC servos?  Are my accelerations too 
>> low?  Raising them by orders of magnitude seemed to have no effect.  I 
>> freely admit I’ve been too lazy to try to calculate it.
> 
> It depends on a huge number of variables. I generally work on trial and 
> error. 1kW is a bit overkill for a S1 BP so assuming your gearing is correct 
> the limiting factor is probably your ball screws. I'd feel a bit 
> uncomfortable going much over 250IPM. If you spin the screws too fast you'll 
> damage them. How fast will your motors be running at that speed? Could you 
> simply be running out of revs on your motors?
> 
> To give you a rough idea my Hurco, which is considerably bigger than a S1 
> CNC, uses 750W servos and does 10m/min (~400IPM) easily. From my ini file:
> MAX_VELOCITY = 166.6
> MAX_ACCELERATION = 750.0
> Note these are metric so divide by 25.4 to get inches.
> 
> Looking at your ini file:
>> MAX_VELOCITY =  8.33
>> MAX_ACCELERATION =  10.0
> 
> Your velocity looks way out. That's 500IPM. While 1kW servos should be able 
> to run the machine this fast with the right gearing I can't see it lasting 
> very long.
> 
> Les
> 
> 
> On 28/06/2021 14:08, Matthew Herd wrote:
>> Hi Les,
>> 
>> The drives accept step/direction from the USC board to command position, not 
>> velocity.  The encoders are pass-through to the USC board and then to 
>> LinuxCNC.
>> 
>> Thanks!
>> Matt
>> 
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-28 Thread Les Newell

Hi Matthew,

I'd recommend setting this up as a stepper system and ignore the encoder 
feedback for now. The feedback loop inside the drive is likely to fight 
with the PID loop inside LinuxCNC. The encoders can be used for position 
feedback but that's not essential and is just making it harder to figure 
out what is going on. Later once you have the machine running you can 
come back to this.


You can use Halscope and monitor the axis commanded position and encoder 
position to assist setting the PID values within the drive.


Alternatively if the drives can accept PWM torque commands I'd do that 
and have LinuxCNC doing all of the PID work.



Extended jogs tend to result in the machine moving awhile after I release the 
button and ferror is all over the place


That's a symptom of the machine not being able to keep up with the 
command. Either your speed or acceleration are too high. Looking at your 
numbers I'd guess you are maxing out the speed.



What is a reasonable acceleration value for a Bridgeport BOSS5 (Series 1 type 
factory CNC machine) with 1kW 5Nm AC servos?  Are my accelerations too low?  
Raising them by orders of magnitude seemed to have no effect.  I freely admit 
I’ve been too lazy to try to calculate it.


It depends on a huge number of variables. I generally work on trial and 
error. 1kW is a bit overkill for a S1 BP so assuming your gearing is 
correct the limiting factor is probably your ball screws. I'd feel a bit 
uncomfortable going much over 250IPM. If you spin the screws too fast 
you'll damage them. How fast will your motors be running at that speed? 
Could you simply be running out of revs on your motors?


To give you a rough idea my Hurco, which is considerably bigger than a 
S1 CNC, uses 750W servos and does 10m/min (~400IPM) easily. From my ini 
file:

MAX_VELOCITY = 166.6
MAX_ACCELERATION = 750.0
Note these are metric so divide by 25.4 to get inches.

Looking at your ini file:

MAX_VELOCITY =  8.33
MAX_ACCELERATION =  10.0


Your velocity looks way out. That's 500IPM. While 1kW servos should be 
able to run the machine this fast with the right gearing I can't see it 
lasting very long.


Les


On 28/06/2021 14:08, Matthew Herd wrote:

Hi Les,

The drives accept step/direction from the USC board to command position, not 
velocity.  The encoders are pass-through to the USC board and then to LinuxCNC.

Thanks!
Matt




___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Advice on Tuning Servo System

2021-06-28 Thread Matthew Herd
Hi Les,

The drives accept step/direction from the USC board to command position, not 
velocity.  The encoders are pass-through to the USC board and then to LinuxCNC.

Thanks!
Matt

> On Jun 28, 2021, at 9:02 AM, Les Newell  wrote:
> 
> Hi Matthew,
> 
> First of all, how are your drives configured? Is the step/direction 
> commanding position to the drives or velocity? If you are using position (the 
> most common with step/dir) all of your PID tuning should be done in the 
> drive. Do you have feedback to LCNC from the encoders?
> 
> Les
> 
> On 28/06/2021 01:07, Matthew Herd wrote:
>> Hi All,
>> 
>> It’s been a long time, but I finally got my servos mounted on my mill today. 
>>  While attemping to tune them I encountered great frustration.  I have 1kW 
>> Yaskawa clone AC servo motors and drives that accept step and direction 
>> signals and provide encoder feedback which is currently interfaced to the 
>> Pico Systems USC board.  I set the acceleration and velocity values in my 
>> ini file to what I thought were plausible and set the ferror to 1.  I was 
>> able to move the axes successfully, so I started tuning the X axis (joint 
>> 0).  That proved to be a debacle.  I attempted to tune by turning P up until 
>> it oscillated, backing off to 60%, then tuning FF1.  Although P could be 
>> tuned effectively, no amount of FF1 made any difference.  Typical 
>> performance was that ferror increased as long as I held the jog button at a 
>> speed of 60 IPM.  Then I started increasing the max velocity for Axis X to 
>> nearly double the max velocity for Joint 0.  This finally caused the ferror 
>> to stabilize while jogging and I was able to tune FF1 to achieve an ferror 
>> of around 0.002 during steady state moves.  I had some substantial 
>> oscillations at start and stop, but overall much improved.  I presume the 
>> ferror values is in inches since I’m using inches for my machine units.  I 
>> turned up the jog speed to ~120IPM and tweaked FF1 a bit further, ending up 
>> at 17.  The ferror remained ~0.002.  I then turned up the jog speed to 
>> 250IPM and the ferror was completely unstable.  The machine doesn’t seem to 
>> be accelerating as quickly as I’d expect, and tuning seems to be extremely 
>> challenging.  Extended jogs tend to result in the machine moving awhile 
>> after I release the button and ferror is all over the place (except below 
>> 120IPM with the settings below).  My ini data is copied below.  It’s derived 
>> from the sample config for the USC board.  Given all this, I have a few 
>> questions.
>> 
>> What is a reasonable acceleration value for a Bridgeport BOSS5 (Series 1 
>> type factory CNC machine) with 1kW 5Nm AC servos?  Are my accelerations too 
>> low?  Raising them by orders of magnitude seemed to have no effect.  I 
>> freely admit I’ve been too lazy to try to calculate it.
>> Why do I seem to need so much headroom on the Axis X max velocity over the 
>> Joint 0 max velocity?  I thought this was supposed to be 5-25%, but that was 
>> insufficient too allow FF1 to have any impact.
>> Does the "PID_MAX_VEL" parameter do anything?
>> Is my ferror the actual encoder feedback or is it the ferror from the step 
>> generator?  I’m trying to determine if the control loop in the drive is in 
>> need of additional tuning and not sure how to identify which loop is the 
>> problem.  I.e. LinuxCNC’s control loop or the drive control loop?
>> What is a good strategy for finding the max acceleration and tuning the 
>> drives?
>> 
>> Thanks in advance for your input!
>> 
>> Matt
>> 
>> 
>> My Actual INI below:
>> # First axis
>> [AXIS_X]
>> MIN_LIMIT = -0.20
>> MAX_LIMIT = 17.80
>> MAX_VELOCITY = 15.0
>> MAX_ACCELERATION = 15
>> 
>> [JOINT_0]
>> TYPE =  LINEAR
>> HOME =  0.000
>> MAX_VELOCITY =  8.33
>> MAX_ACCELERATION =  10.0
>> PID_MAX_VEL =   150
>> BACKLASH = 0.000
>> # INPUT_SCALE sets the resolution of the encoder in user units
>> # for instance a 500 line encoder directly connected to a 5 TPI leadscrew
>> # would give 500 * 4 (for quadrature) * 5 = 1
>> INPUT_SCALE =   -5
>> # OUTPUT_SCALE sets the resolution of the step generator
>> # for a Gecko320 with no pulse multiplier, it should be the same magnitude
>> # as INPUT_SCALE, but the arithmetic sign might need to be opposite
>> # if it runs away.
>> # if you have an encoder on a stepper motor, then this should be calculated
>> # by number of (micro)steps/rev X the leadscrew pitch, and may not match the
>> # INPUT_SCALE.
>> OUTPUT_SCALE =   -12500
>> MIN_LIMIT = -0.20
>> MAX_LIMIT = 17.80
>> FERROR =01.010
>> MIN_FERROR =1.001
>> HOME_OFFSET =-0.10
>> HOME_SEARCH_VEL =-0.160
>> HOME_LATCH_VEL = -0.02
>> HOME_USE_INDEX = YES
>> 

Re: [Emc-users] Advice on Tuning Servo System

2021-06-28 Thread Les Newell

Hi Matthew,

First of all, how are your drives configured? Is the step/direction 
commanding position to the drives or velocity? If you are using position 
(the most common with step/dir) all of your PID tuning should be done in 
the drive. Do you have feedback to LCNC from the encoders?


Les

On 28/06/2021 01:07, Matthew Herd wrote:

Hi All,

It’s been a long time, but I finally got my servos mounted on my mill today.  
While attemping to tune them I encountered great frustration.  I have 1kW 
Yaskawa clone AC servo motors and drives that accept step and direction signals 
and provide encoder feedback which is currently interfaced to the Pico Systems 
USC board.  I set the acceleration and velocity values in my ini file to what I 
thought were plausible and set the ferror to 1.  I was able to move the axes 
successfully, so I started tuning the X axis (joint 0).  That proved to be a 
debacle.  I attempted to tune by turning P up until it oscillated, backing off 
to 60%, then tuning FF1.  Although P could be tuned effectively, no amount of 
FF1 made any difference.  Typical performance was that ferror increased as long 
as I held the jog button at a speed of 60 IPM.  Then I started increasing the 
max velocity for Axis X to nearly double the max velocity for Joint 0.  This 
finally caused the ferror to stabilize while jogging and I was able to tune FF1 
to achieve an ferror of around 0.002 during steady state moves.  I had some 
substantial oscillations at start and stop, but overall much improved.  I 
presume the ferror values is in inches since I’m using inches for my machine 
units.  I turned up the jog speed to ~120IPM and tweaked FF1 a bit further, 
ending up at 17.  The ferror remained ~0.002.  I then turned up the jog speed 
to 250IPM and the ferror was completely unstable.  The machine doesn’t seem to 
be accelerating as quickly as I’d expect, and tuning seems to be extremely 
challenging.  Extended jogs tend to result in the machine moving awhile after I 
release the button and ferror is all over the place (except below 120IPM with 
the settings below).  My ini data is copied below.  It’s derived from the 
sample config for the USC board.  Given all this, I have a few questions.

What is a reasonable acceleration value for a Bridgeport BOSS5 (Series 1 type 
factory CNC machine) with 1kW 5Nm AC servos?  Are my accelerations too low?  
Raising them by orders of magnitude seemed to have no effect.  I freely admit 
I’ve been too lazy to try to calculate it.
Why do I seem to need so much headroom on the Axis X max velocity over the 
Joint 0 max velocity?  I thought this was supposed to be 5-25%, but that was 
insufficient too allow FF1 to have any impact.
Does the "PID_MAX_VEL" parameter do anything?
Is my ferror the actual encoder feedback or is it the ferror from the step 
generator?  I’m trying to determine if the control loop in the drive is in need 
of additional tuning and not sure how to identify which loop is the problem.  
I.e. LinuxCNC’s control loop or the drive control loop?
What is a good strategy for finding the max acceleration and tuning the drives?

Thanks in advance for your input!

Matt


My Actual INI below:
# First axis
[AXIS_X]
MIN_LIMIT = -0.20
MAX_LIMIT = 17.80
MAX_VELOCITY = 15.0
MAX_ACCELERATION = 15

[JOINT_0]
TYPE =  LINEAR
HOME =  0.000
MAX_VELOCITY =  8.33
MAX_ACCELERATION =  10.0
PID_MAX_VEL =   150
BACKLASH = 0.000
# INPUT_SCALE sets the resolution of the encoder in user units
# for instance a 500 line encoder directly connected to a 5 TPI leadscrew
# would give 500 * 4 (for quadrature) * 5 = 1
INPUT_SCALE =   -5
# OUTPUT_SCALE sets the resolution of the step generator
# for a Gecko320 with no pulse multiplier, it should be the same magnitude
# as INPUT_SCALE, but the arithmetic sign might need to be opposite
# if it runs away.
# if you have an encoder on a stepper motor, then this should be calculated
# by number of (micro)steps/rev X the leadscrew pitch, and may not match the
# INPUT_SCALE.
OUTPUT_SCALE =  -12500
MIN_LIMIT = -0.20
MAX_LIMIT = 17.80
FERROR =   01.010
MIN_FERROR =   1.001
HOME_OFFSET =-0.10
HOME_SEARCH_VEL =-0.160
HOME_LATCH_VEL = -0.02
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = NO
DEADBAND = 0.000126
P =  1200
I =  0
D =0
BIAS = 0
FF0 =  0
FF1 =  17
FF2 =   0
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users







Re: [Emc-users] Advice on Tuning Servo System

2021-06-28 Thread Matthew Herd
I think I might have been adjusting the wrong velocity & acceleration 
parameters … see below for the trajectory planner section of the INI:

I assume that increasing the max linear velocity term will help with at least 
some of the issues.  And making sure my max linear acceleration is 25% greater 
as well.

# Trajectory planner section --
[TRAJ]
# Full 4th Axis with Knee
# COORDINATES = X Y Z W A
# 3 Axes plus Knee
# COORDINATES = X Y Z W
# 3 Axes only
COORDINATES =   X Y Z
HOME =  0 0 0
LINEAR_UNITS =  inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 1
MAX_LINEAR_VELOCITY = 8.33
DEFAULT_LINEAR_ACCELERATION = 15.0
MAX_LINEAR_ACCELERATION = 20.0


> On Jun 27, 2021, at 8:07 PM, Matthew Herd  wrote:
> 
> Hi All,
> 
> It’s been a long time, but I finally got my servos mounted on my mill today.  
> While attemping to tune them I encountered great frustration.  I have 1kW 
> Yaskawa clone AC servo motors and drives that accept step and direction 
> signals and provide encoder feedback which is currently interfaced to the 
> Pico Systems USC board.  I set the acceleration and velocity values in my ini 
> file to what I thought were plausible and set the ferror to 1.  I was able to 
> move the axes successfully, so I started tuning the X axis (joint 0).  That 
> proved to be a debacle.  I attempted to tune by turning P up until it 
> oscillated, backing off to 60%, then tuning FF1.  Although P could be tuned 
> effectively, no amount of FF1 made any difference.  Typical performance was 
> that ferror increased as long as I held the jog button at a speed of 60 IPM.  
> Then I started increasing the max velocity for Axis X to nearly double the 
> max velocity for Joint 0.  This finally caused the ferror to stabilize while 
> jogging and I was able to tune FF1 to achieve an ferror of around 0.002 
> during steady state moves.  I had some substantial oscillations at start and 
> stop, but overall much improved.  I presume the ferror values is in inches 
> since I’m using inches for my machine units.  I turned up the jog speed to 
> ~120IPM and tweaked FF1 a bit further, ending up at 17.  The ferror remained 
> ~0.002.  I then turned up the jog speed to 250IPM and the ferror was 
> completely unstable.  The machine doesn’t seem to be accelerating as quickly 
> as I’d expect, and tuning seems to be extremely challenging.  Extended jogs 
> tend to result in the machine moving awhile after I release the button and 
> ferror is all over the place (except below 120IPM with the settings below).  
> My ini data is copied below.  It’s derived from the sample config for the USC 
> board.  Given all this, I have a few questions.
> 
> What is a reasonable acceleration value for a Bridgeport BOSS5 (Series 1 type 
> factory CNC machine) with 1kW 5Nm AC servos?  Are my accelerations too low?  
> Raising them by orders of magnitude seemed to have no effect.  I freely admit 
> I’ve been too lazy to try to calculate it.
> Why do I seem to need so much headroom on the Axis X max velocity over the 
> Joint 0 max velocity?  I thought this was supposed to be 5-25%, but that was 
> insufficient too allow FF1 to have any impact.
> Does the "PID_MAX_VEL" parameter do anything?
> Is my ferror the actual encoder feedback or is it the ferror from the step 
> generator?  I’m trying to determine if the control loop in the drive is in 
> need of additional tuning and not sure how to identify which loop is the 
> problem.  I.e. LinuxCNC’s control loop or the drive control loop?
> What is a good strategy for finding the max acceleration and tuning the 
> drives?
> 
> Thanks in advance for your input!
> 
> Matt
> 
> 
> My Actual INI below:
> # First axis
> [AXIS_X]
> MIN_LIMIT = -0.20
> MAX_LIMIT = 17.80
> MAX_VELOCITY = 15.0
> MAX_ACCELERATION = 15
> 
> [JOINT_0]
> TYPE =  LINEAR
> HOME =  0.000
> MAX_VELOCITY =  8.33
> MAX_ACCELERATION =  10.0
> PID_MAX_VEL =   150
> BACKLASH = 0.000
> # INPUT_SCALE sets the resolution of the encoder in user units
> # for instance a 500 line encoder directly connected to a 5 TPI leadscrew
> # would give 500 * 4 (for quadrature) * 5 = 1
> INPUT_SCALE =   -5
> # OUTPUT_SCALE sets the resolution of the step generator
> # for a Gecko320 with no pulse multiplier, it should be the same magnitude
> # as INPUT_SCALE, but the arithmetic sign might need to be opposite
> # if it runs away.
> # if you have an encoder on a stepper motor, then this should be calculated
> # by number of (micro)steps/rev X the leadscrew pitch, and may not match the
> # INPUT_SCALE.
> OUTPUT_SCALE =-12500
> MIN_LIMIT = -0.20
> MAX_LIMIT = 17.80
> FERROR = 01.010
> MIN_FERROR = 1.001
> HOME_OFFSET =