On Monday 18 February 2013 11:13:24 Tomaz T. did opine:

> Now there is one more thing I would need to add to my spindle section in
> hal, and that is "Spindle at speed" future (machine waits for spindle
> to reach rpm's). I found this guide for implementing this:
> http://linuxcnc.org/docs/html/examples/spindle.html (section 5 & 6.2)
> 
> As I have a bit different case (using sptepgen), I would need some help
> what and where to use it.
> 
> Here is my section for running spindle:
> 
> loadrt scale count=1
> setp scale.0.in 0
> setp scale.0.gain 0.14
> setp scale.0.offset 0
> addf scale.0 servo-thread
> 
> setp stepgen.2.position-scale 1
> setp stepgen.2.maxvel 18000
> setp stepgen.2.steplen 1
> setp stepgen.2.stepspace 0
> setp stepgen.2.dirhold 20000
> setp stepgen.2.dirsetup 20000
> setp stepgen.2.maxaccel 100
> 
> #   Enable
> net spindle-enable <= motion.spindle-on => stepgen.2.enable
> 
> #   Connect spindle speed to scaler
> net spindle-cmd motion.spindle-speed-out => scale.0.in 
> 
> #   Connect scaler output to stepgen velocity
> net spindle-freq <= scale.0.out => stepgen.2.velocity-cmd 
> 
> #   Connect output to the pin for the analog voltage of C6 board
> net spindle-out <= stepgen.2.step => parport.0.pin-14-out 
> 
> #   Control of spindle on/off over the relay
> net spindle-fwd motion.spindle-forward => parport.0.pin-16-out
> 
I am using a pwmgen to run the mills spindle, and like you, no feedback.  
So its impossible to know if the spindle is 'at speed' so that usually gets 
fudged true.  I have a bar graphic that does show the requested speed.

>From that custom_postgui.hal;
=====================================
# Include your customized HAL commands here
# The commands in this file are run after the AXIS GUI (including PyVCP 
panel) starts

# **** Setup of spindle speed display using pyvcp -START ****
# **** Use COMMANDED spindle velocity from EMC because no spindle encoder 
was specified
# **** COMANDED velocity is signed so we use absolute component (abs.0) to 
remove sign

net spindle-cmd => abs.0.in
net absolute-spindle-vel <= abs.0.out => pyvcp.spindle-speed

# **** force spindle at speed indicator true because we have no feedback 
****

net spindle-at-speed => pyvcp.spindle-at-speed-led
sets spindle-at-speed true
====================================== 

> 
> Do I need to add another function for spindle-ramp or can I use
> stepgen.2.maxaccel, where I already defined acceleration? If so, which
> lines and connections I still need to use in my case then?
> -----------------------------------------------------------------------
> ------- 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


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'm not an Iranian!!  I voted for Dianne Feinstein!!
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

Reply via email to