pwmgen continuous run

More
04 Nov 2011 08:40 #14564 by jpka
pwmgen continuous run was created by jpka
Hi!
I currently try to use PWM software generator in EMC2 to control spindle speed. Due to nature of my spindle motor, it not love when PWM control disappears, even when it stopped. At least, motor can't be momentary ESTOP'ped when ESTOP condition occurs, because Pwmgen stops immediately, while i need that it switch at minimum duty cycle.
So the question is, how to keep Pwmgen running always?
I read man pages about Pwmgen and found only this
pwmgen.N.min-dc float rw
The minimum duty cycle. A value of 1.0 corresponds to 100%.
Note that when the pwm generator is disabled, the outputs are
constantly low, regardless of the setting of min-dc.
...and not found how to tune Pwmgen to run always.
Can it be solved?
Thanks! :)

Please Log in or Create an account to join the conversation.

More
04 Nov 2011 15:45 #14572 by andypugh
Replied by andypugh on topic Re:pwmgen continuous run
jpka wrote:

Hi!
I currently try to use PWM software generator in EMC2 to control spindle speed. Due to nature of my spindle motor, it not love when PWM control disappears, even when it stopped. At least, motor can't be momentary ESTOP'ped when ESTOP condition occurs, because Pwmgen stops immediately, while i need that it switch at minimum duty cycle.


Are you using a biased PWM, so that 0% is full speed one way, 100% full speed the other, and 50% is stop?
What is the interface electronics? Can you make it work with an up-down PWM instead?

So the question is, how to keep Pwmgen running always?

Just don't wire the enable pin. ie, instead of linking pwmgen-enable to emc2-enable, replace it with a setp statement in the HAL that turns it on permanently.
But it still won't run when EMC2 is not active...

Minimum duty cycle does something else.

Please Log in or Create an account to join the conversation.

More
04 Nov 2011 16:35 #14580 by jpka
Replied by jpka on topic Re:pwmgen continuous run

Are you using a biased PWM, so that 0% is full speed one way, 100% full speed the other, and 50% is stop?

I use 0.1 to 0.2 duty cycle, which currently represents: 0.1 - stop, 0.2 - full forward. A bit different configuration looks like 0.1 - full reverse, 0.15 - stop, 0.2 - full forward. Both is practically useful, and in both cases 0% duty cycle, or PWM off, as well as any other values outside 0.1 to 0.2 range, must be avoided when possible.

What is the interface electronics?

It is Electronic Speed Controller (ESC) for brushless motor, please see here for details
www.linuxcnc.org/component/option,com_ku.../lang,english/#14554

Can you make it work with an up-down PWM instead?

Sorry, i'm not fully understand your question, but probably i can't.

Just don't wire the enable pin. ie, instead of linking pwmgen-enable to emc2-enable, replace it with a setp statement in the HAL that turns it on permanently.
But it still won't run when EMC2 is not active...

Thank you! It is exactly what i need!
setp pwmgen.0.enable true
Works great!
:silly:

Please Log in or Create an account to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum