Programming language – Toshiba T2N User Manual

Page 217

Advertising
background image

5. Programming Language

204

PROSEC T2N

Function Blocks ....

These are expressed as boxes which each
show 1 function. As types of function, there are
data transfers, the four arithmetic operations,
logic operations, comparative decisions, and
various mathematical functions. Each of these
is called an ‘instruction’. (Function instructions)

In a function block there are 1 or more inputs
and 1 output. When a certain condition is
satisfied by the input state, a specified function
is executed and the ON/OFF of the output is
determined by the result of execution.

Example 1) Addition Instruction

Input

–[

A + B

C

]–

Output

When the input is ON the content of register A and the content of
register B are added and the result is stored in register C . The output
becomes ON if an overflow or an underflow is generated as the result of
the addition.

Example 2) Combination of Relay Symbols and Function Blocks

When X0030 is ON or the content of XW004 exceeds 500, Y0105
becomes ON. When Y0105 stays on even if X0030 is OFF and the
content of XW004 is 500 or less, Y0105 will become OFF when X0027
becomes ON.

1. If a function block is considered as the operation of a ladder diagram,

it can be regarded as a contact which has a special function. By
carefully arranging the function blocks in the order of execution of
instructions, complex control functions can be achieved by an
easily understandable program.

2. A list of ladder diagram instructions is shown in Section 5.5. For the

detailed specifications of each instruction, see the separate
volume, ‘Instruction set Manual’.

NOTE

Advertising