On Monday 25 December 2017 17:47:24 Nicklas Karlsson wrote: > > Greetings and Merry Christmas to all; > > > > Putting the near finishing touches on the hal file for the new > > treatment of a two scale encoder last night I noticed that rigid > > tapping wasn't doing as it should, like the spindle reversal wasn't > > near completely done, so it looked like I was feeding > > motion.spindle-revs from the wrong place, so I've fixed that. With > > this: > > > > # hook up position, after scaleing for gear change, > > # to motion for rigid tapping, two tally switches on knob > > # control the mux4pos.sel 1 and 2 > > net pos_source <= hm2_5i25.0.encoder.00.position => scale_pos.in > > net pos_source => mux4pos.in1 > > net scaled_pos_s <= scale_pos.out => mux4pos.in2 > > net position_scaled <= mux4pos.out => motion.spindle-revs > > > > So that position is scaled by the gear switches. > > > > But generally, we want as much of this as practical, to fall thru in > > a single servo-thread cycle. Nyquist feedback theory and all that. > > > > From the man page: > > Pin names starting with "joint" or "axis" are are read and updated > > by the motion-controller function. > > > > But "motion" itself raises some unique (to me) questions, because it > > handles both input and output. > > > > So where is the ideal position in the addf list for these two > > functions: > > > > addf motion-command-handler servo-thread > > addf motion-controller servo-thread > > Here is the manual page for the motion module > http://linuxcnc.org/docs/html/man/man9/motion.9.html > > Manual state "motion − accepts NML motion commands, interacts with HAL > in realtime" so I would guess NML motion commands are handled by the > motion-command-handler thread and HAL realtime is handled by > motion-controller. As position is a real time output I expect it is > handled by motion-controller thread. > > I think motion is EMCMOT on page four in the devoper manual > http://linuxcnc.org/docs/devel/pdf/LinuxCNC_Developer_Manual.pdf > So I think motion-controller probably needs to be right above the 5i25 write. I've not tried that yet.
My fix for the rigid tapping looks good visually, but on the reversal, I am hearing a pretty decent windup followed by the slowdown to normal cruiseing of the Z motor, so I need to add a 5th channel to halscope, and look at the value being fed to the stepgen to confirm what I am hearing. I have a limit3 between the source of the pid_z.command, and the pid_z.command input, with both maxv and maxa set for 100 ATM, which makes a sine-squared waveform there, primarily because without it, it can do a spindle reverse fast enough at 300 rpms to make the z axis spit out a following error when the tap cutting air is a 10mm x 1.5. And it looks like I'm feeding the un-scaled value into the near for the spindle-at-speed detection, switching to low gear seems to indicate I need yet another scale & mux4 to correct that. Or perhaps I could feed it from the tach circuit, which IS well corrected. I'll tackle that in the morning after the obligatory 2 cups have been put into the blood stream. ;) Thanks Nicklas. [...] 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-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
