<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Alternative method to Trajectory in Position control mode in Kinetis Motor Suite</title>
    <link>https://community.nxp.com/t5/Kinetis-Motor-Suite/Alternative-method-to-Trajectory-in-Position-control-mode/m-p/649146#M160</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sergi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gotcha, sorry I didn't clarify where in the KMS API you should modify these values. &amp;nbsp;&lt;/P&gt;&lt;P&gt;The outputs of your reference generator should be provided to the POSITION block. &amp;nbsp;So in the drv.c file the function call POSITION_run should have the trajpos pieces replaced by your trajectory generator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KMS moves the motor because the runTrajectory command tells the reference generator to start, so you will be going around this by modifying the code to replace the reference generator.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Mar 2017 21:40:05 GMT</pubDate>
    <dc:creator>linestream-adam</dc:creator>
    <dc:date>2017-03-15T21:40:05Z</dc:date>
    <item>
      <title>Alternative method to Trajectory in Position control mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Motor-Suite/Alternative-method-to-Trajectory-in-Position-control-mode/m-p/649143#M157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to control the motor position using the actual system of PaP motors.&lt;BR /&gt;I have an external clock.&amp;nbsp; And every input clock, I need to move "x" degrees.&lt;/P&gt;&lt;P&gt;The problem is that when I initiate a trajectory with user variables "user.command.posStepInt_mrev" and "user.command.posStepFrac_mrev" and start the trajectory with "user.command.runTrajectory=1" this flag take much time to reset&amp;nbsp; for initiate a new movement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, at every while() loop, I read the numbers of externals clock interrupts I received and I convert this number to complete and partial revolutions to update the trajectory.&lt;/P&gt;&lt;P&gt;If I have elevated external clocks, and this result is for examples 3 complete revolutions, the motor make a start/stop every trajectory doing a notable vibration in motor (and current peaks).&lt;/P&gt;&lt;P&gt;I'm working with motor limits of speed and acceleration (speed rate=3000rpm, acceleration/desacceleration=15000rpm, Jerk=200000) and Trapezoidal trajectory.&amp;nbsp; This is the faster way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is .....&lt;BR /&gt;Exist any other method to control the position without using a trajectory method?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Sergi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 07:35:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Motor-Suite/Alternative-method-to-Trajectory-in-Position-control-mode/m-p/649143#M157</guid>
      <dc:creator>sergigomis</dc:creator>
      <dc:date>2017-03-14T07:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative method to Trajectory in Position control mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Motor-Suite/Alternative-method-to-Trajectory-in-Position-control-mode/m-p/649144#M158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sergi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The position profile generator included with KMS is designed for relative point-to-point position moves only. &amp;nbsp;It does not support extending the profile or otherwise updating the profile at run-time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could replace the position profile generator with your own. &amp;nbsp;The main consideration you would need to keep in mind is that the entire KMS position system is windowed. &amp;nbsp;So this means that if the motor rotates in one direction continuously, the position signal will not increase to infinity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2017-03-14 12_31_03-SpinTAC_Position_Move_Rollover.pdf - Adobe Acrobat.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/15357i6828B1056175993D/image-size/large?v=v2&amp;amp;px=999" role="button" title="2017-03-14 12_31_03-SpinTAC_Position_Move_Rollover.pdf - Adobe Acrobat.png" alt="2017-03-14 12_31_03-SpinTAC_Position_Move_Rollover.pdf - Adobe Acrobat.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example in the above image, I told the profile generator to rotate 130 mechanical revolutions. &amp;nbsp;As you can see each time the mechanical revolution became larger than 10, it rolled over to -10 immediately and the position rollover counter increased. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the simplest path for you to avoid the large number of start/stop cycles would be for you to create your own profile generator that will generate a position reference signal according to the above image &amp;amp; description that will increase (or decrease) the position reference based receiving external clock interrupts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should be able to avoid creating the velocity, acceleration, &amp;amp; jerk references since they are only used for feedforward. &amp;nbsp;Obviously, if you did create them the performance of your system would be better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 16:36:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Motor-Suite/Alternative-method-to-Trajectory-in-Position-control-mode/m-p/649144#M158</guid>
      <dc:creator>linestream-adam</dc:creator>
      <dc:date>2017-03-14T16:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative method to Trajectory in Position control mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Motor-Suite/Alternative-method-to-Trajectory-in-Position-control-mode/m-p/649145#M159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adam.&lt;/P&gt;&lt;P&gt;I don't know if I undestand that you explaint me.&lt;/P&gt;&lt;P&gt;Ok. I calculate my position reference acording my inputs..... But I don't understand how set this reference with KMS variables. &lt;/P&gt;&lt;P&gt;How I create my own profile?&lt;/P&gt;&lt;P&gt;How I tell you to KMS API to move to motor without use a "runTrajectory"?&lt;/P&gt;&lt;P&gt;Sorry..... Can you explain me again?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 19:24:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Motor-Suite/Alternative-method-to-Trajectory-in-Position-control-mode/m-p/649145#M159</guid>
      <dc:creator>sergigomis</dc:creator>
      <dc:date>2017-03-14T19:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative method to Trajectory in Position control mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Motor-Suite/Alternative-method-to-Trajectory-in-Position-control-mode/m-p/649146#M160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sergi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gotcha, sorry I didn't clarify where in the KMS API you should modify these values. &amp;nbsp;&lt;/P&gt;&lt;P&gt;The outputs of your reference generator should be provided to the POSITION block. &amp;nbsp;So in the drv.c file the function call POSITION_run should have the trajpos pieces replaced by your trajectory generator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KMS moves the motor because the runTrajectory command tells the reference generator to start, so you will be going around this by modifying the code to replace the reference generator.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2017 21:40:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Motor-Suite/Alternative-method-to-Trajectory-in-Position-control-mode/m-p/649146#M160</guid>
      <dc:creator>linestream-adam</dc:creator>
      <dc:date>2017-03-15T21:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative method to Trajectory in Position control mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Motor-Suite/Alternative-method-to-Trajectory-in-Position-control-mode/m-p/649147#M161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adam.&lt;/P&gt;&lt;P&gt;Thank you. Now is clear.&lt;/P&gt;&lt;P&gt;I try to modify the profile.&lt;/P&gt;&lt;P&gt;Thank's&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Mar 2017 17:54:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Motor-Suite/Alternative-method-to-Trajectory-in-Position-control-mode/m-p/649147#M161</guid>
      <dc:creator>sergigomis</dc:creator>
      <dc:date>2017-03-16T17:54:48Z</dc:date>
    </item>
  </channel>
</rss>

