TIA Portal Compiling Project Message
TIA Portal Compiling Project Message
Siemens TIA Portal Compile Process

There will always come a time in a project, where the compiling must be done. This is because you must compile in order to download to a PLC, even a simulated PLC.

Even though TIA Portal tells you about errors as you write them (with red underlines and crosses), there are still some issues that may not pass the compile process.

What Is Compiling?

Compile messages showing areas that have failed

Compiling is the process of taking written code, in any language, and processing it into a set of instructions that the PLC can follow.

If you write in Ladder, Structured Text, Function Block Diagram… They all go through a compile process so that the PLC can actually follow the instructions required.

When this process detects a failure, it throws a message on to the Compile view at the bottom of TIA Portal.

You can follow the error message to diagnose the fault by clicking the green arrows in the Go to column, and seek help from the Information System by clicking the ?

What Causes A Compile Process To Fail?

Most reasons are really obvious, such as undeclared variables (you’ve used a variable, but haven’t declared the variable anywhere).

Some can be a little more challenging to work out, especially when they are related to hardware.

Hardware Error Siemens TIA Portal Compile
Hardware Error – Password must not be empty

The above image shows an example of a failed compilation in relation to the hardware. This particular issue is caused by an access level being set, but no password is set in the hardware profile for the PLC.

REMEMBER
REMEMBER
REMEMBER

You can click the Go To column’s green arrow to be taken to the issue in question. In this situation, the issue can be resolved here (clicking the arrow took me here)

Access Level options with no password set

Compiling Through The Project Tree

By right clicking on folders in the Project Tree, you can control which objects are compiled.

This is because TIA Portal works on a hierarchy, if you ask a folder to be compiled, all sub folders and their contents are compiled.

For example, clicking the compile button whilst a block is open and active on the screen will only compile the single block:

Example of compiling a single block with errors present

The above failure is because other blocks that this one relies upon have been changed, but those changes have not yet been reflected in this block. This can be rectified manually by right clicking on the interface and choosing Update Interface, or you can compile all of the software in the Project Tree.

GIF – Compiling all changes in the Program Blocks rectifies the issue

The reason this works is because when you compile all Program Blocks, TIA Portal updates all interface usage, which resolves this issue. All blocks are then compiled and any remaining issues are displayed.

RECOMMENDATION
RECOMMENDATION
RECOMMENDATION

I recommend that you always perform a compile of the entire Program Blocks folder.

The only time I don’t do this is if I have a ton of issues and I want to check more localized areas. I then choose folders in the Project Tree and compile a folder at a time to fix issues that way.


Check Out Another Post

Leave a Reply