<?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 The mcd_main function generated from S12ZVM_FOC.slx in Model-Based Design Toolbox (MBDT)</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/The-mcd-main-function-generated-from-S12ZVM-FOC-slx/m-p/683972#M840</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Dear Daniel&lt;/P&gt;&lt;P&gt;This is the main function generated from S12ZVM_FOC.slx, however ,I can't find the SYSTEM_TASK() in the&amp;nbsp;while cycle. Should I put the SYSTEM_TASK in the red part or the while loop?&lt;/P&gt;&lt;P&gt;I &amp;nbsp;have tried to put the SYSTEM_TASK() in the red part&amp;nbsp;or the while loop &amp;nbsp;,and then my BLDC didn't work.&lt;/P&gt;&lt;P&gt;Thanks very much.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/28111iEE06059530AE0221/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Jul 2017 09:36:00 GMT</pubDate>
    <dc:creator>jiangfeng</dc:creator>
    <dc:date>2017-07-26T09:36:00Z</dc:date>
    <item>
      <title>The mcd_main function generated from S12ZVM_FOC.slx</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/The-mcd-main-function-generated-from-S12ZVM-FOC-slx/m-p/683972#M840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Dear Daniel&lt;/P&gt;&lt;P&gt;This is the main function generated from S12ZVM_FOC.slx, however ,I can't find the SYSTEM_TASK() in the&amp;nbsp;while cycle. Should I put the SYSTEM_TASK in the red part or the while loop?&lt;/P&gt;&lt;P&gt;I &amp;nbsp;have tried to put the SYSTEM_TASK() in the red part&amp;nbsp;or the while loop &amp;nbsp;,and then my BLDC didn't work.&lt;/P&gt;&lt;P&gt;Thanks very much.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/28111iEE06059530AE0221/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 09:36:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/The-mcd-main-function-generated-from-S12ZVM-FOC-slx/m-p/683972#M840</guid>
      <dc:creator>jiangfeng</dc:creator>
      <dc:date>2017-07-26T09:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: The mcd_main function generated from S12ZVM_FOC.slx</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/The-mcd-main-function-generated-from-S12ZVM-FOC-slx/m-p/683973#M841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/jiangfeng"&gt;jiangfeng&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure i've understood your question.&lt;/P&gt;&lt;P&gt;The MBDToolbox generates all the code and setup needed to run the application without the need for any additional hand written code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That comment is put there in case you want to reuse the generated code for other purposes via an IDE.&lt;/P&gt;&lt;P&gt;By default the code generated by the Matlab is going to place the call to&amp;nbsp;SYSTEM_TASK() within the callback of the TIM_Ch0_ISR interrupt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this what you are looking for ?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/28563iBEFED2CD87B4905C/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do not try to call is on the infinite loop. In case you need to use another interrupt source, just call it on that interrupt callback routine since you need a precise timing in order to control the motor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 11:01:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/The-mcd-main-function-generated-from-S12ZVM-FOC-slx/m-p/683973#M841</guid>
      <dc:creator>Daniel_Popa</dc:creator>
      <dc:date>2017-07-26T11:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: The mcd_main function generated from S12ZVM_FOC.slx</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/The-mcd-main-function-generated-from-S12ZVM-FOC-slx/m-p/683974#M842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,,Daniel&lt;/P&gt;&lt;P&gt;I understand. Thanks &amp;nbsp;very much&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 11:44:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/The-mcd-main-function-generated-from-S12ZVM-FOC-slx/m-p/683974#M842</guid>
      <dc:creator>jiangfeng</dc:creator>
      <dc:date>2017-07-26T11:44:38Z</dc:date>
    </item>
  </channel>
</rss>

