-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Needle selection is wrong on KH270, Beta builds. #204
Comments
6 seems to point to HALF_SOLENOIDS_NUM The only place where it plays a role is here m_pixelToSet = m_position - startOffset;
if (!beltShift) {
m_solenoidToSet = m_pixelToSet % SOLENOIDS_NUM[static_cast<uint8_t>(m_machineType)];
} else {
m_solenoidToSet = (m_pixelToSet + HALF_SOLENOIDS_NUM[static_cast<uint8_t>(m_machineType)]) % SOLENOIDS_NUM[static_cast<uint8_t>(m_machineType)];
} https://github.com/AllYarnsAreBeautiful/ayab-firmware/blob/main/src/ayab/knitter.cpp#L419 Direction doesn't play a role here a priori; starfOffset is 28/16 for left/right respectively but after modulo 12 operation, end results will be the same, i.e. starfOffset could be set to any multiple of 12. ... but beltshift is supposed to be "not connected" and therefore shouldn't be in such 'if" statement (even if a floating signal shouldn't lead to values dependent of the direction which seems to be the case here) I can't find a reason to explain why the pattern is displaced by 2 needles to the right ... the solenoid to set is always the pixel to set modulo 12 -> either at the correct place or shifted by a multiple of 12. Could you check/confirm that the solenoid connector is well in place, not shifted ? |
My 270 patterns correctly using its native electronics - I checked that patterns are positioned where they should be, relative to the center of the machine. And yes, my number strip is positioned correctly. |
Could you check in your tests if:
When I do otherwise with my simulator, I see shifted patterns or marginal needle selection (solenoid is set when the needle selection takes place). I see in the current code that the carriage position is reset to 135 everytime a magnet crosses the right sensor in whatever direction (END_RIGHT_MINUS_OFFSET) at encoders.cpp#L285 On the left side, position is reset to 5 + 12 = 17 (END_LEFT_PLUS_OFFSET + MAGNET_DISTANCE_270 ) the first time a magnet is seen at encoders.cpp#L199 (detected_carriage is always "Knit" for KH270 and therefore "if" statement is always taken/could just be removed). 135 -17 = 118 = 112 + 6 => shifted by 6 when right magnet of the carriage is crossing the right sensor. 17 seems correct when carriage is engaged from the left and the first magnet crossing the left sensor is the one at the right of the carriage. If the other magnets crosses first (carriage coming from the center before init, not enough to the left at start, ...) , then position is also set to 17 but the carriage is effectively 6 needles (distance between magnets in needles) further => shifted by 6 as well. |
I'm going to test this on my 270 |
Yup, I can repro, probably an issue with the offsets, working on a fix. |
Simulation results;
Released version (NOK)
Proposed #207 fix (OK)
|
Solved by #207 |
AYAB software version: 1.0.0-beta2
Computer/OS: Mac. Intel, Big Sur 11.7.10
Knitting machine: KH270
AYAB hardware: Tried both a shield and an interface
The whole pattern is displaced 2 needles to the right, and alternate rows are displaced by 6 needles.
Steps:
Expected: it should select needles looking exactly like the pattern on the purl side, reversed on the knit side.
Actual: The whole pattern is displaced 2 needles to the right, and alternate rows are displaced by 6 needles. It's not entirely consistent, sometimes a sequence of a few rows will be correct (aside from being displaced) but usually it's wrong on alternate rows.
I tried with and without crossing the turn marks every row. No difference.
It was mostly working previous to the Beta builds, I went back to a build from Aug 16th (including flashing the firmware) which I think was one of Jonathan's test builds and it was still good there.
The text was updated successfully, but these errors were encountered: