Attribute ‘hide_all_locals’ΒΆ

This pragma prevents all local variables of a signature from being visible in the display of the ‘List components’ function, in the input assistant or in the declaration part in online mode.

Syntax:

{attribute 'hide_all_locals'}

Insertion position: first line above the declaration part of the POU.

Example

The function block myPOU uses 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

Two instances of the function block myPOU are defined in the main program.

PROGRAM PLC_PRG
VAR
 POU1, POU2: myPOU;
END_VAR

While an input value for POU1 is now implemented, the ‘List components’ function, which opens when typing POU1. in the implementation part of PLC_PRG, displays the variables a and b, but not the hidden local variables c or d.

See also