On Saturday 28 March 2020 13:55:28 andy pugh wrote: > On Sat, 28 Mar 2020 at 17:50, Gene Heskett <ghesk...@shentel.net> wrote: > > mornings git pull so it might not be page 812 any more. Is now on > > page 814 according to evince: > > > > 14.15.6.6 > > Section 14.15 is "14.15 Creating Userspace Python Components" > > So, this is a Python function for use in custom userspace components. > It has no place in your G-code.
So while I have used M68 to give the counts to pyvcp for massaging and display, I'll have to do all the rest in the gcode if I want to get it done. Thats a bummer. Thanks Andy, I'll see what I can do from that side of the wall. First I have to use a different means of getting the counter output, which is a different signal name in the main hal, I can I hope retrieve that somehow. Here is what I have, from the main hal: # calculate spindle reversal overshoot setp sum2.ovrtrvl.gain0 -1.000000000 # make sub2 out of sum2 # feed accumulated counts to both sample-holds net ovrtrvl1 <= hm2_[HOSTMOT2](BOARD).0.encoder.00.count # Feed both sample-holds net ovrtrvl1 => sample-dirchg.in #checks net ovrtrvl1 => sample-spndlchg.in #checks net spindle-is-reversed <= abs_encdir.is-negative => sample-spndlchg.hold # checks # that takes care of measuring reversal rotation distance, HOWEVER, it also measures the other end # of the travel, so the halmeter jumps to a higher value at the end of the retract move as it # reverses to fwd again. SO KEEP THAT IN MIND! Better yet, make it a held value thats updated net ovrtrvl2 <= sample-dirchg.out => s32_float_cmd.in # checks net ovrtrvl3 <= s32_float_cmd.out => sum2.ovrtrvl.in0 # checks net ovrtrvl4 <= sample-spndlchg.out => s32_float_spndl.in # checks net ovrtrvl5 <= s32_float_spndl.out => sum2.ovrtrvl.in1 # checks # make a sample-hold out of a mux2 net ovrtrvl6 <= sum2.ovrtrvl.out => ovrtvl-frz.in1 net ovrtrvl6a <= ovrtvl-frz.out => ovrtvl-frz.in0 # now we need a ovrtvl-frz.sel <= trig.frz signal net spindle-is-reversed => trig-frz.in setp trig-frz.width 0.25 net holdovrtvl <= trig-frz.out ovrtvl-frz.sel # ovrtvl-frz.out can be watched with a halmeter, is in encoder counts, works # next we need a mult2 to make turns of spindle out of this # first, feed reciprical of encoder counts to in0, which is 240/turn # this is hard coded reciprical of encoder's scale setp mult2turns.in0 0.0041666666666666667 net ovrtrvl6a => mult2turns.in1 # now mult2turns.out s/b spindle turns net makedist0 <= motion.analog-out-00 => mult2distance.in0 net makedist1 <= mult2turns.out mult2distance.in1 net showdist <= mult2distance.out # which feed to pyvcp.ovrtvldist net showdist => motion.analog.in-01 So to feed gcode, I need mult2distance.out delivered to a named gcode var. At least to this point its all hal. So I'm confused, can I do that with a feed to motion.analog.in-01 as above, retrieve in gcode with an M66 E1 L0, and get it back from #599? the M66 uses? And is that instant enough to use for some math in gcode, done above the g33.1 and applied to the next peck cycle. It should be available to the M68 E1 L0 at the end of the g33.1 in each peck cycle. But the header of M66, Wait for input bothers me Does excedrin have a number for this headache? :) 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