10.6
Relational Functions
The Relational functions can be used to compare two numbers and to determine whether a
number lies within a specified range.
•
Equal
Test two numbers for equality
•
Not Equal
Test two numbers for non-equality
•
Greater Than
Test whether one number is greater than another
•
Greater Than or Equal
Test whether one number is greater than or equal to
another
•
Less Than
Test whether one number is less than another
•
Less Than or Equal
Test whether one number is less than or equal to another
•
Range
Tests whether one number lies between two other numbers
When the function receives power flow, it compares input IN1 to input IN2. These
parameters must be the same data type.
Input 1
Input 2
Output
Enable
EQ_
INT
I1 Q
I2
If inputs IN1 and IN2 match the specified relational condition, output Q receives power
flow and is set ON (1); otherwise, it is set OFF (0).
Data Types for Relational Functions
Relational functions operate on these types of data:
INT
Signed integer
DINT
Double precision signed integer
REAL
Floating Point
The %S0020 bit is set ON when a relational function using Real data executes
successfully. It is cleared when either input is NaN (Not a Number).
10.6.1
Relational Functions Equal, Not Equal, Less
Than, Less/Equal, Greater Than, Greater/Equal
10.6.1.1
Parameters for the Relational Functions
Input/ Output
Choices
Description
enable
flow
When the function is enabled, the operation is
performed.
IN1
R, AI, AQ, constant
For INT data only: I, Q,
M, T, G
IN1 contains a constant or reference for the first
value to be compared. IN1 must be a valid
number. Constants must be integers for double
precision signed integer operations.
IN1 is on the left side of the relational equation,
as in IN1 < IN2.
Instruction Set Reference
GFK-1503E User Manual 171
For public disclosure
Summary of Contents for VersaMax PLC
Page 16: ...Notes 16 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 38: ...Notes 38 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 50: ...Notes 50 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 92: ...Notes 92 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 112: ...Notes 112 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 224: ...Notes 224 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 292: ...Notes 292 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 316: ...Notes 316 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 317: ......