02.09.2014 Views

ISPSoft User Manual

ISPSoft User Manual

ISPSoft User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>ISPSoft</strong> <strong>User</strong> <strong>Manual</strong><br />

6.1 Introduction of Symbols<br />

During the process of developing a traditional program for a PLC, it generally takes much time to<br />

manage device addresses. Besides, managing or debugging the program in a big project is a<br />

burden on users. As a result, the concept of symbols in a high-level programming language is<br />

introduced into IEC 61131-3. A device in a PLC can be represented by a symbol, and a device can<br />

be automatically assigned to a symbol. The time of assigning devices is saved, a program is more<br />

readable, and the efficiency of developing a program increases.<br />

*. Variables in <strong>ISPSoft</strong> are called symbols. As a result, variables are the same as symbols in terms of meaning in this<br />

manual.<br />

6.1.1 Application of Symbols and Creation of Identifiers<br />

A symbol has to be declared before it is used, as shown below. There are two types of symbols.<br />

They are global symbols and local symbols. The global symbols can be used in all the POUs in a<br />

project, and the local symbols can only be used in the POU in which the local symbols are declared.<br />

Besides, the identifier of a local symbol in a POU can be the same as the identifier of a local symbol<br />

in another POU. However, if the identifier of a local symbol declared is the same as the identifier of a<br />

global symbol, the system will automatically regard the local symbol declared in a POU as a local<br />

symbol.<br />

The regulations of creating the identifier of a symbol are as follows.<br />

• An identifier is composed of 30 characters at most, and a Chinese character occupies two<br />

characters.<br />

• The identifier of a symbol can not be a name reserved by the system, e.g. an instruction code, a<br />

device name, or a name given a special significance. However, if a name reserved by the system<br />

is a part of the identifier of a symbol, the identifier is a legal name. For example, “M0” is an illegal<br />

name, but “_M0” is a legal name.<br />

• Spaces can not be used. For example, “INPUT CH0” is an illegal name.<br />

• Underlines can be used, but they can not be used continuously or put at the end of an identifier.<br />

For example, “INPUT_CH0” is a legal identifier, but “INPUT__CH0” and “INPUT_CH0_” are<br />

illegal identifiers.<br />

• Special marks can not be used. For example, *, #, ?, \, %, @, and etc. can not be used.<br />

6.1.2 Symbol Classes<br />

In terms of functions, symbols can be classified into five classes. The characteristics of these five<br />

classes are described below.<br />

6-2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!