grblHAL / core

grblHAL core code and master Wiki
Other
326 stars 85 forks source link

Is there away to add implement a "map" for PWM output #383

Closed terjeio closed 5 months ago

terjeio commented 11 months ago

Is there away to add implement a "map", where a pwm of 0=0, the smallest increment above 0 detectable by micro can be set to a selected pwm value, and what a program may perceive as 100% to another value(75% duty). I know that now you can do the later and the available option on lower value is almost the oposite of what im looking for..... also itd be nice to be tunable with out recompiling. Using the $$ settings or potentiometer would be slicker. Thanks

Originally posted by @customsolutions in https://github.com/grblHAL/core/discussions/203#discussioncomment-7369539

dJOS1475 commented 8 months ago

@dJOS1475

I cant use the SPINDLE_LINEARIZATION module as my GRBL_SPD controller doesnt support the features AFAIK.

Did you try it? The GRBL_SPD controller takes a PWM input so it should work?

No, I got around the issue I was having by setting the minimum to 2. I’m not entirely sure why that worked tho (Jon the designer suggested it).

dJOS1475 commented 8 months ago

@dJOS1475

I cant use the SPINDLE_LINEARIZATION module as my GRBL_SPD controller doesnt support the features AFAIK.

Did you try it? The GRBL_SPD controller takes a PWM input so it should work?

OK, I thought I had it solved, but I didnt. So I recompiled grblHAL with the Spindle RPM linearization module and ran your software for it. Frankly Im confused!!I know im an idiot who cant code to save himself, but I do not understand how your system is supposed to work??

Please just implement a simple speed map, like FluidNC, and you wil save a lot of ppl a lot of trouble eg:

Speed_map: 0=0.000% 10000=1.000% 30000=100.000%

Honestly, if you assume ppl are as dumb as I am, you'll make life easier for everyone.

terjeio commented 8 months ago

Looking at this again I believe the $30-$36 settings above should be equivalent to the FluidNC speed map. So what is not working?

dJOS1475 commented 8 months ago

Looking at this again I believe the $30-$36 settings above should be equivalent to the FluidNC speed map. So what is not working?

Tbh, I have no idea what happened. I recompiled the firmware and zeroed out the linear settings and it started behaving.

Bizarre!