Command Write values
Symbol:
Function: The command once 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.
|
With this command, you set one or more variables of the active PLC project on the controller to defined values once. Writing takes place once at the beginning of the next cycle.
You can prepare values by
- clicking in the prepared value field in the declaration part and entering the new value. For a Boolean variable, change the value by single-clicking in the field.
- Click the inline monitoring field in the implementation part of the FBD/LD/IL editor and enter the new value.
- Click in the prepared value field in the Monitor window and enter the new value.
The command Write values for all applications, which affects all PLC projects in the TwinCAT project, is not included in a menu by default. |
See also:
- Command Force values
- PLC documentation: Forcing and Writing Variables Values