cml__ampstruct_8h-source.html
来自「美国COPLEY驱动器,程序开发工具之一.」· HTML 代码 · 共 536 行 · 第 1/5 页
HTML
536 行
<a name="l00208"></a>00208 <span class="comment"> ///</span><a name="l00209"></a>00209 <span class="comment"> /// Note that the acceleration & deceleration limits are not used</span><a name="l00210"></a>00210 <span class="comment"> /// when the position loop is driving the velocity loop. </span><a name="l00211"></a>00211 <span class="comment"> ///</span><a name="l00212"></a>00212 <span class="comment"> /// This parameter is specified in "user units". See </span><a name="l00213"></a>00213 <span class="comment"> /// Amp::SetCountsPerUnit for details.</span><a name="l00214"></a><a class="code" href="structVelLoopConfig.html#o6">00214</a> <span class="comment"></span> <a class="code" href="CML__Utils_8h.html#a11">uunit</a> <a class="code" href="structVelLoopConfig.html#o6">maxDec</a>;<a name="l00215"></a>00215 <span class="comment"></span><a name="l00216"></a>00216 <span class="comment"> /// Deceleration used for emergency stop</span><a name="l00217"></a>00217 <span class="comment"> /// When the position loop is driving the velocity loop this value </span><a name="l00218"></a>00218 <span class="comment"> /// is only used for tracking error conditions. If a tracking error</span><a name="l00219"></a>00219 <span class="comment"> /// occurs, the velocity loop takes over control and drives to zero</span><a name="l00220"></a>00220 <span class="comment"> /// velocity using this deceleration value.</span><a name="l00221"></a>00221 <span class="comment"> ///</span><a name="l00222"></a>00222 <span class="comment"> /// Setting this value to zero indicates that the deceleration is</span><a name="l00223"></a>00223 <span class="comment"> /// unlimited.</span><a name="l00224"></a>00224 <span class="comment"> ///</span><a name="l00225"></a>00225 <span class="comment"> /// This parameter is specified in "user units". See </span><a name="l00226"></a>00226 <span class="comment"> /// Amp::SetCountsPerUnit for details.</span><a name="l00227"></a><a class="code" href="structVelLoopConfig.html#o7">00227</a> <span class="comment"></span> <a class="code" href="CML__Utils_8h.html#a11">uunit</a> <a class="code" href="structVelLoopConfig.html#o7">estopDec</a>;<a name="l00228"></a>00228 <span class="comment"></span><a name="l00229"></a>00229 <span class="comment"> /// Default constructor.</span><a name="l00230"></a>00230 <span class="comment"> /// Simply initializes all members to zero.</span><a name="l00231"></a><a class="code" href="structVelLoopConfig.html#a0">00231</a> <span class="comment"></span> <a class="code" href="structVelLoopConfig.html#a0">VelLoopConfig</a>( <span class="keywordtype">void</span> )<a name="l00232"></a>00232 {<a name="l00233"></a>00233 <a class="code" href="structVelLoopConfig.html#o0">kp</a> = 0;<a name="l00234"></a>00234 <a class="code" href="structVelLoopConfig.html#o1">ki</a> = 0;<a name="l00235"></a>00235 <a class="code" href="structVelLoopConfig.html#o2">kaff</a> = 0;<a name="l00236"></a>00236 <a class="code" href="structVelLoopConfig.html#o3">shift</a> = 0;<a name="l00237"></a>00237 <a class="code" href="structVelLoopConfig.html#o4">maxVel</a> = 0;<a name="l00238"></a>00238 <a class="code" href="structVelLoopConfig.html#o5">maxAcc</a> = 0;<a name="l00239"></a>00239 <a class="code" href="structVelLoopConfig.html#o6">maxDec</a> = 0;<a name="l00240"></a>00240 <a class="code" href="structVelLoopConfig.html#o7">estopDec</a> = 0;<a name="l00241"></a>00241 }<a name="l00242"></a>00242 };<a name="l00243"></a>00243 <a name="l00244"></a>00244 <span class="comment">/***************************************************************************/</span><span class="comment"></span><a name="l00245"></a>00245 <span class="comment">/**</span><a name="l00246"></a>00246 <span class="comment"> This structure holds the current loop configuration parameters. </span><a name="l00247"></a>00247 <span class="comment"></span><a name="l00248"></a>00248 <span class="comment"> The current loop is one of three servo control loops used by the amplifier</span><a name="l00249"></a>00249 <span class="comment"> to control a motor. The configuration parameters used by this control loop</span><a name="l00250"></a>00250 <span class="comment"> allow the servo performance to be 'tuned' for various motors and loads.</span><a name="l00251"></a>00251 <span class="comment"></span><a name="l00252"></a>00252 <span class="comment"> This structure also holds the parameters used to control current limiting.</span><a name="l00253"></a>00253 <span class="comment"> The current limiting acts on the commanded current before it is sent to the</span><a name="l00254"></a>00254 <span class="comment"> current loop.</span><a name="l00255"></a>00255 <span class="comment"></span><a name="l00256"></a>00256 <span class="comment"> The amplifier member functions Amp::GetCrntLoopConfig and Amp::SetCrntLoopConfig</span><a name="l00257"></a>00257 <span class="comment"> are used to read and write this data to the amplifier.</span><a name="l00258"></a>00258 <span class="comment"> */</span><a name="l00259"></a>00259 <span class="comment">/***************************************************************************/</span><a name="l00260"></a><a class="code" href="structCrntLoopConfig.html">00260</a> <span class="keyword">struct </span><a class="code" href="structCrntLoopConfig.html">CrntLoopConfig</a><a name="l00261"></a>00261 {<span class="comment"></span><a name="l00262"></a>00262 <span class="comment"> /// Proportional gain</span><a name="l00263"></a><a class="code" href="structCrntLoopConfig.html#o0">00263</a> <span class="comment"></span> <a class="code" href="CML__Utils_8h.html#a7">int16</a> <a class="code" href="structCrntLoopConfig.html#o0">kp</a>;<a name="l00264"></a>00264 <span class="comment"></span><a name="l00265"></a>00265 <span class="comment"> /// Integral gain</span><a name="l00266"></a><a class="code" href="structCrntLoopConfig.html#o1">00266</a> <span class="comment"></span> <a class="code" href="CML__Utils_8h.html#a7">int16</a> <a class="code" href="structCrntLoopConfig.html#o1">ki</a>;<a name="l00267"></a>00267 <span class="comment"></span><a name="l00268"></a>00268 <span class="comment"> /// Current offset</span><a name="l00269"></a><a class="code" href="structCrntLoopConfig.html#o2">00269</a> <span class="comment"></span> <a class="code" href="CML__Utils_8h.html#a7">int16</a> <a class="code" href="structCrntLoopConfig.html#o2">offset</a>;<a name="l00270"></a>00270 <span class="comment"></span><a name="l00271"></a>00271 <span class="comment"> /// Peak current limit (0.01 amp units)</span><a name="l00272"></a>00272 <span class="comment"> /// This is the maximum current that can be applied to the </span><a name="l00273"></a>00273 <span class="comment"> /// motor at any time</span><a name="l00274"></a>00274 <span class="comment"> /// Also used as Boost current in stepper mode</span><a name="l00275"></a><a class="code" href="structCrntLoopConfig.html#o3">00275</a> <span class="comment"></span> <a class="code" href="CML__Utils_8h.html#a7">int16</a> <a class="code" href="structCrntLoopConfig.html#o3">peakLim</a>;<a name="l00276"></a>00276 <span class="comment"></span><a name="l00277"></a>00277 <span class="comment"> /// Continuous current limit (0.01 amp units)</span><a name="l00278"></a>00278 <span class="comment"> /// This is the maximum current that can continuously be </span><a name="l00279"></a>00279 <span class="comment"> /// applied to the load.</span><a name="l00280"></a>00280 <span class="comment"> /// Also used as Run current in stepper mode.</span><a name="l00281"></a><a class="code" href="structCrntLoopConfig.html#o4">00281</a> <span class="comment"></span> <a class="code" href="CML__Utils_8h.html#a7">int16</a> <a class="code" href="structCrntLoopConfig.html#o4">contLim</a>;<a name="l00282"></a>00282 <span class="comment"></span><a name="l00283"></a>00283 <span class="comment"> /// Time at peak current limit (milliseconds)</span><a name="l00284"></a>00284 <span class="comment"> /// If peak current is requested, it will fall back to the</span><a name="l00285"></a>00285 <span class="comment"> /// continuous limit within this amount of time.</span><a name="l00286"></a>00286 <span class="comment"> /// Also used as Boost current time in stepper mode.</span><a name="l00287"></a><a class="code" href="structCrntLoopConfig.html#o5">00287</a> <span class="comment"></span> <a class="code" href="CML__Utils_8h.html#a7">int16</a> <a class="code" href="structCrntLoopConfig.html#o5">peakTime</a>;<a name="l00288"></a>00288 <span class="comment"></span><a name="l00289"></a>00289 <span class="comment"> /// Stepper hold current (0.01 amps).</span><a name="l00290"></a>00290 <span class="comment"> /// Current used to hold the motor at rest.</span><a name="l00291"></a>00291 <span class="comment"> /// Used in stepper mode only.</span><a name="l00292"></a><a class="code" href="structCrntLoopConfig.html#o6">00292</a> <span class="comment"></span> <a class="code" href="CML__Utils_8h.html#a8">uint16</a> <a class="code" href="structCrntLoopConfig.html#o6">stepHoldCurrent</a>;<a name="l00293"></a>00293 <span class="comment"></span><a name="l00294"></a>00294 <span class="comment"> /// Run to hold time(milliseconds)</span><a name="l00295"></a>00295 <span class="comment"> /// The period of time, beginning when a move is complete,</span><a name="l00296"></a>00296 <span class="comment"> /// to when output current switched to hold current.</span><a name="l00297"></a>00297 <span class="comment"> /// Used in stepper mode only.</span><a name="l00298"></a><a class="code" href="structCrntLoopConfig.html#o7">00298</a> <span class="comment"></span> <a class="code" href="CML__Utils_8h.html#a8">uint16</a> <a class="code" href="structCrntLoopConfig.html#o7">stepRun2HoldTime</a>;<a name="l00299"></a>00299 <span class="comment"></span><a name="l00300"></a>00300 <span class="comment"> /// Voltage control mode time delay (milliseconds)</span><a name="l00301"></a>00301 <span class="comment"> /// Time delay to enter into a special voltage control mode.</span><a name="l00302"></a>00302 <span class="comment"> /// If set to zero this feature is disabled.</span><a name="l00303"></a>00303 <span class="comment"> /// Used for stepper mode only.</span><a name="l00304"></a><a class="code" href="structCrntLoopConfig.html#o8">00304</a> <span class="comment"></span> <a class="code" href="CML__Utils_8h.html#a8">uint16</a> <a class="code" href="structCrntLoopConfig.html#o8">stepVolControlDelayTime</a>;<a name="l00305"></a>00305 <span class="comment"></span><a name="l00306"></a>00306 <span class="comment"> /// Rate of change of current command (milliamps/sec).</span><a name="l00307"></a>00307 <span class="comment"> /// This parameter is only used when running in the low level</span><a name="l00308"></a>00308 <span class="comment"> /// programmed current mode (AMPMODE_PROG_CRNT), or in the </span><a name="l00309"></a>00309 <span class="comment"> /// CANopen profile torque mode (AMPMODE_CAN_TORQUE). In </span><a name="l00310"></a>00310 <span class="comment"> /// other modes this parameter is ignored and no limit is placed</span><a name="l00311"></a>00311 <span class="comment"> /// on the slope of the current command.</span><a name="l00312"></a>00312 <span class="comment"> ///</span><a name="l00313"></a>00313 <span class="comment"> /// If this parameter is set to zero (default) it is not used</span><a name="l00314"></a>00314 <span class="comment"> /// in any mode of operation.</span><a name="l00315"></a>00315 <span class="comment"> ///</span>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?