If you recall, my ELS has a touch screen interface, a Teensy 4.1 micro-controller, and an integrated two axis DRO. It currently can do 25 imperial threads, 24 metric threads, 9 imperial feeds, and 10 metric feeds, and will support other values, but I haven't entered them into the tables. I made a design choice to limit the number of entries to a single page, that can be easily selected by a finger tip. This was to keep the display programming simple. At some point, I may add the algorithm to compute the correct ratios inline. Currently they are computed offline, but are easy enough to add.
What my ELS isn't: A CNC lathe. However, I wish to add some features that while manual, augment the capability of the lathe. The goal is to make this easy to use, and hopefully, intuitive how to operate. Currently, the spindle motor is controlled by a VFD, which is not connected to the ELS. I replaced the original 0.001" resolution DRO's with 1um glass scales. There is no external DRO controller, the DRO display and updating is done in the ELS.
To get ready for these changes, I made a branch in my software repository, called feedtostop, and changed branches. This preserves my fully functional "production" ELS code, should I ever wish to revert to it. One thing that I did in the main branch, was to disable my ELS via disabling the spindle encoder. It was an early design choice, which I need to change. It does work, but it will make adding capabilities a little harder. Disabling the encoder starves the stepper algorithm of updates, so the stepper driver never receives stepper pulses. But this makes the whole system blind to the spindle position. It works ok for simple feeding and threading. But it will prove problematic for positioning to a stop. My new approach will be to gate the stepper driver pulses, but keep the spindle encoder active all the time. My spindle encoder uses signed 64 bit integers, so practically speaking there never should be a rollover issue to worry about, even at the highest speeds and leaving it on for years.
Made the gating changes just now, and need to test it. Hopefully this won't blow up in my face right away! Once the normal functionality has been proven with the gating change, I can start to plod through item #1, feed to a stop. For that to work, I will need a way to enter the end point, and a fool proof stopping mechanism that doesn't chatter at the end, as well as a way to simply restart the feed again.