Default shortcut: CTRL + F7
To write a value by the Debug > Write values command means to set a variable on the controller to a defined value at the beginning of the next execution cycle. The command affects all variables of the application, which are prepared for writing.
NOTE: The command Write values [all applications] which affects all applications of a project, is not by default inserted in any menu (if needed, see the Customize dialog box).
NOTE: Also refer to the Force values command for permanently setting a defined value.
To prepare variables for writing, define the desired value in online mode in one of the following places which are used for monitoring:
oIn a Watch view defined in the project, containing a list of variables to be monitored.
oIn the online view of the object within the declaration part of the respective editor.
Step |
Action |
---|---|
1 |
Open an object in online mode, for example, a program written in ST. Result: In the declaration part of the editor window, you will find the displayable expressions listed in a table. |
2 |
Click the concerned field in the column Prepared value, and enter the desired value. |
3 |
Execute the command Debug > Write values. Result: The value will immediately be written to the respective field in the column Value, which means that it is written to the controller. The Prepared value field will be empty again. |
You can also write values in a Watch view that contains the desired expression.
In addition, the Prepare Value dialog box is available for currently forced variables. It also allows you to define a new value to be written.
If the option Secure online mode is enabled in the Communication Settings of the respective device, you have to confirm after calling this command.