jbeasley Posted August 18, 2020 Share Posted August 18, 2020 Setup EncTable[14].Type = 1 // Single-register read EncTable[14].pEnc = Gate1[7].Chan[1].TimeBetweenCts.a EncTable[14].index1 = 8 // Shift left 8 bits to restore position EncTable[14].index2 = 8 // Shift right to eliminate lower 8 bits EncTable[14].ScaleFactor = 1/256 // For units of timer LSB Motor[14].pEnc = EncTable[14].a // Use table result for position-loop feedback Motor[14].pEnc2 = EncTable[14].a // Use table result for velocity-loop feedback It does not appear my Velocity Loop is reading correctly? I can close the position loop but at high speed i get flat spots that cause a huge amount of jerk. An open Loop Velocity Plot looks like the attached file? what am i missing? The Move looks normal on the position plot. Link to comment Share on other sites More sharing options...
jbeasley Posted August 18, 2020 Author Share Posted August 18, 2020 I also Checked my Sys.ServoPeriod and changing it had no effect. Original: Sys.ServoPeriod=0.442742110000000022 Looked at Variables Acc24E2A[4].PwmPeriod=6527 Acc24E2A[4].PhaseClockDiv=0 Acc24E2A[4].ServoClockDiv=3 Calculated per manual : Sys.ServoPeriod=0.442742242 Default per manual: Sys.ServoPeriod=0.442718 Link to comment Share on other sites More sharing options...
jbeasley Posted August 19, 2020 Author Share Posted August 19, 2020 After looking through the manual i think i might have the pfm set wrong I tried changing it to the example of 2982 and I was able to get a velocity reading but it is nowhere near accurate and is jumping all over the place. It also now won't allow me to see the full stroke of the rod which i'm assuming has something to do with the deadtime I tried increasing that and the servo update time for the motor but that yielded unstable results. My original settings are as follow. Gate1[7].Chan[1].OutputMode = 3 Gate1[7].Chan[1].OutputPol = 0 Gate1[7].Chan[1].Pfm =15 Gate1[7].Chan[1].EncCtrl = 12 I will keep plugging through but any pointers would be helpful. This configuration works flawlessly on Turbo Pmac so i know it must be something in my configuration. Update: It is definitely the PFM setting. I need to set it much higher but too high and i don't catch the pulse response. I have it working on a the Power Pmac in the Shop I am heading out to test it on the installation now. I'm wondering how recirculations play into the PFM calculation in the manual because according to the manual 2982 should work on a 60in rod. I have a a 32 inch with 4x recircs in the shop and i have to set it to 1200 for it to work properly. Still looking for any insight into what a valid configuration would be, but i think i am on the right track. John. Link to comment Share on other sites More sharing options...
jbeasley Posted August 20, 2020 Author Share Posted August 20, 2020 After Updating my settings the resulting tune works better. If I am to understand it right I am basically doing a digital read of the timer difference but i am curious why there is such a fluctuation in the velocity readings. Why wouldn't it just hold the previous velocity and do the math on the new position read to calculate the difference why does it fall and rise so drastically. //Pulse Output Frequency: Gate1.Chan[j].Pfm Gate1[7].Chan[0].Pfm =2000 Gate1[7].Chan[1].Pfm =1900 Gate1[7].Chan[2].Pfm =1900 Gate1[7].Chan[3].Pfm =2000 Link to comment Share on other sites More sharing options...
Omron Forums Support Posted August 20, 2020 Share Posted August 20, 2020 Gate1.Chan[j].Pfm values of 1900 and 2000 should correspond to Pulse Output frequencies of about 1.11 and 1.17 kHz. That should be higher than the servo frequency, so you may want to slow down your servo by changing Acc24E2A[4].PwmPeriod, Acc24E2A[4].PhaseClockDiv, Acc24E2A[4].ServoClockDiv, and Sys.ServoPeriod. The easiest way would probably be setting Acc24E2A[4].ServoClockDiv to 9 or higher and then recalculating Sys.ServoPeriod to match. Alternatively, since your MLDT is only about 32 inches, you can probably use a pulse output frequency high enough you don't need to change your servo frequency. The Users manual says you need 0.35 micro seconds per mm. This would only be 284.48 microseconds, allowing a maximum frequency of 3.5 kHz. Link to comment Share on other sites More sharing options...
jbeasley Posted August 21, 2020 Author Share Posted August 21, 2020 Eric, I have been playing around with different servo rates and also pfm values. I have some different charts based on my settings with open loop signs. it still looks like there is a lot of noise, not really giving me that warm fuzzy feeling but it seems to function properly for my application. Also i am using a 4x re-circulation so i think that affects the pfm as the fastest i can go on the default gate settings with the a 34 (30in)stroke rod in the shop is around 1250. My longest rods in the application are around 64 (60in) stroke. Can you look at the attached open loop sign plots and tell me which one looks like the best result in your professional opinion. I have not noticed much difference in the position loop tunes but am afraid I might run into issues later when I start to do position following or trying to match velocity on 2&4 rod moves. The top is default of 3 and the bottom is 9 with a recalculated Sys.ServoPeriod both are at the same pfm. Thanks for your help. John. Link to comment Share on other sites More sharing options...
jbeasley Posted August 21, 2020 Author Share Posted August 21, 2020 I just figured out that the default Open Loop tune plot is ploting on phase time not servo time. I have made my own plc routine and plot to map on servo time and things are looking a whole lot better. I will update with my final settings in case anyone else is doing a similar hydraulic project. Thanks again for your response. John. Link to comment Share on other sites More sharing options...
Recommended Posts