



NOTICE

You use conditional pragmas in the implementations of ST POUs. CODESYS does not evaluate these conditional pragmas when you use them in the declaration part.
The purpose of conditional pragmas is to influence how code is generated in the pre-compile or compile process. The ST implementation language supports these pragmas.
With conditional pragmas, you influence whether or not implementation code is taken into account for the compile. For example, you can make this dependent on whether a specific variable is declared, whether a specific POU exists, etc.
Pragma |
Description |
---|---|
|
The value can be queried and compared with |
|
The |
|
These are pragmas for the conditional compile. The specified expressions |
|
You can use one or more operators within the constant expression |
You can specify expressions and define
definitions as “compiler definitions” on the “Build” tab in the Properties dialog of POUs. If you specify define
definitions in the properties dialog, then you have to omit the term {define}
, in contrast to the definition in the implementation code. Moreover, you can specify
multiple comma-separated define
definitions in the properties dialog.
-
Operators