L-force | plc designer – Lenze PLC Designer PLC Designer (R2-x) User Manual
Page 724
Advertising
L-force | PLC Designer
PLC Designer Visualization
722
DMS 3.2 EN 02/2011 TD29
Example for a blinking visualization element
:
Define a global variable 'blink1' of type VisualObjectType in the configuration of a
rectangle. In a program of function block the value of a component of the structure
can be modified.
PROGRAM PLC_PRG
VAR
n:INT:=0;
bMod:BOOL:=TRUE;
END_VAR
(* Blinking element *)
n:=n+1;
bMod:= (n MOD 20) > 10;
IF bMod THEN
blinker.nFillColor := 16#00808080; (* Grau *)
ELSE
blinker.nFillColor := 16#00FF0000; (* Blau *)
END_IF
Advertising