On Saturday 12 May 2018 14:04:27 Gene Heskett wrote: > Greetings all; > > Ping! Or is this not possible? > > contains the value of "k" as in the g33.1's k? I'd assume the initial > code scan as the g-code is loaded, records that k someplace. > > I am, if I can obtain that value, going to expand my hal code for > determining reversal overshoot, by scaling the value of the encoder > count it now returns into actual overtravel distance, and display it > with a number button so that I can then use that as a subtraction of > the desired depth of a blind hole tap operation. Ideal would to touch > the bottom of the hole w/o breaking the tap. > > With that k value obtained from linuxcnc, which should be recorded > someplace when the g-code is loaded, I think I can make it work with > my pecking routines for rigid tapping. And save a few broken taps > because I forgot to cut air and then do the math, editing the g-code > based on the result. Thats a right PITA. Having hal scale the > #<_tmp_z> for me would protect me from my own worst enemy, me... > > Thanks everybody.
Humm, no replies. ok, since its not possible to use a #number in hal because the # is a comment to hal, how do I get a #defined numerical value into hal to be used as the scale modules .gain input? Seems like there oughta be a way short of adding a spin button to a pyvcp file to get a pin value. That does not get it from the input gcode file, and for this idea to be a usefull part of linuxcnc, that value must come from the gcode file it is executing. What I have working, for several years now, is a few lines of hal that measure the encoder counts between the issuance of the spindle reversal command from motion and the first encoder edge in the reversed direction. But this value is of course in encoder counts. I want to first scale the encoder edges counted to a floating point of spindle turns, then further scale it by multiplying that by the distance of the tpmm or tpi. the operating tpmm or tpi which will finally give the distance traveled during the overshoot. Step one here is further complicated by the position of the encoder, on the back of the motor, so is upstream to the gear change in the head. That I have already handled, with the side effect of being able to change gears on the fly while the spindle is running. Thats a huge advantage to those square faced gears. Achieved by slowing the motor to about 20 rpm the instant no gear tally is true, so its still turning very slowly while the other gear is being engaged. 4 quadrant motor control is sweet indeed as all this takes only milliseconds... But how do I get the gcode files tpmm or tpi into the .hal file. Thanks. -- 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) Genes Web page <http://geneslinuxbox.net:6309/gene> ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
