classtrjscurve.html

来自「美国COPLEY驱动器,程序开发工具之一.」· HTML 代码 · 共 169 行

HTML
169
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>Copley Motion Library: TrjScurve Class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.4 --><div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div><h1>TrjScurve Class Reference</h1><!-- doxytag: class="TrjScurve" --><!-- doxytag: inherits="Trajectory" --><p>Inheritance diagram for TrjScurve:<p><center><img src="classTrjScurve.png" usemap="#TrjScurve_map" border="0" alt=""></center><map name="TrjScurve_map"><area href="classTrajectory.html" alt="Trajectory" shape="rect" coords="0,0,70,24"></map><a href="classTrjScurve-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>Asymmetric S-curve profile generator. <p>A symmetric S-curve profile uses the same constraint for acceleration &amp; deceleration. Asymmetric profiles use different acceleration &amp; deceleration values. Copley amplifiers are able to calculate symmetric profiles internally, however if asymmetric s-curve profiles are required then they must be calculate external to the amplifier, and passed to it using PVT profile mode.<p>This class extends the generic <a class="el" href="classTrajectory.html">Trajectory</a> class, and provides the code necessary to calculate an asymmetric s-curve profile. Since it extends the <a class="el" href="classTrajectory.html">Trajectory</a> object, it may be passed to the <a class="el" href="classAmp.html#z13_0">Amp::SendTrajectory</a> function.<p>Internally, the s-curve profile is stored as an absolute move from some starting position. This allows the same trajectory object to be reused for multiple moves of the same distance from different starting positions. The starting position may be either passed to the TrjScurve::Calculate function, or set using TrjScurve::SetStartPos.<p><p>Definition at line <a class="el" href="CML__TrjScurve_8h-source.html#l00067">67</a> of file <a class="el" href="CML__TrjScurve_8h-source.html">CML_TrjScurve.h</a>.<table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classError.html">Error</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTrjScurve.html#a5">StartNew</a> (void)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Start a new trajectory.  <a href="#a5"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTrjScurve.html#a6">Finish</a> (void)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classTrajectory.html">Trajectory</a> finished.  <a href="#a6"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classError.html">Error</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTrjScurve.html#a7">NextSegment</a> (<a class="el" href="CML__Utils_8h.html#a11">uunit</a> &amp;pos, <a class="el" href="CML__Utils_8h.html#a11">uunit</a> &amp;vel, <a class="el" href="CML__Utils_8h.html#a6">uint8</a> &amp;time)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the next segment of position, velocity &amp; time info.  <a href="#a7"></a><br></td></tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="a6"></a><!-- doxytag: member="TrjScurve::Finish" ref="a6" args="(void)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void Finish           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">void&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p><a class="el" href="classTrajectory.html">Trajectory</a> finished. <p>This function is called by the <a class="el" href="classAmp.html">Amp</a> object when it is finished with the trajectory object and no longer holding a reference to it. Typically, this will happen after the <a class="el" href="classTrajectory.html#a3">Trajectory::NextSegment</a> function has returned a zero time value, although it can also occure when some external event causes the <a class="el" href="classAmp.html">Amp</a> object to abort a running trajectory. <p>Reimplemented from <a class="el" href="classTrajectory.html#a1">Trajectory</a>.    </td>  </tr></table><a class="anchor" name="a7"></a><!-- doxytag: member="TrjScurve::NextSegment" ref="a7" args="(uunit &amp;pos, uunit &amp;vel, uint8 &amp;time)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">const <a class="el" href="classError.html">Error</a>* NextSegment           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="CML__Utils_8h.html#a11">uunit</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>pos</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="CML__Utils_8h.html#a11">uunit</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>vel</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="CML__Utils_8h.html#a6">uint8</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>time</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Get the next segment of position, velocity &amp; time info. <p>Note that this function will be called from the high priority CANopen receiver task. Therefore, no lengthy processing should be done here.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>The new position value is returned here. This parameter is specified in "user units". See <a class="el" href="classAmp.html#z15_0">Amp::SetCountsPerUnit</a> for details.</td></tr>    <tr><td valign="top"></td><td valign="top"><em>vel</em>&nbsp;</td><td>The new velocity value is returned here. This parameter is specified in "user units". See <a class="el" href="classAmp.html#z15_0">Amp::SetCountsPerUnit</a> for details. Note that the velocity data will be ignored if the function <a class="el" href="classTrajectory.html#a2">UseVelocityInfo()</a> returns false. In this case the amplifier will use linear interpolation between points.</td></tr>    <tr><td valign="top"></td><td valign="top"><em>time</em>&nbsp;</td><td>The segment time is returned here. This is in milliseconds and ranges from 1 to 255. If zero is returned, this is the last frame in the profile.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>An error object. If this is not <a class="el" href="classError.html#s0">Error::OK</a>, then the segment data is assumed to be invalid. </dd></dl><p>Implements <a class="el" href="classTrajectory.html#a3">Trajectory</a>.    </td>  </tr></table><a class="anchor" name="a5"></a><!-- doxytag: member="TrjScurve::StartNew" ref="a5" args="(void)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">const <a class="el" href="classError.html">Error</a>* StartNew           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">void&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Start a new trajectory. <p>This function is called by <a class="el" href="classAmp.html#z13_0">Amp::SendTrajectory</a> before the first call to <a class="el" href="classTrajectory.html#a3">Trajectory::NextSegment</a>. It gives the trajectory object a chance to return an error indicating that it isn't ready to be sent. <dl compact><dt><b>Returns:</b></dt><dd>An error pointer if the trajectory object is not available, or NULL if it is ready to be sent. </dd></dl><p>Reimplemented from <a class="el" href="classTrajectory.html#a0">Trajectory</a>.    </td>  </tr></table><hr>The documentation for this class was generated from the following file:<ul><li><a class="el" href="CML__TrjScurve_8h-source.html">CML_TrjScurve.h</a></ul><hr><address style="align: right;"><small>Copley Motion Library, Copyright (c) 2002-2003<a href="http://www.copleycontrols.com"><img src="CCC_logo.gif" alt="Copley Controls Corp." align="middle" border=0 ></a></small></address></body></html>

⌨️ 快捷键说明

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