router spindle PWM control (open loop)

More
3 years 8 months ago #265236 by PaulQUE
thanks for the help, I manage to get the spindle to turn on and off via the ssr, and to link the speed command to the pmwgen value. when I call for M3 S18000, hm2_7i96.0.pwmgen.00.value is set to 18000, is that normal? what's the unit for hm2_7i96.0.pwmgen.00.value? I have no output on the board, I have found that the PWM- should be connected to TB2-2 and PWM+ TB2-3; but the output is always 5V everywhere on the step4 connector, (0% duty cycle should at least be 0v regardless of the meter's sampling rate? ) I have also tried checking the signal between TB2-1 (GND) and TB2-3 (PWM+) I've included my Hal and Ini, thank you verry much for the help

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

More
3 years 8 months ago #265243 by PCW
The PWM scale parameter sets the full scale PWM value

(so if PWM scale is set to 18000 a PWM value of 18000 will result in 100% duty cycle)

I would not expect any PWM output as all the net commands that would enable
the PWM gen(or set a reasonable scale value) are commented out in the hal file

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

More
3 years 8 months ago #265245 by PaulQUE
which one are you referring to? I have the net scale and output type commented in the spindle section but they are present at the beginning of my hal file

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

More
3 years 8 months ago #265247 by PCW
OK

The PWM gen enable still seems to be unconnected

Note that you will probably want to use
the STEP- output and invert the PWM output
so that the initial PWM state is at 0V

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

More
3 years 8 months ago #265250 by PaulQUE
I added net spindle-enable => hm2_7i96.0.pwmgen.00.enable but I still get 5v between GND and step- or between step- and step +

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

More
3 years 8 months ago #265251 by PCW
Yes that's expected.

You need to invert the PWM output to use the STEP- pin:

setp hm2_7i96.0.pwmgen.00.out0.invert_output true

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

Time to create page: 0.076 seconds
Powered by Kunena Forum