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 7 Function Block<br />

7.1.2 Characteristics and Advantages of Function Blocks<br />

Owing to the fact that function blocks present characteristics and advantages that traditional<br />

programming of a PLC does not have, function blocks are supported by IEC 61131-3, and are<br />

widely used by users.<br />

• Modular design<br />

A large program is divided into several subroutines, and the subroutines are created as function<br />

blocks. The function blocks are arranged and called by POUs of the program type.<br />

• Highly independent<br />

Different function blocks can be created by means of different programming languages such as a<br />

ladder diagram, an instruction list, a structured text, and a function block diagram according to the<br />

characteristics of the function blocks or a programmer’s habit. Besides, when a POU calls a<br />

function block, the programming language by which the program in the function block is written<br />

does not need to be considered. For example, if a complex operation has to be performed in a<br />

part of a ladder diagram, users can create the part of the ladder diagram as a function block by<br />

means of a structured text, and the function block can be called by the original ladder diagram.<br />

• Reusable<br />

Once a function block is created, it can be used repeatedly as long as users conform to the rule of<br />

using the function block.<br />

• Highly portable<br />

After a function block is created, it can be used in the original project. Besides, after the function<br />

block is exported, it can be imported into another project. As a result, users can gradually create<br />

their own function blocks.<br />

• Function blocks can be maintained conveniently.<br />

The program in a function block is an independent module. If an error occurs in a function block,<br />

or the function of a function block does not meet the actual requirement, users can just modify the<br />

program in the function block, and do not need to debug or modify the whole program,<br />

• The readability of a program is increased.<br />

<strong>User</strong>s can write a complex program or a program which will be used repeatedly in a function<br />

block, and the function block can be called by the original program. The structure of the original<br />

program becomes more simplified, and the program becomes more readable.<br />

• Highly confidential<br />

After users set a password for a function block created, they can create their own core technology<br />

in the function block without care, and provide the function block for other users. Besides, system<br />

suppliers or software developers can provide function blocks which have specific functions for<br />

customers.<br />

• Highly efficient<br />

The application of function blocks provides a highly efficient development environment in terms of<br />

project development. Owing to the fact that function block are modular, developers and<br />

manufacturers can take part in the development of a project together, and the use of human<br />

resources are more flexible.<br />

7.2 Structure of the Function Blocks in <strong>ISPSoft</strong><br />

Please refer to the following figure. The internal structure of a function block is similar to that of a<br />

POU of the program type. It is composed of a local symbol table and a program. A function block is<br />

edited in a way in which a POU of the program type is edited. The programming languages that<br />

users can make use of to create the function blocks in <strong>ISPSoft</strong> are ladder diagrams, instruction lists,<br />

structured texts, and function block diagrams, but are not sequential function charts. Besides, a<br />

function block can call another function block. When a function block is called, the programming<br />

language by which program in the function block is written does not need to be considered.<br />

7-3

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

Saved successfully!

Ooh no, something went wrong!