Quote:
Originally Posted by laapmetot
First thing i did:
try motor type 4 which is generic pm motor.
I have a US digital encoder mounted on the ME1616: 2000 cpr, index pulse and open ended per Paul's instructions. I set the encoder-ticks to 2000 and set the pole pairs to 5 per motor datasheet.
Unfortunately the motor doesnt turn, its just sits there vibrating a bit and making "inverter noise". what I tried:
- stream-poscnt: counts up to 8000 and drops to zero and raises up again etc. So that seems good (2000cpr x 4 for quadrature sounds logical) When turning the motor the other side it runs down to zero, then jumps up to 65000 or something and goes down. Weird, not what I expected: I would expect the index pulse to result in reset to 8000.
- Tried 500cpr just to see if that helps: but no.
- swap a-b to check if encoder runs opposite direction then motor. No difference.
- tried step by step the whole angle-offset range, also for swapped ab. There is a range in which the motor " wiggles" a bit more but no clear correct value
- when switching on the controller without encoder connected, it turns slowly and rough: must be the startup sequence which runs until first index pulse.
|
Agreed that for 2000 cpr, and a 2 channel encoder, you get 2000 A channel positive changes, 2000 A channel negative changes, 2000 B channel positive changes, 2000 B channel negative changes .. per rotation. So a count to 8000 makes sense, which then resets to 0 and starts counting up again.
Going the other way goes to a negative number. Since Paul prints them out as unsigned integers (if I remember) they will show 65535 instead of -1, 65534 instead of -2, etc. It's just how the bits in 2's complement binary notation show up. This is normal.
I don't know about the angle offset. That's not used for AC motors (which is what I have experience with).
I will dig up the values that I used for my son's Siemens AC motor. That was a couple of laptops ago, so it will take a bit of looking. Although all of that was was likely posted on this site somewhere ... it's likely faster for me to search my archives than to search through my postings on the various threads
The constants used by Paul's equations to determine how fast to rotate the magnetic field, and how much current is required to move the motor smoothly don't make a lot of sense to me. I don't pretend to understand them.
But I have some numbers that worked for a larger motor (no permanent magnets, though). Maybe you can then guess at some numbers that you can try and that may make your motor operate more smoothly.
Paul had some testing code to try a bunch of different constants and pick the 'best' one. That did not work so well. I think it got removed somewhere along the line.