HJTrost Posted May 22 Share Posted May 22 I now have got my Power PMAC 465 Clipper to move my stages smoothly, with one odd feature: I have rotary encoders on the motors of my leadscrew stages with 2000 lines per rev, corresponding to 6 mm/rev of the screw. However, the counts reported by the Power PMAC are off by a factor 3.125 - 100,000 quadrature counts are reported at 24 mm instead of 75 mm. Motor[x].PosSf and its relatives are all set to 1.0. From using other controllers (PMAC2A/PC104, Turbo Clipper) on the same system I positively know that 75 mm is the correct answer. Are there any candidates among the many parameters that could be "used" to create such a discrepancy? Cheers, Jochen Quote Link to comment Share on other sites More sharing options...
steve.milici Posted May 22 Share Posted May 22 The “raw” feedback is scaled by “EncTable[x].ScaleFactor”. When used in a motor by way of “Motor[x].pEnc” it is then scaled by “Motor[x].PosSf”. The “axis” units can then be scaled by the axis definition statement, which uses motor position as the source, “#x->{axis scale factor}{axis name}“. Quote Link to comment Share on other sites More sharing options...
HJTrost Posted May 24 Author Share Posted May 24 Thanks for clarifying the relationships. By setting EncTable[x].ScaleFactor=1/813.0 I am now getting my 75 mm for 100,000 encoder counts. For now, I can live with handling the encoder scale this way. Still, I don't understand why the raw quadrature encoder counts, which are unambiguously defined in hardware, are not being made available without any hidden scaling. After all, that factor 1/813 has its own uncertainty, which comes on top of the one in the hardware (the accuracy of the linearity is somewhere in the 100-150 micron range in my present test system), and which I will have to measure eventually. Quote Link to comment Share on other sites More sharing options...
steve.milici Posted May 24 Share Posted May 24 I’m not sure what you mean. There is no “hidden” scaling. Raw feedback data is typically “fixed-point” (integer) data, as in a quadrature encoder. The servo algorithms require floating-point data. The ECT converts the data from fixed-point to floating-point data using the “EncTable[n].ScaleFactor” structure element. It is “1” by default, making the ECT output the resolution of the raw feedback device. If you wish to see the motor position in “user” units, you would typically use “Motor[x].PosSf” to effect this. Usually, Motor[x].PosSf will be left at the default value of 1.0, so the motor units are in “counts” or “LSBs” of the feedback device, or it will be set so that the motor units become the engineering units of millimeters, inches, degrees, or revolutions. In the first case, the units of the matching axis are made to be engineering units by a non-unity scale factor (e.g. #1->1000X); in the second case, there can be a unity scale factor in the axis definition (e.g. #1->X). Quote Link to comment Share on other sites More sharing options...
steve.milici Posted May 24 Share Posted May 24 However, note that this scale factor is effectively a gain term in the feedback algorithm, so changing this scale factor requires counteracting servo gain changes, particularly in the “Motor[x].Servo.Kp” proportional gain term. Quote Link to comment Share on other sites More sharing options...
HJTrost Posted May 24 Author Share Posted May 24 My problem is that after loading a bunch of settings (Clipper[0]...., Motor[x]...., Coord[1]...., EncTable[n]....) through a .pmh file of mine in the Global Includes directory into my Power PMAC Clipper, and then entering a command #1j=100000 in the Terminal window of the Power PMAC IDE gives me a move that is not commensurate with my hardware parameters, i.e., the 100000 counts do not make for a 75 mm move. My hardware has a lead screw of 6 mm/rev, and the rotary motor has a rotary encoder on it with 2000 lines or 8000 quadrature counts per rev. My coordinate system definition is &1 #1->x #2->y #3->z and I want to move in units of encoder counts or LSBs. But only if I set EncTable[n].ScaleFactor=1/813 do I get about 75 mm for my 100000 "counts" move. My encoder conversion tables look like this: EncTable[1].Type=1 EncTable[1].pEnc=Clipper[0].Chan[0].TimerA.a EncTable[1].index1=0 EncTable[1].index2=0 EncTable[1].ScaleFactor=1/813 // EncTable[1].ScaleFactor=1/256 following the description on pages 71ff in the Power PMAC Clipper manual of August 21, 2021. I just noticed that on p.31, ServoCapt.a is offered for setting up quadrature encoders rather than TimerA.a - I'll try that one this afternoon. It is not obvious to me which one of those is "right" for what reason. Quote Link to comment Share on other sites More sharing options...
HJTrost Posted May 24 Author Share Posted May 24 (edited) 3 hours ago, HJTrost said: I just noticed that on p.31, ServoCapt.a is offered for setting up quadrature encoders rather than TimerA.a - I'll try that one this afternoon. It is not obvious to me which one of those is "right" for what reason. That did it. ServoCapt.a and ScaleFactor=1/256 are what I need. Now the motors behave quite like I am used to seeing. Edited May 24 by HJTrost Typo. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.