Hi guys,

I came across a video on Youtube of a cool little fixture that is used for zeroing the corner of a part. I decided to try and write my own code for this but the machine seems to go spuratically when i set this and push the zero button in KmontionCNC.

I'm new to C programming so this may be full of issues or there could be something small i am over looking, could someone help me review this and see if they can figure out where i am going wrong?

I am trying to duplicate the motion seen in this short video.

https://www.youtube.com/watch?v=jZLW7knSICk

My Code is attached, I tried to comment all throughout it so that it's easier to follow:

I have tried to make it universal so that all can use it once i get it working i will share it.

Thanks,
Dan