Appendix Display of structure ST_ALIGN_SAMPLE for CX90xx platforms (RISC) with representation of the padding bytes : TYPE ST_ALIGN_SAMPLE: STRUCT _diField1 : DINT; _byField1 : BYTE; _byPadding : BYTE; _iField : INT; _byField2 : BYTE; _a_byPadding : ARRAY[0..2] OF BYTE; _diField2 : DINT; _pField : POINTER TO BYTE; END_STRUCT END_TYPE 10.4.2.5 References (Alias types) You can use the user-defined derived data type to create an alternative name for a variable, constant or function block. Create your references as objects in the Object Organizer under the register card Data types. They begin with the keyword TYPE and end with END_TYPE. Syntax: TYPE : term>; END_TYPE Example:
TYPE message:STRING[50]; END_TYPE; 10.4.2.6 Subrange types A sub-range data type is a type whose range of values is only a subset of that of the basic type. The declaration can be carried out in the data types register, but a variable can also be directly declared with a subrange type: Syntax for the declaration in the 'Data types' register: TYPE : ( .. ) END_TYPE; Example: TwinCAT 2 PLC Control 304 Version: 1.0 Type Description must be a valid IEC identifier is one of the data types SINT, USINT, INT, UINT, DINT, UDINT, BYTE, WORD, DWORD (LINT, ULINT, LWORD). Is a constant which must be compatible with the basic type and which sets the lower boundary of the range types.
The lower boundary itself is included in this range. Is a constant that must be compatible with the basic type, and sets the upper boundary of the range types. The upper boundary itself is included in this basic type.