pwm to esc converter

More
06 Jan 2016 15:55 #67973 by andypugh
Replied by andypugh on topic pwm to esc converter
Stop being random and look at the numbers.

The output of the scale is between 7.5 and 10. Then you have a pwm scale of 1000 and a limit between 50 and 150.

You don't even appear to have re-calculated the scale factor to suityour own spindle speed range.

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

More
06 Jan 2016 18:41 #67978 by billykid
Replied by billykid on topic pwm to esc converter
addf scale.0 servo-thread
setp scale.0.gain 0.8335 #(30000 * 0.8335 = 2.5%)
setp scale.0.offset 7.5
setp hm2_5i23.0.pwmgen.00.scale 100 #(so the pwmgen is working in %)
loadrt limit1 count=1
addf limit1.0 servo-thread
setp limit1.0.min 7.5
setp limit1.0.max 10
net spindle-vel-cmd-rpm limit1.0.in
net spindle-vel-cmd-limited limit1.0.out => hm2_5i23.0.pwmgen.00.value

I am mortified for having made all these mistakes
but slowly I changed and now works well enough.
I have to set the spindle override to 1% to be divided in a few steps the duty cycle
I recalculated the gain to 30000 rpm.
if you have time and want to look my cnc I put the link a few posts back
thank you again
Mauro

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

Time to create page: 0.058 seconds
Powered by Kunena Forum