⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ampparam_8cpp-source.html

📁 美国COPLEY驱动器,程序开发工具之一.
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<a name="l00234"></a>00234 }<a name="l00235"></a>00235 <a name="l00236"></a>00236 <span class="comment">/***************************************************************************/</span><span class="comment"></span><a name="l00237"></a>00237 <span class="comment">/**</span><a name="l00238"></a>00238 <span class="comment">  Get the actual motor current.  This current is based on the amplifiers current</span><a name="l00239"></a>00239 <span class="comment">  sensors, and indicates the portion of current that is being used to generate</span><a name="l00240"></a>00240 <span class="comment">  torque in the motor.</span><a name="l00241"></a>00241 <span class="comment"></span><a name="l00242"></a>00242 <span class="comment">  The current is returned in units of 0.01 amps.</span><a name="l00243"></a>00243 <span class="comment"></span><a name="l00244"></a>00244 <span class="comment">  @param value A variable that will store the returned value.</span><a name="l00245"></a>00245 <span class="comment">  @return A pointer to an error object, or NULL on success</span><a name="l00246"></a>00246 <span class="comment">  */</span><a name="l00247"></a>00247 <span class="comment">/***************************************************************************/</span><a name="l00248"></a><a class="code" href="classAmp.html#z2_10">00248</a> <span class="keyword">const</span> <a class="code" href="classError.html">Error</a> *<a class="code" href="classAmp.html#z2_10">Amp::GetCurrentActual</a>( <a class="code" href="CML__Utils_8h.html#a7">int16</a> &amp;value )<a name="l00249"></a>00249 {<a name="l00250"></a>00250    <span class="keywordflow">return</span> <a class="code" href="classNode.html#o0">sdo</a>.<a class="code" href="classSDO.html#a11">Upld16</a>( OBJID_CRNT_ACT, 0, value );<a name="l00251"></a>00251 }<a name="l00252"></a>00252 <a name="l00253"></a>00253 <span class="comment">/***************************************************************************/</span><span class="comment"></span><a name="l00254"></a>00254 <span class="comment">/**</span><a name="l00255"></a>00255 <span class="comment">  Get the commanded motor current.  This current is the input to the current </span><a name="l00256"></a>00256 <span class="comment">  limiter.  This value is also the output of the velocity loop when the </span><a name="l00257"></a>00257 <span class="comment">  motor is in either position or velocity control mode.  When in current control </span><a name="l00258"></a>00258 <span class="comment">  mode, the commanded current is derived from the control source (analog input, </span><a name="l00259"></a>00259 <span class="comment">  PWM input, function generator, etc).</span><a name="l00260"></a>00260 <span class="comment"></span><a name="l00261"></a>00261 <span class="comment">  The current is returned in units of 0.01 amps.</span><a name="l00262"></a>00262 <span class="comment"></span><a name="l00263"></a>00263 <span class="comment">  @param value A variable that will store the returned value.</span><a name="l00264"></a>00264 <span class="comment">  @return A pointer to an error object, or NULL on success</span><a name="l00265"></a>00265 <span class="comment">  */</span><a name="l00266"></a>00266 <span class="comment">/***************************************************************************/</span><a name="l00267"></a><a class="code" href="classAmp.html#z2_11">00267</a> <span class="keyword">const</span> <a class="code" href="classError.html">Error</a> *<a class="code" href="classAmp.html#z2_11">Amp::GetCurrentCommand</a>( <a class="code" href="CML__Utils_8h.html#a7">int16</a> &amp;value )<a name="l00268"></a>00268 {<a name="l00269"></a>00269    <span class="keywordflow">return</span> <a class="code" href="classNode.html#o0">sdo</a>.<a class="code" href="classSDO.html#a11">Upld16</a>( OBJID_CRNT_CMD, 0, value );<a name="l00270"></a>00270 }<a name="l00271"></a>00271 <a name="l00272"></a>00272 <span class="comment">/***************************************************************************/</span><span class="comment"></span><a name="l00273"></a>00273 <span class="comment">/**</span><a name="l00274"></a>00274 <span class="comment">  Get the limited motor current.  The commanded current (GetCurrentCommand) is</span><a name="l00275"></a>00275 <span class="comment">  passed to a current limiter.  The output of the current limiter is the limited</span><a name="l00276"></a>00276 <span class="comment">  current which is passed as an input to the current loop.</span><a name="l00277"></a>00277 <span class="comment"></span><a name="l00278"></a>00278 <span class="comment">  The current is returned in units of 0.01 amps.</span><a name="l00279"></a>00279 <span class="comment"></span><a name="l00280"></a>00280 <span class="comment">  @param value A variable that will store the returned value.</span><a name="l00281"></a>00281 <span class="comment">  @return A pointer to an error object, or NULL on success</span><a name="l00282"></a>00282 <span class="comment">  */</span><a name="l00283"></a>00283 <span class="comment">/***************************************************************************/</span><a name="l00284"></a><a class="code" href="classAmp.html#z2_12">00284</a> <span class="keyword">const</span> <a class="code" href="classError.html">Error</a> *<a class="code" href="classAmp.html#z2_12">Amp::GetCurrentLimited</a>( <a class="code" href="CML__Utils_8h.html#a7">int16</a> &amp;value )<a name="l00285"></a>00285 {<a name="l00286"></a>00286    <span class="keywordflow">return</span> <a class="code" href="classNode.html#o0">sdo</a>.<a class="code" href="classSDO.html#a11">Upld16</a>( OBJID_CRNT_LIM, 0, value );<a name="l00287"></a>00287 }<a name="l00288"></a>00288 <a name="l00289"></a>00289 <span class="comment">/***************************************************************************/</span><span class="comment"></span><a name="l00290"></a>00290 <span class="comment">/**</span><a name="l00291"></a>00291 <span class="comment">  Get the instantaneous commanded velocity passed out of the trajectory </span><a name="l00292"></a>00292 <span class="comment">  generator.  This velocity is used by the position loop to calculate it's </span><a name="l00293"></a>00293 <span class="comment">  velocity feed forward term.</span><a name="l00294"></a>00294 <span class="comment"></span><a name="l00295"></a>00295 <span class="comment">  This parameter is specified in "user units".  See Amp::SetCountsPerUnit for details.</span><a name="l00296"></a>00296 <span class="comment"></span><a name="l00297"></a>00297 <span class="comment">  @param value variable that will store the returned value</span><a name="l00298"></a>00298 <span class="comment">  @return A pointer to an error object, or NULL on success</span><a name="l00299"></a>00299 <span class="comment">  */</span><a name="l00300"></a>00300 <span class="comment">/***************************************************************************/</span><a name="l00301"></a><a class="code" href="classAmp.html#z2_13">00301</a> <span class="keyword">const</span> <a class="code" href="classError.html">Error</a> *<a class="code" href="classAmp.html#z2_13">Amp::GetTrajectoryVel</a>( <a class="code" href="CML__Utils_8h.html#a11">uunit</a> &amp;value )<a name="l00302"></a>00302 { <a name="l00303"></a>00303    <a class="code" href="CML__Utils_8h.html#a9">int32</a> v;<a name="l00304"></a>00304    <span class="keyword">const</span> <a class="code" href="classError.html">Error</a> *err = <a class="code" href="classNode.html#o0">sdo</a>.<a class="code" href="classSDO.html#a9">Upld32</a>( OBJID_TRJ_VEL, 0, v ); <a name="l00305"></a>00305    value = <a class="code" href="classAmp.html#z15_15">VelLoad2User</a>( v );<a name="l00306"></a>00306    <span class="keywordflow">return</span> err;<a name="l00307"></a>00307 }<a name="l00308"></a>00308 <a name="l00309"></a>00309 <span class="comment">/***************************************************************************/</span><span class="comment"></span><a name="l00310"></a>00310 <span class="comment">/**</span><a name="l00311"></a>00311 <span class="comment">  Get the instantaneous commanded acceleration passed out of the trajectory </span><a name="l00312"></a>00312 <span class="comment">  generator.  This acceleration is used by the position loop to calculate it's </span><a name="l00313"></a>00313 <span class="comment">  acceleration feed forward term.</span><a name="l00314"></a>00314 <span class="comment"></span><a name="l00315"></a>00315 <span class="comment">  This parameter is specified in "user units".  See Amp::SetCountsPerUnit for details.</span><a name="l00316"></a>00316 <span class="comment"></span><a name="l00317"></a>00317 <span class="comment">  @param value variable that will store the returned value</span><a name="l00318"></a>00318 <span class="comment">  @return A pointer to an error object, or NULL on success</span><a name="l00319"></a>00319 <span class="comment">  */</span><a name="l00320"></a>00320 <span class="comment">/***************************************************************************/</span><a name="l00321"></a><a class="code" href="classAmp.html#z2_14">00321</a> <span class="keyword">const</span> <a class="code" href="classError.html">Error</a> *<a class="code" href="classAmp.html#z2_14">Amp::GetTrajectoryAcc</a>( <a class="code" href="CML__Utils_8h.html#a11">uunit</a> &amp;value )<a name="l00322"></a>00322 { <a name="l00323"></a>00323    <a class="code" href="CML__Utils_8h.html#a9">int32</a> v;<a name="l00324"></a>00324    <span class="keyword">const</span> <a class="code" href="classError.html">Error</a> *err = <a class="code" href="classNode.html#o0">sdo</a>.<a class="code" href="classSDO.html#a9">Upld32</a>( OBJID_TRJ_ACC, 0, v ); <a name="l00325"></a>00325    value = <a class="code" href="classAmp.html#z15_16">AccLoad2User</a>( v );<a name="l00326"></a>00326    <span class="keywordflow">return</span> err;<a name="l00327"></a>00327 }<a name="l00328"></a>00328 <a name="l00329"></a>00329 <span class="comment">/***************************************************************************/</span><span class="comment"></span><a name="l00330"></a>00330 <span class="comment">/**</span><a name="l00331"></a>00331 <span class="comment">  Get the motor phase angle.  The phase angle describes the motor's electrical </span><a name="l00332"></a>00332 <span class="comment">  position with respect to it's windings.  It's an internal parameter used by </span><a name="l00333"></a>00333 <span class="comment">  the amplifier to commutate a brushless motor.</span><a name="l00334"></a>00334 <span class="comment"></span><a name="l00335"></a>00335 <span class="comment">  The angle is returned in degrees.</span><a name="l00336"></a>00336 <span class="comment"></span><a name="l00337"></a>00337 <span class="comment">  @param value variable that will store the returned value</span><a name="l00338"></a>00338 <span class="comment">  @return A pointer to an error object, or NULL on success</span><a name="l00339"></a>00339 <span class="comment">  */</span><a name="l00340"></a>00340 <span class="comment">/***************************************************************************/</span><a name="l00341"></a><a class="code" href="classAmp.html#z2_15">00341</a> <span class="keyword">const</span> <a class="code" href="classError.html">Error</a> *<a class="code" href="classAmp.html#z2_15">Amp::GetPhaseAngle</a>( <a class="code" href="CML__Utils_8h.html#a7">int16</a> &amp;value )<a name="l00342"></a>00342 { <a name="l00343"></a>00343    <span class="keywordflow">return</span> <a class="code" href="classNode.html#o0">sdo</a>.<a class="code" href="classSDO.html#a11">Upld16</a>( OBJID_PHASE_ANG, 0, value ); <a name="l00344"></a>00344 }<a name="l00345"></a>00345 <a name="l00346"></a>00346 <span class="comment">/***************************************************************************/</span><span class="comment"></span><a name="l00347"></a>00347 <span class="comment">/**</span><a name="l00348"></a>00348 <span class="comment">  Get the current digital hall sensor state.  The hall state is the value of </span><a name="l00349"></a>00349 <span class="comment">  the hall sensors after any adjustments have been made to them based on the</span><a name="l00350"></a>00350 <span class="comment">  hallWiring parameter of the MtrInfo structure.</span><a name="l00351"></a>00351 <span class="comment"></span><a name="l00352"></a>00352 <span class="comment">  @param value variable that will store the returned value</span><a name="l00353"></a>00353 <span class="comment">  @return A pointer to an error object, or NULL on success</span><a name="l00354"></a>00354 <span class="comment">  */</span>

⌨️ 快捷键说明

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