PLC Skill Tree
PLC Skill Tree
Thanks for downloading this free guide. Most PLC programmers out there focus on writing logic fast.
They’ll just start coding from the get-go without considering the structure of the program blocks or the
organization of the data used in the program. Big mistake.
The main focus throughout my highly successful career as a self-employed system integrator has
been on creating proper structures for my PLC applications. It’s the main reason why I never run out
of projects and why my clients keep coming back for more.
If you’re ready to level-up and start taking program structuring serious, then I’d like to share with you 5
simple steps to instantly improve the structure of your PLC applications in TIA Portal.
Happy reading!
Benefit: By creating groups for your program blocks, PLC tags, and PLC data types, you’ll
transform your long and confusing lists of blocks, tags and user-defined data types into
a modular, clean looking application.
PLCSKILLTREE.COM
Email: hans@plcskilltree.com
Web: www.plcskilltree.com 5 SIMPLE STEPS TO DRASTICALLY IMPROVE YOUR PLC PROGRAM STRUCTURE IN TIA PORTAL | 1
STEP 2 - ADD MAIN FUNCTION CALLS
Benefit: By grouping function blocks together in main function calls, you’ll create a clear
distinction between the different main parts of your application.
Benefit: Using multi-instances reduces the number of DBs necessary for your application,
resulting in a more streamlined application.
When a function block (FB) is called in TIA Portal, an instance is created. This instance contains the
data of the block interface (Input, Output, InOut, Static, Temp, Constant) of the called function block.
If the instance is created as a single-instance -> the instance is created as a separate, new datablock
(DB) that will appear under your Program blocks.
If the instance is created as a multi-instance -> the instance is created in the Static area of the block
interface of the higher-level function (where the function with multi-instance is called). No new DB will
be created.
PLCSKILLTREE.COM
Email: hans@plcskilltree.com
Web: www.plcskilltree.com 5 SIMPLE STEPS TO DRASTICALLY IMPROVE YOUR PLC PROGRAM STRUCTURE IN TIA PORTAL | 2
In our example (Fig.3 below) we are calling the main function calls ‘FB - Machine Modules’ and ‘FB -
Equipment Modules’ in our OB1 with single-instances (OB1 does not have a Static area so the only
option here is single-instance).
The functions inside our main functions calls are then called using multi-instances. In our example
below, we are calling 3 functions inside the ‘FB - Equipment Modules’ - Supply, Refill process 1 and
refill process 2. All 3 of those calls are created with multi-instances.
Benefit: This step will optimize your data communication and create modularity in your
application.
One way to create tags for your application is by using single datatypes like bool, int, real, ...
What if I told you there is a much more gracious way to organize your data in 2 easy steps?
In Fig.4.1 below, we have created UDTs for each module of our machine and equipment modules. If
we take UDT_Refill for example, you can see that a tag structure has been created using status tags
(Sts), command tags (Cmd), parameter tags (Par), configuration tags (Cfg) and fault tags (Flt).
PLCSKILLTREE.COM
Email: hans@plcskilltree.com
Web: www.plcskilltree.com 5 SIMPLE STEPS TO DRASTICALLY IMPROVE YOUR PLC PROGRAM STRUCTURE IN TIA PORTAL | 3
Going over to Fig.4.2, we have then used those UDTs to create tag data-structures in our global data-
blocks ‘DB - Equipment’ and ‘DB - Machine’.
Benefit: Other programmers will instantly understand your logic when you hand over your project
to them. Your application becomes much easier to read and troubleshoot.
So you´ve done all the previous steps, and your application is starting to look sleek, coherent, and
structured. Great work so far! But before we call it a day, there is one final step that we can take to
give our application that extra layer of polish - adding comments and descriptions.
PLCSKILLTREE.COM
Email: hans@plcskilltree.com
Web: www.plcskilltree.com 5 SIMPLE STEPS TO DRASTICALLY IMPROVE YOUR PLC PROGRAM STRUCTURE IN TIA PORTAL | 4
Clarifying your logic becomes extremely important if you´re not the only one working on an
application. If someone for example takes over your PLC application, why not give that person a
fighting chance by explaining what you´ve programmed? Now there’s an idea!
In Fig.5 below, we have clarified our ‘FB - Supply’ block by adding a block title and a description.
Furthermore, we have added a short description to each network title with a comment below each title
to share more details about the network.
Keep your titles short and to the point (less clutter) - use the comment section
below each title to write a more detailed description of the block or the
network.
-Hans
PLCSKILLTREE.COM
Email: hans@plcskilltree.com
Web: www.plcskilltree.com 5 SIMPLE STEPS TO DRASTICALLY IMPROVE YOUR PLC PROGRAM STRUCTURE IN TIA PORTAL | 5