Flying Electron wrote:
> Andy Pugh wrote:
>> 2010/1/7 Flying Electron <sa...@flyingelectron.com>:
>>
>>   
>>> So with a hypothetical setup of a mesa card, a brushless dc servo drive,
>>> and a 1000 CPR encoder, the mesa card's only job would be to read the
>>> encoder and report back to EMC and EMC would send the pwm signals out
>>> parallel port pins to the servo drive?
>>>     
>> You could do that (as long as your parallel port isn't full of Mesa
>> card) but it makes a lot more sense to do the PWM generation on the
>> Mesa card too. (Mhz rather than kHz PWM capability)
>>   
> Ok, that makes more sense.  I think I was confused because I didn't know 
> that EMC2 could send commands to the mesa card to have the mesa card 
> generate the pwm signal.  So just to make sure I understand correctly, 
> instead of EMC2 generating the pwm signal by toggling a parallel port 
> pin, it's possible for EMC2 to send a command to the mesa board to set 
> the duty cycle of a PWM output of the mesa card and the CPU on the EMC2 
> box only needs send a command to the mesa box whenever it wants to 
> change the duty cycle of the PWM instead of constantly toggling the pin 
> of the parallel port itself.  And this happens once every servo period, 
> which is around 1ms?

That's it exactly.


> Looking at the Pico Systems PWM Brushless Servo Amplifier, it recommends 
> a PWM frequency of at least 25khz, so assuming the parallel port could 
> be driven fast enough the CPU would have to send data to the parallel 
> port at least 50000 times a second to toggle a pin as opposed to sending 
> 1000 commands a second to vary the generated PWM duty cycle.  Is that 
> kind of how it works?

That's right, but the situation is worse than it might appear.

If the CPU was toggling a parport pin at 50 KHz, and it was trying to 
make a 25 KHz PWM signal, then the computer gets two opportunities per 
PWM period to make the output on or off.  So it has only two bits of 
resolution.  The PWM duty cycle can be at 0%, 50%, or 100%.  Not very 
fine control!

The hostmot2 pwmgen runs at 100 MHz, so with a 25 KHz PWM signal you 
have about 12 bits of resolution, which is ample.


-- 
Sebastian Kuzminsky

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to