#linuxcnc-devel Logs

Sep 18 2023

#linuxcnc-devel Calendar

01:09 AM pere: skunkworks: what is the frequency limit of your encoder reader? could it be that it is too limited for the speeds you rotate?
07:18 AM IAmTheRealBeef is now known as Beef
07:28 AM skunkworks: pere: The base thread is about 40khz - I am turning the spindle pretty slow in these tests.. (about 1rpm)
07:29 AM pere: skunkworks: sound like that is not the issue, then.
07:29 AM skunkworks: right. I am still looking - it certainly could still be me. :)
07:30 AM skunkworks: I have done similar things with the mesa encoder counter and would have known if I was losing counts.. (thousands of rotations)
07:32 AM skunkworks: obviously different hardware - but 1 index detection then many thousands of rotations..
07:32 AM skunkworks: https://www.youtube.com/watch?v=_S_bGAuTN0s
07:34 AM pere: skunkworks: you saw the suggestion from andypugh ?
07:35 AM Tom_L: skunkworks, i managed to get my 1.2kw spindle warm cutting that pendant cover block down to size with a 1.25" fly cutter
07:35 AM Tom_L: seems to be working yours pretty good
07:35 AM skunkworks: pere: no. hopefully tonight..
07:36 AM skunkworks: Tom_L: mine gets warm when you work it. No major issues though. i have a fan mounted - but not hooked it up
08:42 AM JT-Cave: pcw---home, do you have a sample of a 7i95t joint that is using encoder feedback?
08:44 AM JT-Cave: hmm I think I can use a 7i77 example to work with
08:56 AM pcw---home: Basically you swap encoder feedback for stepgen feedback and the PID output drives say a PWMgen instead of a stepgen
08:57 AM JT-Cave: ok thanks, missed the pid output part
08:58 AM pcw---home: skunkworks: might be a noise issue, I don't think the software encoder counter has any filtering
08:59 AM pcw---home: JT-Cave: It could also have stepgen output (say a system with step/dir output but linear scale feedback)
09:00 AM JT-Cave: that's what I'm trying to code for a 7i95 stepgen with encoder feedback
09:01 AM JT-Cave: http://paste.debian.net/1292342/
09:01 AM JT-Cave: that's what I have so far and it doesn't error out but I need to rig up an encoder to a stepper to test
09:05 AM pcw---home: Yes, its basically identical except for the feedback source (and the encoder setup)
09:06 AM pcw---home: Also typically the P term would be a lot lower
09:08 AM pcw---home: skunkworks: if the encoder is low resolution (so your 40 KHz is oversampling a lot) it might be interesting to add a digital filter
09:10 AM pcw---home: without a filter, a 10 ns noise spike at the right time could cause a miscount...
09:13 AM JT-Cave: thanks
12:37 PM skunkworks: pcw---home: I was thinking of adding a dbounce.. Just for testing..
12:39 PM skunkworks: pcw---home: for me it is not trivial to catch something like that :)
12:42 PM skunkworks: I would probably have to setup an actual index channel - so I can run a separate encoder that I can then compare the counts to the physical encoder pulse.
12:44 PM pcw---home: Yeah I would try the debounce
12:44 PM skunkworks: the sensor is totempole.. Unless the sensor is seeing something..
12:45 PM pcw---home: A scope on the parallel port inputs might also help
12:45 PM skunkworks: sure.
12:47 PM pcw---home: A possible problem is that a noise pulse on A near a B transition (or vice versa) can add/subtract counts
12:47 PM skunkworks: well - this is a single channel counter.. (using missing tooth) so even worse :)
12:48 PM pcw---home: Ahh in that case it is worse. Do you get extra counts?
12:49 PM skunkworks: Hmm - well.. the actual position starts moving left on hal scope.. So - I think it would be missing wouldn't it? which doesn't make sense - does it.
12:50 PM pcw---home: no, not on a simple counter
12:51 PM skunkworks: https://github.com/LinuxCNC/linuxcnc/issues/2635
12:51 PM pcw---home: I can imagine a scenario where you could lose counts, but its very unlikely
12:51 PM skunkworks: if you look at the last 3 photos.. You can see the position do is moving to the left
12:52 PM skunkworks: dot
12:52 PM skunkworks: (interager rotations)
12:52 PM skunkworks: yes - it doesn't make sense to me.
12:53 PM pcw---home: Ahh maybe specific to the missing tooth encoder
12:53 PM skunkworks: that is why I was wondering about the accuracy math in the encoder..
12:53 PM skunkworks: well - I get the same thing if I setup a 99 tooth encoder counter - with no missing tooth
12:54 PM skunkworks: but - it could be a bigger problem with the missing tooth code.. I would have to try 2.8 - again though - I would have to hook up a physical index.
12:54 PM pcw---home: I think I had to compromise on my firmware missing tooth encoder to only calculate velocity every other tooth
12:54 PM skunkworks: more 3d printing of sensor holders.. lol
12:56 PM pcw---home: If it's on the normal software encoder that's a bit surprising as I would have expected more people to have issues
12:56 PM skunkworks: well - maybe not.. I didn't see it in a normal threading situation...
12:58 PM skunkworks: It was when I started a G33 - then strung a bunch together.. (I do similar in my non-circular boring - only detect the index once) - but that is done with mesa hardware and I have had no issues (and real encoders)
12:58 PM skunkworks: So - it assumes the position calculates correctly after that..
12:59 PM skunkworks: (And the non-circular turning/boring can have many many thousands of rotations..
12:59 PM pcw---home: I wonder if the missing tooth index detection logic screws up because of the velocity calculation issue
01:00 PM skunkworks: Well - I can test it - just have to do a little extra work..
01:00 PM pcw---home: that's going to hurt interpolated position also
01:01 PM pcw---home: (it's why I punted on the firmware which forces 1 tooth missing only and only even number of teeth)
01:02 PM pcw---home: (even before the tooth is removed)
06:20 PM skunkworks: pcw---home: Ummmmm
06:21 PM skunkworks: https://electronicsam.com/images/emco/PXL_20230918_230840479.jpg
06:21 PM skunkworks: pretty consistant spikes like that..
06:54 PM skunkworks: I don't know if it is refelctions on the disk..
07:01 PM skunkworks: I set a debounce to 5 counts - it has run 650 rotations so far with no missed counts
07:03 PM skunkworks: *no position drift..'