Automatic Finger Jointer Debug

Today I had again to go through code bugs:

  • Sometimes the motor screams without moving;
  • For some long displacement I don’t get the displacement set;

Let’s see how I found the errors.

Sometimes the motor screams but doesn’t move and I found out after several checks that this was due to its stalling because I used a too high speed. I then reduced the minimum delay from one step to another to 55 milliseconds and looks like this problem is solved now.

The second point was really a headache but I finally did it, after getting mad about this 1200 rows of coding I found the most miserable error within it!! But I had to go through a fight between me and the computer because I wasn’t getting any system error. Therefore I calculated by hand a lot of times the relative positions of the gantry and, each time I had to move it for a long displacement, I had and wrong position at the end. The solution is so simple, I know, but it took me hours to find it: it was an error of definition of two variables that were defined as integer while they should have been defined as long.

In the next days I will do some refinements in order to have my final version and I am preparing meanwhile everything to shoot a video to share with you guys.

Stay tuned

Max

Leave a comment