Understanding Advanced Data Types and UDTs in Siemens TIA portal

Data types are a vital concept in PLC programming that help us differentiate between the various parameters we deal with in the industrial world. Advanced data types can be created using combinations of other primary PLC data types as a structure. This helps with reusability and efficiency and accelerates programming. 


This is a companion discussion topic for the original entry at https://www.solisplc.com/tutorials/advanced-data-types-and-udts-in-siemens-tia-portal
1 Like

I think it is wrong that you connected the data block to the temperature and pressure outputs.

1 Like

Hey @Mosta,

Welcome to the forum, and thanks for the feedback!

@Victory_E, any thoughts?

@Mosta It is connected this way for the following reasons:

  1. To be able to visualize the pressure and temperature value at a go.
  2. The Pressure and Temperature tag can be connected to an external tag and not just reside in the FC.
  3. HMI/SCADA can use the tag for vizualization purposes that is why they were assigned to an output parameter and not just TEMP or STATIC parameter.

Does this answer your question?

1 Like

the function reads the T & P values from the DB, does some calculations, and finally writes the values back to the DB ?!

I think there is wrong assignment for the UDT examples for Tanks1, 2 and 3, cause assigning MD0 for temp which contains (Byte0, 1,2,3) while assinging M2.0,M2.1 etc for other outputs at same time, am i correct?

Thanks
M. Rezk

1 Like

Hey @Mohammed_Rezk,

Welcome to the forum, and thanks for the feedback!

@Victory_E, any thoughts?

@Mohammed_Rezk your observtion is duly noted and correct also.

1 Like

Thanks Team, you are very helpful.

2 Likes