Unitary | Pre-APOGEE | APOGEE | BACnet | PXC.A |
---|---|---|---|---|
● | ● | ● | ● | ● |
Syntax
If (value1.EQ.value2) then...
value1,value2 | These values are defined as analog or digital numbers, local variables, or object names. |
Use
Compares two values to determine if the first value (value1) is equal to the second value (value2). The comparison is true if value1 is equal to value2.
Example
500 C IF THE ROOM TEMP IS EQUAL TO 80,
510 C THEN SET THE SET OBJECT TO 70.
520 C
530 IF (RMTEMP.EQ.80.0) THEN RMSET = 70.0
Notes
Check the object format and number of decimal places used before comparing values with this relational operator. Certain objects (primarily analog input) may contain precise values. When comparing a object value to a whole number, the result will be false if the values are not identical.