On Saturday 28 March 2020 07:16:49 andy pugh wrote: > On Sat, 28 Mar 2020 at 07:45, Gene Heskett <ghesk...@shentel.net> wrote: > > Now, the actual line from the gcode which should be good > > #<_Z_dist>=hal.get_value("ovrtrvl-scaler-mux.out") > > Where did you find that format? Is it in the docs somewhere?
page 812, /usr/share/doc/linuxcnc/Documentation.pdf > If so, can you say which file and which page? > > You seem to be trying to put Python code in G-code. > http://linuxcnc.org/docs/2.8/html/hal/halmodule.html Is not answering the phone this morning. > You can read HAL pins at the _beginning_ of a G-code routine, but the > format is quite different. > #<_Z_dist>=#<_hal[ovrtrvl-scaler-mux.out]) Not usefull here. > http://linuxcnc.org/docs/2.7/html/remap/remap.html#remap:referto-hal-i >tems > > But that won't work here, as the G-code gets the interpreter value, > not the run-time value. > > What you need to do is > > net G-code-input ovrtrvl-scaler-mux.out => motion.analog-in-00 The in-00 is already in use so I'll have to use in-01, in-00 is supplying the tpmm or tpi to hal, which then runs it thru a short chain that converts the overtravel counts into turns(float) and if tp* is non-zero, distance(float) according to the value passed as tpi/tpmm from the gcode, to turns*tpi|tpmm and converts it back to imperial based on the outputs of a units module so I get the same "physical" answer for both g20 and g21. Section 5.4.16 of that same doc says wait on input, but in this case the input is there, and what I want it to do is pass the new value the hal modules have caught during he peck just performed, updated during every g33.1 pass and held in a sample-hold. Updated at the bottom of each peck and available even if tp** is zero. I still get the # of counts, displayed as turns. What I want to do now is ship that "turns" back to the gcode, massage it by tpmm or tpi and subtract it from the depth commanded as it runs the next loop of the peck. Eventually I want to incorporate the tools tlo from the tool table. (that, with my tray of taps, might need a bigger tool table). That however will probably wait until I've bored out a big bar holder so it mates with my tray of top-hatted taps. They are all 7/8" OD and keyed so they cannot turn in the holder. There is a 4mm cap screw in the side of each hat that mates with a notch cut in an R8, or will be cut into this custom toolholder. > Then in the g-code > M66 E0 L0 > #<Z_dist> = #5399 M66 E1 L0, but is the #number(#5399) the same? The docs would seem to say so, so in the gcode I should capture that immediately after the g33.1 peck is done. And this is synchronized? Coding it up and testing will answer that.. My method is always, if I'm pecking, one peck stale. And if I don't peck it still works for the display of turns in FPoint. So then I just loop once. All this gives me, after the 1st peck, a display of both turns and distance traveled while its slowing and turning around to back out of the hole. Even if one is carefull, this is where you break taps, and I've broken quite a few already. :( At some point I want to add a #<_var> to hold the in-## so it can be edited to fit other installs that may already be using different num_aio's for other things. Stay safe everybody. 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