Actually, this got me thinking a bit, the table is hard to yank around and get real results. But we can actually measure the spring in the system, if we have something rigid enough to push against. Stick a spring of known lb/in between your table and the frame or some other ill advised and unsafe practice. Then just compress it and compare the f-error of the rotary with the linear encoder.

Here's what happened when I stuck a 400lb/in spring in there and gave it a go.

Column-1 displacement/spring compression - inches
Column 2- f-error rotary (aka "spring" in the complete axis drive system) - inches
Colump 3 - Theoretical Spring force - lbs
0       0       0
0.25    0.002   100
0.5     0.0025  200
0.75    0.003   300
1       0.0033  400
1.25    0.0037  500
1.5     0.004   600
1.75    0.0042  700
2       0.0047  800

I pulled the backlash out of the system and put a very light preload on the spring to hold it in place. Then I put on my face shield and hid behind the control cabinet and did the test.

-Dave

On Sun, 26 Apr 2020 15:49:16 -0400, David Berndt <[email protected]> wrote:

There's about .0015-.002" of backlash and an .0005" spring in the system at reasonably force levels at the highest points of stiction on the ways. I'm sure I could get more spring out of the system if I run an endmill into the vise, but we're not really testing that here.

Ballscrews, precision Apex gearboxes, big metal couplings (whatever they brand is called) and reasonable ballscrew bearings, no belts, on a 5000lb universal mill. It's stiffer than the average 6040 router.

Rotary scale works out to 254000/inch, Linear is 50800/inch. Running drives with +/-10v in torque mode.

I tuned the system to work with the linear scales only. It sucks in terms of following error compared to what I've achieved with the rotary. Getting the acceleration errors out is a challenge with the linear scale (probably because those acceleration errors are actually real as opposed to the rotary that has no idea what table position really is). Still ~.001 following error isn't terrible.

I then took the tuned linear and turned the sum2'ing with the rotary back on, so both loops are running, then I crank up the I term on the linear pid and let that run. It seems to give good results. I can run with the linear scale as the feedback into axis.1.motor-pos-fb. But I've given up on homing to index. It's not something I need that badly and I can't justify any more machine downtime for it really.

I may consider instead of adding more I to the linear PID that perhaps I should play with the gain on the sum'ing of the two PID outputs. But I'm not sure that's useful. I also tried inserting the Linear PID result into the rotary BIAS, and although that worked it didn't do anything better than where I was at before.

Currently If I g2 a 2"dia circle at 20IPM (a normal feed rate for me) the follow error at reversal peaks at ~.0006" as the backlash is pulled out. It's an improvement for sure. My time now would be better spent on finding a new ballscrew.


-Dave


On Sun, 26 Apr 2020 13:34:14 -0400, Roland Jollivet <[email protected]> wrote:

No-one has mentioned the mechanics of the system.. (or have they?)

What is the mechanical coupling like between the stepper and the linear
scale. Obviously it's most susceptible to backlash and belt stretch.
If the stepper is holding fast, how much linear deviation can you get if
you try move the carriage to and fro?  (stiffness)
Also, how many steps/linear increment?



On Sun, 26 Apr 2020 at 16:47, dave engvall <[email protected]> wrote:

Not that I know much about this but: It is my understanding that the
rotary because it has less quantatization error does a better job on
control but unless your machine is very tight a poorer job on position.
Early on I tried my machine with a 5 um linear glass scale. It was very
difficult to tune. Later on tuning with a rotary encoder was a cinch by
comparison. I've not tried both scales yet but that is where I'm headed. Conversation with Stu and the group that did the installation might shed
some light. Does the information  coming off the sensors need to be
reallocated. Just thinking(?) out loud.

On my machine, a well worn BP size, using I has never given me better
following error. I get by with P, FF1, FF2, zero or very small D and no I.

just my tuppence!

Dave

On 4/25/20 10:56 PM, David Berndt wrote:
> The rotary loop works fine by itself.
>
> The linear loop, as it's just an I term is pretty useless/non
> functional by itself. Maybe you could argue it's ok for really small
> values of I, but then the settling time when using both PID loops
> combined is terrible. I was under the impression that was as
> designed/expected based on the
>
http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Combining_Two_Feedback_Devices_On_One_Axis
>
> Side question. When doing touchoff/tool touchoff is commanded position
> or actual position used?
>
>
>
> Maybe I'll look at a different PID strategy. Perhaps I could add the
> pid.y2.error value from the linear encoder to the pid.Y.command then
> the servo encoder will really have its thumb in the tuning pie. The
> linear encoder won't have to run any actual gain, just spit out the
> current error vs commanded.
>
> -Dave
>
>
> On Sat, 25 Apr 2020 23:44:46 -0400, Peter C. Wallace <[email protected]>
> wrote:
>
>> On Sat, 25 Apr 2020, David Berndt wrote:
>>
>>> Date: Sat, 25 Apr 2020 23:13:59 -0400
>>> From: David Berndt <[email protected]>
>>> To: Peter C. Wallace <[email protected]>
>>> Cc: "Enhanced Machine Controller (EMC)"
>>> <[email protected]>
>>> Subject: Re: [Emc-users] Encoder reset on homing to index
>>> Resent-Date: Sat, 25 Apr 2020 23:39:11 -0400
>>> Resent-From: "David Berndt" <[email protected]>
>>> Resent-To: "[email protected]"
>>> <[email protected]>
>>> Resent-cc: "Peter C. Wallace" <[email protected]>
>>>  Trying this again for the second time, no more attachments, only a
>>> google photos link. I really mean it this time.
>>> https://photos.app.goo.gl/xMK4Ep69i1SpznC58
>>>
>>> Here are some halscope screenshots. Would saving the halscope data and >>> distributing that be better/prefered? Not sure what the policy is here.
>>>
>>>
>>> This isn't really revealing much to me. All the index-enables fire,
>>> commands go to zero, feedback goes to 0 and then the PID.y.output takes
>>> off, PID.y2(linear).output eventually catches on and doesn't do
>>> anything
>>> to help, seems to add fuel to the fire instead of acting in an opposite
>>> direction it should.
>>>
>>> Please see screenshots, any thoughts are appreciated.
>>>
>>> -Dave
>>>
>>
>> The runaway almost suggests you have one PID loop with negative
>> feedback and one with positive feedback. Have you tried each loop
>> individually?
>>
>>>
>>>
>>> On Sat, 25 Apr 2020 14:44:54 -0400, Peter C. Wallace <[email protected]>
>>> wrote:
>>>
>>>> On Sat, 25 Apr 2020, David Berndt wrote:
>>>>
>>>>> Date: Sat, 25 Apr 2020 14:21:45 -0400
>>>>> From: David Berndt <[email protected]>
>>>>> To: "Enhanced Machine Controller (EMC)"
>>>>> <[email protected]>,
>>>>>    Peter C. Wallace <[email protected]>
>>>>> Subject: Re: [Emc-users] Encoder reset on homing to index
>>>>> Thanks for the feedback Peter.
>>>>> I took the time to re-order my hal file (it's a bit of a disaster
>>>>> with all the other non motion going-ons in there).
>>>>>  Here is the relevant start of m addf's
>>>>>   addf hm2_5i25.0.read          servo-thread
>>>>> addf motion-command-handler   servo-thread
>>>>> addf motion-controller        servo-thread
>>>>> addf pid.x.do-pid-calcs       servo-thread
>>>>> addf pid.y.do-pid-calcs       servo-thread #rotary
>>>>> addf pid.y2.do-pid-calcs      servo-thread #linear
>>>>> addf pid.z.do-pid-calcs       servo-thread
>>>>> addf pid.a.do-pid-calcs       servo-thread
>>>>> addf pid.s.do-pid-calcs       servo-thread
>>>>>  addf sum2.3                   servo-thread #pid.y.output
>>>>> +pid.y2.output -> 'y-output' -> hm2_5i25.0.7i77.0.1.analogout1
>>>>>  addf hm2_5i25.0.write         servo-thread
>>>>>   I excluded all the stuff below which is are things like servo
>>>>> amp ready, amp fault, coolant, spindle speed, spindle amp draw,
>>>>> f-error tracking, stuff that happens in servo-thread but isn't
>>>>> exciting or relevant to motion in a realtime way.
>>>>>  Yes, PID.y.index-enable, pid.y2.index-enable,
>>>>> hm2....encoder.03.index-enable, and hm2...encoder.01.index-enable
>>>>> are all plumbed up and I show them going TRUE during homing.
>>>>>  When I went out to the cold mill this AM and started fooling
>>>>> around I noticed I was getting some following errors even in my
>>>>> previously configured "acceptable" config which was driving
>>>>> axis.1.motor-pos-fb from the rotary encoder still. Some
>>>>> hal-scoping around shows that maybe with the change I need some
>>>>> re-tuning at higher speeds.
>>>>>  The need for retuning made me think that perhaps if the tuning
>>>>> was questionable and that lead to a bit of runaway condition at
>>>>> higher speeds then perhaps if I just decreased the max speed and
>>>>> tried assigning the linear encoder pos fb to axis pos fb I might
>>>>> see an improvement.
>>>>> So I did that, and it did. I'm now jogging back and forth at half
>>>>> the old max speed and doing some basic G-code tests with the
>>>>> linear axis being axis.1.motor-pos-fb. Which is nice because the
>>>>> GUI displays more enjoyable numbers.
>>>>>  I'm not sure which change contributed to what, HAL
>>>>> reorder/cleanup, or tuning.
>>>>>   My homing situation hasn't really changed. I still have to home
>>>>> twice to get a completed homing cycle. I once got persistent
>>>>> runaway after homing (caught quickly by f-error), but it wasn't
>>>>> self correcting, turning the machine on again (f2) just led to
>>>>> another immediate runaway. Restarted linuxcnc to try again and all
>>>>> was well. Interesting problems.
>>>>>   So as it stands now, homing (i have no idea what to actually
>>>>> try/change, it's broken but also kind of fine...) , and more
>>>>> tuning (assuming it's not a fools errand to change tuning with the
>>>>> addition of a linear scale...) are my next steps.
>>>>>    -Dave
>>>>>
>>>> I suspect you will have to track down whats going on with halscope
>>>> (triggered by index-enable going low) and monitor the commanded
>>>> position, feedback position
>>>> and PID output
>>>>
>>>>>  On Sat, 25 Apr 2020 09:44:14 -0400, Peter C. Wallace
>>>>> <[email protected]> wrote:
>>>>>
>>>>>> On Sat, 25 Apr 2020, David Berndt wrote:
>>>>>>
>>>>>>> Date: Sat, 25 Apr 2020 03:23:20 -0400
>>>>>>> From: David Berndt <[email protected]>
>>>>>>> Reply-To: "Enhanced Machine Controller (EMC)"
>>>>>>>   <[email protected]>
>>>>>>> To: "Enhanced Machine Controller (EMC)"
>>>>>>> <[email protected]>
>>>>>>> Subject: Re: [Emc-users] Encoder reset on homing to index
>>>>>>> After a few more hours tonight putzing around with this thing.
>>>>>>> Here's where I'm at.
>>>>>>> I've wired up the shared index. It completes both the encoder's
>>>>>>> index-enable cycles. encoder.NRotary.position and
>>>>>>> encoder.nLinear.position both reset to ~0. Home is also at 0 as
>>>>>>> is homeoffset, so once index is found there should be no need
>>>>>>> for the axis to move. However it takes off and gets caught by a
>>>>>>> fairly strict ferror.
>>>>>>> If I then home it again the result seems to be close enough that
>>>>>>> the small post-index-enable completion jump is within f-error.
>>>>>>> The axis moves a few .001" and settles. I'm not sure what's
>>>>>>> causing this jump in the first/second homing. Because of the
>>>>>>> ferror the first homing attempt does not actually complete the
>>>>>>> homing cycle, ishomed is not set.
>>>>>>> For the homing thing, I may setup a mux to turn off the
>>>>>>> pid.yLinear.output. Maybe leave it off until everythings homed,
>>>>>>> or everythings homed + some time, or some other benchmark. My
>>>>>>> machine spends very little of it's time in an unhomed state and
>>>>>>> the control tends to stay on 99% of the time so homing/rehoming
>>>>>>> isn't really much of a priority. Or maybe abandon indexed homing.
>>>>>>>  It would also be nice to be able to feed pid.yLinear.feedback
>>>>>>> into axis.1.motor-pos-fb. But that's a recipe for the axis
>>>>>>> taking off/tripping ferror instantly. I'm not sure why, I can
>>>>>>> watch the pid.yRotary.feedback and pidyLinear.feedback and
>>>>>>> they're quite close to each other. I think this works fine
>>>>>>> pre-homed and breaks after homing but I'd have to re-run that
>>>>>>> experiment to be sure. Seeing the machine @actual position being >>>>>>> off a few thou is really disconcerting. I can always press the @
>>>>>>> to switch to machine commanded, which is (hopefully, if the
>>>>>>> linear is more accurate) much closer to reality.
>>>>>>>  -Dave
>>>>>> Is the index enable signal wired to both PID components in hal?
>>>>>> Also What is the thread order?
>>>>>> (it should be hardware_read, motion, PID, hardware_write)
>>>>>>  Peter Wallace
>>>>>> Mesa Electronics
>>>>>> (\__/)
>>>>>> (='.'=) This is Bunny. Copy and paste bunny into your
>>>>>> (")_(") signature to help him gain world domination.
>>>>>>   _______________________________________________
>>>>>> Emc-users mailing list
>>>>>> [email protected]
>>>>>> https://lists.sourceforge.net/lists/listinfo/emc-users
>>>>  Peter Wallace
>>>> Mesa Electronics
>>>>  (\__/)
>>>> (='.'=) This is Bunny. Copy and paste bunny into your
>>>> (")_(") signature to help him gain world domination.
>>
>> Peter Wallace
>> Mesa Electronics
>>
>> (\__/)
>> (='.'=) This is Bunny. Copy and paste bunny into your
>> (")_(") signature to help him gain world domination.
>
>
> _______________________________________________
> Emc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users


_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users


_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users


_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users


_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to