Page 1 of 1

PWM signal stuck

PostPosted: Mon Aug 17, 2020 6:48 pm
by loesch
I was having a problem with my spindle coming on at full speed when I booted up the UCCNC software, so I did some digging and I think I have found a bug.

With UCCNC V1.2049 and UC100 firmware to 3.0110, everything runs fine. When I monitor the PWM output with a scope, I get a PWM baseline of 0V and the duty cycles responds correctly. Toggling the active low check box toggles the baseline from 0V to 5V, as expected.

With UCCNC V1.2112 and firmware 3.0190 (one has no control of the firmware version as it upgraded/downgraded automatically based upon the version of UCCNC you are using), the PWM baseline is stuck at 5V and the active low checkbox has no effect. This forces me to use my Industrial HF spindle in manual mode if I want to use the screenset I've come to love as it's not compatible with the earlier version.

Hopefully this is something that can easily be fixed so I can go back to using 1.2112 safely with my spindle.

Re: PWM signal stuck

PostPosted: Mon Aug 17, 2020 7:52 pm
by ger21
Did you try 1.2113?

Re: PWM signal stuck

PostPosted: Mon Aug 17, 2020 9:33 pm
by loesch
Gerry, thanks for the suggestion. It led me down a totally different path and I found the source of the issue.

It never was 1.2112 or the UC100 firmware, it was a profile setting. After installing 1.2113, it worked fine using the default profile. When I tried the same profile I was using in 1.2112, the problem presented itself. I made sure that absolutely everything in the Spindle tab was set exactly the same. One profile worked, the other didn't. So, I used Notepad++ and did a compare of the two profile files. It turns out the culprit was a setting on the I/O Setup tab. There is a setting that showed up in the more recent versions (since 1.2049) for defining a the pin/port for the Laser. If set to 0/0, everything worked fine with my spindle. If it was defined the same as my spindle, the spindle would come on at full RPM when you run UCCNC. I may have set that a month or so ago when I installed my 6W Opt Laser as both my spindle and laser use PWM on the same pin. I use a Stepcraft switch box to switch between the spindle and the laser, depending upon what I'm doing.

If anyone knows why the spindle and laser settings cause this problem when set to the same pin/port (both active high), let me know.

Re: PWM signal stuck

PostPosted: Tue Aug 18, 2020 2:55 am
by cncdrive
Because they are different PWMs and ofcourse if you set 2 things to the same output the 2 settings cannot drive the output the same time, it is a conflict.