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/TMDSCNCD28379D: Change Expression Values

Part Number: TMDSCNCD28379D

Tool/software: Code Composer Studio

Hi All, 

I'm experiencing an issue when attempting to change the value of an Expression. I am currently following the Design Guide: TIDM-1000 and am on Step 9 of 6.4.1.5. What is the proper way to change Expression Values? I need to change the Expression VIENNA_clearTrip to show a value of 1. 

My first attempt was to modify the variable value within the vienna.c file. This worked the first time I rebuilt and ran the main loop, but on subsequent rebuilds and reruns it would simply flash the changed value and then revert to displaying the default value of 0 for VIENNA_clearTrip. 

Thank you. 

  • Aiden,

    In looking at the guide I believe that they want you to use the Expressions view in CCS to change this value not in your C file.  Figure 25 shows the Expressions view in CCS.  This view is for viewing and setting the values of variables and expressions.

    Running the script in 6.4.1.3 would have added a bunch of variables to the Expressions view.  You should be able to go to the value of VIENNA_clearTrip and change its value to 1.

    Regards,

    John

  • Hi John - thank you for the timely reply. 

    When trying to write to the variable through the Expressions View, it allows us to type into the Value column, but after pressing enter the value is reset to the Default Value of 0. 

    -Aiden

  • Aiden,

    What state is the device in when you attempt to edit the value?  If it is running then it is not going to accept the change in value unless real-time mode is enabled.  You could test by halting (button that looks like pause) and then trying to edit the value.

    Section 6.4.1.4 shows how to enable real-time mode.

    Regards,

    John

  • The script is currently running in the main loop and real-time mode is enabled. Even when halting the program, changing the value, and then resuming progress it changes back to zero once the script is running.

    However, when we are running our script we do see a boost in the voltage. Is it normal to see a zero for VIENNA_clearTrip even if we entered in 1 into into its value in an attempt to change it? But by this logic we should be able to turn off the boost by entering a zero in for its value and this does not work. We are quite stumped at this behavior. 

  • Oh. Perhaps this isn't a variable that is meant to be changed, but rather a value of 1 is entered to execute some code, perhaps in the .h file. We are able to change our VIENNA_dutyPU_DC value and it successfully holds and modifies the voltage. 

  • Aiden,

    I am not familiar with what application is doing.  I will see if I can loop in someone from the C2000 team to assist.

    Regards,

    John

  • Okay thank you so much. We look forward to reaching a solution.

  • Hi Aiden,

    This step is to set Vienna_cleartrip to 1 in expression window. You don't need to go back and change anything in the code. Once you set it to 1 and press enter, since you are in the real time mode, this value will be updated. But you will probably still see "0" there because it is reset to 0 based on the code in a very short time which is expected. please see function VIENNA_clearPWMTrip in vienna.h for details. Thanks.

    Regards,

    Chen