<?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: Scaling Error Writing Real Transformation Fixed Point Scaled Parameters in Freemaster in Model-Based Design Toolbox (MBDT)</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Scaling-Error-Writing-Real-Transformation-Fixed-Point-Scaled/m-p/1476827#M7422</link>
    <description>&lt;P&gt;This isn't a solution, it is avoiding the regression in FREEmaster. The 0.1 unit per bit scaling is needed for the application I am developing, and should work with a tool designed to calibrate and stimulate fixed point scaled integer types.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Jun 2022 13:00:12 GMT</pubDate>
    <dc:creator>ericrost</dc:creator>
    <dc:date>2022-06-20T13:00:12Z</dc:date>
    <item>
      <title>Scaling Error Writing Real Transformation Fixed Point Scaled Parameters in Freemaster</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Scaling-Error-Writing-Real-Transformation-Fixed-Point-Scaled/m-p/1476081#M7416</link>
      <description>&lt;P&gt;When I build and deploy the attached model to a S32K144 and connect to the MCU using freemaster there are several values that cannot be written to the "scaled_parameter" that is present in the model. The GPIO pin that is being manipulated is simply to avoid removal of the parameter by the code generation optimizations in Simulink Embedded Coder.&lt;/P&gt;&lt;P&gt;For example, if a real value of 0.3 (uint16 value 3) is written through the attached freemaster project's Variable Watch, a value of 0.2 is read back (uint16 value 2), there are several other values that are not possible to write.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="scaled_param_write_0.3.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/183748iAA69AA4F92E98374/image-size/medium?v=v2&amp;amp;px=400" role="button" title="scaled_param_write_0.3.png" alt="scaled_param_write_0.3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="scaled_param_readback_0.2.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/183749iA510FDE4F574DCAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="scaled_param_readback_0.2.png" alt="scaled_param_readback_0.2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I can work around this by doing the real scaling in my javascript, but this is a fairly major regression in a tool meant to manipulate fixed point scaled values.&lt;/P&gt;&lt;P&gt;The model is created with the following tool versions, and the latest HotFix for the MBD Toolbox has been installed as well:&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------&lt;BR /&gt;MATLAB Version: 9.8.0.1721703 (R2020a) Update 7&lt;BR /&gt;Operating System: Microsoft Windows 10 Enterprise Version 10.0 (Build 19043)&lt;BR /&gt;Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode&lt;BR /&gt;-----------------------------------------------------------------------------------------------------&lt;BR /&gt;MATLAB Version 9.8 (R2020a)&lt;BR /&gt;Simulink Version 10.1 (R2020a)&lt;BR /&gt;AUTOSAR Blockset Version 2.2 (R2020a)&lt;BR /&gt;Embedded Coder Version 7.4 (R2020a)&lt;BR /&gt;Fixed-Point Designer Version 7.0 (R2020a)&lt;BR /&gt;MATLAB Coder Version 5.0 (R2020a)&lt;BR /&gt;MATLAB Report Generator Version 5.8 (R2020a)&lt;BR /&gt;Model-Based Design Toolbox for S32K1xx Series Version 4.2.0 (R2016a-R2020a)&lt;BR /&gt;Simscape Version 4.8 (R2020a)&lt;BR /&gt;Simscape Electrical Version 7.3 (R2020a)&lt;BR /&gt;Simulink Check Version 4.5 (R2020a)&lt;BR /&gt;Simulink Coder Version 9.3 (R2020a)&lt;BR /&gt;Simulink Coverage Version 5.0 (R2020a)&lt;BR /&gt;Simulink Design Verifier Version 4.3 (R2020a)&lt;BR /&gt;Simulink Requirements Version 1.5 (R2020a)&lt;BR /&gt;Stateflow Version 10.2 (R2020a)&lt;BR /&gt;Vehicle Network Toolbox Version 4.4 (R2020a)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ericrost_0-1655479085532.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/183750i60AB156C2E2F731A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ericrost_0-1655479085532.png" alt="ericrost_0-1655479085532.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 15:18:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Scaling-Error-Writing-Real-Transformation-Fixed-Point-Scaled/m-p/1476081#M7416</guid>
      <dc:creator>ericrost</dc:creator>
      <dc:date>2022-06-17T15:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling Error Writing Real Transformation Fixed Point Scaled Parameters in Freemaster</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Scaling-Error-Writing-Real-Transformation-Fixed-Point-Scaled/m-p/1476801#M7419</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/195042"&gt;@ericrost&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I checked the attached files and I have a possible solution for you. The model seems fine and all you have to do is to modify the Freemaster project:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Add two variables to the 'Variable Watch':&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SorinIBancila_0-1655726623598.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/183908i44DE69299CCD3DFE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SorinIBancila_0-1655726623598.png" alt="SorinIBancila_0-1655726623598.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Configure the '&lt;STRONG&gt;Scaled_param&lt;/STRONG&gt;' as in the following photo:&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SorinIBancila_1-1655726695098.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/183909i9637268CB792CC63/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SorinIBancila_1-1655726695098.png" alt="SorinIBancila_1-1655726695098.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Configure the '&lt;STRONG&gt;X&lt;/STRONG&gt;' as in the following photo (it's important to be configured as '&lt;STRONG&gt;unsigned int&lt;/STRONG&gt;' and to Show As '&lt;STRONG&gt;Dec&lt;/STRONG&gt;'):&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SorinIBancila_3-1655726759161.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/183911iC4464C474804AAB5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SorinIBancila_3-1655726759161.png" alt="SorinIBancila_3-1655726759161.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;To modify the variable, you have to edit the second variable ('&lt;STRONG&gt;X&lt;/STRONG&gt;'), and then the '&lt;STRONG&gt;scaled_param&lt;/STRONG&gt;' is automatically computed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if this solution helps you.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Bancila Sorin&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 12:09:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Scaling-Error-Writing-Real-Transformation-Fixed-Point-Scaled/m-p/1476801#M7419</guid>
      <dc:creator>SorinIBancila</dc:creator>
      <dc:date>2022-06-20T12:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling Error Writing Real Transformation Fixed Point Scaled Parameters in Freemaster</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Scaling-Error-Writing-Real-Transformation-Fixed-Point-Scaled/m-p/1476804#M7420</link>
      <description>&lt;P&gt;Bancila,&lt;/P&gt;&lt;P&gt;This isn't a better workaround than what I'm already able to do in my javascript. I would like to modify the engineering unit scaled value directly in the GUI I am implementing, and FREEmaster not being able to write multiple specific valid parameter values is a relatively serious deficiency.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Eric&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 12:15:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Scaling-Error-Writing-Real-Transformation-Fixed-Point-Scaled/m-p/1476804#M7420</guid>
      <dc:creator>ericrost</dc:creator>
      <dc:date>2022-06-20T12:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling Error Writing Real Transformation Fixed Point Scaled Parameters in Freemaster</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Scaling-Error-Writing-Real-Transformation-Fixed-Point-Scaled/m-p/1476827#M7422</link>
      <description>&lt;P&gt;This isn't a solution, it is avoiding the regression in FREEmaster. The 0.1 unit per bit scaling is needed for the application I am developing, and should work with a tool designed to calibrate and stimulate fixed point scaled integer types.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 13:00:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Scaling-Error-Writing-Real-Transformation-Fixed-Point-Scaled/m-p/1476827#M7422</guid>
      <dc:creator>ericrost</dc:creator>
      <dc:date>2022-06-20T13:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling Error Writing Real Transformation Fixed Point Scaled Parameters in Freemaster</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Scaling-Error-Writing-Real-Transformation-Fixed-Point-Scaled/m-p/1477246#M7426</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/195042"&gt;@ericrost&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Another possible solution to your problem can be to set the Transformation from 'Linear: ax + b' to '&lt;STRONG&gt;Lin: two points".&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SorinIBancila_0-1655796934688.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/183998iD377515F95A8BF3D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SorinIBancila_0-1655796934688.png" alt="SorinIBancila_0-1655796934688.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In this case, the inverse transformation works better, and the problem you discovered doesn't appear anymore.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SorinIBancila_1-1655797210757.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/183999i036D5A2DCC42E39E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SorinIBancila_1-1655797210757.png" alt="SorinIBancila_1-1655797210757.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SorinIBancila_2-1655797228375.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/184000i9126212EF07C4A6F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SorinIBancila_2-1655797228375.png" alt="SorinIBancila_2-1655797228375.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Let me know if this solution works better for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Bancila Sorin Ioanid&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 07:41:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Scaling-Error-Writing-Real-Transformation-Fixed-Point-Scaled/m-p/1477246#M7426</guid>
      <dc:creator>SorinIBancila</dc:creator>
      <dc:date>2022-06-21T07:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling Error Writing Real Transformation Fixed Point Scaled Parameters in Freemaster</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Scaling-Error-Writing-Real-Transformation-Fixed-Point-Scaled/m-p/1477465#M7427</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/180247"&gt;@SorinIBancila&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This workaround is acceptable to make the scaling that I need for my application function properly. An update to FREEmaster resolving the regression when using "ax + b" linear scaling would be preferred, but I can make this work.&lt;/P&gt;&lt;P&gt;Thanks for the support!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 12:54:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Scaling-Error-Writing-Real-Transformation-Fixed-Point-Scaled/m-p/1477465#M7427</guid>
      <dc:creator>ericrost</dc:creator>
      <dc:date>2022-06-21T12:54:06Z</dc:date>
    </item>
  </channel>
</rss>

