Attribute 'conditionalshow'
The pragma is relevant for function blocks and other types contained in a library.
The effect of the pragma is that the complete function block containing this attribute is not displayed on the user interface if the associated library is installed as a *.compiled library. However, the function block is displayed on the user interface if the associated library is installed as a *.library.
Affected features:
- Library management
- Debugging
- Input assistant
- List components function
- Monitoring
- Symbol configuration
This is useful when you are developing libraries. As a library developer, you provide function blocks or variables with the pragma. This allows you to specify which identifiers are hidden after being included in a project. If you miss the hidden identifiers later, for example when debugging or further developing the library, you can re-enable their visibility.
Syntax: {attribute 'conditionalshow'}
Insertion location: Line above a signature
Samples
Hide a variable:
FUNCTION_BLOCK FB_Sample
PROGRAM_MAIN
VAR
{attribute 'conditionalshow'}
nLocal : INT;
nCounter : INT;
END_VAR
The variable nLocal is invisible.
Hide a function block:
{attribute 'conditionalshow'}
FUNCTION_BLOCK FB_ Sample
VAR
nLocal : INT;
nCounter : INT;
END_VAR
The function block FB_Sample and its variables nLocal and nCounter are invisible.
See also: