Kirk Wallace wrote: > Last week I made my first thread on my lathe. It didn't take long to get > good threads, but I wasn't happy with the PID tuning, so I have been > doing battle with that. After some improvement, I tried another thread > and got a pronounced surge motion during the threading passes. This > happened last week, but turned out to be an erratic spindle encoder > signal. I checked all of my encoders, which seem to be fine. Then I went > back through some of my "known decent" PID settings and got the same > surging. The surge appears to be commanded. I have a feeling that the > increased acceleration times may be a factor. I wonder if synced motion > should have a ramp or buffer zone to allow it to lock gracefully. I have > a halscope graph of a spindle synced motion and my best tuning at this > link: > > http://www.wallacecompany.com/cnc_lathe/HNC/emc2/spindle_sync_surge-1a.png > > and the .ngc file is here: > > http://www.wallacecompany.com/cnc_lathe/HNC/emc2/spin_sync_z-1.ngc Well, there may not be any problem with your code. You have to give it some room to accelerate before the tool hits the workpiece. You also need a lead-out region where the tool can be retracted from the work. I can't tell what your velocities are there, but it looks liek it is surging a bit to get in sync with the thread. It HAS to do that. Depending on exactly where the spindle is when everything arrives at the "decision point", it either has to race ahead or lag behind and wait for another rotation. Sometimes it lucks into almost perfect sync and a tiny correction puts it on the dot, other times it will have to accelerate very near to the machine max acceleration spec from the ini file to make it.
Your code is a bit odd, anyway, and the EMC2 code may assume a non-synced move in Z to some good starting point, and then a transition to spindle synced motion. Your code is just doing synced motion back and forth. (That may have nothing to do with the surging, anyway. You can look at http://jelinux.pico-systems.com/codes/thread3.ngc for a program I have used to demonstrate threading on my minimill. This program should work fine on a lathe, too. I don't see that it does any sort of unsynced lead-in move, either, but it does allow some Z travel before tool begins the cut. it does a 45 degree lead-out with the X axis before breaking out of sync, though. If you don't have the luxury of cutting air off the end of the part, then a similar angled lead-in could be used. That way the Z axis is in sync before the tool touches. Jon ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
