On Saturday, April 07, 2012 06:53:47 AM Steve Blackmore did opine:
> On Fri, 6 Apr 2012 19:43:33 -0400, you wrote:
> >Slowly hooking up the actual lathe to linuxcnc. Starting with that
> >encoder I made.
> >
> >1. I get it that this encoder.0.velocity is something that is reported
> >in rps if I have the scale set correctly, but what I am getting is an
> >extremely noisy reading for what looks like, and sounds like, a quite
> >steady rotation.
>
> I had the same problem. Had to get some help to filter the signal
> somewhat. Here's the relevant bits from my hal file - the lines with #
> after them are the ones added.
>
> loadrt lowpass count=1 #
>
> addf parport.0.read base-thread
> addf stepgen.make-pulses base-thread
> addf encoder.update-counters base-thread
> addf pwmgen.make-pulses base-thread
> addf parport.0.write base-thread
> addf parport.0.reset base-thread
>
> addf stepgen.capture-position servo-thread
> addf encoder.capture-position servo-thread
> addf motion-command-handler servo-thread
> addf motion-controller servo-thread
> addf stepgen.update-freq servo-thread
> addf pwmgen.update servo-thread
> addf abs.0 servo-thread
> addf abs.1 servo-thread
> addf scale.0 servo-thread
> addf lowpass.0 servo-thread #
>
>
> net spindle-cmd <= motion.spindle-speed-out => abs.1.in
> net spindle-abs-cmd <= abs.1.out => pwmgen.0.value
> net spindle-enable <= motion.spindle-on => pwmgen.0.enable
> parport.0.pin-14-out
Is above Line wrapped?
> net spindle-pwm <= pwmgen.0.pwm
> setp pwmgen.0.pwm-freq 0.0
> setp pwmgen.0.scale 18000
> setp pwmgen.0.offset 0
> setp pwmgen.0.dither-pwm true
> net spindle-cw <= motion.spindle-forward
> net spindle-ccw <= motion.spindle-reverse
>
> setp encoder.0.position-scale 500.000000
> net spindle-position encoder.0.position => motion.spindle-revs
> net spindle-velocity encoder.0.velocity => motion.spindle-speed-in
> net spindle-index-enable encoder.0.index-enable <=>
> motion.spindle-index-enable
Did the above line wrap? I've turned mine off
> net spindle-phase-a encoder.0.phase-A
> net spindle-phase-b encoder.0.phase-B
> net spindle-index encoder.0.phase-Z
> setp lowpass.0.gain 0.01 #
> net spindle-velocity encoder.0.velocity => lowpass.0.in #
> net spindle-rpm-filtered <= lowpass.0.out #
>
> Steve Blackmore
Thanks Steve, I'll filter this into mine. But it seems to me, with as
clean a waveforms as I have going in, that I shouldn't have to slow it
that much.
I'll have to read up on the lowpass function to see if it defines what
this "gain" setting means. My copy of the docs, and the online version
both need better explanations as to what these options passed with setp do.
>From its man page:
PARAMETERS
lowpass.N.gain float rw
NOTES
The effect of a specific gain value is dependant on the period of the
function that lowpass.N is added to
Gives no clue about what to expect. And dependent is miss-spelled. :)
I haven't attempted to connect the spindle controller yet, my box for
it isn't going to mount cleanly, its wrong size puts the mount holes under
the lathes controller board. So it looks like I'll have to remove the
"speedway" label and "goop" it to the front face of the existing box.
With the wall wart and such parts of its power supply, its too big to
hide in that cover box.
I should be able to get the motors connected today though, once it warms
up, there is frost on the pumpkin here this morning.
Thanks Steve.
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)
My web page: <http://coyoteden.dyndns-free.com:85/gene>
The District of Columbia has a law forbidding you to exert pressure on
a balloon and thereby cause a whistling sound on the streets.
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users