On Friday, March 04, 2011 10:56:42 am Igor Chudov did opine:

> On Fri, Mar 4, 2011 at 9:25 AM, gene heskett <ghesk...@wdtv.com> wrote:
> > On Friday, March 04, 2011 10:12:57 am Igor Chudov did opine:
> > > On Fri, Mar 4, 2011 at 7:27 AM, Przemek Klosowski <
> > > 
> > > przemek.klosow...@gmail.com> wrote:
> > > > On 3/4/11, Igor Chudov <ichu...@gmail.com> wrote:
> > > > > I re-wrote Andy's function to compare the absolute value of the
> > > > > diff, and compare that to 1E-07. I know that this is crazy,
> > > > > ugly, and stupid. But
> > > > 
> > > > it
> > > > 
> > > > > works beautifully.
> > > > 
> > > > NO, absolutely not stupid at all. This is in fact the only sane
> > > > way of comparing floating point numbers, recommended in all
> > > > numerical analysis textbooks.
> > > 
> > > Whils I kind of agree in general (I do numerical modeling too, for a
> > > living), here we are essentially comparing a == a and it fails. See
> > > my another post in this thread about GCC bug 323.
> > > 
> > > My concern with doing what I am doing, is that if I wanted the knee
> > > to move at glacial speed, it would shut off.
> > > But I know that I do not need it.
> > 
> > But, would it not come back on and move accordingly if the diff
> > between shutoff position (saved) and present requested position
> > exceeded that 1E-07?
> 
> No, the comparison is between the previously commanded position and the
> currently commanded position.
> 
> And this is why I am slightly concerned with this approach.
> 
> > That does seem to a a pretty reasonable assumption, and at that
> > small a diff, the part would never know the motor had been resting. I
> > don't see an accumulated error creeping in as long as the requested
> > position is never thrown away, only the saved requested position at
> > the point of the turnoff.
> 
> I would not be worried if I was comparing actual with commanded, but I
> compare previous commanded to current commanded.

I would I think, change the comparison then, to just the error term. 
Determined from servo's feedback error after the application of the I & P 
terms.  If ABS(error) less than 1E-07 (or whatever scales well), turn it 
off, if more, turn it on and do the move.  Code wise that might even be 
simpler because all you are really wanting is the error term.

Do the ABS on it after the application of the I &P factors, and if its 
<1EE-07 (or whatever scales well so you get a reliable shutoff within the 
deadband) and shut it off.  If >1EE-07 (or whatever) then turn it on.

Or is the feedback error term not available to hal?  I run steppers here, 
so I am blindly walking around in servo territory and these are two 
separate cats, neither of which are always conducive to std cat herding 
practices.  ;-)

He who speaks servo, doesn't speak steppers well and vice versa I think.
 
> > I looked at the smallest knee mill Grizzly has, but keep going back to
> > the G0704 because of its larger table motion envelope.  OTOH the head
> > on that re-labeled machine can be articulated too.  But it also
> > weighs a good half ton, and the flooring in my shop is not up to
> > that, its sagged about 2" in the middle now, and was liberally
> > blocked and leveled when I built it. Damned yellow clay soil, its a
> > supercooled liquid.  Never stops flowing.
> 
>  Maybe some concrete application is in order.
> 
That would be a whole new building & I'm out of both yard space and a wife 
if I cover any more dirt. :)

> I love my 2 ton mill. :)

I hear that!

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
<http://tinyurl.com/ddg5bz>
University politics are vicious precisely because the stakes are so small.
                -- C. P. Snow

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to