robert wrote:
> here is my code for my spindle
> #invert voltage out
> setp hm2_[HOSTMOT2](BOARD).0.gpio.XXX.invert_output true
> setp hm2_[HOSTMOT2](BOARD).0.pwmgen.XX.output-type 3
>
> #make spindle pos
> loadrt abs count=0
> #scale spindle speed to volts
> loadrt scale count=0
>
> addf abs.0 servo-thread
> addf scale.0 servo-thread
>
> #spindle speed gain
> #hm2 1=10v out
> #pwm/speed=1/6000rpm=0.0001667
> #6k
> setp scale.0.gain 0.000166667
>
> net spindle-abs abs.0.in <= motion.spindle-speed-out
> net spindle-abs-out abs.0.out => scale.0.in
> net spindle-out scale.0.out => hm2_[HOSTMOT2](BOARD).0.pwmgen.03.value
>   

The hm2 pwmgen has its own .scale parameter, so you could get rid of the 
stand-alone scale component and just apply the scale.gain to hm2's 
pwmgen.scale.

<http://linuxcnc.org/docs/devel/html/drivers_hostmot2.html#r1_14_2>


-- 
Sebastian Kuzminsky


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to