User Guide
Table Of Contents
- Table of Contents
- How to Use This Manual
- Chapter 1–Program Methodology
- Overview
- Introduction to PPCL
- PPCL Rules
- PPCL Program Design Guidelines
- Relational Operators
- Logical Operators
- Arithmetic Operators
- Arithmetic Functions
- Special Functions
- Order of Precedence
- Resident Points
- Local Variables
- Point Priority Overview
- At (@) Priority Status Indicators
- Point Status Indicators
- Converting a Sequence of Operation intoProgram Code
- Chapter 2–Control OptionComparisons
- Chapter 3–Command Syntax
- Overview
- ACT (Activate lines)
- ADAPTM (Adaptive control, multiple)
- ADAPTS (Adaptive control, single)
- ALARM (Alarm state)
- AUTO (Auto status)
- DAY (Day mode)
- DBSWIT (Dead band switch)
- DC (Duty cycle)
- DCR (Duty cycle routine)
- DEACT (Deactivate lines)
- DEFINE (Define abbreviation)
- DISABL (Disable lines)
- DISALM (Disable alarm)
- DISCOV (Disable COV)
- DPHONE (Disable phone)
- EMAUTO (Emergency, Auto status)
- EMFAST (Emergency, Fast status)
- EMOFF (Emergency, Off status)
- EMON (Emergency, On status)
- EMSET (Emergency, set value)
- EMSLOW (Emergency, Slow status)
- ENABLE (Enable lines)
- ENALM (Enable alarm)
- ENCOV (Enable COV)
- EPHONE (Enable phone)
- FAST (Fast status)
- GOSUB (Go to subroutine)
- GOTO (Go to line)
- HLIMIT (High limit)
- HOLIDA (Holiday)
- IF/THEN and IF/THEN/ELSE (Conditional control)
- INITTO (Initialize totalized value)
- LLIMIT (Low limit)
- LOCAL (Local variable)
- LOOP (Loop control)
- MAX (Maximum value)
- MIN (Minimum value)
- NIGHT (Night mode)
- NORMAL (Normal operating mode)
- OFF (Off status)
- OIP (Operator interface program)
- ON (On status)
- ONPWRT (On after power return)
- PDL (Peak demand limiting)
- PDLDAT (PDL, define load attributes)
- PDLDPG (PDL, digital point group)
- PDLMTR (PDL, meter monitor)
- PDLSET (PDL, setpoints)
- RELEAS (Release)
- RETURN (Return/end subroutine)
- SAMPLE (Sample a statement)
- SET (Set point value)
- SLOW (Slow status)
- SSTO (Start/stop time optimization)
- SSTOCO (SSTO coefficients)
- STATE (State text command)
- TABLE (Table of coordinates)
- TIMAVG (Average over time)
- TOD (Time of day, digital points)
- TODMOD (TOD modes)
- TODSET (Time of day, analog points)
- WAIT (Wait time)
- Overview
- Glossary
- Appendix A—PPCL Reserved WordList
- Index
Program Methodology—Logical Operators
Siemens Building Technologies, Inc. 1-17
Logical Operators
Both relational operators and logical operators compare two values
and produce a result that is called a condition. With logical operators,
there is a related action for each possible outcome of the condition. If
the condition is true, then a specific action is taken. If the condition is
false, then an alternate action is performed. For information on the
order in which logical operators are evaluated, see the Order of
Precedence section in this chapter.
The following example describes the function of the logical operator.
Example
You are reading the newspaper one morning and find that it is
going to be a beautiful day. You say to yourself, "If it gets
warmer than 80°F and I do not have to work, then I will go to the
beach."
You have just used a logical operator to define two conditions. Your
first condition is that the temperature must be greater than 80°F.
Your second condition tests if you have to work. Both conditions
must be true in order for you to go to the beach. If one condition is
not true, then you will not go to the beach.
PPCL supports the following logical operators:
• And (.AND.)
• Not And (.NAND.)
• Or (.OR.)
• Exclusive Or (.XOR.)
Each logical operator is described in more detail on the following
pages.
APOGEE PPCL User’s Manual
1-18 Siemens Building Technologies, Inc.
And (.AND.)
Unitary pre-APOGEE APOGEE BACnet
Syntax
if (cond1.AND.cond2) then...
cond1,
cond2
Defines a condition that is the result of a comparison
between two values.
Use
• Used to compare two logical conditions.
• If both conditions are true, the result of the comparison is true.
• A single statement can incorporate a combined total of 16
relational and logical operators.
See Table 1-1 for a comparison of conditions used with the .AND.
logical operator:
Table1-1. Truth Table for .AND. Logical Operator.
Condition 1 False Condition 1 True
Condition 2 False
Result is False Result is False
Condition 2 True
Result is False Result is True
Example
200 IF (TIME.LT.19:00.AND.TIME.GT.5:00) THEN ON(LIGHTS)