On Monday 10 June 2013 09:00:19 andy pugh did opine: > On 10 June 2013 02:43, Gene Heskett <[email protected]> wrote: > > even, for about 20 minutes, tried to learn what the pwmgen module > > might be able to do in the PDM mode, but it seemed even harder to > > control then. The man page tells you how to put it in that mode, but > > leaves you on your own to determine how it actually works. > > http://en.wikipedia.org/wiki/Pulse_density_modulation > > So, what is this PFMgen that you are asking for? If you mean: > http://en.wikipedia.org/wiki/Pulse-frequency_modulation > Then that sounds like rather a tricky thing to do with a > fixed-frequency base thread.
Yes, it would be a cobble job at best. What I have in mind is hardware that only updates its output at the end of a burst of pulses. Or auto zero's if a new burst does not come in within a time limit. Then send a burst of pulses, number being determined by an 8 bit int conversion of the float output at motion-spindle-rps. I can visualize setting the number of pulses in each burst by loading a counter, counting down to zero at BASE_THREAD/2 rate by falling edge decrement of the counter, and having charge_pump issue pulses as long as the counter is non-zero. But this thread would have to run at a 20 ms to 50 ms rate to give decent granularity. Granularity to be improved by adding the floats value to the right of the decimal point in a tmp register, adding a pulse to the counter when it goes above 1 and subtract that 1 from this tmp value. So the first question I need to ask is, can I set up a 3rd thread, called SPINDLE_THREAD in the ini file, to be run at 1/50th the rate of the SERVO_THREAD? It wouldn't be more than an exercise in what if's if I can't do that. It would also be a Good Thing(TM) if the charge_pump module could have the same pin reset code put in it that the stepgen's have now as that would double the potential update rate to a pulse per BASE_THREAD as opposed to 2x BASE_THREAD, the situation now. Am I making any sense? ISTM that with around 10kg of rotating mass, 20 updates per second should be sufficient when the target hardware has sample/hold for in between updates. I think I could build that in eagle in a few days if I can get meself back up to speed in eagle. It's been a while since I did the encoders interrupter board so I'm a bit rusty. Perhaps its even something that Steve Stallings (PMDX) might want to do as another method of doing what his PMDX-106 does with PWM now? I'm not sure how much board the free eagle will let me do either. But ATM it won't run, yelling about an UNK symbol in libssl? WTH? Version 6.30, must be time to update. 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 having BEAUTIFUL THOUGHTS about the INSIPID WIVES of smug and wealthy CORPORATE LAWYERS ... A pen in the hand of this president is far more dangerous than 200 million guns in the hands of law-abiding citizens. ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
