Creating Watch Lists, Recipes

By default in each project an empty watch list “Standard” is automatically created. See in the following how further lists can be created and filled with watch variables and how recipes can be defined. Partly this depends on which (target dependant) variant of the Watch- and Recipe Manager is used:

Creating watch lists

Create a new, empty list - in offline or online mode:

If entry ‘Watch- and Recipe Manager’ is selected in the ‘Resources’ tab, then in the Watch- and Recipe Manager via command ‘Project’ ‘Object’ ‘ Add’ (menu ‘Project’ - ‘Object’, or context menu) a new, primarily empty watch list can be created. In the Watch- and Recipe Manager for this purpose the command ‘Insert’ ‘New Watch List’ (menu ‘Insert’ or context menu) is available. Each a dialog for entering an unique watch list name opens. After confirmation the new list will be immediately added in the Resources tree (tabular editor) resp. in the left part of the 1-Window-Editor.

Fill new list with watch variables out of the POU editors, resp. add variables to existing lists:

Only possible in online mode. It is not necessary to ‘Extras’ \ ‘Monitoring Active’ for this purpose.

Tabular Editor and 1-Window-Editor:

  • If one or multiple variables or elements are selected in one of the POU editors, they can be directly entered in a new watch list by command ‘Extras’ ‘Into new watch \ list’ (menu ‘Extras’ or context menu). The new list will be added automatically as “Watch<n>” in the Resources tab below the Watch- and Recipe Manager and opened in the editor window. ‘Extras’ ‘Rename Watch List’ of the list is only possible in offline mode.
  • If one or multiple variables or elements are selected in one of the POU editors, the variables can be directly added to one of the existing watch lists by command ‘Extras’ ‘Add to watch \ list’ (menu ‘Extras’ or context menu).
  • Instead of a variable identifier an Address in standard format can be entered in a watch list. Command ‘Insert address range’ (menu ‘Extras’ or context menu) allows to add all addresses of a specified address range at one go.

Fill a list manually:

Possible in online and offline mode; for the syntax see: Watch- and Recipe Manager

Tabular editor:

1-Window-Editor:

  • For entering variables in a watch list, the list must be selected in the left part of the Watch- and Recipe Manager Window. Then variables are added in the right part at the current cursor position line by line, either with the help of the input assistant <F2> (see Note on using the Input Assistant… below) or by typing. See Watch- and Recipe Manager for the requested syntax. If the variables should be entered in online mode, previously the monitoring must be deactivated. Via command ‘Extras’ \ ‘Monitoring Active’ in the ‘Extras’ or the context menu you can switch between activated and deactivated.

Note on using the Input Assistant in the Watch- and Recipe Manager:

The Unstructured Display view of the Input Assistant offers additional filter functions for selecting watch variables: In the Filter input field you can enter a string and additionally specify whether this string must be found at the beginning of a variable name (Prefix), at the end of a variable name (Suffix), or at an arbitrary position within the variable name in order to get the watch variables offered for selection.

Working with Recipes

The variables of a watch list can be preset with constant values. In the tabular editor this is possible via column recipe value, in the 1-Window-Editor by an assignment via “:=”. Then the watch list can be used as a so-called “recipe”.

If the presetting should be done automatically with the current values read from the PLC, then command ‘Read Recipe’ can be used.

In the 1-Window-Editor variant of the Watch- and Recipe Manager the recipe values must be assigned according to the following example:

Example:

PLC_PRG.TIMER:=50

Here variable PLC_PRG.TIMER is preset with 50.

Note the following for variables of type array, structure or function block instance: The particular elements resp. instance variables must be entered explicitly in order to be able to preset them with values. Example: Let’s assume that a structure STRU is defined with components a, b,c, and a structure variable struvar is declared in program PLC_PRG. In order to preset a,b,c with values, the following must be entered in the watch list:

PLC_PRG.struvar.a:=<value>

PLC_PRG.struvar.b:=<value>

PLC_PRG.struvar.c:=<value>

Correspondingly the presetting of elements of an array must be done: Example for an array variable arr_var of type ARRAY[0…6]

PLC_PRG.arr_var[0]:=<value>

PLC_PRG.arr_var[1]:=<value>

If a function block fb contains the variables x,y and an instance variable fb_inst of type fb is declared in PLC_PRG, then x and y can be preset as follows:

PLC_PRG.fb_inst.x:=<value>

PLC_PRG.fb_inst.y:=<value>

Recipes can be saved externally in a file via command ‘Extras’ ‘Save Watch List’ and they can be loaded back to the editor via ‘Extras’ ‘Load Watch List’. In online mode the recipe values can be written to the variables on the PLC via ‘Extras’ \ ‘Write Recipe’.