The pragma has the effect that the identifiers of an integrated compiled library <library name> .compiled-library
, which are decorated with the pragma, are hidden before programming an application.
The POUs can be called but the variables are invisible in the CODESYS user interface.
Affected 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 or variables with the pragma. As a result, you determine which identifiers are hidden in an application after integration. If you want to show the hidden identifiers later, for example for debugging or further development of the library, you can reactivate its visibility.
Syntax
{attribute 'conditionalshow' ( := ' <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 a function block, above a variable
Example
For more examples, see the document "Library Development Summary".
Hiding a variable
FUNCTION_BLOCK FB_DataManager VAR {attribute 'conditionalshow' := 'Library_Developer'} iLocal : INT; iCounter : INT; END_VAR
The variable iLocal
is invisible.
Hiding a function block
{attribute 'conditionalshow' := 'Library_Developer'} FUNCTION_BLOCK FB_DataManager VAR iLocal : INT; iCounter : INT; END_VAR
The identifiers FB_DataManager
, iLocal
, and iCounter
are invisible.
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 identifiers 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", "Visibility Control" Chapter