User Guide

Table Of Contents
Command Syntax
Siemens Building Technologies, Inc. 3-61
IF/THEN and IF/THEN/ELSE (Conditional control)
Unitary pre-APOGEE APOGEE BACnet
Syntax
IF(exp) THEN x
or
IF(exp) THEN x ELSE y
exp Expression representing one or more logical or relational
tests that are the basis for the THEN/ELSE decision making.
The logical test can compare variables, constants,
status indicators, priority indicators, and/or numbers,
state text, and system points.
Several logical tests can be linked together with
relational or logical operators.
A maximum of 13 operands can be tested.
Operands can be point names, status indicators (i.e.,
ON, ALARM, etc.), @ priority indicators, and/or
numbers.
x Represents a condition, assignment, or course of action to
take if the expression (exp) is true.
y Represents a condition, assignment, or course of action to
take if the expression (exp) is false.
Use
This conditional logic command is used to provide customized
decision logic.
When the IF expression is true, the THEN command is executed.
When the IF expression is false, the ELSE command (if defined)
is executed.
If the IF expression is false and no ELSE command is defined,
execution continues with the next line of code.
APOGEE PPCL User’s Manual
3-62 Siemens Building Technologies, Inc.
Example 1
110 IF (OATEMP.GT.70.0) THEN OADPR = 80.0
Example 2
310 IF (TIME.GT.8:00.AND.TIME.LT.16:00) THEN
ON(@NONE,SFAN) ELSE ON(@OPER, SFAN)
Notes
GOSUB commands should not be used for the x or y parameters.
Time-based commands such as WAIT and TODMOD should not
be directly used for the x or y parameters.