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

Page 998

Advertising
background image

L-force | PLC Designer

Programming Reference

996

DMS 4.1 EN 03/2011 TD29

Attribute Hide_all_locals
With the help of the pragma {attribute 'hide_all_locals'} you may prevent all local
variables of a signature from being displayed within the "List Components"
functionality or input assistant. This attribute is identical to assigning the attribute
'hide' to each of the local variables.

Syntax:
{attribute 'hide_all_locals’}

Example:
The function block myPOU is implemented making use of the attribute:

{attribute 'hide_all_locals'}
FUNCTION_BLOCK myPOU
VAR_INPUT
a:INT;
END_VAR
VAR_OUTPUT
b:BOOL;
END_VAR
VAR
c,d:INT;
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"
and "b", but none of the hidden local variables "c" or "d".

Advertising