Attribute pragmas influence compiling and precompiling. They are supported only in text editors.
CODESYS supports a series of pre-defined attribute pragmas. In addition you can use user-defined pragmas, which you can query with the help of conditional pragmas before the compilation of the project.
Attributes are defined in the declaration part. Exception: For the Action and Transition objects, which do not have their own declaration part, you can define attributes at the beginning of the implementation part.
If you define your own attributes, make sure that they are unique. You do this, for example, by prefixing the attribute name. Device manufacturers can use the vendor prefix for this purpose.
-
Effects on symbols
-
Custom attribute
-
Attribute: call_after_global_init_slot
-
Attribute: call_after_init
-
Attribute: call_after_online_change_slot
-
Attribute: call_before_global_exit_slot
-
Attribute: call_on_type_change
-
Attribute: conditionalshow
-
Attribute: conditionalshow_all_locals
-
Attribute: const_replaced, const_non_replaced
-
Attribute: dataflow
-
Attribute: displaymode
-
Attribute: enable_dynamic_creation
-
Attribute: estimated-stack-usage
-
Attribute: ExpandFully
-
Attribute: global_init_slot
-
Attribute: hide
-
Attribute: hide_all_locals
-
Attribute: initialize_on_call
-
Attribute: init_namespace
-
Attribute: init_on_onlchange
-
Attribute: instance-path
-
Attribute: io_function_block, io_function_block_mapping
-
Attribute: is_connected
-
Attribute: linkalways
-
Attribute: monitoring
-
Attribute: monitoring_display
-
Attribute: monitoring_encoding
-
Attribute: no_assign, no_assign_warning
-
Attribute: no_check
-
Attribute: no_copy
-
Attribute: no-exit
-
Attribute: noinit
-
Attribute: no_instance_in_retain
-
Attribute: no_virtual_actions
-
Attribute: pingroup
-
Attribute: pin_presentation_order_inputs, pin_presentation_order_outputs
-
Attribute: obsolete
-
Attribute: pack_mode
-
Attribute: ProcessValue
-
Attribute: qualified_only
-
Attribute: reflection
-
Attribute: subsequent
-
Attribute: to_string
-
Attribute: warning disable, warning restore