User defined types (UDTs) allow for defining custom structures in SCL. The UDTs then can be used when declaring variables. Nested UDTs are supported. Recursive nesting however is not supported.
Example:
There are cases where one would want to group a number of related values into a bigger entity. Then treat all values inside as a single value. Accessing individual values is done via the full path to the value.
Example:
VAR
in:"PD_STW1";
END_VAR;
BEGIN
#in.ControlByPlc := true;
The UDT can include:
Fields of primitive types
Fields of UDT types
Fields of array type
Comments