Hi!
I am currently working with an application where I want rotate my motor exactly 2,6 revolutions very quickly using Spintac position move with a trapezoidal trajectory. My problem is that the motor settles in a position a bit short off my target position, but when checking the position error in Spintac by using STPOSCTL_getPositionError_mrev it says that I am dead on target. So somewhere on the way the softwares perception of the motors position must have drifted.
It may be worth noting that I am using a 12-bit absolute encoder to sense my motors position, which is implemented in the software by modifying the ENC package.
It seems that if i do the same movement but at with less max speed the final position error becomes smaller. I am thinking maybe it has to do something with the position converter running to seldom. If my calculations are correct I am currently running the system with the following speed
PWM freq = 40kHz
ISR freq = 20kHz
Ctrl freq = 10kHz
Speed loop freq = 2kHz
The motors max speed is set to 10krpm in the software which results in a max electric frequency of 333Hz since the motor has 2 pole pairs. I read somewhere on the forum the the position converter required at least 3 samples per electrical revolution to perform correct, so this should work, shouldn't it?
Any ideas what the problem may be, I am grateful for any help!
Best regards,
Gustav