cml__amp_8h-source.html

来自「美国COPLEY驱动器,程序开发工具之一.」· HTML 代码 · 共 482 行 · 第 1/5 页

HTML
482
字号
<a name="l00283"></a>00283 <span class="comment">   /// master controller before signaling an error condition.</span><a name="l00284"></a>00284 <span class="comment">   ///</span><a name="l00285"></a>00285 <span class="comment">   /// The life time factor is treated as a multiple of the guard time.  </span><a name="l00286"></a>00286 <span class="comment">   ///</span><a name="l00287"></a>00287 <span class="comment">   /// If this parameter and the node guard time are both non-zero,</span><a name="l00288"></a>00288 <span class="comment">   /// and the heartbeatTime is zero, then node guarding will be setup </span><a name="l00289"></a>00289 <span class="comment">   /// for the amplifier.</span><a name="l00290"></a>00290 <span class="comment">   ///</span><a name="l00291"></a>00291 <span class="comment">   /// Default 3 (multiples of the guard time)</span><a name="l00292"></a><a class="code" href="classAmpSettings.html#o8">00292</a> <span class="comment"></span>   <a class="code" href="CML__Utils_8h.html#a6">uint8</a> <a class="code" href="classAmpSettings.html#o8">lifeFactor</a>;<a name="l00293"></a>00293 <span class="comment"></span><a name="l00294"></a>00294 <span class="comment">   /// Enable amplifier at init time.  If this is true, then the amplifier</span><a name="l00295"></a>00295 <span class="comment">   /// will be enabled at the end of a successful init().  If false, the </span><a name="l00296"></a>00296 <span class="comment">   /// amplifier will be disabled when init() returns.</span><a name="l00297"></a>00297 <span class="comment">   ///</span><a name="l00298"></a>00298 <span class="comment">   /// Default: true</span><a name="l00299"></a><a class="code" href="classAmpSettings.html#o9">00299</a> <span class="comment"></span>   <span class="keywordtype">bool</span> <a class="code" href="classAmpSettings.html#o9">enableOnInit</a>;<a name="l00300"></a>00300 <span class="comment"></span><a name="l00301"></a>00301 <span class="comment">   /// Initial mode of operation.  This defines the mode of operation that the</span><a name="l00302"></a>00302 <span class="comment">   /// amplifier will be placed in when it is initialized.</span><a name="l00303"></a>00303 <span class="comment">   ///</span><a name="l00304"></a>00304 <span class="comment">   /// Default: AMPMODE_CAN_HOMING</span><a name="l00305"></a><a class="code" href="classAmpSettings.html#o10">00305</a> <span class="comment"></span>   <a class="code" href="CML__AmpDef_8h.html#a397">AMP_MODE</a> <a class="code" href="classAmpSettings.html#o10">initialMode</a>;<a name="l00306"></a>00306 <span class="comment"></span><a name="l00307"></a>00307 <span class="comment">   /// Reset the amplifier on init.  If true, the amplifier will be reset </span><a name="l00308"></a>00308 <span class="comment">   /// when it is initialized.  This has the advantage of clearing out any</span><a name="l00309"></a>00309 <span class="comment">   /// fault conditions and putting the amplifier in a known state.</span><a name="l00310"></a>00310 <span class="comment">   ///</span><a name="l00311"></a>00311 <span class="comment">   /// Default: false</span><a name="l00312"></a><a class="code" href="classAmpSettings.html#o11">00312</a> <span class="comment"></span>   <span class="keywordtype">bool</span> <a class="code" href="classAmpSettings.html#o11">resetOnInit</a>;<a name="l00313"></a>00313 <span class="comment"></span><a name="l00314"></a>00314 <span class="comment">   /// Max PVT segments to send in response to a PVT status update.  This</span><a name="l00315"></a>00315 <span class="comment">   /// parameter may be used to limit the number of new PVT segments to send</span><a name="l00316"></a>00316 <span class="comment">   /// in response to a PVT status update.  Normally, this parameter may be</span><a name="l00317"></a>00317 <span class="comment">   /// safely left at it's default setting.</span><a name="l00318"></a>00318 <span class="comment">   ///</span><a name="l00319"></a>00319 <span class="comment">   /// Default 6</span><a name="l00320"></a><a class="code" href="classAmpSettings.html#o12">00320</a> <span class="comment"></span>   <a class="code" href="CML__Utils_8h.html#a6">uint8</a> <a class="code" href="classAmpSettings.html#o12">maxPvtSendCt</a>;<a name="l00321"></a>00321 };<a name="l00322"></a>00322 <a name="l00323"></a>00323 <span class="comment">/***************************************************************************/</span><span class="comment"></span><a name="l00324"></a>00324 <span class="comment">/**</span><a name="l00325"></a>00325 <span class="comment">PVT trajectory segment cache object.  This is used internally by the Amp</span><a name="l00326"></a>00326 <span class="comment">object to keep track of PVT segments recently sent.  It allows the amp object</span><a name="l00327"></a>00327 <span class="comment">to recover if a segment is lost in transit by resending the missing segments.</span><a name="l00328"></a>00328 <span class="comment">*/</span><a name="l00329"></a>00329 <span class="comment">/***************************************************************************/</span><a name="l00330"></a><a class="code" href="classPvtSegCache.html">00330</a> <span class="keyword">class </span><a class="code" href="classPvtSegCache.html">PvtSegCache</a><a name="l00331"></a>00331 {<a name="l00332"></a><a class="code" href="CML__Amp_8h.html#a0">00332</a> <span class="preprocessor">   #define PVTCACHESIZE  32</span><a name="l00333"></a>00333 <span class="preprocessor"></span><span class="keyword">public</span>:<span class="comment"></span><a name="l00334"></a>00334 <span class="comment">   /// Default constructor.  Clears the cache.</span><a name="l00335"></a><a class="code" href="classPvtSegCache.html#a0">00335</a> <span class="comment"></span>   <a class="code" href="classPvtSegCache.html#a0">PvtSegCache</a>(){ <a class="code" href="classPvtSegCache.html#a1">Clear</a>(); }<a name="l00336"></a>00336 <span class="comment"></span><a name="l00337"></a>00337 <span class="comment">   /// Clear the cache</span><a name="l00338"></a><a class="code" href="classPvtSegCache.html#a1">00338</a> <span class="comment"></span>   <span class="keywordtype">void</span> <a class="code" href="classPvtSegCache.html#a1">Clear</a>(){ ct = top = 0; }<a name="l00339"></a>00339 <a name="l00340"></a>00340    <span class="keywordtype">void</span> <a class="code" href="classPvtSegCache.html#a2">AddSegment</a>( <a class="code" href="CML__Utils_8h.html#a6">uint8</a> *seg, <a class="code" href="CML__Utils_8h.html#a8">uint16</a> <span class="keywordtype">id</span>, <a class="code" href="CML__Utils_8h.html#a11">uunit</a> p );<a name="l00341"></a>00341    <span class="keywordtype">bool</span> <a class="code" href="classPvtSegCache.html#a3">GetSegment</a>( <a class="code" href="CML__Utils_8h.html#a6">uint8</a> *seg, <a class="code" href="CML__Utils_8h.html#a8">uint16</a> <span class="keywordtype">id</span> );<a name="l00342"></a>00342    <span class="keywordtype">bool</span> <a class="code" href="classPvtSegCache.html#a4">GetPosition</a>( <a class="code" href="CML__Utils_8h.html#a11">uunit</a> *p, <a class="code" href="CML__Utils_8h.html#a8">uint16</a> <span class="keywordtype">id</span> );<a name="l00343"></a>00343 <a name="l00344"></a>00344 <span class="keyword">private</span>:<span class="comment"></span><a name="l00345"></a>00345 <span class="comment">   /// Total number of segments in the cache</span><a name="l00346"></a>00346 <span class="comment"></span>   <a class="code" href="CML__Utils_8h.html#a8">uint16</a> ct;<span class="comment"></span><a name="l00347"></a>00347 <span class="comment">   /// Index of the oldest segment in the cache</span><a name="l00348"></a>00348 <span class="comment"></span>   <a class="code" href="CML__Utils_8h.html#a8">uint16</a> top;<span class="comment"></span><a name="l00349"></a>00349 <span class="comment">   /// ID of the oldest segment in the cache</span><a name="l00350"></a>00350 <span class="comment"></span>   <a class="code" href="CML__Utils_8h.html#a8">uint16</a> oldest;<span class="comment"></span><a name="l00351"></a>00351 <span class="comment">   /// Holds copies of the cached segments</span><a name="l00352"></a>00352 <span class="comment"></span>   <a class="code" href="CML__Utils_8h.html#a6">uint8</a> cache[ <a class="code" href="CML__Amp_8h.html#a0">PVTCACHESIZE</a> ][8];<span class="comment"></span><a name="l00353"></a>00353 <span class="comment">   /// Holds position info for each segment.</span><a name="l00354"></a>00354 <span class="comment"></span>   <a class="code" href="CML__Utils_8h.html#a11">uunit</a> pos[ <a class="code" href="CML__Amp_8h.html#a0">PVTCACHESIZE</a> ];<a name="l00355"></a>00355 };<a name="l00356"></a>00356 <a name="l00357"></a>00357 <span class="comment">/***************************************************************************/</span><span class="comment"></span><a name="l00358"></a>00358 <span class="comment">/**</span><a name="l00359"></a>00359 <span class="comment">Trapezoidal profile parameters.  This structure holds all the parameters </span><a name="l00360"></a>00360 <span class="comment">necessary to perform a trapezoidal profile move.</span><a name="l00361"></a>00361 <span class="comment">*/</span><a name="l00362"></a>00362 <span class="comment">/***************************************************************************/</span><a name="l00363"></a><a class="code" href="structProfileConfigTrap.html">00363</a> <span class="keyword">struct </span><a class="code" href="structProfileConfigTrap.html">ProfileConfigTrap</a><a name="l00364"></a>00364 {<span class="comment"></span><a name="l00365"></a>00365 <span class="comment">   /// For absolute moves this is an absolute position,</span><a name="l00366"></a>00366 <span class="comment">   /// for relative moves it's a distance to move.</span><a name="l00367"></a>00367 <span class="comment">   ///</span><a name="l00368"></a>00368 <span class="comment">   /// This parameter is specified in "user units".  See </span><a name="l00369"></a>00369 <span class="comment">   /// Amp::SetCountsPerUnit for details.</span><a name="l00370"></a><a class="code" href="structProfileConfigTrap.html#o0">00370</a> <span class="comment"></span>   <a class="code" href="CML__Utils_8h.html#a11">uunit</a> <a class="code" href="structProfileConfigTrap.html#o0">pos</a>;<a name="l00371"></a>00371 <span class="comment"></span><a name="l00372"></a>00372 <span class="comment">   /// Velocity limit for move.</span><a name="l00373"></a>00373 <span class="comment">   ///</span><a name="l00374"></a>00374 <span class="comment">   /// This parameter is specified in "user units".  See </span><a name="l00375"></a>00375 <span class="comment">   /// Amp::SetCountsPerUnit for details.</span><a name="l00376"></a><a class="code" href="structProfileConfigTrap.html#o1">00376</a> <span class="comment"></span>   <a class="code" href="CML__Utils_8h.html#a11">uunit</a> <a class="code" href="structProfileConfigTrap.html#o1">vel</a>;<a name="l00377"></a>00377 <span class="comment"></span><a name="l00378"></a>00378 <span class="comment">   /// Acceleration limit for move.</span><a name="l00379"></a>00379 <span class="comment">   ///</span>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?