<?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: There is a question about the dual motor S32 project form NXP in Model-Based Design Toolbox (MBDT)</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/There-is-a-question-about-the-dual-motor-S32-project-form-NXP/m-p/680959#M736</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;Haha:smileyhappy:,Thank you !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Jul 2017 08:31:16 GMT</pubDate>
    <dc:creator>edenli</dc:creator>
    <dc:date>2017-07-03T08:31:16Z</dc:date>
    <item>
      <title>There is a question about the dual motor S32 project form NXP</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/There-is-a-question-about-the-dual-motor-S32-project-form-NXP/m-p/680957#M734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;I read the C-code about the dual motor demo board ,there is a question shown as below:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;&lt;STRONG&gt;The C-code from the Project as below:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;/*&lt;BR /&gt; * Declaration macro keeps all necessary settings for single/dual&lt;BR /&gt; * motor control application under one command.&lt;BR /&gt; */&lt;BR /&gt;#define DECLARATION(param, uni3_param, pospe_param, cb_param, enc_avaliable, res_avaliable) &amp;nbsp;static pmsmDrive_t &amp;nbsp;param = { CFOC_DEFAULT,\&lt;BR /&gt; uni3_param##_CFG_DEFAULT,\&lt;BR /&gt; pospe_param##_CFG_DEFAULT,\&lt;BR /&gt; enc_avaliable,\&lt;BR /&gt; res_avaliable,\&lt;BR /&gt; MPC5643L_BGA257_##cb_param##_DEFAULT,\&lt;BR /&gt; CNTR_STATE_DEFAULT,\&lt;BR /&gt; SCALAR_CNTR_STATE_DEFAULT};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;&lt;STRONG&gt;My analysis and question:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;&lt;STRONG&gt;AS i use the 'define' before,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;&lt;STRONG&gt;#define A &amp;nbsp;5 &amp;nbsp;--- equal to A=5; According to the similar to analyze it that&amp;nbsp;&lt;SPAN style="color: #3d3d3d; font-weight: normal;"&gt;DECLARATION =&amp;nbsp;&lt;SPAN&gt;param,but it &amp;nbsp;seems not right,The reason is that the parameters order of&amp;nbsp;DECLARATION is &lt;STRONG style="color: #800000;"&gt;(1)&lt;/STRONG&gt;param, &lt;STRONG style="color: #800000;"&gt;(2)&lt;/STRONG&gt;uni3_param, &lt;STRONG style="color: #800000;"&gt;(3)&lt;/STRONG&gt;pospe_param, &lt;STRONG style="color: #800000;"&gt;(4)&lt;/STRONG&gt;cb_param, &lt;STRONG style="color: #800000;"&gt;(5)&lt;/STRONG&gt;enc_avaliable, &lt;STRONG style="color: #800000;"&gt;(6)&lt;/STRONG&gt;res_avaliable ,but the assignment is&amp;nbsp;&lt;STRONG style="color: #800000;"&gt;(1)&lt;/STRONG&gt;CFOC_DEFAULT&amp;nbsp;&lt;STRONG style="color: #800000;"&gt;(2)&lt;/STRONG&gt;uni3_param##_CFG_DEFAULT&amp;nbsp;&lt;STRONG style="color: #800000;"&gt;(3)&lt;/STRONG&gt;pospe_param##_CFG_DEFAULT,\&lt;STRONG style="color: #800000;"&gt;(4)&lt;/STRONG&gt;&amp;nbsp;enc_avaliable,\&lt;STRONG style="color: #800000;"&gt;(5)&lt;/STRONG&gt;&amp;nbsp;res_avaliable,\&amp;nbsp;&lt;STRONG style="color: #800000;"&gt;(6)&lt;/STRONG&gt;MPC5643L_BGA257_##cb_param##_DEFAULT,\&lt;STRONG style="color: #800000;"&gt;(7)&lt;/STRONG&gt;CNTR_STATE_DEFAULT,\&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;&lt;STRONG style="color: #800000;"&gt;(8)&lt;/STRONG&gt;&lt;/SPAN&gt;SCALAR_CNTR_STATE_DEFAULT};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;1#&lt;/STRONG&gt;&lt;/SPAN&gt; The order and the numbers is the same, Why adding the&amp;nbsp;&lt;SPAN&gt;&lt;SPAN style="color: #ff0000;"&gt;CNTR_STATE_DEFAULT and&amp;nbsp;SCALAR_CNTR_STATE_DEFAULT&lt;/SPAN&gt;?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG style="color: #ff0000;"&gt;2#&lt;/STRONG&gt; How to comprehend the&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp;&lt;STRONG style="color: #800000; font-weight: normal;"&gt;uni3_param##_CFG_DEFAULT?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="color: #800000; font-weight: normal;"&gt;3#Assign the order of the Value is rignt?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2017 04:01:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/There-is-a-question-about-the-dual-motor-S32-project-form-NXP/m-p/680957#M734</guid>
      <dc:creator>edenli</dc:creator>
      <dc:date>2017-07-03T04:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: There is a question about the dual motor S32 project form NXP</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/There-is-a-question-about-the-dual-motor-S32-project-form-NXP/m-p/680958#M735</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/edenli"&gt;edenli&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;## operator is called the &lt;STRONG&gt;concatenation&lt;/STRONG&gt; or &lt;STRONG&gt;token pasting&lt;/STRONG&gt;. and its job is to concatenate whatever comes before ## with whatever stand after it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;For the rest of the questions - keep in mind that the macro DECLARATION is used to construct a STRUCT called M1 or M2 of type&amp;nbsp;&lt;STRONG&gt;pmsmDrive_t&lt;/STRONG&gt;. If you think about that macro this way - i think you will have no issues to understand what it is expanding for and figure the answers by yourself :-)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Hope this helps!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Daniel&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2017 08:02:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/There-is-a-question-about-the-dual-motor-S32-project-form-NXP/m-p/680958#M735</guid>
      <dc:creator>Daniel_Popa</dc:creator>
      <dc:date>2017-07-03T08:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: There is a question about the dual motor S32 project form NXP</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/There-is-a-question-about-the-dual-motor-S32-project-form-NXP/m-p/680959#M736</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;Haha:smileyhappy:,Thank you !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2017 08:31:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/There-is-a-question-about-the-dual-motor-S32-project-form-NXP/m-p/680959#M736</guid>
      <dc:creator>edenli</dc:creator>
      <dc:date>2017-07-03T08:31:16Z</dc:date>
    </item>
  </channel>
</rss>

