Hi Troy,

It should be ok. Just make sure your Screen Script is configured in KMotionCNC...
What do you mean configured in KMCNC?
In KMotionCNC | Tool Setup | Tool/Setup Files | Main Dialog Face should be "Custom" and your Screen Script.


Also, in order for me to get v3.6 to compile i changed this line....
#include "c:\KMotionSrc\C Programs\KflopToKMotionCNCFunctions.c"

to this...

#include "KflopToKMotionCNCFunctions.c"
Yes. Sorry my mistake.


Back to the FeedHold issue before...
That is all very strange. Adding in dead code or running GCode shouldn't make a difference.

The only thing I can think of is slight timing variations. I noticed that the loop is quite long and borderline on using an entire Time Slice. Also the debounce time is set fairly long at 300 loops.
#define DBTIME 300

With one Thread running and executing in one Time Slice the debounce time = 180us x 300 = 0.054 seconds. If it takes 2 Time slices that would be 0.108 seconds. Could it be you are just not holding the button down long enough? Or maybe the button isn't making solid contact. The switch needs to be completely closed for 0.108 seconds to be recognized. Here is an article that shows typical switch bouncing is only about 1 milliseconds. So we could try reducing the DBTIME to a much smaller number.

I suppose noise glitches could also be an issue. Periodic noise glitches would appear as switch bouncing and result in the button not being recognized.