Greetings all; Sitting here waiting for the coffee to kick in, and lamenting the difficulty in doing math in hal.
That bit of hal stuff I can watch with a halmeter needs some math to translate the encoder counts of the overshoot into actual distance it represents. Then somehow, dynamically as the g33.1 is running, diddle the z distance its using as the turn around point so the first one, cutting air, would establish the z offset for the next peck, doing this on a peck by peck basis. A wrapper for the G33.1 could do that before starting the next peck. I think that overshoot value is still valid at the point where its back to doing its incrementing of the depth it hands g33.1 for the next peck. So, how can I store the output of a hal module to memory?, Such that the gcode can access it #4990 style and use it to adjust the z point its working with. IOW I need to be able to make a memory location out of something one would normally be looked at with a halmeter. With that, I could do the math in gcode to make a g33.1 peck cycle wrapper self correct for the overshoot. Here is what I have now: just incomplete enough to be confusing I'm sure. ======================== # Now, lets see if we can track the G33.1 turnaround overtravel # first, make a sum2 a sub2 setp sum2.ovrtrvl.gain0 -1.0000 # then net the sample holds but sample needs s32, not float so use count net ovrtrvl1 hm2_5i25.0.encoder.00.count sample.dirchg.in sample.spndlchg.in net spindle-ccw => sample.dirchg.hold net spindle-reverse abs.encdir.is-negative sample.spndlchg.hold # and calc the overtravel from S32ś net ovrtrvl2 sample.dirchg.out S32_float_cmd.in net ovrtrvl3 S32_float_cmd.out sum2.ovrtrvl.in0 net ovrtrvl4 sample.spndlchg.out S32_float_spndl.in net ovrtrvl5 S32_float_spndl.out sum2.ovrtrvl.in1 # the hal pin sample.ovrtrvl.out should be shown with a hal__meter ============================== And its this last sample.ovrtrvl.out that I want to put in a memory location. 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> ------------------------------------------------------------------------------ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users