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.

CCS/DRV8302-HC-C2-KIT: LoadJSfile Error

Part Number: DRV8302-HC-C2-KIT

Tool/software: Code Composer Studio

Hello,

I am using this kit with PM_Sensorless program but when I try to load the java script in the scripting console an error message appears:

"missing ; before statement [my js location] ".

I tried to find an answer in the documentation but I did not find it.

I am using ccs 9 whereas the documentation deals with ccs4 but I can't install this version.

Does someone have a solution to my problem ?

Thank you.

  • You might ignore this to add the related variables to the watch window directly for debugging. The .js is just used for adding watch window variables.

    Or refer to the below code to change the .js file.

    //AddWatchWindowVars_F2803x.js

    //Add watch window variables
    expRemoveAll();
    expAdd ("EnableFlag", getDecimal());
    expAdd ("DRV_RESET", getDecimal());
    expAdd ("IsrTicker", getDecimal());

    expAdd ("SpeedRef", getQValue(24));
    expAdd ("VdTesting", getQValue(24));
    expAdd ("VqTesting", getQValue(24));

    expAdd ("cal_offset_A", getQValue(15));
    expAdd ("cal_offset_B", getQValue(15));

    expAdd ("IdRef", getQValue(24));
    expAdd ("IqRef", getQValue(24));

    expAdd ("lsw", getDecimal());
    expAdd ("dlog.prescalar", getDecimal());

    expAdd ("pid1_id.term.Ref", getQValue(24));
    expAdd ("pid1_iq.term.Ref", getQValue(24));
    expAdd ("pid1_id.term.Fbk", getQValue(24));
    expAdd ("pid1_iq.term.Fbk", getQValue(24));
    expAdd ("speed3.EstimatedSpeed", getQValue(24));
    expAdd ("pid1_spd.param.Kp", getQValue(24));
    expAdd ("pid1_spd.param.Ki", getQValue(24));

  • Hello,

    Thank you for your answer. 

    It means that I need to write the variables from the Sensorless FOC of PMSM into the watch window? 

    I replaced the program in the java script by yours but it did not work. 

    Best regards. 

  • Could you please tell what's the operation step you did?

    You may try the step using "View->Scripting Console", copy the content in the file of the .js to the window of "Scripting Console", and then click "enter".

    If still not work, you have to add the related variables by manual. Unfortunately, I can't repeat the issue you mentioned.

  • Thank you for your help.

    I am going to try it and I will tell you if it worked.

    Best regards.

  • Any updates?  Just wanted to check in and see if there is any update from your side, I haven’t heard from you for a week, so I’m assuming you were able to resolve your issue. Please let me know if you have any questions. We would like to close this thread if no further questions. Thanks.