Skip to main content

Command: Force Values

Keyboard shortcut: F7

Function: The command sets a permanent predefined value to a variable on the controller.

Call: Debug menu

Requirement: The application is in online mode.

Unusual changes to variable values in an application currently running on the controller can cause undesired behavior of the controlled plant.

Evaluate possible dangers before forcing variable values, and take the respective safety precautions. Depending on the controlled plant, this could result in damage to the plant or the workpieces, or injury or death of personnel.

With the command, CODESYS permanently sets one or more variables of the active application to defined values on the controller.

A forced value is marked with the forced _cds_icon_forced_variable.png symbol.

For more information about the functionality of forcing and the p of values, see the "Forcing and Writing of Variables" help page.

Tip

By default, the Force Values [All Applications] command, which applies to all application in the project, and is not included in a menu.

For more information, see: Forcing and Writing of Variables and Using Watch Lists