Requirement: An application has a CFC POU that contains a function block, and the application is in offline mode.




NOTICE

This kind of forcing uses a data breakpoint internally and is therefore different from forcing with the “Force Values” command or [F7].
Values which were forced by the “Force Function Block Input” command do not respond to the “Watch all Forces” or “Unforce Values” commands.
-
Open the editor of the CFC POU by double-clicking the object in the tree.
-
Log in to the application on the target device.
-
When using compiler version 3.5.11.x or 3.5.12.x, enable the "forceability" for the desired function block. Select the POU element in CFC and click “CFC Prepare Box for Forcing”.
-
In CFC, select the input of the POU and click “Force Function Block Input” in the context menu.
The “Force Value” dialog opens.
-
Set a new value for the input. Example in the case of a
TONPOU:FALSEfor the Boolean inputIN, ort#4sfor thePTinput (TIME). Click “OK” to confirm.The set value is forced immediately. A green circle is displayed at the upper left of the POU element and the name of the input in the element is highlighted in green. In the case of a Boolean value, a small monitoring view with the value also opens at the input. In the monitoring views, the forced value is displayed, for example in the “Value” column, as in the declaration part.
-
To remove the forced value, click “Force Function Block Input” again. In the “Force Value” dialog, select the “Remove value” option.
Forcing is canceled. The input gets the current value from the controller.
For more information, see: ⮫ “Command: Force Values ” and ⮫ “Command: Write Values ”