Delta ISPSoft — 8.2.2 Creating a Structure

ISPSoft User Manual 8.1 User-defined Data Type/Data Unit Type Sometimes basic data types are not sufficient for users to write their own programs for the PLC. In the IEC 61131-3 standard, a high-level language such as the user-defined data type is adopted to create a new data type as users desired, supporting the following three self-defined data types with ISPSoft and improving the readability and the efficiency of developing a program.

8.2 Structure 8.2.1 Definition of a Structure A structure is the collection of data, consisting of members with various data types, which can also be used as a member for other structures as well as used for grouping data and can be seen as a data unit to transfer values. 8.2.2 Creating a Structure Right-click DUT (Data Unit Type) in the project management area to see the option New . Click New to bring out a New DUT window. Input a name, select the type as Structure and then click OK to confirm the setting. After that, a new DUT will appear under the DUT option. 8-2 Data Type Description Structured Composed of multiple data types as members.

Enum I Composed of multiple enumeration values, which correspond to a constant of NT type individually. Union Similar with structured type, the difference is that all the members of Union share the same memory location. Thus, any changes to a single member’s value will change all other members’ values.

STRUCTURE Values Member Data WORD 1 WORD 0 Name Type Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Str1 ARRAY 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 1 1 1 0 0 0 0 0 1 1 1 Str2 WORD 12,039 (16#2F07) Str3 ARRAY 32,769(16#8001) 12,039 (16#2F07) Str4 DWORD 2,147,561,223(16#80012F07)