0% found this document useful (0 votes)
5 views10 pages

TIA PLC Program Structuring

The document outlines the steps for structuring applications in TIA Portal, emphasizing the importance of defining logical and sub-logical modules, creating program groups, and organizing global data. It provides examples of module structures for a water supply-redistribution system, detailing the program execution hierarchy and data handling structures. Additionally, it includes guidelines for adding input/output tags and naming conventions for both IO and internal tags.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views10 pages

TIA PLC Program Structuring

The document outlines the steps for structuring applications in TIA Portal, emphasizing the importance of defining logical and sub-logical modules, creating program groups, and organizing global data. It provides examples of module structures for a water supply-redistribution system, detailing the program execution hierarchy and data handling structures. Additionally, it includes guidelines for adding input/output tags and naming conventions for both IO and internal tags.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

TIA PORTAL PROGRAM STRUCTURING LIKE A PRO

Steps To Application Structuring

• Define logical and sub-logical module (Section the target process into sub-modules based on process functions and
equipment).
• Create program groups based on the Logical Modules.
• Structure Global data based on program group and sub-logical modules.
• Add Input/Output Tags based on process equipment/machine IO.
Example Application: Water Supply-Redistribution System

Supply
Module
Valve
Pump
Refill Module 2 Process Tank

Valve
Pump

Refill Module 1 Process Tank


Supply Tank
TIA PORTAL PROGRAM STRUCTURING LIKE A PRO

Logical Modular Structure for the Process (Used in programming environment to create the PROGRAM GROUPS )

• Machine Module
• Equipment Module

Equipment Module Structure for the Process/FBs

• Supply Module FB.


• Refill Module FB.

Machine Module Structure for the Process/FBs


• StateHandler FB.
• AlarmHandler FB.
• NetworkHandler FB.
• RecipeHandler FB.
• LightTower FB.

Note these modules can vary depending on the Process Application being developed
TIA PORTAL PROGRAM STRUCTURING LIKE A PRO
Data Handling Structure for the Process (Used in programming environment to create the GLOBAL DATA BLOCKS )

• DB-Equipment
• DB-Machine

TIA Portal program Organization

Groups DB/FB Calls DB/FB Calls

Machines FB-Machine FB-StateHandler

FB-Supply
FB-Equipment FB-Refill
Equipment FB-Refill

DB-Machine UDT-StateHandler

UDT-Supply
Global Data DB-Equipment UDT-Refill
TIA PORTAL PROGRAM STRUCTURING LIKE A PRO

Program Execution Hierarchy

OB1

FB-Equipment FB-Machine
Module/Group Module/Group

FB-Supply FB-Refill
FB-Refill FB-StateHandler FB-AlarmHandler
Module Module 2
Module 1

FB-
NetworkHandler
FB-
RecipeHandler
TIA PORTAL PROGRAM STRUCTURING LIKE A PRO
Data Call Hierarchy

DB-Equipment (Groups) DB-Machine (Groups)

UDT-StateHandler
UDT-Supply (Module) UDT- Refill (Module) (Module)

Status (Struct) Status (Struct) State (Struct) Ready


Running
Cmd (Struct) Faulted
Cmd (Struct) Cmd (Struct)
Reset

Cfg (Struct) Cfg (Struct) Cfg (Struct) Start


Stop
Reset
Flt (Struct) Flt (Struct) Flt (Struct)
TIA PORTAL PROGRAM STRUCTURING LIKE A PRO
PLC Program Structure

MACHINE GLOBAL DATA EQUIPMENT


FB-AlarmHandler
DB-Machine FB-Supply
FB-NetworkHandler

Supply Module

FB-Statehandler
FB-Refill
Ready Faulted
Refill Module
DB-
Process 1
Equipment
Running Reset

FB-IndicatorsHandler FB-RecipeHandler FB-Refill

Refill Module
Process 2
TIA PORTAL PROGRAM STRUCTURING LIKE A PRO
Contents of a Global DB
A global DB is made up of data structures. These data structures are grouped into UDTs with struct datatype based on the
modules (FBs) in the groups. The UDTs are then grouped according to Equipment and Machine groups created earlier.

Data Structures in the Equipment group Modules’ UDT


The list below is the commonly used data structure of the UDTs for the modules (FBs) created in the Equipment group.
They are all Structure datatypes containing different datatypes in them. They will be used in the DB created for the
Equipment group function:

• Status (Sts)
• Command (Cmd)
• Configuration (Cfg)
• Fault (Flt)
Data Structures in the Machine group Modules’ UDT
Just as we have data structure for the UDTs of the modules (FBs) in the Equipment group, the same way we have for the
Machine group.

• State (Sta)
• Command (Cmd)
• Configuration (Cfg)
• Fault (Flt)
TIA PORTAL PROGRAM STRUCTURING LIKE A PRO
Adding Input and Output Tags
A structure is also used for adding IO tags to the project. Generally, IOs are associated with the devices they are connected
to for the purpose of sending the device status to the controller and also sending commands to the device from the controller.
From these IOs, tags are being setup according to groups and modules and then devices. Below is the recommended
hierarchy for IO tag list:

Group

Module

Device

• IO Tag1
• IO Tag2

• IO TagN IO Tags Structure
TIA PORTAL PROGRAM STRUCTURING LIKE A PRO
IO Tags associated with the application
process as an example
EQUIPMENT MACHINE
REFILL MODULE STATEHANDLER MODULE
GROUP
Pump Operator Interface
₋ Digital Input: Pump motor circuit breaker ₋ Digital Input: Pushbutton start application
₋ Digital Input: Pump local isolator ₋ Digital Input: Pushbutton stop application
₋ Digital Input: Pump running feedback MODULES ₋ Digital Input: Pushbutton reset fault
₋ Digital Output: Start pump operation ₋ Digital Output: Lamp application running
₋ Digital Output: Lamp application faulted
Valve DEVICES
₋ Digital Input: Valve position open feedback
₋ Digital Output: Open valve

Tank IO TAGS
₋ Analog Input: Actual water level indicator The rest of
the text
SUPPLY MODULE showing
names of IO
Tank tags, their
₋ Digital Input: Low level indicator. mode and
signal type
are the IO
tags.
TIA PORTAL PROGRAM STRUCTURING LIKE A PRO
IO and internal Tags naming recommendation

IO Tags naming reference Internal Tags naming reference


• Input Tags: i_(tagtype)Name. For naming Internal tags, we can use the
• Output Tags: q_(tagtype)Name. syntax: (tagtype)Name

Where the character “i” means


input and “q” means output.

Tagtype notations and their meaning


Tagtype Notation Notation Meaning
x Boolean
i Integer
r Real
w Word
dw Double Word
di Double Integer

You might also like