‘Online’ ‘Force values’¶
Shortcut: <F7>
With this command, one or more variables are permanently set (see ‘Online’ ‘Write values’ for setting only once at the beginning of a cycle) to user-defined values.
The setting occurs in the run-time system, both at the beginning and at the end of the cycle. The time sequence in one cycle: 1.Read inputs, 2. Force values 3. Process code, 4. Force values 5. Write outputs.
The function remains active until it is explicitly suspended by the user (command ‘Online’ ‘Release force’) or the programming system is logged-out.
For setting the new values, a ‘writelist’ is first created, just as described under ‘Online’ ‘Write values’. The variables contained in the writelist are accordingly marked in Monitoring. The writelist is transferred to a ‘forcelist’ as soon as the command ‘Online’ ‘Force values’ is executed. It is possible that an active forcelist already exists, in which case it is updated as required. The writelist is then emptied and the new values displayed in red as ‘forced’. Modifications of the forcelist are transferred to the program with the next ‘Force values’ command.
Note: The forcelist is created at the first forcing of the variables contained in the writelist, while the writelist existed prior to the first writing of the variables that it contains.
The command for forcing a variable, which means that it will be entered into the forcelist can be found at the following places:
- Command ‘Force Values’ in the menu ‘Online’.
- Button ‘Force Values’ in the dialog ‘Online’ ‘Write/Force’ Dialog’.
Note
In the sequential function chart language, the individual values from which a transition expression is assembled cannot be changed with ‘Force 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 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 ‘Force values’ command is only possible for this variable.