This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Difference between GUI Composer standalone and GUI Composer inside CCSv5.5

Other Parts Discussed in Thread: CCSTUDIO

Hi there,

I have an issue with the GUI Composer standalone app.

Just a simple GUI that controls the speed of the Motor.

When I write the Gui Composer App inside CCSv5.5 and make an Preview

I can control the speed of the Motor and it runs perfect.

When i export this project to an standalone App the Motor drives not correct.

It would be Interrupted by something. The Speed does not drive constant.

I think that is an Interrupt from the Debugger.

Why does it works inside CCSv5.5?. Its the same Debugger Connection XDS100V2.

Alex

 

  • Hi Alex, 

    It is most likely due to default appInitScript.js file in your web app. By default we have a debugger setting in there that works on all devices, but it is not a good option for motor control apps. We are planning on changing this for v6. 

    Please open your appInitScript.js file and replace it with content below. 

    This line specifically

    session.options.setBoolean("UseLegacyStopMode", true);

    causes the debug engine to halt the CPU temporarily before making memory access, thus causing the jerkiness. 

    Martin

    -------------------

    importPackage(Packages.com.ti.ccstudio.scripting.environment)

    function initTarget() {
    var debugServer = ScriptingEnvironment.instance().getServer("DebugServer.1");

    print("Initializing target : " + appConfigFile+"\n");
    debugServer.setConfig(appConfigFile /* internal variable */);
    var session = debugServer.openSession("*", "*" /* TODO: */);

    /*session.options.setBoolean("UseLegacyStopMode", true);*/

    if (!session.target.isConnected()) {
    print("Connecting target: "+session.getName()+"\n");
    session.target.connect();
    }

    print("Loading program: "+appProgramFile+"\n");
    session.memory.loadProgram(appProgramFile /* internal variable */);

    print("Enabling Realtime\n");
    session.expression.evaluate("ST1.DBGM = 0");
    session.expression.evaluate("GEL_EnableRealtime()");

    print("Running Program...\n");
    session.target.runAsynch();
    }

    initTarget();

    importPackage(Packages.com.ti.ccstudio.scripting.environment)

    function initTarget() {
    var debugServer = ScriptingEnvironment.instance().getServer("DebugServer.1");

    print("Initializing target : " + appConfigFile+"\n");
    debugServer.setConfig(appConfigFile /* internal variable */);
    var session = debugServer.openSession("*", "*" /* TODO: */);

    /*session.options.setBoolean("UseLegacyStopMode", true);*/

    if (!session.target.isConnected()) {
    print("Connecting target: "+session.getName()+"\n");
    session.target.connect();
    }

    print("Loading program: "+appProgramFile+"\n");
    session.memory.loadProgram(appProgramFile /* internal variable */);

    print("Enabling Realtime\n");
    session.expression.evaluate("ST1.DBGM = 0");
    session.expression.evaluate("GEL_EnableRealtime()");

    print("Running Program...\n");
    session.target.runAsynch();
    }

    initTarget();

    -----------------------

  • alternatively you can use the appinit.js from any of the InstaSPIN GUIs that I know you are using.

    C:\ti\guicomposer\webapps\InstaSPIN_MOTION_F2806xM

     

    That's one of the reasons I've stated to use these GUIs as a starting point....because there is more to getting the GUI running than the actual widgets and variables.  Have you used any of the pre/post processing functions yet?  Or the post processing logic?  Being able to copy from an example is very helpful!

     

  • hi Martin, Chris,

    i copied the appinit.js from

    C:\ti\guicomposer\webapps\InstaSPIN_MOTION_F2806xM

    to my project and it works very well. :-)

     

    I don't use the pre and post processing function because i have an issue with this but this

    is not so important.

    I make a separate post with this issue.

    thank for you answers.

    alex