<?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>FreeMASTERのトピックRe: freemaster dashboard variable input</title>
    <link>https://community.nxp.com/t5/FreeMASTER/freemaster-dashboard-variable-input/m-p/1951200#M1845</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;your script works well on my side.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MichalH_1-1725980527609.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/298292iBCC83BFD5D2AACC7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MichalH_1-1725980527609.png" alt="MichalH_1-1725980527609.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please remember that the variable needs to be modifiable:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MichalH_0-1725980370862.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/298291iABD8B60BBA9D7CB8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MichalH_0-1725980370862.png" alt="MichalH_0-1725980370862.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Also note that current version of FreeMASTER will not update the variable value in the Watch view until you open the communication port. This issue will be fixed in the upcoming release - the virtual variables will not need a port being open at all and their value will refresh variable watch views.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Michal&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Sep 2024 15:03:45 GMT</pubDate>
    <dc:creator>MichalH</dc:creator>
    <dc:date>2024-09-10T15:03:45Z</dc:date>
    <item>
      <title>freemaster dashboard variable input</title>
      <link>https://community.nxp.com/t5/FreeMASTER/freemaster-dashboard-variable-input/m-p/1951051#M1844</link>
      <description>&lt;P&gt;In freemaster software i am unable to overwrite a virtual variable in the watch variabe section from the dashboard input for that variable.&lt;BR /&gt;Kindly Clarify!&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
    &amp;lt;title&amp;gt;PWM Dashboard&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body onload="main()"&amp;gt;
    &amp;lt;object id="pcm" height="0" width="0" classid="clsid:48A185F1-FFDB-11D3-80E3-00C04F176153"&amp;gt;&amp;lt;/object&amp;gt;
    &amp;lt;h1&amp;gt;PWM Dashboard&amp;lt;/h1&amp;gt;
    var01inc: &amp;lt;input id="input_var01inc" value="1" type="text" size="10"&amp;gt;
    &amp;lt;input type="button" value="Write!" onclick="writevar()"&amp;gt;
    &amp;lt;span id="span_status" type="text"&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;

    &amp;lt;div class="footer"&amp;gt;
        Copyright 2020 NXP
    &amp;lt;/div&amp;gt;

    &amp;lt;script language="Javascript"&amp;gt;
        var i_var01inc;
        var s_status;

        function main() {
            i_var01inc = document.getElementById("input_var01inc");
            s_status = document.getElementById("span_status");

            // Check if FreeMASTER is available
            if (!pcm) {
                s_status.innerText = "ERROR: FreeMASTER not initialized!";
                return;
            }

            // Display a message that FreeMASTER has initialized correctly
            console.log("FreeMASTER initialized. Ready to write variable.");
        }

        function writevar() {
            var v = i_var01inc.value; // Get the input value for var01inc

            // Attempt to write to FreeMASTER's virtual variable
            if (pcm.WriteVariable("var01inc", v)) {
                s_status.innerText = "Written: " + v;
            } else {
                s_status.innerText = "ERROR: " + pcm.LastRetMsg;
            }

            console.log("Attempting to write value: ", v);
        }
    &amp;lt;/script&amp;gt;

    &amp;lt;script type="text/javascript" src="/js/simple-jsonrpc-js.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script type="text/javascript" src="/js/freemaster-client.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 10 Sep 2024 10:58:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/freemaster-dashboard-variable-input/m-p/1951051#M1844</guid>
      <dc:creator>paul_ephraim_13</dc:creator>
      <dc:date>2024-09-10T10:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: freemaster dashboard variable input</title>
      <link>https://community.nxp.com/t5/FreeMASTER/freemaster-dashboard-variable-input/m-p/1951200#M1845</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;your script works well on my side.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MichalH_1-1725980527609.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/298292iBCC83BFD5D2AACC7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MichalH_1-1725980527609.png" alt="MichalH_1-1725980527609.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please remember that the variable needs to be modifiable:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MichalH_0-1725980370862.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/298291iABD8B60BBA9D7CB8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MichalH_0-1725980370862.png" alt="MichalH_0-1725980370862.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Also note that current version of FreeMASTER will not update the variable value in the Watch view until you open the communication port. This issue will be fixed in the upcoming release - the virtual variables will not need a port being open at all and their value will refresh variable watch views.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Michal&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 15:03:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/freemaster-dashboard-variable-input/m-p/1951200#M1845</guid>
      <dc:creator>MichalH</dc:creator>
      <dc:date>2024-09-10T15:03:45Z</dc:date>
    </item>
  </channel>
</rss>

