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 tabular editor via command 'Object' 'Add' (menu 'Project' - 'Object', or context menu) a new, primarily empty watch list can be created⮫ “Overview”⮫ “'Project' 'Object' ' Add'”. In the 1-Window-Editor for this purpose the command 'New Watch List' (menu 'Insert' or context menu) is available⮫ “Overview”⮫ “'Insert' 'New Watch List'”. 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 deactivate monitoring for this purpose⮫ “'Extras' 'Monitoring Active'”.
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 'Into new watch list' (menu 'Extras' or context menu)⮫ “'Extras' 'Into new watch list'”. 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. Renaming of the list is only possible in offline mode⮫ “'Extras' 'Rename Watch List'”.
-
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 'Add to watch list' (menu 'Extras' or context menu)⮫ “'Extras' 'Add to watch list'”.
-
Instead of a variable identifier an address in standard format can be entered in a watch list⮫ “Address”. Command 'Insert address range' (menu 'Extras' or context menu) allows to add all addresses of a specified address range at one go⮫ “'Insert address range'”.
Fill a list manually:
Possible in online and offline mode; for the syntax see: Overview, Editor⮫ “Editor”
Tabular editor:
-
If the watch list is opened, via commands 'Insert watch variable' or 'Insert' 'Attach watch variable'further variables can be added⮫ “'Insert' 'Insert watch variable'”⮫ “'Insert' 'Attach watch variable'”. Existing entries can be selected and removed by 'Delete watch variable' resp. <Del>⮫ “'Delete watch variable'”.
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 Overview, Editor for the requested syntax⮫ “Editor”. If the variables should be entered in online mode, previously the monitoring must be deactivated. Via command 'Monitoring active' in the 'Extras' or the context menu you can switch between activated and deactivated⮫ “'Extras' 'Monitoring Active'”.
Note on using the input assistant in the watch- and recipe manager:
The non-structured view of the Input Assistant offers additional filter functions for selecting watch variables⮫ “Unstructured display”: 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”.
⮫ “'Extras' 'Save Watch List'”