Delta ISPSoft — 7.1.1 Introduction of Function Blocks

ISPSoft User Manual 7.1 Knowing Function Blocks Function blocks (FB) and Function (FC) play important roles in the PLC programming. They are also supported by IEC 61131-3. Owing to the characteristics and advantages of function blocks, ISPSoft also supports and offer many functionalities related to function blocks, for instance user-defined FB POU and system-defined FB POU. Though self-defined FC POU is only supported by DVPxxMC and AS5xx series, ISPSoft provides API instructions for users to use as system-defined FC POU. 7.1.1 Introduction of Function Blocks A function block is a component in a program which performs an operation. It is a type of POU, but it can not operate by itself.

After a POU of the program type calls a function block, and sends the related parameters, the function of the function block can be executed. After the execution of the function block is complete, the internal operation result will be sent to the device or symbol specified by the superior POU (caller). A function block is shown below. The appearance of a function block is similar to that of an applied instruction in that there are input pins and output pins. The usage of a function block is also similar to that of an applied data type is a function block in the superior POU (caller) which calls the function block. Besides, a function instruction.

A function block is different from an applied instruction in that users have to declare a symbol whose block can call another function block. A function block is a memory unit. Every function block is assigned a substantial memory block where the values of the internal symbols are stored. Owing to the fact that the value of the symbol in a function block will be retained after the function block is executed, every execution result is affected by the last execution result. In other words, the output values may be different even if the input values are the same. An application instance of a function block is shown in the figure below.

There is a symbol whose data type is a function block in the local symbol table in the superior POU (caller). The name in the Type… cell is the same as the name of the function block. Please refer to the following sections for more information about the usage of a function block. 7-2