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.

Chapter 5 Program Organization Units and Tasks<br />

units.<br />

In the classic architecture, a source code for a PLC is composed of all procedures, including<br />

subroutines. If the size of a program becomes larger, the maintenance of the program and the<br />

debugging of the program will be a burden. In the IEC 61131-3 architecture, a program is divided<br />

into several units according to the functions or characteristics. It is convenient to develop and<br />

maintain a program. Besides, owing to the fact that program organization units are modular, different<br />

program organization units can be developed by different designers. It benefits the distribution of<br />

manpower and the execution of the project.<br />

There are two types of POUs in <strong>ISPSoft</strong>. They are programs (PROGs) and function blocks (FBs).<br />

• Program (PROG)<br />

A POU of the program type plays a role according to the task to which it is assigned. If a program<br />

POU is assigned to a cyclic task, the POU of the program type acts as a main program. If the POU<br />

of the program type is assigned to an interrupt task, the POU of the program type acts as a<br />

subroutine. Besides, a POU of the program type can call a function block (FB).<br />

• Function block (FB)<br />

A static symbol can be declared in a function block (FB). As a result, the value of the symbol after<br />

an operation can be retained. Owing to the fact that the operation is performed on the value<br />

memorized in the function block and an input value, the output values may be different even if the<br />

input values are the same. Besides, a function block can call another function block.<br />

The relation among POUs is shown below. A function (FC) is a type of POU. Owing to the fact that<br />

<strong>ISPSoft</strong> presently does not support functions, functions will not be introduced.<br />

5.2.2 POUs in <strong>ISPSoft</strong><br />

All POUs created by users are listed in the program management area. The POUs of the program<br />

type and the POUs of the function block type are managed separately. Besides, the programming<br />

language in which a POU is written determines the icon representing the POU, and the information<br />

about the POU is put at the end of the POU name.<br />

After a POU in the project management area is double-clicked, a POU editing window will appear.<br />

The POU editing window is composed of two parts. A table of local symbols is at the upper part of<br />

the window, and the body of a program is at the lower part of the window. Besides, the editing<br />

environment at the lower part of the window varies with the programming language used. Please<br />

refer to the following sections for more information about symbol tables and program editing.<br />

5-3

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

Saved successfully!

Ooh no, something went wrong!