Skip to main content

Attribute: conditionalshow_all_locals

The pragma has the effect that all all local variables of a library POU decorated with the pragma are hidden from application programmers. The POUs of an integrated compiled library <library name>.compiled-library can be called, but the variables are invisible in the Basic Level user interface.

. Affects features:
  • Library management

  • Debugging

  • Input Assistant

  • "List components" Feature

  • Monitoring

  • Symbol Configuration

This is useful when you develop libraries. As the library developer, you decorate function blocks with the pragma. As a result, you determine that their identifiers are hidden in an application after integration. If you want to show these identifiers later, for example for debugging or further development of the library, you can reactivate its visibility.

For more information, see: "Library Development Summary" documentation

Syntax

{attribute 'conditionalshow_all_locals' := ' <some text> ' }

Insert location

First line above the declaration part of the function block

<some text>

Optional

Optional string literal to control the visibility of the identifiers decorated with this kind of pragma by means of a command-line command and this literal

When the pragma is specified without a literal, the variables in the Basic Level development environment are always hidden, regardless of how Basic Level was started.

Hiding all local variables

{attribute 'conditionalshow_all_locals' := 'Library_Developer'}
FUNCTION_BLOCK FB_DataManager
VAR
    iLocal : INT;
    iCounter : INT;
END_VAR

For examples, see the "Library Development Summary" document.

Visibility in case of existing source code file

When the source code file <library name>.library from an integrated library also exists at the same memory location (repository), the library POU variables are visible despite the pragmas. That is regardless of whether or not an attribute value has been specified in the declaration.

Command-line call to activate visibility

You can also enable the visibility of the hidden variable without a source code file by starting Basic Level with the command-line option conditionalshowsymbols. To enable the visibility, specify the attribute values of the pragma which are separated by commas.

Syntax

codesys.exe --conditionalshowsymbols=" <some text> ( ,<next text> )* "
Example 260. example
codesys.exe --conditionalshowsymbols="Library_Developer"
codesys.exe --conditionalshowsymbols="Group_A,Group_B"


For more information, see: hide_all_locals, conditionalshow, and the "Visibility Control" chapter