pwmgen outputting digital signal

More
22 Jun 2022 23:39 #245627 by daveansell2
After some struggle I have managed to get most of my cnc lathe setup working. I am using a 7i92 and a 7i78 and some switches directly connected to the P1 connector on the 7i92.

The steppers move the spindle turns on an reverses. However it is always on maximum speed and changing the spindle override doesn't change the speed of the spindle. 

hm2_7i92.0.pwmgen.00.value does change, and all the pins up to it, but the pwm output is either maximum or zero.

I have attached all the config files I think are important.

Have I somehow screwed up the hardware or is there something else I can try?

thanks
Attachments:

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

More
23 Jun 2022 00:52 #245633 by PCW
You might verify that the pwmgen scale pin is set properly
and that varying the spindle speed slider adjusts the pwmgen
value pin in from 0 to MAX_RPM

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

More
23 Jun 2022 10:37 #245662 by daveansell2
Thankyou for the reply. The pwmgen scale parameter is set as 3600. The pwmgen value pin is varying from 0 to 1 smoothly, is this correct?

spindle.0.speed-out-rpm has varies from 0-1, and spindle.0.speed-out-rpm seems to be varying as 1/60th of that, which sounds wrong.

Have i somehow got it set to a maximum speed of 1rpm somehow?

If I try to set the spindle speed in MDI using a G97 Sxxxx command the spindle stops and won't start again unless I press the stop and start button. If I look at the output with a multimeter it reads as 10V.

thanks

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

More
23 Jun 2022 10:46 #245663 by daveansell2
i have just tried adding a DEFAULT_SPINDLE_SPEED=2000 to the main ini file, but that doesn't seem to have helped.

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

More
23 Jun 2022 14:23 #245681 by daveansell2
So after more playing around I discovered that there was a problem with the default spindle speed (which I haven't fixed yet) but also the pwm needed its output inverting
hm2_7i92.0.pwmgen.00.out0.invert_output
and i think that setting the scale parameter to 3600.00 not 3600 caused issues.

now i just have to get the jog buttons working
thanks

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

Moderators: cmorley
Time to create page: 0.070 seconds
Powered by Kunena Forum