α
2
Simple Application Controllers
Function Blocks 6
6 - 27
6.13 Compare Block
The function block compares value 1 (V1) with value 2 (V2) using an operational based
instruction based upon the following conditions: =, >, >=, <, <= or <>. If current values satisfy
the operational expression then the output status is ON.
Table 6.13: Compare Function Block
Setup of the Compare Function Block directly from the
α
2
Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the “OK” key with the cursor in the function block. The function block edit screen is
displayed as shown.
3 ) Press the “OK” Key and enter the function block settings using the “ and ” keys.
4 ) Pressing the “OK” key invokes the menu thats lists the function block input data type.
5 ) Press the “OK” Key and a Direct Set value can be entered..
Function
Set Item
Description
I
Input pin for compare operation
FB
The following three set items exist:
1) Compare Value (V1):
a) Constant value set range:-32768 to +32767 with an initial value 0
b) Analogue value set range: A01-A08
c) Output value from a different function block
2) Operational Expression: =, >, >=, <, <=, <>
3) Compare Value (V2):
a) Constant value set range:-32768 to +32767 with an initial value 0
b) Analogue value set range: A01-A08
c) Output value from a different function block
Output
If Compare value (V1) and Compare value (V2) satisfies the
operational expression the status of the output is ON.
0 0
0
P
C
O
I
P
B001 : CP
Se t up FB
Cha ng e No
De l e t e FB
B001 : CP
CmpVa l
V1 =
V2
0
1
B001 : CP
D i r e c t S
Ana l o g I n
FB Va l u e
e t
B001 : CP
CmpVa l
D i r e c t Se t
0
1