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

📄 ampparam_8cpp-source.html

📁 美国COPLEY驱动器,程序开发工具之一.
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<a name="l00113"></a>00113 <span class="comment">  This position is the command input to the servo loop.  The commanded position</span><a name="l00114"></a>00114 <span class="comment">  is calculated by the trajectory generator and updated every servo cycle.</span><a name="l00115"></a>00115 <span class="comment"></span><a name="l00116"></a>00116 <span class="comment">  This parameter is specified in "user units".  See Amp::SetCountsPerUnit for details.</span><a name="l00117"></a>00117 <span class="comment"></span><a name="l00118"></a>00118 <span class="comment">  @param value variable that will store the returned value</span><a name="l00119"></a>00119 <span class="comment">  @return A pointer to an error object, or NULL on success</span><a name="l00120"></a>00120 <span class="comment">  */</span><a name="l00121"></a>00121 <span class="comment">/***************************************************************************/</span><a name="l00122"></a><a class="code" href="classAmp.html#z2_4">00122</a> <span class="keyword">const</span> <a class="code" href="classError.html">Error</a> *<a class="code" href="classAmp.html#z2_4">Amp::GetPositionCommand</a>( <a class="code" href="CML__Utils_8h.html#a11">uunit</a> &amp;value )<a name="l00123"></a>00123 {<a name="l00124"></a>00124    <a class="code" href="CML__Utils_8h.html#a9">int32</a> v;<a name="l00125"></a>00125    <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_POS_CMD, 0, v );<a name="l00126"></a>00126    value = <a class="code" href="classAmp.html#z15_14">PosLoad2User</a>( v );<a name="l00127"></a>00127    <span class="keywordflow">return</span> err;<a name="l00128"></a>00128 }<a name="l00129"></a>00129 <a name="l00130"></a>00130 <span class="comment">/***************************************************************************/</span><span class="comment"></span><a name="l00131"></a>00131 <span class="comment">/**</span><a name="l00132"></a>00132 <span class="comment">  Get the position error.  This is the difference between the position demand </span><a name="l00133"></a>00133 <span class="comment">  value and the actual position.</span><a name="l00134"></a>00134 <span class="comment"></span><a name="l00135"></a>00135 <span class="comment">  This parameter is specified in "user units".  See Amp::SetCountsPerUnit for details.</span><a name="l00136"></a>00136 <span class="comment"></span><a name="l00137"></a>00137 <span class="comment">  @param value variable that will store the returned value</span><a name="l00138"></a>00138 <span class="comment">  @return A pointer to an error object, or NULL on success</span><a name="l00139"></a>00139 <span class="comment">  */</span><a name="l00140"></a>00140 <span class="comment">/***************************************************************************/</span><a name="l00141"></a><a class="code" href="classAmp.html#z2_5">00141</a> <span class="keyword">const</span> <a class="code" href="classError.html">Error</a> *<a class="code" href="classAmp.html#z2_5">Amp::GetPositionError</a>( <a class="code" href="CML__Utils_8h.html#a11">uunit</a> &amp;value )<a name="l00142"></a>00142 { <a name="l00143"></a>00143    <a class="code" href="CML__Utils_8h.html#a9">int32</a> v;<a name="l00144"></a>00144    <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_POS_ERR, 0, v );<a name="l00145"></a>00145    value = <a class="code" href="classAmp.html#z15_14">PosLoad2User</a>( v );<a name="l00146"></a>00146    <span class="keywordflow">return</span> err;<a name="l00147"></a>00147 }<a name="l00148"></a>00148 <a name="l00149"></a>00149 <span class="comment">/***************************************************************************/</span><span class="comment"></span><a name="l00150"></a>00150 <span class="comment">/**</span><a name="l00151"></a>00151 <span class="comment">  Get the actual motor velocity.  The motor velocity is estimated by the</span><a name="l00152"></a>00152 <span class="comment">  amplifier based on the change in position seen at the encoder.</span><a name="l00153"></a>00153 <span class="comment">  For dual encoder systems, the load encoder veloctiy can be queried using</span><a name="l00154"></a>00154 <span class="comment">  the function Amp::GetVelocityLoad.</span><a name="l00155"></a>00155 <span class="comment"></span><a name="l00156"></a>00156 <span class="comment">  This parameter is specified in "user units".  See Amp::SetCountsPerUnit for details.</span><a name="l00157"></a>00157 <span class="comment"></span><a name="l00158"></a>00158 <span class="comment">  @param value variable that will store the returned value</span><a name="l00159"></a>00159 <span class="comment">  @return A pointer to an error object, or NULL on success</span><a name="l00160"></a>00160 <span class="comment">  */</span><a name="l00161"></a>00161 <span class="comment">/***************************************************************************/</span><a name="l00162"></a><a class="code" href="classAmp.html#z2_6">00162</a> <span class="keyword">const</span> <a class="code" href="classError.html">Error</a> *<a class="code" href="classAmp.html#z2_6">Amp::GetVelocityActual</a>( <a class="code" href="CML__Utils_8h.html#a11">uunit</a> &amp;value )<a name="l00163"></a>00163 { <a name="l00164"></a>00164    <a class="code" href="CML__Utils_8h.html#a9">int32</a> v;<a name="l00165"></a>00165    <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_VEL_MTR, 0, v ); <a name="l00166"></a>00166    value = <a class="code" href="classAmp.html#z15_8">VelMtr2User</a>( v );<a name="l00167"></a>00167    <span class="keywordflow">return</span> err;<a name="l00168"></a>00168 }<a name="l00169"></a>00169 <a name="l00170"></a>00170 <span class="comment">/***************************************************************************/</span><span class="comment"></span><a name="l00171"></a>00171 <span class="comment">/**</span><a name="l00172"></a>00172 <span class="comment">  Get the load encoder velocity.  The load velocity is estimated by the</span><a name="l00173"></a>00173 <span class="comment">  amplifier based on the change in position seen at the load encoder.</span><a name="l00174"></a>00174 <span class="comment">  For dual encoder systems, the motor encoder veloctiy can be queried using</span><a name="l00175"></a>00175 <span class="comment">  the function Amp::GetVelocityActual.</span><a name="l00176"></a>00176 <span class="comment"></span><a name="l00177"></a>00177 <span class="comment">  This parameter is specified in "user units".  See Amp::SetCountsPerUnit for details.</span><a name="l00178"></a>00178 <span class="comment"></span><a name="l00179"></a>00179 <span class="comment">  @param value variable that will store the returned value</span><a name="l00180"></a>00180 <span class="comment">  @return A pointer to an error object, or NULL on success</span><a name="l00181"></a>00181 <span class="comment">  */</span><a name="l00182"></a>00182 <span class="comment">/***************************************************************************/</span><a name="l00183"></a><a class="code" href="classAmp.html#z2_7">00183</a> <span class="keyword">const</span> <a class="code" href="classError.html">Error</a> *<a class="code" href="classAmp.html#z2_7">Amp::GetVelocityLoad</a>( <a class="code" href="CML__Utils_8h.html#a11">uunit</a> &amp;value )<a name="l00184"></a>00184 { <a name="l00185"></a>00185    <a class="code" href="CML__Utils_8h.html#a9">int32</a> v;<a name="l00186"></a>00186    <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_VEL_LOAD, 0, v ); <a name="l00187"></a>00187    value = <a class="code" href="classAmp.html#z15_15">VelLoad2User</a>( v );<a name="l00188"></a>00188    <span class="keywordflow">return</span> err;<a name="l00189"></a>00189 }<a name="l00190"></a>00190 <a name="l00191"></a>00191 <span class="comment">/***************************************************************************/</span><span class="comment"></span><a name="l00192"></a>00192 <span class="comment">/**</span><a name="l00193"></a>00193 <span class="comment">  Get the commanded velocity.  The commanded velocity is the velocity value</span><a name="l00194"></a>00194 <span class="comment">  that is passed to the velocity limiter, and from there to the velocity </span><a name="l00195"></a>00195 <span class="comment">  control loop.  If the amplifier is in position mode (i.e. the position loop</span><a name="l00196"></a>00196 <span class="comment">  is active), then this velocity is the output of the position control loop.</span><a name="l00197"></a>00197 <span class="comment"></span><a name="l00198"></a>00198 <span class="comment">  This parameter is specified in "user units".  See Amp::SetCountsPerUnit for details.</span><a name="l00199"></a>00199 <span class="comment"></span><a name="l00200"></a>00200 <span class="comment">  @param value variable that will store the returned value</span><a name="l00201"></a>00201 <span class="comment">  @return A pointer to an error object, or NULL on success</span><a name="l00202"></a>00202 <span class="comment">  */</span><a name="l00203"></a>00203 <span class="comment">/***************************************************************************/</span><a name="l00204"></a><a class="code" href="classAmp.html#z2_8">00204</a> <span class="keyword">const</span> <a class="code" href="classError.html">Error</a> *<a class="code" href="classAmp.html#z2_8">Amp::GetVelocityCommand</a>( <a class="code" href="CML__Utils_8h.html#a11">uunit</a> &amp;value )<a name="l00205"></a>00205 { <a name="l00206"></a>00206    <a class="code" href="CML__Utils_8h.html#a9">int32</a> v;<a name="l00207"></a>00207    <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_VEL_CMD, 0, v ); <a name="l00208"></a>00208    value = <a class="code" href="classAmp.html#z15_8">VelMtr2User</a>( v );<a name="l00209"></a>00209    <span class="keywordflow">return</span> err;<a name="l00210"></a>00210 }<a name="l00211"></a>00211 <a name="l00212"></a>00212 <span class="comment">/***************************************************************************/</span><span class="comment"></span><a name="l00213"></a>00213 <span class="comment">/**</span><a name="l00214"></a>00214 <span class="comment">  Get the limited velocity.  This velocity is the result of applying the </span><a name="l00215"></a>00215 <span class="comment">  velocity limiter to the commanded velocity (see GetVelocityCommand).</span><a name="l00216"></a>00216 <span class="comment"></span><a name="l00217"></a>00217 <span class="comment">  When the velocity loop is being driven by the position loop, the velocity</span><a name="l00218"></a>00218 <span class="comment">  limiter consists of a maximum velocity value only.  When some other source</span><a name="l00219"></a>00219 <span class="comment">  is driving the velocity loop, the limiter also includes a maximum acceleration</span><a name="l00220"></a>00220 <span class="comment">  and deceleration value.</span><a name="l00221"></a>00221 <span class="comment"></span><a name="l00222"></a>00222 <span class="comment">  This parameter is specified in "user units".  See Amp::SetCountsPerUnit for details.</span><a name="l00223"></a>00223 <span class="comment"></span><a name="l00224"></a>00224 <span class="comment">  @param value variable that will store the returned value</span><a name="l00225"></a>00225 <span class="comment">  @return A pointer to an error object, or NULL on success</span><a name="l00226"></a>00226 <span class="comment">  */</span><a name="l00227"></a>00227 <span class="comment">/***************************************************************************/</span><a name="l00228"></a><a class="code" href="classAmp.html#z2_9">00228</a> <span class="keyword">const</span> <a class="code" href="classError.html">Error</a> *<a class="code" href="classAmp.html#z2_9">Amp::GetVelocityLimited</a>( <a class="code" href="CML__Utils_8h.html#a11">uunit</a> &amp;value )<a name="l00229"></a>00229 { <a name="l00230"></a>00230    <a class="code" href="CML__Utils_8h.html#a9">int32</a> v;<a name="l00231"></a>00231    <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_VEL_LIM, 0, v ); <a name="l00232"></a>00232    value = <a class="code" href="classAmp.html#z15_8">VelMtr2User</a>( v );<a name="l00233"></a>00233    <span class="keywordflow">return</span> err;

⌨️ 快捷键说明

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