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.

js script for LAB06c appears incomplete

In lab06c the script file appears not to work properly.

Attached are screen shots, copy of js file.

Any thing I can do to fix it?  It only sets about 4 of 10 - 15 expressions.

David

0245.6C ERROR.rar

  • 6c.js works fine for me

    you can edit with text editor, here is the contentts

    expRemoveAll();
    expAdd ("gMotorVars");
    expAdd ("gMotorVars.UserErrorCode");
    expAdd ("gMotorVars.CtrlVersion");
    expAdd ("gMotorVars.Flag_enableSys", getDecimal());
    expAdd ("gMotorVars.Flag_Run_Identify", getDecimal());
    expAdd ("gMotorVars.Flag_enablePowerWarp", getDecimal());
    expAdd ("gMotorVars.CtrlState");
    expAdd ("gMotorVars.EstState");
    expAdd ("gMotorVars.Flag_MotorIdentified", getDecimal());
    expAdd ("gMotorVars.MagnCurr_A");
    expAdd ("gMotorVars.Rr_Ohm");
    expAdd ("gMotorVars.Rs_Ohm");
    expAdd ("gMotorVars.Lsd_H");
    expAdd ("gMotorVars.Lsq_H");
    expAdd ("gMotorVars.Flux_VpHz");
    expAdd ("gMotorVars.SpeedRef_krpm", getQValue(24));
    expAdd ("gMotorVars.MaxAccel_krpmps", getQValue(24));
    expAdd ("gMotorVars.MaxJrk_krpmps2", getQValue(20));
    expAdd ("gMotorVars.Speed_krpm", getQValue(24));
    expAdd ("gMotorVars.Torque_lbin");
    expAdd ("gMotorVars.SpinTAC.VelCtlStatus");
    expAdd ("gMotorVars.SpinTAC.Inertia_Aperkrpm", getQValue(24));
    expAdd ("gMotorVars.SpinTAC.Friction_Aperkrpm", getQValue(24));
    expAdd ("gMotorVars.SpinTAC.VelCtlBwScale", getQValue(24));
    expAdd ("gMotorVars.SpinTAC.VelCtlBw_radps", getQValue(20));
    expAdd ("gMotorVars.SpinTAC.VelCtlErrorID");
    expAdd ("gMotorVars.SpinTAC.VelMoveStatus");
    expAdd ("gMotorVars.SpinTAC.VelMoveCurveType");
    expAdd ("gMotorVars.SpinTAC.VelMoveTime_ticks");
    expAdd ("gMotorVars.SpinTAC.VelMoveDone", getDecimal());
    expAdd ("gMotorVars.SpinTAC.VelMoveErrorID");
    expAdd ("gMotorVars.SpinTAC.VelPlanRun");
    expAdd ("gMotorVars.SpinTAC.VelPlanStatus");
    expAdd ("gMotorVars.SpinTAC.VelPlanDone", getDecimal());
    expAdd ("gMotorVars.SpinTAC.VelPlanErrorID");
    expAdd ("gWasherState");
    expAdd ("gWaterLevel");

    expAdd ("gDrvSpi8301Vars");

     

  • Thank you Chris,

    I converted your text to a js file and tried it. Still have the same results.

    I think the next text file attached showing errors and path might be a clue.

    The attachment attached to the first post shows screen shots of the error.

    For kicks I tried to see if it was isolated to the one lab, and it is not the next lab gives errors as well.

    David

    js:> loadJSFile "C:\ti\motorware\motorware_1_01_00_12\sw\solutions\instaspin_motion\src\proj_lab06c.js"
    Wrapped org.eclipse.swt.SWTException: Failed to execute runnable (TypeError: Cannot call method "setActiveFormat" of null (C:\ti\ccsv6\eclipse\configuration\org.eclipse.osgi\bundles\318\1\.cp\script\expressionView.js#36)) (C:\ti\ccsv6\eclipse\configuration\org.eclipse.osgi\bundles\318\1\.cp\script\expressionView.js#39)
    js:> loadJSFile "C:\ti\motorware\motorware_1_01_00_12\sw\solutions\instaspin_motion\src\proj_lab06c.js"
    Wrapped org.eclipse.swt.SWTException: Failed to execute runnable (TypeError: Cannot call method "setActiveFormat" of null (C:\ti\ccsv6\eclipse\configuration\org.eclipse.osgi\bundles\318\1\.cp\script\expressionView.js#36)) (C:\ti\ccsv6\eclipse\configuration\org.eclipse.osgi\bundles\318\1\.cp\script\expressionView.js#39)
    js:> loadJSFile "C:\ti\motorware\motorware_1_01_00_12\sw\solutions\instaspin_motion\src\proj_lab06c.js"
    Wrapped org.eclipse.swt.SWTException: Failed to execute runnable (TypeError: Cannot call method "setActiveFormat" of null (C:\ti\ccsv6\eclipse\configuration\org.eclipse.osgi\bundles\318\1\.cp\script\expressionView.js#36)) (C:\ti\ccsv6\eclipse\configuration\org.eclipse.osgi\bundles\318\1\.cp\script\expressionView.js#39)
    js:> loadJSFile "C:\ti\motorware\motorware_1_01_00_12\sw\solutions\instaspin_motion\src\proj_lab06c.js"
    Wrapped org.eclipse.swt.SWTException: Failed to execute runnable (TypeError: Cannot call method "setActiveFormat" of null (C:\ti\ccsv6\eclipse\configuration\org.eclipse.osgi\bundles\318\1\.cp\script\expressionView.js#36)) (C:\ti\ccsv6\eclipse\configuration\org.eclipse.osgi\bundles\318\1\.cp\script\expressionView.js#39)
    js:> loadJSFile "C:\ti\motorware\motorware_1_01_00_12\sw\solutions\instaspin_motion\src\proj_lab06d.js"
    Wrapped org.eclipse.swt.SWTException: Failed to execute runnable (TypeError: Cannot call method "setActiveFormat" of null (C:\ti\ccsv6\eclipse\configuration\org.eclipse.osgi\bundles\318\1\.cp\script\expressionView.js#36)) (C:\ti\ccsv6\eclipse\configuration\org.eclipse.osgi\bundles\318\1\.cp\script\expressionView.js#39)

  • you are using CCSv6, which we've never fully tested.

    I see the CCS folks decided to make some change to the scripting once again...brilliant...they messed this up moving from CCSv4 to v5 and now from v5 to v6.

    I confirm this is a bug.

     

  • Ok, What would you suggest?

    I take it you'll report it. If you think it will be corrected soon I'll wait. Otherwise I try to find CCS 5 or something as I will be working on this tomorrow sometime. Spinning in both directions now.

    Thanks for taking the time to look at the problem for me. At least we know what it is.

    Have good evening.

    David

  • you will have to copy from the text file and paste into the Expressions view, and then manually right click and change the format if required.

    or, if you just type in

    gMotorVars

    you will have all the variables, but you will stil have to manually change the Q format on some of them

     

    yes, I've let the CCS team know....no, it won't be fixed "soon".

     

  • Cool !!!

    Thank you

    David

  • David,

    This actually is NOT a bug, and things work fine.

    You just need to have a valid debug session running.  You must have closed yours or didn't launch the debugger.

     

  • Chris,

    Thanks for continue to look into it.

    That's good to hear.

    I'll try that in a few min., got to get some coffee.

    Thanks !!!!!

    David

  • Beautiful !!!!!

    I am rolling again.

    Sorry about that, guess that was my fault.

    Good thing to know, I would have never guessed that one. (another

    Thanks again for keeping on top of it, Darn good job.

    David