02.09.2014 Views

ISPSoft User Manual

ISPSoft User Manual

ISPSoft User Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

7.1 Knowing Function Blocks<br />

Function blocks (abbreviated as FB) play an important role in the writing of the program in a PLC.<br />

They are also supported by IEC 61131-3. Owing to the characteristics and advantages of function<br />

blocks, <strong>ISPSoft</strong> provides much support and many functions for function blocks.<br />

7.1.1 Introduction of Function Blocks<br />

A function block is a component in a program which performs an operation. It is a type of POU, but it<br />

can not operate by itself. After a POU of the program type calls a function block, and sends the<br />

related parameters, the function of the function block can be executed. After the execution of the<br />

function block is complete, the internal operation result will be sent to the device or symbol specified<br />

by the superior POU (caller).<br />

A function block is shown below. The appearance of a function block is similar to that of an applied<br />

instruction in that there are input pins and output pins. The usage of a function block is also similar<br />

to that of an applied instruction. A function block is different from an applied instruction in that users<br />

have to declare a symbol whose data type is a function block in the superior POU (caller) which calls<br />

the function block. Besides, a function block can call another function block.<br />

A function block is a memory unit. Every function block is assigned a substantial memory block<br />

where the values of the internal symbols are stored. Owing to the fact that the value of the symbol in<br />

a function block will be retained after the function block is executed, every execution result is<br />

affected by the last execution result. In other words, the output values may be different even if the<br />

input values are the same.<br />

An application example of a function block is shown in the figure below. There is a symbol whose<br />

data type is a function block in the local symbol table in the superior POU (caller). The name in the<br />

Type… cell is the same as the name of the function block. Please refer to the following sections for<br />

more information about the usage of a function block.<br />

7-2

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

Saved successfully!

Ooh no, something went wrong!