Both , after the full install it lost our config so setup its own AP. Same result with that.
Does the zaxis work normally?
Watching the video again it clearly shows that itās working backwards. Like as if the encoder somehow is confused about which way is out. But then the logs look normal
Yup. Itās going up and down without issue
Actually Iām not so sure about this. Looking at the code it seems like it should work exactly the way that it is working for you:
float distMoved = positionNow - lastPosition;
//If the belt is moving out, let's keep it moving out
if (distMoved > .1) {
My machine is at the shop so I wonāt be able to test until tomorrow but it sure does seem like somehow everything is backwards
When this happened a few weeks ago usually a reboot or firmware upgrade would resolve it. Iāve put 10+ hours of cutting on the machine and itās been millimeter perfect. Soooo weird
Super weird for sure! Weāll get to the bottom of it.
I feel like Iāve got some good leads to jump into tomorrow morning
OK, so comparing your log to my log it is 100% that somehow it thinks its going backwards:
Position: -55.774
vs
Position: 375.602
Now we just need to figure out how that is possible
Hereās a version which tells us more about all the relevant parts of that calculation:
firmware.bin (1.6 MB)
It also includes one possible fixā¦we were using a float where we should have been using an int32_t. They are the same size in memory (I think) so they shouldnāt be causing the issue that we are seeingā¦but also compiler magic happens and who knows.
For comparison on my machine this starts out looking like this:
[MSG:INFO: Position: 0.011 mostRecentCumulativeEncoderReading: -1 _mmPerRevolution: 43.975]
Looks like this while Iām pulling on the belt:
[MSG:INFO: Position: 18.176 Distance moved: 1.729 on axis Top Left]
[MSG:INFO: Position: 18.176 mostRecentCumulativeEncoderReading: -1693 _mmPerRevolution: 43.975]
[MSG:INFO: Position: 19.239 Distance moved: 1.063 on axis Top Left]
[MSG:INFO: Position: 19.239 mostRecentCumulativeEncoderReading: -1792 _mmPerRevolution: 43.975]
And ended up looking something like this:
[MSG:INFO: Position: 347.205 mostRecentCumulativeEncoderReading: -32340 _mmPerRevolution: 43.975]
tl2.rtf (40.6 KB)
see attached
OK so the encoder is 100% reading backwardsā¦hmmm
Digging into the encoder code it looks like it is possible to set the encoder to read backwardsā¦weāre not doing that but maybe itās getting set somehow anyway? Hereās a version which will print out if that is happening:
firmware.bin (1.6 MB)
Edit:
[MSG:INFO: Encoder direction: 0]
Is what we expect to see
tl3.rtf (64.7 KB)
thats what we seeā¦
It seems like there is some sort of bug in the encoder code because I tried to set the encoder direction backwards to see if I could replicate what you are seeing and it works exactly the same for me either wayā¦which it shouldnātā¦investigating
Will you DM me your address? I want to send you a couple spare encoders in case it turns out to be an issue with the encoder board and I want to get those in the mail
Until I can find the true cause of the issue hereās a quick fix which will reverse the direction of the encoders hopefully helping to fix the issue:
firmware.bin (1.6 MB)
All 4 arms extending the correct way! Is it safe to cut do you think?
Weāre in uncharted territory. Iād jog it around for a bit and see if it behaves as expected first
So far so goodā¦ jogged around a sheet of 2400x1200 without issue.
Serial Messages
[MSG:INFO: Channel auto report interval set to 50 ms]
[GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F0 S0]
[GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F0 S0]
[MSG:INFO: Caution: Unlocked]
[MSG:INFO: Retracting all belts]
[MSG:INFO: Bottom Left pulled tight with offset 0.011]
[MSG:INFO: Top Left pulled tight with offset 0.000]
[MSG:INFO: Bottom Right pulled tight with offset 0.000]
[MSG:INFO: Top Right pulled tight with offset 0.000]
[MSG:INFO: Extending all belts]
[MSG:INFO: Retracting all belts]
[MSG:INFO: Top Left pulled tight with offset 0.000]
[MSG:INFO: Bottom Left pulled tight with offset 0.011]
[MSG:INFO: Top Right pulled tight with offset -0.011]
[MSG:INFO: Bottom Right pulled tight with offset -15.310]
[MSG:INFO: Extending all belts]
[MSG:INFO: All belts extended to center position]
[MSG:INFO: Measured waypoint 0]
[MSG:INFO: Center point deviation: TL: 0.054 TR: 0.020 BL: -2.991 BR: -3.071]
[MSG:INFO: Center point deviation: TL: 0.054 TR: 0.020 BL: -2.991 BR: -3.071]
[MSG:INFO: Center point deviation within 15.000mm, your coordinate system is accurate]
Keep me posted. Iāll keep investigating.