On Saturday 16 February 2013 07:58:23 Tomaz T. did opine:
> I'm trying to make working my spindle rpm display (pyvcp), but don't
> know which signal to connect or take from my .hal file.
>
> Here is what is in my hal file for spindle:
>
>
> net spindle-enable <= motion.spindle-on => stepgen.2.enable
> net spindle-cmd motion.spindle-speed-out => scale.0.in
> net spindle-freq <= scale.0.out => stepgen.2.velocity-cmd
> net spindle-out <= stepgen.2.step => parport.0.pin-14-out�
> net spindle-fwd motion.spindle-forward => parport.0.pin-16-out
>
>
> and what I have in hal for display:
>
>
> addf mult2.2 servo-thread
> setp mult2.2.in1 28.75
> net cypher_speed mult2.2.in0 <= spindle-vfd.frequency-out
> net speed_out pyvcp.spindle_rpm <= mult2.2.out
>
>
> Probably spindle-vfd.frequency-out should be replaced with something
> from hal to make correct connection in my case?
Mine goes through some contortions, but the signal is originally derived
from encoder.0.velocity as I have a 50 cycle encoder on my lathes spindle.
net spindle-feedback0 encoder.0.velocity
scale.0.in scale.1.in scale.2.in
# so scale.2 is the next grep.
addf scale.2 servo-thread
setp scale.2.gain 60 # sets spindle display
calibration, set at 10 rps=600 rpm
setp scale.2.offset 0.0 # for completeness
net tach-feed scale.2.out
limit2.3.in # to smooth tach reading
# and that feeds "limit2.3.in" so
addf limit2.3 servo-thread
# smooth the tach readin
setp limit2.3.maxv 400
# denoise the spindle rpm display
net spindle-rpm-filtered limit2.3.out
pyvcp.spindle_rpm
# the limit2.3.maxv makes it behave much like a mechanical tach needle,
adjust to suit. 400 approximates the slam it to full speed delta accel
my spindle can do with a 5" 4 jaw chuck mounted. Toy lathe, obviously.
Calibration, scale.2.gain is derived from my oscilloscopes time base,
watching the encoder index pulse where 1 second between pulses is
1 rps=60 rpm etc. The encoder module also has an -rps output but
I found its much noisier. This works well for me.
Not of course in the above order as my .hal file is more ordered than
the above, I got that my 'grep'ing, and I do not use the => or <= syntax
in my "net" statements. My spindle is pid servo'd. Not as 'stiffly' as
I would like, but it saves fuses that way too, while still carving great
threads.
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> is up!
My views <http://www.armchairpatriot.com/What%20Has%20America%20Become.shtml>
I disagree with what you say, but will defend to the death your right to
tell such LIES!
I was taught to respect my elders, but its getting
harder and harder to find any...
------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
is your hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials, tech docs,
whitepapers, evaluation guides, and opinion stories. Check out the most
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users