New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spindle pwm pin pw:period has no effect #1103
Comments
you want to be using hw_pwm for output-type, on a pwm-capable pin, not
"pwm".
See http://smoothieware.org/switch
…On Sun, Jan 29, 2017 at 11:29 AM, Frank Herrmann ***@***.***> wrote:
Hello,
i test for my XATC some boards to get some functions stable. During my
test with the PWMSpindle i wonder that the change in pwm_period has no
effect on pin 1.23 (PWM capable pin).
Here my configuration:
Build version: edge-75df940, Build date: Jan 18 2017 20:24:49, MCU:
LPC1768, System Clock: 100MHz
CNC Build 3 axis
switch.spindle.enable true #
switch.spindle.pwm_period 100000 # <---- default 1000, sets the PWM frequency
switch.spindle.input_on_command M3 #
switch.spindle.input_off_command M5 #
switch.spindle.output_pin 1.23 # Here we are using the first big MOSFET
switch.spindle.output_type pwm # pwm output settable with S parameter in the input_on_comand
switch.spindle.max_pwm 255 # set max pwm for the pin default is 255
[image: image]
<https://cloud.githubusercontent.com/assets/3763176/22403368/36d87eac-e615-11e6-8c1d-f49aef8227c5.png>
You see pic from my oszi at the command "M3 S100" ... (btw, can we put the
max rpm/min in config and calculate the pwm value correct? i.e. "M3 S6000"
max 12000rpm/min == 50% on pwm pin)
I changed for my DC Motor Controller the PWM Frequency to 100 kHz but the
Frequency never changed. I check the code but find nothing:
https://github.com/Smoothieware/Smoothieware/blob/edge/src/modules/tools/
spindle/PWMSpindleControl.cpp#L84
Please help :)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1103>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AAGpFflEiWlGGDtcepwZoh1xVWVbl25jks5rXGnugaJpZM4LwwYO>
.
--
Courage et bonne humeur.
|
Thnaks for ur fast answer ok, i change it:
Same result at M3 S50 (it's just between 0 and 100), Frequency is about 0.050 kHz |
The value you want to set is not pwm_period but pwm_period_ms ( period in
milliseconds ), and 10000 is a strange value to set there.
Also, next time you file an issue, make sure you strictly follow the rules
: https://github.com/Smoothieware/Smoothieware/blob/edge/ISSUE_TEMPLATE.md
…On Sun, Jan 29, 2017 at 3:27 PM, Frank Herrmann ***@***.***> wrote:
Thnaks for ur fast answer ok, i change it:
switch.spindle.enable true #
switch.spindle.pwm_period 100000 # default 1000, sets the PWM frequency
switch.spindle.input_on_command M3 #
switch.spindle.input_off_command M5 #
switch.spindle.output_pin 1.23 # Here we are using the first big MOSFET
switch.spindle.output_type hwpwm # pwm output settable with S parameter in the input_on_comand
switch.spindle.max_pwm 255 # set max pwm for the pin default is 255
Same result at M3 S50 (it's just between 0 and 100), Frequency is about
0.050 kHz
[image: image]
<https://cloud.githubusercontent.com/assets/3763176/22404726/4361a884-e637-11e6-8f23-d4c683da6dcf.png>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1103 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGpFfUOAVnt32ESfpBj1DQ1GXAfSwRuks5rXKHXgaJpZM4LwwYO>
.
--
Courage et bonne humeur.
|
Ok, found the problem. You have another parameter: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
i test for my XATC some boards to get some functions stable. During my test with the PWMSpindle i wonder that the change in pwm_period has no effect on pin 1.23 (PWM capable pin).
Here my configuration:
Build version: edge-75df940, Build date: Jan 18 2017 20:24:49, MCU: LPC1768, System Clock: 100MHz
CNC Build 3 axis
You see pic from my oszi at the command "M3 S100" ... (btw, can we put the max rpm/min in config and calculate the pwm value correct? i.e. "M3 S6000" max 12000rpm/min == 50% on pwm pin)
I changed for my DC Motor Controller the PWM Frequency to 100 kHz but the Frequency never changed. I check the code but find nothing:
https://github.com/Smoothieware/Smoothieware/blob/edge/src/modules/tools/spindle/PWMSpindleControl.cpp#L84
Please help :)
The text was updated successfully, but these errors were encountered: