The prepared value is set to the respective variable at the beginning and end of a task cycle (or of a processing loop in the case of other task types).
The processing order in each cycle of a task is as follows:
- 1
-
Read the inputs
- 2
-
Force: Before the first program call, all prepared values are written to the variables by the runtime system, regardless of whether or not they are used by the task.
- 3
-
Process the IEC code
- 4
-
Force: After the last program call, all prepared values are written to the variables by the runtime system, regardless of whether or not they are used by the task.
- 5
-
Write the outputs
Note: It is possible that a forced variable temporarily gets a different value in the cycle while the code is being processed because the IEC code performs an assignment. Then the variable receives the forced value again only at the end of the cycle. The variable value can also be overwritten by the write access of a client to symbols of the application in mid-cycle. For this case, see the “Access variables in sync with IEC tasks” option in the “Properties” of the device object, or the “Configure synchronization with IEC tasks” setting in the symbol configuration. In this way, a PLC handler-supported synchronization of the write accesses by clients can be enabled with the task cycle.




NOTICE

Forced values are marked with the symbol. Automation Builder does the forcing until the user lifts it explicitly by one of the following actions:
-
Execution of the “Unforce All Values” command
-
Releasing the force operation in the “Prepare Value” dialog
-
Logging out of the application
In Automation Builder the Persistent Force behavior is enabled by default, so that the forced values are also retained after the controller is restarted (reboot or power cycle).
If forced variables still exist when logging out, then a dialog opens, prompting whether or not forcing should be lifted for all variables. If you respond by clicking “No”, then the forced values are applied again at the next login.