Command Force values

Symbol: Command Force values 1:

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

Call: Menu PLC, TwinCAT PLC Toolbar Options

Requirement: The PLC project is in online mode.

CAUTION

Material damage and personal injury due to unexpected behavior of the controlled system

Changing the values of variables in a PLC program running on the controller can lead to unexpected behavior of the controlled system. Depending on the controlled system, damage to equipment and workpieces can occur or people's health and lives may be endangered.

  • Evaluate possible risks before forcing variable values and take appropriate safety precautions.

With this command, TwinCAT permanently sets one or more variables of the active application on the controller to defined values. This setting is carried out at the beginning and end of each processing cycle. Order of execution: 1. Read inputs, 2. Force values, 3. Execute code, 4. Force values, 5. Write outputs.

You can prepare values by

A "forced" value is marked with an Command Force values 2:.

Command Force values 3:

TwinCAT performs forcing until it is explicitly cancelled by the user through

Command Force values 4:

The command Force values for all applications, which affects all PLC projects in the TwinCAT project, is not included in a menu by default.

See also: