Spindle speed from PWM to analog (0-10)

More
17 Nov 2017 16:52 #101948 by Xpertmill
Hello everybody,

i bought this breakoutboad from ebay LINK . This board can generate a 0 - 10V analog voltage for my vfd by using pwm pulses. The problem i have now is, that at spindlespeed 30000 rpm (M3 S30000) the voltage is 0.05 V and at spindlespeed 1000 it is 9.6 V. But it should be about 10V at 30000 rpm and about 0.5V at 1000 rpm.

Can i invert the pwm output, that the pulses are minimal at 1000 rpm and maximum at 30000 rpm?

This is the part of my hal i used for the pwm generation:
loadrt pwmgen output_type=0
addf pwmgen.update servo-thread
addf pwmgen.make-pulses base-thread
net spindle-speed-cmd motion.spindle-speed-out => pwmgen.0.value
net spindle-on motion.spindle-on => pwmgen.0.enable
net spindle-pwm pwmgen.0.pwm => parport.0.pin-09-out
# Set the spindle's top speed in RPM
setp pwmgen.0.scale 30000

Thank you
Greetings
Michael

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

More
17 Nov 2017 17:10 #101950 by PCW
You probably want to invert the PWM output pin:

setp parport.0.pin-09-out-invert true

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

More
17 Nov 2017 17:58 #101953 by Xpertmill
Thank you PCW!

i just checked it out. Works perfect!

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

Time to create page: 0.124 seconds
Powered by Kunena Forum