On Monday 13 July 2020 20:12:09 Chris Albertson wrote: > Displacement of the cross slide while cutting a hex head is > proportional to the sin of the spindle angle. Very much like the > height of a piston is proportional to the angle of the crank
Yes, but for a siggen's sine output, one would need to run the sin thru an ABS to generate 2 half sin's as the zero point of the ABS output is the point of the hex, and the amplitude is the flatness of the flat. One would want to mul the encoder angle by 3 because the ABS makes 2 adjacent flats out of one complete sin wave. A fixed offset mixed into that would allow the size of the hex to be controlled. By borrowing the output of the X jog dial, the hex can be sized by .0001" per click of the dial. Get rid of the siggen after you've proved X can move fast enough by subbing a MOD[encoder_scale] out of the encoder output to make a SIN[out of that], feed that to an ABS[] would make 4 or 6 sided heads. Choice of multiplier of the mod product could make a 5 sided head that only you could make a wrench for. ;-) Experimenting while fixing my index generation yesterday, I find that X speed isn't going to be a huge problem even for complex shapes as when the backgear is engaged, and the vfd is at 5 hertz, which is my lf cutoff arbitrarily set in the vfd, it takes about 8 seconds for one turn of the chuck. X has buckets of time to do the sailors hornpipe. Or any other dance you might want to teach it. I have at least 40 ipm to play with at my current accel settings. And with one of the 3 phase motors subbing for the 2 phase nema-24 in the X now, I could probably hit 80 ipm peak. And the 2NM version of that same motor would fit! I'm doing 70 with that 3NM motor on Z now and haven't found its limits yet, it hasn't stalled unless I hit something. I could cobble all that together in hal, that part isn't exactly black magic, but what would be needed is gcodes to control it. Thats well above my pay grade. Is there a family ## that could be used for this already defined in G##PQ for on/off, and the same G##.1|2|3|4 etc used for other controls that is already semi assigned in rs-274d that we could use without getting too far afield? > Draw a picture of a hexagon and then make a line that crosses one of > the flats at some odd angle. Figure out how long this line is. At > first it seems hard then you draw a second line from center to one of > the hex's points and now you have a triangle with two angles and one > side known. The function that drives the cross slide is basically a > sine. Exactly. > You can look up "Angle Side Angle" or "cosine law" in Wikipedia. > > The exact same thing could be used to "turn" a flat on a shaft Exactly. There we'd need a switch to enable only one half sin per revolution. Or maybe even 2 per, spaced to cut two opposing flats. I need that to do the worm shaft drive coupler on this BS-1 clone. :) > On Mon, Jul 13, 2020 at 11:49 AM Gene Heskett <ghesk...@shentel.net> wrote: > > On Monday 13 July 2020 13:56:47 Chris Albertson wrote: > > > Actually making a hex head on the lathe would best be done using a > > > microcontroller. FPGAs can compute trig functions but I think > > > the method used is to first implement a "soft CPU" and then run > > > code written in C that uses math.h That is a silly-expensive why > > > to replace a $5 STM32 chip. I think the existing hal tools can do some of this. > > > But really, the Lathe spindle does not run so fast and you can > > > write this code as a HAL component that runs in the Servo loop. > > > I wanted out how I would do this last night and was stumped on the > > > math until I remembered the law of cosines and "SAS" triangle > > > problems from some class I took in the 10th grade. Look those up > > > on Wikipedia and then it is not hard to computer the cross slide > > > position as a function of spindle angle. > > > > > > The hard part is getting such a good cross slide setup with no > > > play of backlash Ball screws. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene> _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users