WATCHES: Monitoring/Debugging the Safety-Related Application
![]() | The WATCHES window can be used to collect variables to monitor their online values while the application is executed. This makes it unnecessary to open the individual code worksheets containing the variables to be monitored. For variables collected from safety-related POUs, the following applies:
|
Adding variables to WATCHES
Variables can be added to the WATCHES window by dragging them from- code worksheets or
- variables tables or
- the 'Data List' of the Safety PLC
A variable can only be added once to the WATCHES window. Newly added variables are always added at the end of the watch list.
Ports (only available for PLCnext Technology controllers) can also be added from local variables tables (only programs) and from the PLCnext Data List. Their online values are shown in the WATCHES window in the same representation like IEC variables.
The WATCHES window content is saved locally on your computer when saving the project. This means that the watch list is restored in the WATCHES window when re-opening a project.
Content of the WATCHES window
The tabular WATCHES window shows the following information for each inserted variable:
- Variable name: in case of a function input/output, the name is composed of the function/FB instance name and the input/output name separated by a dot. Example: P_GEN_1.Q.
- Value: current online value of the element. This is the value of the element between two task execution cycles. Forced values are shown in the following color gradients:
/
Value forced to TRUE/SAFETRUE /
Value forced to FALSE/SAFEFALSE - Data type of the variable.
- Instance: location where the variable is used, including the unique instance path.
WATCHES window context menu
Right-clicking a variable in the WATCHES window opens the context menu providing the following commands.
Command | Shortcut | Description |
---|---|---|
Overwrite/Force | <Ctrl> + <Alt> + <2> | Overwrites or forces the selected element with a defined value. Forced values are shown with a color gradient (see list above).For variables inserted from safety-related POUs, this command is only available if debug mode of the Safety PLC is active. While the Safety PLC runs in monitoring mode, no debug commands on its variables can be executed.For detailed information on overwriting using the WATCHES window, see the topic "Debugging Safety-Related Code: Forcing/Overwriting". |
Unforce | <Ctrl> + <Alt> + <3> | Resets the forced value to the actual value. Only active if the variable is forced.For variables inserted from safety-related POUs, this command is only available if debug mode of the Safety PLC is active. While the Safety PLC runs in monitoring mode, no debug commands on its variables can be executed.For detailed information on overwriting using the WATCHES window, see the topic "Debugging Safety-Related Code: Forcing/Overwriting". |
Select All | <Ctrl> + <A> | Selects all elements in the WATCHES window. |
Collapse | - | For variables inserted from safety-related POUs, this command remains inactive because no user-defined data types to be expanded/collapsed are supported. |
Delete | <Del> | Removes the selected element from the WATCHES window.Multiselection is possible, by using the 'Select All' context menu item or by selecting individual variables while holding the <Ctrl> key down while left-clicking. |