Man, does anyone want to condense that gnu thing down to 10 words or less? Holy cow. I "read" it, but I don't know what I read. haha.
OK! I've been debugging the software. Everything is all set up. The encoder is now working. At first the index pulse wasn't resetting the counter, but now it is working! ya! It was just one bit I forgot to set in initializing the Quadrature Encoder Interface module. The annoying thing is you need the rotor flux angle, which has nothing to do with the location of the index. So, now I need to run the motor with Id chasing throttle, and Iq chasing 0, until there's no movement with the motor. Then, I need to mark the angle that the motor post is at, and that's the official rotor flux angle for all eternity, well until I get a new motor or encoder! Then, you make Iq chase throttle, and Id chase 0, and the stupid thing should spin!
I also did some time tests. All in C, my field oriented control code takes 25uS, and I have 125uS available if I run the motor PWMs at 8kHz. Or, if I switch to 16kHz, I'll still have around 62.5uS, which is more than enough! HUrray! I don't have to learn PIC assembly at this time. hahaha
|