Visualization

When you insert a visualization as an element in another visualization, you are creating a “reference” of the visualization.

The configuration of this reference can be done in the Visualization category within the visualization element configuration dialog box.

../_images/15fe34174377ee170a33139006eab46b

Enter the object namefor the visualization, which should be inserted, in the Visualization field. Use the … button to open a dialog box containing the visualizations available in this project. Any visualization may be used with the exception of the current one.

The possible settings concerning the visualization frame are the same as described for a bitmap (see above).

The Placeholder button leads to the ‘Replace placeholder’ dialog. It lists in the ‘Placeholder’ column all the placeholders which had been inserted in the configuration dialogs of the “mother”-visualization and offers in the ‘Replacements’ column the possibility of replacing these for the current reference with a definite value. Which replacements are possible in a given case depends on whether a value group was predefined in the ‘Extras’ ‘Placeholder list’ dialog in the “mother”-visualization. If this is the case, it will be displayed in a combo box for selection. If nothing was pre-defined, double clicking on the corresponding field in the Replacements column opens an editing field which can be filled in as desired.

A further possibility for replacing placeholders in references occurs directly when you define the call of a visualization by an entry into the Zoom to vis. option field in the configuration dialog (‘Input’ category).

Note

No control of the chronological sequence of replacements is possible! Therefore no placeholders should be replaced with text that also contains placeholders!

Note

When using placeholders it is no longer possible to check for invalid entries in the configuration of the visualization element immediately upon compilation of the project. Hence the appropriate error messages are first issued in Online mode (…Invalid Watch expression..).

Example of an application of the \ placeholder concept

Instances of a function block can easily be displayed with the help of references of the same visualization. For example, in configuring the visualization visu, which visualizes the variables of function block, one could begin each variable entry with the placeholder $FUB$ (e.g. $FUB$.a). If a reference from visu is then used (by inserting visu in another visualization or by calling via ‘Zoom to vis.’), then in the configuration of this reference the placeholder $FUB$ can then be replaced with the name of the function block instance to be visualized.

This might look like shown in the following:

In the project define a function block containing the following declarations:

FUNCTION_BLOCK     fu

VAR_INPUT

changecol : BOOL; (\* should cause a color change in the visualization     \*)`

END_VAR

In PLC_PRG define two instances of ‘fu’:

inst1_fu : fu;

inst2_fu : fu;

Create a visualization object ‘visu’. Insert an element and open the configuration dialog, category ‘Variables’. Enter in field ‘Change color’ the following: “$FUB$.changecol”. Open category ‘Input’ and enter in field ‘Tap Variable’ “$FUB$.changecol”. Open category ‘Text’ and enter”$FUB$ - change color “. Define an alarm color in category ‘Colors’.

Create another visualization object ‘visu1’.

Insert visualization ‘visu’ twice in ‘visu1’ (two references of ‘visu’).

Mark the first reference of ‘visu’ and open the configuration dialog of category ‘Visualization’. Press button ‘Placeholder’, so that the placeholder list will be displayed. There replace entry ‘FUB’ by ‘PLC_PRG.inst1_fu’.

Now mark the second reference of ‘visu’ and (like described for the first one) replace ‘FUB’ by ‘PLC_PRG.inst2_fu’.

Now in online mode the values of the variables which are used to configure the two instances of ‘fu’ will be visualized in the corresponding reference of ‘visu’.

Of course the placeholder $FUB$ can be used at all places in the configuration of ‘visu’ where variables or text strings are entered.

Note

Attention: Online behaviour of a visualization reference: If you insert a visualization and then select and configure this reference, it will be regarded as a single object and in online mode will react to inputs correspondingly to its configuration. In contrast: if you do not configurate the reference, then in online mode its particular visualization elements will react exactly like those of the original visualization.