Delta ISPSoft — 6.1.1 Application of Symbols and Creation of Identifiers

ISPSoft User Manual 6.1 Introduction of Symbols During the process of developing a traditional program for a PLC, it generally takes much time to manage device addresses. Besides, managing or debugging the program in a big project is a burden on users. As a result, the concept of symbols in a high-level programming language is introduced into IEC 61131-3. A device in a PLC can be represented by a symbol, and a device can be automatically assigned to a symbol. The time of assigning devices is saved, a program is more readable, and the efficiency of developing a program increases. *. Variables in ISPSoft are called symbols.

As a result, variables are the same as symbols in terms of meaning in this manual. 6.1.1 Application of Symbols and Creation of Identifiers A symbol has to be declared before it is used, as shown below. There are two types of symbols. They are global symbols and local symbols. The global symbols can be used in all the POUs in a project, and the local symbols can only be used in the POU in which the local symbols are declared. Besides, the identifier of a local symbol in a POU can be the same as the identifier of a local symbol in another POU. However, if the identifier the local symbol declared in a POU as a local symbol.

of a local symbol declared is the same as the identifier of a global symbol, the system will automatically regard The regulations of creating the identifier of a symbol are as follows.  An identifier is composed of 30 characters at most, and a Chinese character occupies two characters.  The identifier of a symbol cannot be a name reserved by the system, e.g. an instruction code, a device name, or a name given a special significance. However, if a name reserved by the system is a part of the identifier of a symbol, the identifier is a legal name. For example, “M0” is an illegal name, but “_M0” is a legal name.  The name of a symbol and the name of an enumeration cannot be the same.

Refer to chapter 8 for the enumeration usage.  Spaces cannot be used. For example, “INPUT CH0” is an illegal name.  Underlines can be used, but they cannot be used continuously or put at the end of an identifier. For example, “INPUT_CH0” is a legal identifier, but “INPUT__CH0” and “INPUT_CH0_” are illegal identifiers.  Special marks cannot be used. For example, *, #, ?, \, %, @, and etc. cannot be used. 6-2