The pragma has the effect that 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 CODESYS user interface.
Affects features:
-
Library management
-
Debugging
-
Input Assistant
-
Function "List components"
-
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.
Syntax
{attribute 'conditionalshow_all_locals' ( := ' <some text> ' )? }
<some text>
: 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 CODESYS development environment are always hidden, regardless of how CODESYS was started. For more help about this, see the document "Library Development Summary".
Insert location: Top line in the declaration part of the function block.
Example
Hiding all local variables
{attribute 'conditionalshow_all_locals' := 'Library_Developer'} FUNCTION_BLOCK FB_DataManager VAR iLocal : INT; iCounter : INT; END_VAR
For more examples, see the document "Library Development Summary".
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 CODESYS 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
codesys.exe --conditionalshowsymbols="Library_Developer"
codesys.exe --conditionalshowsymbols="Group_A,Group_B"
See also
-
"Library Development Summary", chapter "Visibility Control"