top of page
Search

SCL UDT Syntax

Writer's picture: Ivaylo FizievIvaylo Fiziev


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

22 views0 comments

Recent Posts

See All

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating

Subscribe Form

Thanks for submitting!

bottom of page