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.3 Using a Function Block<br />

7.3.1 Basic Specifications for the Function Blocks<br />

The specifications for the function blocks in <strong>ISPSoft</strong> are shown below. When users use function<br />

blocks, they have to make sure that the operation conforms to the specifications in the table.<br />

Otherwise, an error occurs when the program is compiled or executed.<br />

• Specifications for the function blocks<br />

Number of<br />

function block<br />

definitions<br />

Number of<br />

function block<br />

instances<br />

Size of a function<br />

block<br />

Number of layers<br />

AH500: The number of function block definitions which produce the instances<br />

can not be larger than 1024.<br />

DVP: The number of function block definitions depends on the number of P<br />

devices available. (One function block instance occupies one P<br />

device.)<br />

AH500: The maximum number of memory blocks depends on the model<br />

selected. (Please refer to appendix B.)<br />

DVP: The number of function block instances depends on the number of P<br />

devices available. (One function block instance occupies one P<br />

device.)<br />

AH500: The size of a memory block is 4096 words.<br />

DVP: The size of a function block depends on the devices assigned to the<br />

function block<br />

A function block can calls another function block, and 32 layers of function<br />

blocks at most can be called.<br />

• Note<br />

‣ The pins of a function block must be assigned operands. The operands can be device<br />

addresses or symbols. If the class of a symbol is VAR_INPUT, the operand assigned to the<br />

symbol can be a constant.<br />

‣ An inferior function block can not call the superior function block, and a function block can not<br />

call itself.<br />

‣ If a function block is exported, the definition of the function block is exported, but the definitions<br />

of the inferior function blocks and the global symbols used are not exported.<br />

‣ The En pins of the function blocks in ladder diagrams, sequential function charts, function block<br />

diagrams, and instruction lists must be connected to contacts. However, the En pins of the<br />

function blocks in structured texts do not have to be connected to contacts.<br />

‣ The programming languages which support the creation of function blocks include ladder<br />

diagrams, instruction lists, structured texts, and function block diagrams. Sequential function<br />

charts do not support the creation of function blocks.<br />

‣ The programming languages which support the calling of function blocks include ladder<br />

diagrams, instruction lists, structured texts, and function block diagrams. <strong>User</strong>s can also use<br />

function blocks in the actions in sequential function charts.<br />

‣ <strong>User</strong>s can modify function block definitions, but they can not modify function block instances.<br />

(Please refer to section 7.3.4.)<br />

‣ If the modification of a function block definition in the online mode results in the abnormal<br />

representation of the function block in the superior POU, users have to disable the online<br />

editing function, delete the abnormal representation of the function block, and add the normal<br />

representation of the function block. After the normal representation of the function block is<br />

added, the program can be compiled and downloaded. (Please refer to section 7.3.4 for more<br />

information.)<br />

‣ If a jump instruction is used in a function block, the jump destination must be in the same<br />

function block, and can not be outside the function block or in the inferior function block.<br />

‣ <strong>User</strong>s can not declare symbols whose data types are TIMER and symbols whose data types<br />

are COUNTER in the function blocks in a project for an AH500 series CPU module, but they<br />

can declare symbols whose data types are POINTER, symbols whose data types are<br />

T_POINTER, symbols whose data types are C_POINTER, and symbols whose data types are<br />

7-20

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

Saved successfully!

Ooh no, something went wrong!