maartenvervelde Posted December 17, 2015 Share Posted December 17, 2015 Hi, I'm running my own servo loop with setpoint generator, and because I choose the destination position from the P variable TarPos and not from Motor[1].DesPos, the following error does not work normaly. Now I change Motor[1].MasterPos to the output of my setpoint generator before the PID controller to keep the following error correct. This works when I keep changing the value of Motor[1].DesPos to the value of Motor[1].ActPos. Now I have a correctly working following error, but I have a problem. Sometimes when I run my program and the motor is on the correct position (ActPos == DesPos && ActPos == TarPos), I still get a following error. The Power Pmac User Manual says: Motor[x].PosError = Following error (DesPos – ActPos) But changing MasterPos changes the result in the following error. So I would like to know what the calculation is for the following error, so I can check the other values in my program which change the final value. Link to comment Share on other sites More sharing options...
Omron Forums Support Posted December 17, 2015 Share Posted December 17, 2015 Hi, My instinct is that this is not the correct approach. I strongly recommend allowing PMAC to handle the following error calculation natively. Putting set points into the servo algorithm is virtually never done unless you have a complex MIMO design -- set points are generally inputs to the servo algorithm only. One way users have generated their own setpoints "dynamically" with success is simply issuing a discrete series of Jog commands with small time-spacing. PMAC will then linearly interpolate with finer points in between your setpoints. Link to comment Share on other sites More sharing options...
curtwilson Posted December 17, 2015 Share Posted December 17, 2015 The net desired position in Motor[x].DesPos is the sum of: * Trajectory command position in Motor[x].Desired.Pos * Following position in Motor[x].ActiveMasterPos (possibly slew-rate limited from Motor[x].MasterPos) * Compensation command position in Motor[x].CompDesPos The net actual position in Motor[x].ActPos is the sum of: * Raw measured position in Motor[x].Pos * Compensation position in Motor[x].CompPos * Backlash position in Motor[x].BlCompSize (depending on direction) The following error in Motor[x].PosError is the difference between NET desired and actual positions. Link to comment Share on other sites More sharing options...
Recommended Posts