‘Online’ ‘Write values’

Shortcut: <Ctrl>+<F7>

With this command, one or more variables are set – one time only! – to user defined values at the beginning of a cycle (see ‘Online’ ‘Force values’ for setting permanently).

The values of all single-element variables can be changed, so long as they are also visible in Monitoring.

Before the command ‘Write values’ can be executed, a variable value must be ready to be written: For non-boolean variables a double mouse click in performed on the line in which a variable is declared, or the variable is marked and the <Enter> key is pressed. The dialog box ‘Write variable <x>’ then appears, in which the value to be written to the variable can be entered.

../_images/804496bdc1b99c6a0a317d313b70ec7f1

For boolean variables, the value is toggled (switched between TRUE and FALSE, with no other value allowed) by double-clicking on the line in which the variable is declared; no dialog appears.

The value set for Writing is displayed in brackets and in turquoise colour behind the former value of the variable. e.g. a=0 <:=34>.

Note

Exception: In the FBD and LD Editor the value is shown turquoise without brackets next to the variable name.

Set the values for as many variables as you like.

The values entered to be written to variables can also be corrected or deleted in the same manner. This is likewise possible in the ‘Online’ ‘Write/Force dialog’ (see below).

The values to be written that were previously noticed are saved in a writelist (Watchlist), where they remain until they are actually written, deleted or transferred to a forcelist by the command ‘Force values’.

The command to Write Values can be found at two places:

When the command ‘Write values’ is executed, all the values contained in the writelist are written, once only , to the appropriate variables in the controller at the beginning of the cycle, then deleted from the writelist. (If the command ‘Online’ ‘Force values’ is executed, the variables in question are also deleted from the writelist, and transferred to the forcelist!)

Note

In the sequential function chart language (SFC Sequential Function Chart (SFC)), the individual values from which a transition expression is assembled cannot be changed with ‘Write values’. This is due to the fact that in monitoring the ‘Total value’ of the expression, not the values of the individual variables are displayed (e.g. “a AND b” is only displayed as TRUE if both variables actually have the value TRUE).

In Function Block Diagram (FBD), on the other hand, only the first variable in an expression, used for example as input to a function block, is monitored. Thus a ‘Write values’ command is only possible for this variable.