User Defined Data Type
UDT user-defined data type, it saves us from doing multiple jobs. Programming already does a lot of work with shortcodes.
UDT data type, for example; You have more than one engine and if you are going to create the same blocks of the same tags in all of them. Or if you want to write a regular code structure, then you can use the UDT data type.
For example, you have 20 engines and you want to create START, STOP, FAULT, ALARM, RUNNING, SPEED tags for all.
You only need to create 6 tags for 1 engine, 6×20 = 120 tags for 20 engines, and you must write the same logic in all of them.
Here you can use the UDT data type. I will explain with an example shortly.
The second place of use, let me give an example from the barcode application I wrote recently.
You will receive information from 50 machines and process them. Again, if you create UDT for 50 machines instead of writing them one by one, it will have regular tags and it will work the same in all of the logic you have tested for only one machine. When there is a change in logic or tags afterward, you can easily intervene by changing one block.
Now let’s come on how to create UDT.
I will continue with an example.