It is standard debug practice to watch local and global variables while debugging code. There are various methods for doing this in CCS, such as memory views and watch views. Additionally, CCS has the ability to make time (and frequency) domain plots. This ability allows the user to view waveforms using graph tool.
Click View → Expressions on the
menu bar to open an Expressions watch window . Move the mouse to the Expressions
window to view the variables being used in the project. Add variables to the
Expressions window as shown in Figure 3-11, it uses the number format associated with variables during declaration,
shows an example of the Expressions window. You can select a desired number
format for the variable by right clicking on it and choosing.
Alternately, a group of variables can be imported
into the Expressions window by right clicking within Expressions window and
clicking Import, and browse to the directory of the project at
<install_location>\solutions\tidm_02010_hvac_dmpfc\common\debug
and pick BuildLevel1.txt and click OK to import the variables shown in
Figure 3-11.
Note that some of the
variables have not been initialized at this point in the main code and might
contain some useless values.
The structure variables motorVars[0], motorVars[1] and pfcVars have references to most variables that are related to controlling dual motor with PFC. By expanding this variable, you can see them all and edit as needed.
Click on the Continuous Refresh button in
the expressions window. This enables the window to run with real-time mode. By
clicking the down arrow in this expressions window, you can select Customize
Continuous Refresh Interval and edit the refresh rate of the expressions
window. Note that choosing too fast an interval might affect performance.
Figure 3-11 Build Level 1: Expressions Watch Window at Reset