2012/1/27 Peter C. Wallace <p...@mesanet.com>: > On Fri, 27 Jan 2012, Viesturs L?cis wrote: > >> Date: Fri, 27 Jan 2012 11:45:30 +0200 >> From: "[UTF-8] Viesturs L?cis" <viesturs.la...@gmail.com> >> Reply-To: "Enhanced Machine Controller (EMC)" >> <emc-users@lists.sourceforge.net> >> To: "Enhanced Machine Controller (EMC)" <emc-users@lists.sourceforge.net> >> Subject: [Emc-users] Servo tuning - wtf? >> >> Hello, folks! >> >> I would appreciate some advice on servo tuning. >> I have Keling Nema23 BLDC servo motors attached to Mesa 7i39. >> And also zero experience with this :) >> >> The way I am doing the tuning is: >> 1) start Emc, hit F1 and F2; >> 2) open Machine -> Calibration; >> 3) change P value, for example, from 1 to 3, press "Test" and then try >> jogging the joint; >> 4) my target max velocity is 10m/min, which would require 4000 rpm on >> motor, so I start jogging at 1100 mm/min - seems fine, increase speed >> to ~3000 mm/min and motor starts oscillating; >> >> When motor starts oscillating, I hit F2 to disable any movement and motor >> stops; >> So here I would like to change some PID values and then try again. >> The problem I have encountered is: >> Motor starts oscillating again as soon as I hit F2 regardless of what >> are the PID settings. If I restart Emc and start over, it is fine with >> the same PID settings until the moment it gets a chance to start >> oscillating again - then I cannot stop it from doing that. Setting PID >> values back to default also does not help - it will oscillate anyway. >> >> Why on earth would it oscillate as soon as motion is enabled? Is there >> a way to aviod it? >> >> Default PID values are: >> >> DEADBAND = 0.000 >> P = 1 >> I = 0 >> D = 0 >> FF0 = 1 >> FF1 = 1 >> FF2 = 0 >> BIAS = 0 > > > Start with no FF0 and FF1 > > This is wrong, you add D to make it more stable not I > > I is added in small does only when all other tuning is close to remove the > last bit of static error and slew errors >
Ok, thank You, I will try that out in a minute. > > FF1 will only be close to 1 with the PID/PWM scale set correctly for the > situation > In INI fie I have: INPUT_SCALE = 3276.8 OUTPUT_SCALE = 166.667 OUTPUT_OFFSET = 0.0 MAX_OUTPUT = 166.667 Input scale is encoder pulses per machine unit - pulses per 1 mm in my case. But even Integrator's manual does not help me understand, what to do with the scale value and maxoutput value. > > BTW what is you sample period? depending on motor poles and RPM required you > may need to decrease the sample period from the default 1 ma to maybe 250 uSec > (4 KHz) Servo period is default 1ms. Motors have 4 poles, target is 4000 RPM, motors have 2048 CPR (8192 PPR) encoders. Viesturs ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users