On Monday 24 March 2014 10:38:50 Marius Liebenberg did opine: > I found a solution. If you just put a (-) in front of the Z figure it > travels the opposite way. You also have to swing the incremental counter > for the no of cuts to add in stead of subtract as well.
The way your OP was worded, I thought you were asking about reversing the spindle, but IF the spindle has enough relays to achieve the reversal, then its a matter of issuing an m5 to stop it, killing enough time for it to stop, then issuing the m3 to start it in fwd. This can be done considerably quicker if the spindle is variable speed and encoded for speed control. Alternatively, an AC induction motor can have a dynamic braking stop added with a separate DC power supply, current limited to about the motors normal draw, which is switched on by the backside contacts of the run/stop relay. That might need 100 milliseconds of dead time by staging it with two relays in order to allow the armature currents to decay else the power supply might be taking some large voltage surges at the moment of stop contact. I have equipt mine with dynamic braking to speed up the stopping, in 3 stages, and have some hal trickery synthesizing the stop and can now run the g33.1 rigid threading cycle in a loop I wrote that pecks it about 1/2 turn per cycle so I have a chance to hit the tap with an air hose & if quick enough some cutting oil. You have to figure on the stop coast distance in your depth estimates, which on mine are about 1.5 turns at 300 rpm. 2.5 maybe at 700 rpm. The rotating mass in a 5" chuck, and a 3/1 geared down 1HP treadmill spindle motor are quite a bit higher than the OEM 3" chuck and motor. And yes, 80 watts worth of the shacks 8 ohm 20 watt audio dummy load r's do get warmed right up. :) For lack of a way to dynamically measure motor current, or lack of my ability to find power transistors with enough SOA ratings to do it that way (the ones I bought 5 of, in TO-247 packages, would have needed about 50 of them before the estimated currents per transistor would have stayed inside the SOA ratings), I am staging the braking resistors with a wcomp module watching the encoder, driving 2 ice cube relays, with terminates in a dead short on the motor by the time its down to about 125 rpm at the chuck. When the chuck is within maybe 5 degrees of stopped, the new direction is then clocked on out to the speed controls by hal gates and it accelerates from essentially zero speed in the other direction. Po' folks version of a reversible VFD. :) Works, but the hal file is a nearly 300 line monster. :) If anyone is interested, I can have that file available on my web page by tomorrow afternoon, although it is in a state of flux with the lincurve module ATM. Its temporarily by passed so once I get the mechanics all covered up again, I can program out any remaining non-linearity's in the requested vs actual speed. Today I have a lengthy "honeydo" graphics job. > On 2014-03-24 15:49, Marius Liebenberg wrote: > > I tried that Andy but is does not work as expected. I will have to > > write the routine to explicitly do that. > > I was hoping to find a shortcut and not have to write it from scratch. > > No problem I like learning new stuff. It's what drives me :) > > > > On 2014-03-24 15:33, andy pugh wrote: > >> On 24 March 2014 13:23, Marius Liebenberg <[email protected]> wrote: > >>> Is there a way to > >>> > >>> switch between these two modes with Gcode? > >> > >> I _think_ you can just use a negative diameter and it works. Cheers, Gene -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) Genes Web page <http://geneslinuxbox.net:6309/gene> ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
