top of page
Search

SCL UDT Syntax

Writer: 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

 
 
 

댓글

별점 5점 중 0점을 주었습니다.
등록된 평점 없음

평점 추가

Subscribe Form

Thanks for submitting!

bottom of page