<?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>Kinetis Motor SuiteのトピックRe: Problem with KMS Current Control</title>
    <link>https://community.nxp.com/t5/Kinetis-Motor-Suite/Problem-with-KMS-Current-Control/m-p/726772#M334</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried to use _SQ15(), but it did not work either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I missing??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Oct 2017 18:36:07 GMT</pubDate>
    <dc:creator>PedroCastro</dc:creator>
    <dc:date>2017-10-27T18:36:07Z</dc:date>
    <item>
      <title>Problem with KMS Current Control</title>
      <link>https://community.nxp.com/t5/Kinetis-Motor-Suite/Problem-with-KMS-Current-Control/m-p/726771#M333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I generated the code from the KMS GUI and I was testing the current control. The motor speeds up pretty smooth using the interface. However, when I tried from the code generated, the motor tries to start apparently with much higher torque then a&amp;nbsp; fault comes up and the motor stops abruptly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here follows the code snippet I inserted in order to use current control:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(GPIO_DRV_ReadPinInput(kGpioSW3) == 0){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;switch(user.state){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case USER_BRAKE:&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;user.state = USER_IDLE;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case USER_IDLE:&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case USER_RUN_CURRENT:&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;user.command.statorRefCurrent.q = _SQ(0.3/FULL_SCALE_CURRENT);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;user.state = USER_RUN_CURRENT;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;default:&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; }&lt;BR /&gt; else{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;brake.config.brakingType = BRAKE_COAST;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;user.state = USER_BRAKE;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Update drive module&lt;BR /&gt; DRV_updateSlowTick();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please help me solve this problem?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Oct 2017 20:21:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Motor-Suite/Problem-with-KMS-Current-Control/m-p/726771#M333</guid>
      <dc:creator>PedroCastro</dc:creator>
      <dc:date>2017-10-26T20:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with KMS Current Control</title>
      <link>https://community.nxp.com/t5/Kinetis-Motor-Suite/Problem-with-KMS-Current-Control/m-p/726772#M334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried to use _SQ15(), but it did not work either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I missing??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2017 18:36:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Motor-Suite/Problem-with-KMS-Current-Control/m-p/726772#M334</guid>
      <dc:creator>PedroCastro</dc:creator>
      <dc:date>2017-10-27T18:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with KMS Current Control</title>
      <link>https://community.nxp.com/t5/Kinetis-Motor-Suite/Problem-with-KMS-Current-Control/m-p/726773#M335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if(GPIO_DRV_ReadPinInput(kGpioSW2) == 0){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;switch(user.state){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;case USER_BRAKE:&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;user.state = USER_IDLE;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;case USER_IDLE:&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;user.state = USER_RUN_CURRENT;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;case USER_RUN_CURRENT:&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;user.command.statorRefCurrent.q = _SQ(0.5/FULL_SCALE_CURRENT);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;user.state = USER_RUN_CURRENT;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;default:&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; }&lt;BR /&gt; else{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;brake.config.brakingType = BRAKE_COAST;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;user.state = USER_BRAKE;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems to me that at the first time you move from IDLE to CURRENT, the control sets an initial speed value to follow, so you need to set a current when you are already in the CURRENT mode&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Oct 2017 18:24:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Motor-Suite/Problem-with-KMS-Current-Control/m-p/726773#M335</guid>
      <dc:creator>PedroCastro</dc:creator>
      <dc:date>2017-10-29T18:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with KMS Current Control</title>
      <link>https://community.nxp.com/t5/Kinetis-Motor-Suite/Problem-with-KMS-Current-Control/m-p/726774#M336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Pedro, you are great!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Oct 2017 20:18:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Motor-Suite/Problem-with-KMS-Current-Control/m-p/726774#M336</guid>
      <dc:creator>PedroCastro</dc:creator>
      <dc:date>2017-10-29T20:18:44Z</dc:date>
    </item>
  </channel>
</rss>

