Qing Xie Posted June 12 Share Posted June 12 (edited) Hello everyone: My motor desired position (Motor[0].DesPos) may jump randomly and sharply when motor servo on by orders like "jog/", "jog0:0". I use a load cell voltage(-10V ~ +10V) as my motor position value, the corresponding code is shown as bellow. ---------------------------------------- // use encode convert table to right move adc raw data EncTable[3].Type = 1 EncTable[3].pEnc = Gate3[2].Chan[0].AdcAmp[0].a // feedback source. AdcAmp: adc EncTable[3].index1 = 0 EncTable[3].index2 = 16 // input raw data(type 1: WORD) right move bits EncTable[3].ScaleFactor = 1 // use encode convert table to track filte data EncTable[8].Type = 1 EncTable[8].pEnc = ect_ss_actor.PrevEnc.a // feedback source. AdcAmp: adc EncTable[8].index1 = 1 EncTable[8].index2 = 245 // input raw data(type 1: WORD) right move bits EncTable[8].ScaleFactor = 1 Motor[0].pEnc = ect_ss_actor_flt.a Motor[0].pEnc2 = ect_ss_actor_flt.a ---------------------------------------- The value of desired position (Motor[0].DesPos) is equal to the actual position value when the servo loop is disabled. But once I close the servo loop by using "jog/", "jog0:0", etc. the value of Motor[0].DesPos will change to a random value immediately, and then change to actual position gradually. The sharply position jump may cause great possition error and ServoOut. How can I avoid this position jump? Edited June 12 by Qing Xie wrong word spiling Quote Link to comment Share on other sites More sharing options...
leandro.martins Posted June 12 Share Posted June 12 Maybe that might happen because at the moment you command "jog/", your motor has a non-zero velocity, then when you issue the command, the controller will decelerate it before going to the initial position. You can try to set Motor[x].JogTa and Motor[x].JogTs to 0, to see if that effect is reduced. Quote Link to comment Share on other sites More sharing options...
Qing Xie Posted June 12 Author Share Posted June 12 38 minutes ago, leandro.martins said: Maybe that might happen because at the moment you command "jog/", your motor has a non-zero velocity, then when you issue the command, the controller will decelerate it before going to the initial position. You can try to set Motor[x].JogTa and Motor[x].JogTs to 0, to see if that effect is reduced. I use an analog sensor (load cell) as the position feedback, so the motor's actual velocity can not be exact zero, even PMAC send no pulse to motor. And here is another question, how does pmac determine Motor[0].DesPos, why does not the value keep equal to actual position. Quote Link to comment Share on other sites More sharing options...
leandro.martins Posted June 12 Share Posted June 12 The DesPos is calculated at each servo interruption. You can check the coefficients of cubic equation used for the calculation in the "Motor[x].New[i]." structure. How did you design your tracking filter (cutoff frequency, damping and sample rate)? Quote Link to comment Share on other sites More sharing options...
Qing Xie Posted June 13 Author Share Posted June 13 On 6/12/2023 at 10:38 PM, leandro.martins said: The DesPos is calculated at each servo interruption. You can check the coefficients of cubic equation used for the calculation in the "Motor[x].New[i]." structure. How did you design your tracking filter (cutoff frequency, damping and sample rate)? Thank you Martins, I will try to track the Motor[x].New[i] structure. I designed the filter, followed the steps in manual, cutoff freq. = 100, damping = 0.7 sample rate = 20k Quote Link to comment Share on other sites More sharing options...
Gregs Posted June 14 Share Posted June 14 How well is the motor tuned? Can you show a screenshot of a tuning plot(s)? 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.