Jump to content
OMRON Forums

RESOLVED - How do I Scale Motor Units to Engineering Units


Recommended Posts

Hi, we are using an encoder with a 50nm count resolution. That makes the configuration of the motor-setup a little tricky. To make it easier for people, not that heavily involved in the Pmac, I would like to scale the encoder units into 1mm. I thought I could solve this by setting:

EncTable[1].ScaleFactor = 1 / 20000 ;

since there are 20000cts per mm. Furthermore I would multiply

Motor[1].PhasePosSf by that factor to keep the commutation cycle correct. For my Motor it then becomes:

Motor[1].PhasePosSf = 20000*( 2048 / ( 330000 * 256 ) ) ;

However when I apply these changes, I am not able to tune the Position Loop gains. I am not sure if I am on the right path here either. In the teaching materials, there is a figure depicting the Motor Scale Factors. In that figure the EncTable[1].ScaleFactor is multiplied by Motor[1].PhasePosSf. That would effectively eliminate the Scale Factor I applied before. But If I do not adjust the Parameter for Motor[1].PhasePosSf, it would give the wrong counts for the commutation cycle. Is there a comprehensive explanation or example available on this topic. Is this even feasible?


Best regards,


Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic


I mistook Motor[1].PhasePosSf for Motor[1].PhasePosSf. However if I change Motor[1].PosSf to 1/20000 and try to tune the gain terms I do not get any movement at all. 1/20000 should make the gain terms quite big and approaching the old gain terms multiplied by 20000 should show some action. But I do not see anything.

Link to comment
Share on other sites

I think you rescaled twice when you only needed to do so once.


Most people leave the output of the encoder table in counts. I would return the EncTable[n].ScaleFactor to its default value. For digital quadrature, this value is 1/256, which makes the result of the table entry in units of quadrature counts, with 8 bits of estimated sub-count fraction.


(If you just converted this value from 1/256 to 1/20000, you did NOT rescale from counts to mm, because you did not change the scaling by a factor of 20,000.)


I would start with a Motor[x].PosSf and Pos2Sf = 1.0 so that the motor units are also in counts. With the motor disabled, move it by hand and see if you get the expected numerical change with distance.


Then change these scale factors to 1/20000 and repeat the hand movement to see if the reported units look like mm.


Now you can try to tune the system.

Link to comment
Share on other sites

This topic is now closed to further replies.

  • Create New...