Category Compile
Scope of PLC project properties Note that the scope differs between different project properties! |
The category Compile is used to configure the compiler options.
Settings
Compiler definitions | Here you can enter compiler definitions/"defines" (see {define} statements) and conditions for compiling the application (conditional compilation). A description of the available conditional pragmas can be found in section Conditional pragmas. The expression expr used in such pragmas can also be entered here. Several entries are possible in the form of a comma-separated list. |
System compiler definitions | Available from TwinCAT 3.1 Build 4024 The compiler definitions that have been set at System Manager level in the PLC project settings under Compiler definitions are automatically adopted here. |
Download application info | Available from TwinCAT 3.1 Build 4024 Situation: You are loading a PLC project onto the controller that differs from the project already located there. In this case, a message window appears containing a Details button. Use this button to open the Application information window, which allows you to check the differences between the current PLC project and the PLC project on the controller. This involves comparing the number of function blocks, the data and the storage locations. The Application information window contains a brief description of the differences, for example:
(Default): If this setting is enabled, the information on the contents of the PLC project is loaded onto the PLC. This enables an extended check of the differences between the current PLC project and the PLC project on the controller. The difference in the extended check option is that the Application information window contains an additional Online comparison tab, which shows a tree comparison view. This will tell you which POUs have been changed, deleted or added. The additional tab appears when you execute the blue underlined command in the lower area of the Application information window ("Application not current. Generate code now to display the online comparison?"). |
Generate tpy file | Available from TwinCAT 3.1 Build 4024 The tpy file contains, among other things, project, routing, compiler and target system information. It is the format used for describing a TwinCAT 2 PLC project. To ensure compatibility with existing applications, this file can be created for a TwinCAT 3 PLC project, if required. (Default): When the PLC project is created, no tpy file associated with the project is created. : When the PLC project is created, a tpy file associated with the project is created and stored in the project folder.
Please note that the value and configuration availability of this option depends on whether or not the TPY file is configured as a target file (see Settings tab).
|
Add initialization values of declarations to the TMC file | Available from TwinCAT 3.1 Build 4026.12 (Default): Initialization values of declarations are saved in the TMC file. This is useful, for example, if the initialization values are required for other applications. : Initialization values of declarations are not saved in the TMC file. This reduces the size of the TMC file and the compilation time, especially if the declarations in the PLC project contain a large number of initialization values.
|
Add comments on POU and DUT declarations to the TMC file | Available from TwinCAT 3.1 Build 4026 (Default): Comments on POUs and DUTs that are above their declaration are saved with the data type in the TMC file. This is useful, for example, if the comments are required for other applications. : Comments above the declaration of POUs and DUTs are not saved in the TMC file. This reduces the size of the TMC file and the compilation time, especially if the comments contain detailed descriptions of the POUs and DUTs. Sample:
|
Solution Options
Compiler Version | Defines the compiler version that TwinCAT uses during compilation and during loading for compilation. Please note that this setting does not replace the Remote Manager. The compiler version setting is only relevant if the PLC project to be version-managed is a library project.. |
Maximum number of warnings | Refers to the maximum number of warnings that TwinCAT issues in the Error List view. The selection of displayed compiler warnings is defined in the category Compiler warnings in the Project Settings dialog. |
Replace constants | : TwinCAT loads the value directly for each constant of scalar type, i.e. not for STRING, ARRAY or structures. In online mode, TwinCAT identifies the constants in the declaration editor or monitoring window with a symbol preceding the value. In this case, access via an ADR operator, forcing or writing, for example, is not possible. (Default): Access to constants is possible. The computing time increases slightly. |
See also: