I have been struggling a bit with my Y-axis servos. The setup is a 1-cycle per turn resolver on a 6-pole AC brushless servo motor. Commutation is in software, using the bldc component. The drives are Mesa 8i20, which take digital rotor angle and current values. Initially the axis was moving smoothly in one direction, but not the other. http://youtu.be/_CsaPcHpmos At Cradek's suggestion I wired up HAL to send a constant low current command to the drives when either of two front panel buttons were pressed to take PID issues out of the system. This showed that the axis moved very slowly in one direction, and fast in the other. It turned out that the jerkiness in the +Y direction was bad PID tuning in the "good" direction, and the "bad" direction was simply too sluggish to show any issues.
The hm2 resolver module supplies virtual encoder counts, 16777216 counts per rev. These connect to the bldc "rawcounts" pin with the bldc set to "a" mode (Absolute encoder). The assumption in the original HAL config was that motor "zero" matched resolver "zero". This seened not to be the case. Depending on Resolver phasing and phase-naming there are 4 possible "zeros" per cycle. The 3-phase, 6-pole motor has 3 ways to be wired, for 9 possible motor "zeros" per revolution. However, these are redundant, so there are only really 3 possibilities to consider. The bldc component has an "encoder-offset" parameter to compensate for such issues. By a process of trial and error I found that an encoder-offset of 2400000 made the axis run equally well in both directions. After some re-tuning with this setting, the axis runs like: http://youtu.be/haO5ZJq-Y3c However, it runs the wrong direction, and I have so far not managed to find a combination of bldc scale, axis scale and offset that reverses the motion without runaway. (And, in fact, I might have welded a relay in my DC PSU during the experiment) Some calculation indicates that if the resolver zero is aligned to _one_ of the motor zeros then I need to try multiples of 16777216 / 12 = 1398101. This vaguely matches the 2400000 I currently have, if that ought to be 2800000. Tonight I will experiment with these numbers to see if I can find an encoder-offset that gives me equal torque in both directions in the fixed-current mode, but which runs in the opposite direction. This is all surprisingly baffling, and I am meant to understand this stuff better than most. :-) -- atp If you can't fix it, you don't own it. http://www.ifixit.com/Manifesto ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users