Delta ISPSoft — 13.1.7 Notes on ST Programming

ISPSoft User Manual 13.1.6 Using Array Symbols in ST If users want to use a symbol whose data type is ARRAY in a structured text, the expression format is Identifier[Index] . The index is a constant or a symbol. However, only the indexes in a project for an AH/AS series CPU module can be symbols. The minimum index value must be 0, whether the index is a constant or a symbol. The maximum index value cannot be larger than or equal to the number of elements in the array. For example, if the number of elements in an array is 10, the index value must be within the range between 0 and 9. Please refer to section 6.2.3 for more information.

Besides, users have to pay attention to the following points when they use a symbol whose data type is ARRAY.  Users can only manipulate a single element in an array. A symbol which represents an array can not be used as an operand.  The arrays that ISPSoft supports are one-dimensional arrays but the structure from the Data Unit Type can support up to three-dimensional arrays. This type of variables can be written as the image shown below. DO value is written in the pt1 [1,1,1] of the vardut. Refer to chapter 8 for more information.  If an index is a symbol, and the value of the symbol is not within a legal range, the PLC will continue running and no error will occur.

However, the data taking part in the operation may be incorrect.  If the index for a symbol is constant, the symbol can be modified by an index register. If the index for a symbol is a symbol, the symbol can not be modified by an index register. Please refer to section 6.1.5 for more information. 13.1.7 Notes on ST Programming  If the structure of the keywords or the statements in a structured text is not destroyed, starting new lines and leaving blank spaces is allowed.  In principle, full width characters and half width characters in ISPSoft are regarded as different characters. Please avoid using full width characters lest they should be identified incorrectly.

 Structured texts are case-insensitive. “IF” and “If” are considered to be the equivalents of “if”. (The C language is case-sensitive.)  If users want to use constants in a structured text in ISPSoft, the constants must be represented in the following ways.  Decimal value: 23456 (A value which is not preceded by any mark will be regarded as a decimal value.)  Hexadecimal value: 16#5BA0 (A value is preceded by 16#.) 13-8