Placeholders in visualization, L-force | plc designer – Lenze PLC Designer PLC Designer (R2-x) User Manual

Page 696

Advertising
background image

L-force | PLC Designer

PLC Designer Visualization

694

DMS 3.2 EN 02/2011 TD29



20.6.1

Placeholders in Visualization

At each location in the configuration dialog at which variables or text are entered, a
placeholder can be set in place of the respective variable or text. This makes sense if
the visualization object is not to be used directly in the program, but is created to be
inserted in other visualization objects as an "instance". When configuring such an
Instance, the placeholders can be replaced with variable names or with text (see
chapter Configuring an inserted visualization, there you also find an example for
using placeholders).

Any string enclosed in two dollar signs ($) is a valid placeholder (e.g. $variable1$,

variable$x$). For each placeholder a „value group" can be defined as an input
specification in the 'Placeholder list' dialog (called from 'Extras' 'List of placeholders').
With one of these values you can replace the placeholder when configuring an
instance of the visualization object. A placeholder list will be available in the instance
to do this replacements.

Example of an application of the placeholder concept:

Instances of a function block can easily be displayed with the help of instances 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 an instance of visu is then used (by inserting visu
in another visualization or by calling via 'Zoom to vis.'), then in the configuration of
this instance 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 ".

Create another visualization object 'visu1'.

Advertising