top of page
Search
Writer's pictureIvaylo Fiziev

SCL UDT Syntax



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:

  1. Fields of primitive types

  2. Fields of UDT types

  3. Fields of array type

19 views0 comments

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page