On Friday 03 January 2014 14:20:34 Jared Turner did opine:

> I’m using a BBB with LinuxCNC to retrofit an old CNC mill. I have all
> of the stepper motors working, but I would like to add programmatic
> control of the spindle. The motor drive uses an analog signal, so I
> bought a digital pot so the speed can be controlled digitally. How do I
> add support for this with the existing HAL code? I want to retain the
> extruder control so I can use the mill for a 3d printer. I have a link
> to the digital pot’s datasheet below. Thanks for the help.

This is a case where I believe I would use a stepgen in step-dir mode, 
driving an 8 to 12 bit external counter, which would in turn drive a D-A.  
If it is an 8 bit counter, and you want half speed, send 128 up pulses. 
Configure the counter to send an all zeros count signal back, then home it 
to that in the ini.  If you need both directions at the spindle, some 
hardware and hal trickery with the dir pin s/b able to do that.  With a 
millisecond FP loop, you could still adjust the spindle speed faster than 
it can respond I'd think, at least in larger machinery, and you have only 
used 3 pins to do it.
> 
> 
> 
> 
> http://pdf1.alldatasheet.com/datasheet-pdf/view/34252/XICOR/X9C104P.html
> ------------------------------------------------------------------------
> ------ Rapidly troubleshoot problems before they affect your business.
> Most IT organizations don't have a clear picture of how application
> performance affects their revenue. With AppDynamics, you get 100%
> visibility into your Java,.NET, & PHP application. Start your 15-day
> FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.cl
> ktrk _______________________________________________
> 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)
Genes Web page <http://geneslinuxbox.net:6309/gene>

Well, Jim, I'm not much of an actor either.
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
         law-abiding citizens.

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to