Forum keeps timing me out. Lost my post. Got the signal running fast enough for me. Now trying to make the period variable. You advised me to use setPeriod. In the wiki, there is also a setNextPeriod. I tried setPeriod, and there seems to be sort of a delay. Guess that is understandable because the change is asynchronous. Is setNextPeriod supposed to eliminate the delay?
My first attempt at dynamic change of the timer was not good. Forgot to change based on integer periods, and did it based on time. Oops. This resulted in changing the period before the period was up. Not pretty. Maybe tomorrow I will be able to make that work.
My lathe does have linear encoders, but in the beginning, I will only work on spindle position and lead screw position. I want to be able to cut different threads with out changing gears, or to move the carriage very slow for a good finish. If that works out well, I will integrate in the linear encoders. But first, I need to take baby steps.
My first attempt at dynamic change of the timer was not good. Forgot to change based on integer periods, and did it based on time. Oops. This resulted in changing the period before the period was up. Not pretty. Maybe tomorrow I will be able to make that work.
My lathe does have linear encoders, but in the beginning, I will only work on spindle position and lead screw position. I want to be able to cut different threads with out changing gears, or to move the carriage very slow for a good finish. If that works out well, I will integrate in the linear encoders. But first, I need to take baby steps.