- Joined
- Dec 18, 2019
- Messages
- 7,495
The Clough42 ELS knows the spindle count, which is referenced (I presume) to the spindle position on power on. So the spindle angle can be referenced to the start point by using simple modulo arithmetic. This is true, as long as the encoder pulses are being counted. If the encoder pulses are not looked at, or the interrupt is turned off, then that reference is lost. This is equivalent to opening the half nuts. As long as we enable the counting, one can get back to the start point. In C, this is a simple command. I don't know what variable names are used, so I will make up some, for the sake of discussionMy understanding of the Clough42 ELS is that it does not know what the spindle angle is. It keeps track of the spindle angle position relative to its point of initiation by totaling the number of encoder pulses from the point of initiation. This has always seemed like a cumbersome way to manage sync.
If the controller pulses to the driver are disabled, either using the driver disable/enable or via the software controlled pulse stream, sync is lost. If the spindle continues to rotate, the encoder is still sending pulses and they will have to be accounted for on order to reestablish sync. Managing all that math seems like a tedious way to go.
I like using the half nuts and thread dial when threading. For me, the ELS is simply an electronic replacement for the gear train, as Clough had intended. I have a solution for threading to a shoulder or turning to a stop via my variable speed motor and TouchDRO. Hence no pressing need to make a change at this point. I like my 602 and with modifications I have made it very nearly meets all my requirements. A recent modification of the Clough42 software by kwackers on github to enable user entry of custom thread pitches via the UI is close to completing my wish list.
(It only addresses metric pitches and while I can do the math to calculate inch threads, there are some holes due to the limited number of decimal places for the pitch entry but for the most part, it is close enough for practical purposes.
I am not inclined to want to go CNC with my lathe. I prefer the manual control and most of the time I don't bother with the power feed or even turning on the DRO. The dials and a micrometer has worked well for simple tasks for more than fifty years. For the very few times that I need CNC control, my Tormach mill can be configured as a vertical CNC lathe. However, if I wanted to have the ELS control the x axis, I would probably elect for full CNC. The reason being that G code is relatively simple to write and far more universal in function.
C:
angle_count = count_val % ppr;
angle = angle_count * 360.0/ppr;
I have to agree with your approach to Clough42's ELS. I just want to replace physical gear changing with electronic changing. If I can add extra stuff, like thread to a stop, it would be very nice. It's not necessary, but it would be very helpful for coarse pitches and metric threads. As it stands, with metric threads, I have to stop the spindle every time I get to the gutter, retract, reverse the lathe and start again. It would be nice to not to have to do that. Integrating the VFD brake would be both neat and (at least initially) terrifying. Trying to determine if I want to do that or not. Due to my small shop constraints, I do not have access behind the lathe. The lathe is close to the wall. So taking the VFD approach is temporarily not my prime approach. I'm not ready for lathe CNC, as I consider myself very much a beginning machinist. Not enough experience to avoid colossal screw ups in CNC land.
I took the easy way out in my code and disabled the encoder as a way to shut things down. (No updates = no movement of the stepper.) I shouldn't have done that - because that causes loss of spindle sync. Instead, I need to disable the stepper. I will make those changes, so that I can look into thread to the gutter. I also don't keep a copy of the stepper count, but I can easily add one to my code. Thread to a stop requires access to the VFD controls. I may get there, but think that will be later.