Pragma instructions, Pragmas, overview, L-force | plc designer – Lenze PLC Designer PLC Designer (R2-x) User Manual

Page 269

Advertising
background image

L-force | PLC Designer

Editors in PLC Designer



DMS 3.2 EN 02/2011 TD29

267

7.3

Pragma instructions

7.3.1

Pragmas, Overview

The pragma instruction is used to affect the properties of a variable concerning the
compilation resp. precompilation process. It can be used in with supplementary text in
a program line of the declaration editor or in its own line.

The pragma instruction is enclosed in curly brackets, upper- and lower-case are
ignored: { <Instruction text> }

If the compiler cannot meaningfully interpret the instruction text, the entire pragma
is handled as a comment and read over. A warning will be issued in this case.

Depending on the type and contents of pragma, the pragma either operates on the
line in which it is located or on all subsequent lines until it is ended by an appropriate
pragma, or the same pragma is executed with different parameters, or the end of the

file is reached. By file we mean here: declaration part, implementation portion, global
variable list, type declaration.

The opening bracket may immediately follow a variable name. Opening and closing
brackets must be located on the same line.

The following pragmas are currently available in »PLC Designer«:

• Pragma {flag} for Initialization, Monitoring, Creation of symbols
• Pragma {bitaccess...} for the Bitaccess
• Pragma {link} for linking POUs during Compilation
• Pragma {parameter..}, {template...}, {instance...} for creating for Parameter

Manager entries

• Pragmas for Controlling the Display of Library Declaration Parts

7.3.2

Pragma instructions for Initialization, Monitoring, Creation of symbols, Bitaccess

See on this page the description of the following pragmas:

• {flag ...} for initialization, monitoring, creation of symbols
• {bitaccess ... } for bitaccess
• {link} for forcing the linking of a POU or DUT during compilation

Advertising