Attribute hide, L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual

Page 997

Advertising
background image

L-force | PLC Designer

Programming Reference

DMS 4.1 EN 03/2011 TD29

995

Attribute Hide
With the help of the pragma {attribute 'hide'} you may prevent variables or even whole
signatures from being displayed within the "List Components" functionality, the input
assistant or the declaration part in online-modus. Only the variable subsequent to the
pragma will be hidden.

Syntax:
{attribute 'hide’}
To hide all local variables of a signature use THIS attribute.
Example:
The function block myPOU is implemented making use of the attribute:

FUNCTION_BLOCK myPOU
VAR_INPUT
a:INT;
{attribute 'hide'}
a_invisible: BOOL;
a_visible: BOOL;
END_VAR
VAR_OUTPUT
b:INT;
END_VAR
VAR
END_VAR

In the main program two instances of function block myPOU are defined:

PROGRAM PLC_PRG
VAR
POU1, POU2: myPOU;
END_VAR

When assigning e.g. an input value to POU1, the "List Components" function working
on typing "POU1." in the implementation part of PLC_PRG will display the variables "a",
"a_visible" and "b", but not the hidden variable "a_invisible".

Advertising