Instance and global data
As with most PLCs, TIA Portal has two types of data – global and instance. What defines the data as a particular type is where and how it is used. What is classed as global or instance data depends on what information is being held and how it interacts or interfaces with logic:
- Global data:
- Data that can be accessed anywhere in the project, at any hierarchy level.
- Data can be freely defined by the programmer, including the creation of sub-structures that contain data or UDT definitions.
- It cannot hold instance data for a function block, even in a sub-structure.
- Instance data:
- Data that exists explicitly to be used with a function block or UDT.
- Data is automatically defined by the requirements of the function block/UDT it is associated with.
- It will contain any sub-instances of function blocks that have been called within the parent function block.
Note
There is an additional global data block type called Array DB. This allows a data block to be explicitly...