You are on page 1of 152

APOGEE Powers Process

Control Language (PPCL)


Users Manual
125-1896

Rev. 6, May, 2006

Rev. 6, May, 2006


Notice
Document information is subject to change without notice and should not be
construed as a commitment by Siemens Building Technologies, Inc. Companies,
names, and various data used in examples are fictitious unless otherwise noted.
No part of this document may be reproduced or transmitted in any form or by any
means, electronic or mechanical, for any purpose, without the express written
permission of Siemens Building Technologies, Inc.
All software described in this document is furnished under a license agreement
and may be used or copied only in accordance with license terms.
For further information, contact your nearest Siemens Building Technologies, Inc.
representative.
Copyright 2006 Siemens Building Technologies, Inc.
Credits
APOGEE and Insight are registered trademarks of Siemens Building
Technologies, Inc.
Other product or company names mentioned herein may be the trademarks of
their respective owners.
Printed in U.S.A.
Comments
Your feedback is important to us. If you have comments about this manual,
please submit them to technical.editor@sbt.siemens.com.

APOGEE PPCL Users Manual


Multiplication ...........................................................................1-26
Subtraction ..............................................................................1-27
Arithmetic Functions ......................................................................1-28
Arc-Tangent (ATN)..................................................................1-29
Complement (COM) ................................................................1-30
Cosine (COS)..........................................................................1-31
Natural Antilog (EXP) ..............................................................1-32
Natural Log (LOG)...................................................................1-33
Root (.ROOT.).........................................................................1-34
Sine (SIN)................................................................................1-35
Square Root (SQRT)...............................................................1-36
Tangent (TAN) ........................................................................1-37
Special Functions ..........................................................................1-38
Alarm priority (ALMPRI) ..........................................................1-39
Totalized value (TOTAL) .........................................................1-41
Order of Precedence .....................................................................1-42
Changing Precedence Levels with Parentheses ....................1-43
Resident Points..............................................................................1-46
Alarm count (ALMCNT)...........................................................1-47
Alarm count 2 (ALMCT2) ........................................................1-48
Battery condition ($BATT).......................................................1-49
Decimal time (CRTIME) ..........................................................1-50
Day (DAY) ...............................................................................1-51
Day of the month (DAYOFM)..................................................1-52
Communications link (LINK) ...................................................1-53
Month (MONTH)......................................................................1-54
Node number (NODE0 through NODE99)..............................1-55
PDL monitor ($PDL)................................................................1-56
Seconds counter (SECNDS)...................................................1-57
Seconds counters (SECND1 through SECND7) ....................1-58
Military time (TIME) .................................................................1-59
Local Variables ..............................................................................1-60
$ARG1 through $ARG15 ........................................................1-61
$LOC1 through $LOC15 .........................................................1-63
Point Priority Overview ..................................................................1-64
APOGEE and pre-APOGEE Point Priority Levels ..................1-64
BACnet Priority Array ..............................................................1-66
At (@) Priority Status Indicators ....................................................1-68
Testing Point Priorities ............................................................1-68
Commanding Points to a Specific Priority...............................1-68
Pre-APOGEE Firmware ..........................................................1-69
At (@) Priority Status Indicators Supported............................1-71
Emergency (@EMER) ............................................................1-72

Table of Contents
How to Use This Manual.......................................................................VII
Introduction .......................................................................................VII
Manual Organization .......................................................................VIII
Manual Conventions..........................................................................IX
Syntax Page Example ........................................................................X
Compatibility bar .........................................................................XI
Syntax ........................................................................................XII
Use .............................................................................................XII
Notes (if applicable) ..................................................................XIII
See also (if applicable)..............................................................XIII
Where To Send Comments .............................................................XIII
Chapter 1Program Methodology ......................................................1-1
Overview..........................................................................................1-1
Introduction to PPCL .......................................................................1-3
PPCL Rules .....................................................................................1-4
General PPCL Rules.................................................................1-4
Defining Points in a PPCL Program..........................................1-6
Rules for Naming Points ...........................................................1-6
Rules for Naming a PPCL Program ..........................................1-7
PPCL Program Design Guidelines ..................................................1-8
Designing a Program that is Easy to Maintain..........................1-8
Designing a Program that Operates Efficiently.........................1-9
Relational Operators......................................................................1-10
Equal to (.EQ.) .......................................................................1-11
Greater than or equal to (.GE.) ...............................................1-12
Greater than (.GT.)..................................................................1-13
Less than or equal to (.LE.).....................................................1-14
Less than (.LT.) .......................................................................1-15
Not equal to (.NE.) ..................................................................1-16
Logical Operators ..........................................................................1-17
And (.AND.).............................................................................1-18
Not And (.NAND.)....................................................................1-19
Or (.OR.) .................................................................................1-20
Exclusive Or (.XOR.)...............................................................1-21
Arithmetic Operators......................................................................1-22
Addition ...................................................................................1-23
Assignment .............................................................................1-24
Division....................................................................................1-25
Siemens Building Technologies, Inc.

II

Siemens Building Technologies, Inc.

Table of Contents
PPCL (@NONE) .....................................................................1-73
Operator (@OPER).................................................................1-74
Peak Demand Limiting (@PDL)..............................................1-75
Smoke (@SMOKE) .................................................................1-76
Point Status Indicators...................................................................1-77
Failed Point Values .................................................................1-77
Determining Point Status ........................................................1-77
Commanding and evaluating the HAND status ......................1-78
Point Status Indicators Supported ..........................................1-80
Alarm (ALARM) .......................................................................1-82
Alarm acknowledge (ALMACK) ..............................................1-83
Auto (AUTO) ...........................................................................1-85
Battery statusdischarged (DEAD) .......................................1-86
Battery statusalmost discharged (LOW) .............................1-87
Battery statuscharged (OK).................................................1-88
Day mode (DAYMOD).............................................................1-89
Failed (FAILED) ......................................................................1-90
Fast (FAST).............................................................................1-91
Manual override (HAND).........................................................1-92
Night mode (NGTMOD) ..........................................................1-93
Off (OFF) .................................................................................1-94
On (ON)...................................................................................1-95
Proof on (PRFON)...................................................................1-96
Slow (SLOW) ..........................................................................1-97
Converting a Sequence of Operation into Program Code.............1-98
Guidelines ...............................................................................1-98
Designing Programs Using a Modular Structure ....................1-99
Subroutine Commands .........................................................1-102
Multiple Programs versus Subroutines .................................1-103
Program Testing....................................................................1-104
Program Documentation .......................................................1-105

APOGEE PPCL Users Manual


Start/Stop Time Optimization (SSTO) ...........................................2-10
Where to Use SSTO ...............................................................2-10
Defining SSTO ........................................................................2-11
How SSTO Adjusts the Start and Stop Times ........................2-11
SSTO Formulas ......................................................................2-13
Time-of-Day (TOD)........................................................................2-22
Where to Use TOD..................................................................2-22
Defining Time-Of-Day .............................................................2-22
IF/THEN/ELSE Time-Of-Day ..................................................2-26
APOGEE Interaction with PPCL TOD.....................................2-27

Chapter 2Control Option Comparisons ...........................................2-1


Overview..........................................................................................2-1
Duty Cycling (DC) ............................................................................2-2
Duty Cycling Commands ..........................................................2-3
Enthalpy and Dry Bulb Economizer Control ....................................2-4
ExampleEconomizer Comparison .........................................2-4
Enthalpy Economizer Calculations ...........................................2-5
Peak Demand Limiting (PDL) ..........................................................2-6
Why Use PDL?..........................................................................2-6
Why Use PDL Instead of Duty Cycling? ...................................2-7
PDL Application Programs........................................................2-7

Chapter 3Command Syntax ..............................................................3-1


Overview..........................................................................................3-1
ACT (Activate lines) ..................................................................3-4
ADAPTM (Adaptive control, multiple) .......................................3-5
ADAPTS (Adaptive control, single) .........................................3-16
ALARM (Alarm state) ..............................................................3-24
AUTO (Auto status).................................................................3-25
DAY (Day mode) .....................................................................3-26
DBSWIT (Dead band switch) ..................................................3-27
DC (Duty cycle) .......................................................................3-29
DCR (Duty cycle routine) ........................................................3-31
DEACT (Deactivate lines) .......................................................3-33
DEFINE (Define abbreviation) ................................................3-34
DISABL (Disable lines) ...........................................................3-35
DISALM (Disable alarm) .........................................................3-36
DISCOV (Disable COV) ..........................................................3-37
DPHONE (Disable phone) ......................................................3-38
EMAUTO (Emergency, Auto status) .......................................3-39
EMFAST (Emergency, Fast status) ........................................3-40
EMOFF (Emergency, Off status) ............................................3-41
EMON (Emergency, On status) ..............................................3-42
EMSET (Emergency, set value)..............................................3-43
EMSLOW (Emergency, Slow status) ......................................3-44
ENABLE (Enable lines) ...........................................................3-45
ENALM (Enable alarm) ...........................................................3-46
ENCOV (Enable COV) ............................................................3-47
EPHONE (Enable phone) .......................................................3-48
FAST (Fast status) ..................................................................3-49
GOSUB (Go to subroutine) .....................................................3-50
GOTO (Go to line)...................................................................3-57
HLIMIT (High limit) ..................................................................3-58
HOLIDA (Holiday) ...................................................................3-59

Siemens Building Technologies, Inc.

IV

III

Siemens Building Technologies, Inc.

Table of Contents

APOGEE PPCL Users Manual

IF/THEN and IF/THEN/ELSE (Conditional control) ................3-61


INITTO (Initialize totalized value)............................................3-63
LLIMIT (Low limit)....................................................................3-64
LOCAL (Local variable)...........................................................3-65
LOOP (Loop control) ...............................................................3-66
MAX (Maximum value)............................................................3-69
MIN (Minimum value) ..............................................................3-70
NIGHT (Night mode) ...............................................................3-71
NORMAL (Normal operating mode) .......................................3-72
OFF (Off status) ......................................................................3-73
OIP (Operator interface program) ...........................................3-75
ON (On status) ........................................................................3-78
ONPWRT (On after power return) ..........................................3-79
PDL (Peak demand limiting) ...................................................3-80
PDLDAT (PDL, define load attributes) ....................................3-83
PDLDPG (PDL, digital point group) ........................................3-85
PDLMTR (PDL, meter monitor)...............................................3-87
PDLSET (PDL, setpoints) .......................................................3-90
RELEAS (Release) .................................................................3-92
RETURN (Return/end subroutine) ..........................................3-94
SAMPLE (Sample a statement) ..............................................3-95
SET (Set point value) ..............................................................3-96
SLOW (Slow status)................................................................3-98
SSTO (Start/stop time optimization) .......................................3-99
SSTOCO (SSTO coefficients)...............................................3-102
STATE (State text command) ...............................................3-105
TABLE (Table of coordinates)...............................................3-106
TIMAVG (Average over time)................................................3-108
TOD (Time of day, digital points) ..........................................3-110
TODMOD (TOD modes) .......................................................3-112
TODSET (Time of day, analog points)..................................3-114
WAIT (Wait time)...................................................................3-116
Glossary .................................................................................. Glossary-1
Appendix APPCL Reserved Word List .......................................... A-1
Index .............................................................................................. Index-1

Siemens Building Technologies, Inc.

VI

Siemens Building Technologies, Inc.

APOGEE PPCL Users Manual

Manual Organization

How to Use This Manual

The PPCL User's Manual contains the following chapters:

Introduction

Chapter 1 Programming Methodology gives a complete


overview of the PPCL environment. This chapter includes
discussions about relational, logical, and arithmetic operators, as
well as information about precedence levels, resident points,
special functions, point priority, point status, and modular
programming.

To effectively use this manual, you should be familiar with the


equipment controlled by the PPCL programming language. Some of
the ways you can become familiar with APOGEE products are as
follows:

Chapter 2 Control Option Comparisons describes different


control applications, how they should be used, and how their
PPCL commands should be organized.

Siemens Building Technologies, Inc. Training Classes


Hands-on experience

Chapter 3 Syntax lists all control commands. This chapter


describes the syntax, functionality, and special exceptions for
each command, as well as related commands.

Reading user documentation for the APOGEE Automation


System
If you have knowledge or experience with HVAC equipment, the task
of learning the programming language becomes easier.

The Glossary describes the terms and acronyms used in this


manual.
Appendix A lists the PPCL reserved word list.
An Index is provided to help you locate information presented in
this manual.

Siemens Building Technologies, Inc.

VII

VIII

Siemens Building Technologies, Inc.

How to Use This Manual

Manual Conventions

APOGEE PPCL Users Manual

Syntax Page Example

The following table lists text conventions used in this manual.


Convention

The following example of the DISALM command illustrates the five


sections of each syntax page.

Example

Syntax commands are in


uppercase and bolded

DISALM

ON

Point names are in uppercase


and italics

OATEMP

User-defined parameters are


in lowercase and italics. This
indicates parameters that you
must specify depending on
your job.

(pt1, pt2, pt3)

Error messages and computer


code are displayed in Courier
New font.

610

Unitary

pre-APOGEE

APOGEE

BACnet

Section 1
Compatibility Bar
Section 2
Syntax

Syntax
DISALM(pt1,...,pt16)
pt1 through pt16
Names of the points that should have alarm reporting
disabled.

IF (FANDO1.EQ.1.0) THEN ...

If you are having problems with the computer,


the following message displays, Pinging
APOGEEPC [10.0.0.1] with 32 bytes
of data.

Three periods placed after


program code denotes a
continuation of program code.
This convention is used to
prevent programming
examples from becoming
cluttered.

610

Section 3
Use

IF (FANDO1.EQ.1.0) THEN ...

Use
This command disables the alarm printing capabilities for
specified points. Up to 16 points can be enabled for alarm
reporting by one command. The point status changes to
*PDSB* after it has been DISALMed.

Example
50

IF (SFAN.EQ.OFF) THEN DISALM(ROOM1) ELSE


ENALM(ROOM1)

Notes
Section 4
Notes (if applicable)
This command cannot be used for points that do not reside in
the device in which the control program is written. DISALM
cannot be used to directly disable alarm reporting over the
network.

Section 5
See Also (if
applicable)

Siemens Building Technologies, Inc.

IX

See also
ALARM, ENALM, HLIMIT, LLIMIT, NORMAL

Siemens Building Technologies, Inc.

How to Use This Manual

APOGEE PPCL Users Manual

Syntax

Compatibility bar

The Syntax section provides the command format. Youll also find a
description for each parameter in the command, as well as the valid
inputs and any calculations you may need.

The compatibility bar indicates if the command can be used with a


specific type of firmware.
The symbol indicates that the command is available in all
supported revisions of that type of firmware.

Use
The Use section describes what function the command performs.
Examples of program code are provided to show you how
parameters and values are defined.

A firmware revision number indicates the earliest firmware


revision that supports the command.
No symbol or firmware revision number indicates the command is
not available in any revision of that type of firmware.

Truth Tables
Truth tables help explain conditional and comparison logic. Inputs
are defined in the truth table, and then they are logically compared to
produce outputs (results). See following example to better
understand the concept of truth tables.

Figure 1 shows the command can be used in APOGEE Firmware


Revision 2.4 and later, as well as all revisions of BACnet Firmware.
The command is not available in Unitary or pre-APOGEE firmware.
Unitary

pre-APOGEE

APOGEE

BACnet

2.4 and later

Example
To use a truth table, first identify the objects you want to compare. In
this example, a comparison will be made between an object selected
with youre the your left and an object selected with your right hand.

Figure 1. Symbols Used in the Compatibility Bar.

Types of Firmware

Imagine that you have a barrel of apples and oranges. You reach
into the barrel and randomly select one piece of fruit with each hand.
Table 1 shows the possible conclusions you can reach.

The following types of firmware are currently available:


Unitary firmware uses a subset of PPCL commands found in
pre-APOGEE firmware.

Table 1. Comparing Apples to Oranges.

Pre-APOGEE Firmware (Revisions 12.5/1.5 and 12.51/1.51) are


mainly used in Controller Modules and early revisions of Open
Processors.
APOGEE Firmware (Revision 2.x) is used in APOGEE field
panels.

The main differences between these types of firmware are how point
priority indicators and point status indicators are used. For more
information, see Chapter 2 Control Option Comparisons.
XI

Right hand
orange

Right hand
apple

Left hand orange

Same

Different

Left hand apple

Different

Same

Lets say you are holding an orange in your left hand and an apple in
your right hand. Locate the first input, Left hand orange, in the
heading along the left side of the table. Locate the second input,
Right hand apple, in the heading across the top of the table. The box
where the vertical and horizontal rows intersect is the output (result)
of the comparison. In this case, the objects in your left hand and right
hand are different.

BACnet firmware uses most of the PPCL commands found in


APOGEE firmware.

Siemens Building Technologies, Inc.

Items

XII

Siemens Building Technologies, Inc.

How to Use This Manual

APOGEE PPCL Users Manual

Even though truth tables compare more complex items than apples
and oranges, the method for determining the result is always the
same.

Notes (if applicable)


The Notes section contains helpful hints that relate to how the
command operates, as well as specific details for commonly missed
items and subsequent errors in the program.

See also (if applicable)


The See also section directs you to other commands, operators, or
sections that are related to the command.

Where To Send Comments


Your feedback is important to us. If you have comments about this
manual, please submit them to sbt_technical.editor@siemens.com.

Siemens Building Technologies, Inc.

XIII

XIV

Siemens Building Technologies, Inc.

APOGEE PPCL Users Manual


Using Resident Points and Storage Locations for Data

Chapter 1Program Methodology

Resident Points
Local Variables

Overview

Understanding the Relationship Between Point Priority and


Status

Chapter 1 contains information related to the design, coding, and


implementation of a program. The following concepts are discussed
in this chapter:

Point Priority Overview

Introduction to PPCL

Point Status Indicators

At (@) Priority Status Indicators

PPCL Rules

Converting a Sequence of Operation into Program Code

General PPCL Rules

Guidelines

Defining Points in a PPCL Program

Designing Programs Using a Modular Structure

Rules for Naming Points

Subroutine Commands

Rules for Naming a PPCL Program

Multiple Programs versus Subroutines

PPCL Program Design Guidelines

Program Testing

Designing a Program that is Easy to Maintain

Program Documentation

Designing a Program that Operates Efficiently


Making Comparisons
Relational Operators
Logical Operators
Arithmetic Operators
Performing Mathematical Functions and Calculations
Arithmetic Functions
Special Functions
Order of Precedence
Changing Precedence Levels with Parentheses
Siemens Building Technologies, Inc.

1-1

1-2

Siemens Building Technologies, Inc.

Program MethodologyIntroduction to PPCL

Introduction to PPCL

APOGEE PPCL Users Manual

PPCL Rules

Imagine trying to control the environment of a 40-story building


without the use of a computer. Suddenly, a large number of daily
functions that are controlled by computers would have to be
controlled by hand. For example, to prepare the building for daily
occupancy, you would have to go to every floor and manually adjust
the setpoint for each control device.

Just as grammatical rules are used for the spoken language, PPCL
uses rules to create commands and instructions. Each PPCL
program must conform to these rules; otherwise, the computer will
not understand what you are trying to say.
Program lines are executed in ascending order according to their
line numbers, unless directed otherwise.

Even though computers are very powerful devices, they need


instructions in order to process information correctly. The instructions
that the computer uses are in the form of a programming language.
The programming language used with the APOGEE Automation
System is called Powers Process Control Language (PPCL).
PPCL is a high-level language developed specifically to control
Heating, Ventilating, and Air Conditioning (HVAC) equipment; it uses
a text-based programming structure like BASIC.

When the last line of the program is reached, the computer


automatically returns to the first line of the program and continues
processing.

General PPCL Rules


The general rules for PPCL are as follows:
Each PPCL program contains one or more PPCL statements.

There is much more to writing a PPCL program than putting


instructions and commands together.

Each PPCL statement must be assigned a unique line number.


Valid program line numbers are 1 through 32,767.

Programs should be logically thought out and their processes


understood before writing program code.

The maximum number of program lines a device can contain is


limited to the amount of free memory of that device.

Programs can be organized differently, but still perform the same


function.

When transferring program control from a subroutine, you must


use the RETURN command.

Although certain programming techniques can work better than


others, no one program is the best solution.

For APOGEE firmware only, each field panel running PPCL


contains one or more separate programs.
For APOGEE firmware only, the last line of the program does not
need to be executed on every pass of the program. For Unitary
and pre-APOGEE firmware, the last line of the program must be
executed on every pass of the program.
Maximum Number of Characters per Program Line
APOGEE and BACnet Firmware
When entering program lines through an APOGEE field panel HMI or
MMI port, the maximum number of characters per line is 66
(including the line number).

Siemens Building Technologies, Inc.

1-3

1-4

Siemens Building Technologies, Inc.

Program MethodologyPPCL Rules


If you need to enter more characters, enter an ampersand (&) at
the end of the line and continue entering characters on the next
line.

APOGEE PPCL Users Manual

Defining Points in a PPCL Program


All physical and virtual points used in the program must be
defined in the point database.

The maximum number of characters allowed on a total of three


lines of code is 198 characters (including the ampersands and
line numbers).

Point names that begin with numbers must be prefixed with the at
(@) character.
Point names that are greater than 6 characters must be enclosed
in double quotes.

Pre-APOGEE Firmware
When entering program lines through a pre-APOGEE field panel
MMI port, the maximum number of characters per line is 72.
If you need to enter more characters, enter an ampersand (&) at
the end of the line and continue entering characters on the next
line.

Point names that use characters other than A-Z or 0-9 must be
enclosed in double quotes.
Example
560

The maximum number of characters allowed on both lines of


code is 144 characters (including the ampersand).

ON(B2SFN,BUILDING1.AHU01.SFAN)

The first point (B2SFN) does not require quotes.


The second point (BUILDING1. AHU01.SFAN) is greater than six
characters and requires quotes.

Maximum Number of Characters per Comment Line


When entering comment lines through an APOGEE field panel HMI
or MMI port, the maximum number of characters per line is 81 (not
including the line number or operator C).

Rules for Naming Points


Use the following rules to establish a point naming convention that
provides meaningful information.

Creating a Notepad at the Field Panel


A PPCL program containing only comment lines can be used as a
notepad for the field panel. This allows you to record information
regarding activities, modifications, a to-do list, special instructions to
follow-up personnel, or general notes.

Valid names are from 1 to 30 characters.


Acceptable characters include: A-Z, a-z, 0-9, spaces ( ), periods
(.), commas (,), dashes (-), underlines (_), and apostrophes (').

The comment lines can be added and viewed from any


HMI/MMI or front-end device.

Do not use the following characters in point names: & ? * [ ] { } %

The program can be archived for historical purposes.

Only use a colon (:) in a point name when working with subpoints.

Since a PPCL program that contains only comment lines is not


executed, it does not affect system performance.
NOTE:

APOGEE Firmware

BACnet Firmware
Valid names are from 1 to 30 characters.

Only field panels containing Firmware Revision 2.6/2.6.1


and later support a notepad at the field panel with PPCL
comment lines.

Acceptable characters include: A-Z, a-z, 0-9, spaces ( ), periods


(.), commas (,), dashes (-), underlines (_), and apostrophes (').
Do not use the following characters in point names: & ? * { } %

Siemens Building Technologies, Inc.

1-5

1-6

Siemens Building Technologies, Inc.

Program MethodologyPPCL Rules


Pre-APOGEE Firmware

APOGEE PPCL Users Manual

PPCL Program Design Guidelines

Valid names are limited to 6 characters.

These guidelines will help you avoid common programming errors


and write programs that run faster and are easier to maintain. The
PPCL guidelines are as follows:

Acceptable characters include: A-Z and 0-9.


Do not use the following characters in point names: & ? * [ ] { } %

A program defined in one field panel should not be used to


control points in a different field panel.

Rules for Naming a PPCL Program


APOGEE PPCL programs use an assigned name. Use the following
rules to assign a program name:

Loop statements should not be closed across a network.


Time-based commands (for example, LOOP, SAMPLE, TOD,
WAIT, etc.) should be evaluated through every pass of the
program for proper operation.

APOGEE and pre-APOGEE Firmware


Valid names are from 1 to 30 characters.

If program execution is interrupted (for example, during a power


failure), the system always resumes processing at the first line of
the program. Therefore, the first line of the program should be
executed through every pass of the program.

Acceptable characters include: A-Z, a-z, 0-9, spaces ( ), periods


(.), commas (,), dashes (-), underlines (_), and apostrophes (').
Do not use the following characters in program names:
&?*[]{}%

Routing commands (such as GOTO) should transfer program


control to a sequentially higher line number. This practice
prevents programs from being caught in endless loops.

BACnet Firmware
Valid names are from 1 to 30 characters.
Acceptable characters include: A-Z, a-z, 0-9, spaces ( ), periods
(.), commas (,), dashes (-), underlines (_), and apostrophes (').

Designing a Program that is Easy to Maintain


Use comment lines to document program logic.

Do not use the following characters in program names:


&?*{}%

Number program lines in multiples of ten (10, 20, 30) or more so


that modifications can be made without renumbering the
program.
Use point names that are meaningful and describe the function
for which they are being used. For example, a point name
monitoring outside air temperature could be named OATEMP.
A subroutine should only be used in situations where it is more
beneficial to place a block of code in a subroutine instead of
using straight-line code.

Siemens Building Technologies, Inc.

1-7

1-8

Siemens Building Technologies, Inc.

Program MethodologyPPCL Program Design Guidelines


Whenever possible, re-use blocks of program code in other
devices that require the same control. Reusing program code
helps reduce testing time and minimizes the number of errors in
program logic.
NOTE:

APOGEE PPCL Users Manual

Relational Operators
Both relational operators and logical operators compare two values
and produce a result that is called a condition. With relational
operators, a related action is taken only if the condition is true. No
action is taken if the condition is false. For information on the order in
which relational operators are evaluated, see the Order of
Precedence section in this chapter.

Since PPCL requires a unique point database, you must


modify the point names in the reused program code to
reflect the database for that device.

Designing a Program that Operates Efficiently

The following example describes the function of the relational


operator.

The number of FLN devices connected to the field panel has the
greatest influence on program code evaluation speed.

Example

The number of program lines defined in a device affects the line


evaluation rate.

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 80F, I will go to the beach. If not, then I will stay
home."

When using time-based commands, be aware that different


versions of the same device may execute the same program
code at different rates.

You have just used a relational operator to determine your


actions for the day. Your condition is the temperature. If the
temperature is greater than 80F (the condition is true), then you
will go to the beach. If the temperature is 80F or less (the
condition is false), then you will stay home.

For example, Version 3.0 controller boards are capable of


evaluating an average of 350 lines of program code per second.
Field panels using Version 4.0 controller boards are capable of
evaluating an average of 500 lines of program code per second.
When multiple PPCL programs are installed in an APOGEE field
panel, try to create programs that are roughly the same number
of lines per program. Since the computer sequentially executes
one line of each enabled program, the program with the fewest
lines will be executed more often the program with the most lines.

PPCL supports the following relational operators:


Equal to (.EQ.)
Greater than or equal to (.GE.)
Greater than (.GT.)

For example, a field panel contains two programs: one with 10


lines and the other with 50 lines. The shorter program will be
executed five times before the longer program is executed once.

Less than or equal to (.LE.)


Less than (.LT.)
Not equal to (.NE.)
Each relational operator is described in more detail on the following
pages.

Siemens Building Technologies, Inc.

1-9

1-10

Siemens Building Technologies, Inc.

Program MethodologyRelational Operators

Equal to (.EQ.)

APOGEE PPCL Users Manual

Greater than or equal to (.GE.)

Unitary

pre-APOGEE

APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax

if (value1.EQ.value2) then...
value1,
value2

if (value1.GE.value2) then...

These values are defined as analog or digital numbers,


local variables, or point names.

value1,
value2

Use

These values are defined as analog or digital numbers,


local variables, or point 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.

Compares two values to determine if the first value (value1) is


greater than or equal to the second value (value2). The comparison
is true if value1 is greater than or equal to value2.

Example

Example

500
510
520
530

700
710
720
730
740

C IF THE ROOM TEMP IS EQUAL TO 80,


C THEN SET THE SET POINT TO 70.
C
IF (RMTEMP.EQ.80.0) THEN RMSET = 70.0

C IF THE ROOM TEMP IS GREATER THAN


C OR EQUAL TO 80, THEN SET THE SET
C POINT TO 70
C
IF (RMTEMP.GE.80.0) THEN RMSET = 70.0

Notes
Check the point format and number of decimal places used before
comparing values with this relational operator. Certain points
(primarily analog input) may contain precise values. When
comparing a point value to a whole number, the result will be false if
the values are not identical.

Siemens Building Technologies, Inc.

1-11

1-12

Siemens Building Technologies, Inc.

Program MethodologyRelational Operators

Greater than (.GT.)

APOGEE PPCL Users Manual

Less than or equal to (.LE.)

Unitary

pre-APOGEE

APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax

if (value1.GT.value2) then...

if (value1.LE.value2) then...

value1,
value2

value1,
value2

These values are defined as analog or digital numbers,


local variables, or point names.

Use

These values are defined as analog or digital numbers,


local variables, or point names.

Use

Compares two values to determine if the first value (value1) is


greater than the second value (value2). The comparison is true if
value1 is greater than value2.

Compares two values to determine if the first value (value1) is less


than or equal to the second value (value2). The comparison is true if
value1 is less than or equal to value2.

Example

Example

250
260
270
280

300
310
320
330
340

C IF THE ROOM TEMP IS GREATER THAN


C 80, THEN SET THE SET POINT TO 70
C
IF (RMTEMP.GT.80.0) THEN RMSET = 70.0

Siemens Building Technologies, Inc.

1-13

1-14

C IF THE ROOM TEMP IS LESS THAN OR


C EQUAL TO 80, THEN SET THE SET POINT
C TO 70
C
IF (RMTEMP.LE.80.0) THEN RMSET = 70.0

Siemens Building Technologies, Inc.

Program MethodologyRelational Operators

Less than (.LT.)

APOGEE PPCL Users Manual

Not equal to (.NE.)

Unitary

pre-APOGEE

APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax

if (value1.LT.value2) then...

if (value1.NE.value2) then...

value1,
value2

value1,
value2

These values are defined as analog or digital numbers,


local variables, or point names.

Use

These values are defined as analog or digital numbers,


local variables, or point names.

Use

Compares two values to determine if the first value (value1) is less


than the second value (value2). The comparison is true if value1 is
less than value2.

Compares two values to determine if the first value (value1) is not


equal to the second value (value2). The comparison is true if value1
is not equal to value2.

Example

Example

900
910
920
930

600
610
620
630

C IF THE ROOM TEMP IS LESS THAN 80,


C THEN SET THE SET POINT TO 70.
C
IF (RMTEMP.LT.80.0) THEN RMSET = 70.0

Siemens Building Technologies, Inc.

1-15

1-16

C IF THE ROOM TEMP IS NOT EQUAL TO


C 80, THEN SET THE SET POINT TO 70.
C
IF (RMTEMP.NE.80.0) THEN RMSET = 70.0

Siemens Building Technologies, Inc.

Program MethodologyLogical Operators

Logical Operators

APOGEE PPCL Users Manual

And (.AND.)

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.

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax
if (cond1.AND.cond2) then...
cond1,
cond2

The following example describes the function of the logical operator.

Defines a condition that is the result of a comparison


between two values.

Use

Example

Used to compare two logical conditions.

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 80F and I do not have to work, then I will go to the
beach."

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.

You have just used a logical operator to define two conditions. Your
first condition is that the temperature must be greater than 80F.
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.

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

PPCL supports the following logical operators:


And (.AND.)
Not And (.NAND.)

Condition 1 True

Condition 2 False

Result is False

Result is False

Condition 2 True

Result is False

Result is True

Example

Or (.OR.)

200

IF (TIME.LT.19:00.AND.TIME.GT.5:00) THEN ON(LIGHTS)

Exclusive Or (.XOR.)
Each logical operator is described in more detail on the following
pages.

Siemens Building Technologies, Inc.

1-17

1-18

Siemens Building Technologies, Inc.

Program MethodologyLogical Operators

Not And (.NAND.)


Unitary

APOGEE PPCL Users Manual

Or (.OR.)

pre-APOGEE

APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

2.4 and later

Syntax

Syntax
if (cond1.NAND.cond2) then...

if (cond1.OR.cond2) then...

cond1,
cond2

cond1,
cond2

Defines a condition that is the result of a comparison


between two values.

Defines a condition that is the result of a comparison


between two values.

Use

Use
Used to compare two logical conditions.

Used to compare two logical conditions.

If both conditions are true, then the result of the .NAND.


statement is false.

If at least one of the conditions is true, the result of the statement


is true.

A single statement can incorporate a combined total of 16


relational and logical operators.

A single statement can incorporate a combined total of 16


relational and logical operators.

Example

See Table 1-2 for a comparison of conditions used with the .OR.
logical operator:

100

IF (LDO1.EQ.ON.NAND.LDO2.EQ.ON) THEN ON(LDO3)


ELSE OFF(LDO3)

Table 1-2. Truth Table for .OR. Logical Operator.


Condition 1 False
LDO1 State

LDO2 State

LDO3 State

NAND Result

Condition 1 True

Condition 2 False

Result is False

Result is True

Condition 2 True

Result is True

Result is True

OFF

OFF

ON

TRUE

OFF

ON

ON

TRUE

ON

OFF

ON

TRUE

Example

ON

ON

OFF

FALSE

200

IF (TIME.LT.5:00.OR.TIME.GT.17:00) THEN ON(LIGHTS)

Notes
For APOGEE Firmware Revision 2.3 and earlier, AND statements
should be used instead of NAND. In this case, the above example
would be written as:
100

IF (LDO1.EQ.ON.AND.LDO2.EQ.ON) THEN OFF(LDO3)


ELSE ON(LDO3)

Siemens Building Technologies, Inc.

1-19

1-20

Siemens Building Technologies, Inc.

Program MethodologyLogical Operators

APOGEE PPCL Users Manual

Arithmetic Operators

Exclusive Or (.XOR.)
Unitary

pre-APOGEE

APOGEE

BACnet

Arithmetic operators are mathematic functions that are performed on


two or more numbers (operands). When used in PPCL, the result of
a calculation is determined and assigned to a point name or local
variable for future reference. For information on the order in which
arithmetic operators are evaluated, see the Order of Precedence
section in this chapter.

Syntax
if (cond1.XOR.cond2) then...
cond1,
cond2

Defines a condition that is the result of a comparison


between two values.

NOTE:

Use

A maximum of 15 arithmetic operators can be used in


one PPCL program line.

PPCL supports the following arithmetic operators:

Used to compare two logical conditions.

Addition (+)

If cond1 is true and cond2 is false, the result of the statement is


true. If cond1 is false and cond2 is true, this statement is also
true.

Assignment (=)

A single statement can incorporate a combined total of 16


relational and logical operators.

Multiplication (*)

Division (/)

Subtraction (-)

See Table 1-3 for a comparison of conditions used with the .XOR.
logical operator:

Each arithmetic operator is described in more detail on the following


pages.

Table 1-3. Truth Table for .XOR. Logical Operator.


Condition 1 False

Condition 1 True

Condition 2 False

Result is False

Result is True

Condition 2 True

Result is True

Result is False

Example
200

IF (PMP1.EQ.ON.XOR.PMP2.EQ.ON) THEN NORMAL(PMPALM)

Siemens Building Technologies, Inc.

1-21

1-22

Siemens Building Technologies, Inc.

Program MethodologyArithmetic Operators

Addition

APOGEE PPCL Users Manual

Assignment

Unitary

pre-APOGEE

APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax

pt1 = value1 + value2

pt1 = value1

pt1

A point name or local variable that receives the value of


the calculation.

pt1

The point name or local variable that receives the value


from value1.

value1,
value2

Point names, local variables, expressions, or numbers


that are used in the calculation.

value1

A point name, local variable, expression, or number that is


assigned to pt1.

Use

Use

Adds two or more values and stores the sum in a defined location as
pt1.

Assigns the value of value1 to the value of pt1.


Example

Example
560

560

COUNT = COUNT + 1.0

COUNT = COUNT + 1.0

Notes
Do not to assign values to reserved words. See the Reserved Word
List in Appendix A.
Example
500

C = OATEMP

The code in this example would fail due to the C being used like a
variable, when instead the field panel interprets the line as a
comment.

Siemens Building Technologies, Inc.

1-23

1-24

Siemens Building Technologies, Inc.

Program MethodologyArithmetic Operators

Division

APOGEE PPCL Users Manual

Multiplication

Unitary

pre-APOGEE

APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax

pt1 = value1 / value2

pt1 = value1 * value2

pt1

A point name or local variable that receives the value of the


calculation.

pt1

A point name or local variable that receives the value of


the calculation.

value1

A point name, local variable, expression, or number used in


the calculation. In PPCL, value1 represents the numerator.

value1,
value2

Point names, local variables, expressions, or numbers


used in the calculation.

value2

A point name, local variable, expression or number used in


the calculation. In PPCL, value2 represents the
denominator.

Use
Multiplies two or more values (value1 and value2) and stores the
product in a defined location (pt1).

Use
Divides two values (value1 by value2) and stores the quotient in a
defined location (pt1).

Example
300

SETPT = TEMP * 0.00438

Example
890

AVERAG = TOTAL / 5.0

Siemens Building Technologies, Inc.

1-25

1-26

Siemens Building Technologies, Inc.

Program MethodologyArithmetic Operators

APOGEE PPCL Users Manual

Arithmetic Functions

Subtraction
Unitary

pre-APOGEE

APOGEE

BACnet

Arithmetic functions perform mathematical calculations on a number


(value). When used in PPCL, the result of a calculation is usually
assigned to a point name for future reference. For information on the
order in which arithmetic functions are evaluated, see the Order of
Precedence section in this chapter.

Syntax
pt1 = value1 - value2
pt1

A point name or local variable that receives the value of


the calculation.

value1,
value2

Point names, local variables, expressions, or numbers


that are used in the calculation.

PPCL supports the following arithmetic functions:


Arc-Tangent (ATN)
Complement (COM)
Cosine (COS)

Use
Subtracts a value (value2) from another value (value1) and stores
the difference in a defined location (pt1).

Natural Antilog (EXP)

Example

Root (.ROOT.)

300

Natural Log (LOG)

COUNT = COUNT - 1.0

Sine (SIN)
Square Root (SQRT)
Tangent (TAN)
Each arithmetic operator is described in more detail on the following
pages.

Siemens Building Technologies, Inc.

1-27

1-28

Siemens Building Technologies, Inc.

Program MethodologyArithmetic Functions

Arc-Tangent (ATN)
Unitary

APOGEE PPCL Users Manual

Complement (COM)

pre-APOGEE

APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax
pt1 = ATN(value1)

pt1 = COM(value1)

pt1

A point name or local variable that receives the value of the


calculation.

pt1

A point name or local variable that receives the value of the


calculation.

value1

A point name, local variable, or number from which the


value of the arc-tangent is calculated.

value1

A point name, local variable, or number from which the


complement is calculated.

Use

Use

A function that calculates a one's complement value for a point


(value1). The one's complement function converts digital values (0 or
1) to their opposite values. The result of the calculation is then stored
in a defined location (pt1).

A trigonometric function that calculates the arc-tangent of a value


(value1). The result of the calculation is then stored in a defined
location (pt1).
All values used with this function are expressed in degrees.

Example
Example
500

500

LLSTAT = COM(PROF01)

THETA = ATN(VALUE1)

Siemens Building Technologies, Inc.

1-29

1-30

Siemens Building Technologies, Inc.

Program MethodologyArithmetic Functions

Cosine (COS)
Unitary

APOGEE PPCL Users Manual

Natural Antilog (EXP)


pre-APOGEE

APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax
pt1 = COS(value1)

pt1 = EXP(value1)

pt1

A point name or local variable that receives the value of the


calculation.

pt1

A point name or local variable that receives the value of the


calculation.

value1

A point name, local variable, or number from which the


value of the cosine is calculated.

value1

A point name, local variable, or number from which the


value of the antilog is calculated.

Use

Use

Calculates the natural antilog of a point (value1) and stores the result
of the calculation in a defined location (pt1).

A trigonometric function that calculates the cosine of a value


(value1). The result of the calculation is then stored in a defined
location (pt1).

Example

All values used with this function are expressed in degrees.

860

NATANT = EXP(VALUE1)

Example
700
701
702
703
704
706

C
C THIS FORMULA COMPUTES REAL POWER
C WHEN VOLTS, AMPS, AND PHASE ANGLE
C ARE KNOWN.
C
PWR = V * I * COS(THETA)

Siemens Building Technologies, Inc.

1-31

1-32

Siemens Building Technologies, Inc.

Program MethodologyArithmetic Functions

Natural Log (LOG)

APOGEE PPCL Users Manual

Root (.ROOT.)

Unitary

pre-APOGEE

APOGEE

BACnet

Unitary

Syntax

pre-APOGEE

APOGEE

BACnet

Syntax

pt1 = LOG(value1)

pt1 = (value1.ROOT.value2)

pt1

A point name or local variable that receives the value of the


calculation.

pt1

A point name or local variable that receives the value of


the calculation.

value1

A point name, local variable, or number from which the


value of the log is calculated.

value1,
value2

Point names, local variables, or numbers from which the


value of the root is calculated.

Use

Use

Calculates the natural log of a point (value1) and stores the result of
the calculation in a defined location (pt1).

This function calculates the root of the defined points by raising the
value of value1 to the inverse power of value2. The result of the
calculation is then stored in a defined location (pt1). The
mathematical notation for the root is represented as follows:

Example
200

ENTH = LOG(VALUE1)

TEMP

The following example demonstrates the same values defined as a


line of PPCL program code:
Example
310

Siemens Building Technologies, Inc.

1-33

1-34

RVAL = (TEMP.ROOT.3.0)

Siemens Building Technologies, Inc.

Program MethodologyArithmetic Functions

Sine (SIN)
Unitary

APOGEE PPCL Users Manual

Square Root (SQRT)


pre-APOGEE

APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax
pt1 = SIN(value1)

pt1 = SQRT(value1)

pt1

A point name or local variable that receives the value of the


calculation.

pt1

A point name or local variable that receives the value of the


calculation.

value1

A point name, local variable, or number from which the


value of the sine is calculated.

value1

A point name, local variable, or number from which the value of


the square root is calculated.

Use

Use
A trigonometric function that derives the sine of a value (value1). The
result of the calculation is then stored in a defined location (pt1).

Derives the square root of a value. The result of the calculation is


then stored in a defined location (pt1).

All values used with this function are expressed in degrees.

Example
180

SRPT1 = SQRT(PT1)

Example
180

VAR = SIN(THETA)

Siemens Building Technologies, Inc.

1-35

1-36

Siemens Building Technologies, Inc.

Program MethodologyArithmetic Functions

Special Functions

Tangent (TAN)
Unitary

APOGEE PPCL Users Manual

pre-APOGEE

APOGEE

BACnet

pt1 = TAN(value1)

Special functions are used to access a specific value that is unique


to a point. The value of the point can then be tested or assigned to
other points. Since special functions are maintained by the system,
they cannot be manually commanded to a different value. For
information on the order in which special functions are evaluated,
see the Order of Precedence section in this chapter.

pt1

A point name or local variable that receives the value of the


calculation.

NOTE:

value1

A point name, local variable, or number from which the


value of the tangent is calculated.

PPCL supports the following special functions:

Syntax

Special functions cannot be used over the network.

Alarm priority (ALMPRI)

Use

Totalized value (TOTAL)

A trigonometric function that calculates the tangent of a value


(value1). The result of the calculation is then stored in a defined
location (pt1).

Each special function is described in more detail on the following


pages.

All values used with this function are expressed in degrees.


Example
930

TANPT1 = TAN(PT1)

Siemens Building Technologies, Inc.

1-37

1-38

Siemens Building Technologies, Inc.

Program MethodologySpecial Functions

APOGEE PPCL Users Manual

Table 1-4. APOGEE to BACnet


Notification Class Reference.

Alarm priority (ALMPRI)


Unitary

pre-APOGEE

APOGEE

BACnet

ALMPRI Value

BACnet
Notification Class

0-31

32-63

64-95

96-127

128-191

192-255

Syntax
ALMPRI(pt1)
pt1

A point name for which the current alarm priority is taken.

Use
Accesses the alarm priority level of a point defined in an enhanced
alarming control strategy. The value of ALMPRI can range from 1
through 6. Besides testing ALMPRI for a specific value, you can also
assign the value of ALMPRI to another point.
Example 1
230
232
234
236
240

C
C THIS LINE TESTS IF THE POINT CALLED
C RMTEMP IS AT ALARM PRIORITY LEVEL 1.
C
IF (ALMPRI(RMTEMP).EQ.1) THEN ON (OPBELL)

Example 2
330
332
334
336
340

C
C THIS LINE ASSIGNS THE ALARM PRIORITY LEVEL
C OF RMTEMP TO THE POINT CALLED TMPPRI.
C
TMPPRI = ALMPRI(RMTEMP)

Notes
ALMPRI must reside in the same field panel as the point on which
the function is being performed.
For BACnet firmware, the ALMPRI value corresponds to a priority in
the Notification class for the points current alarm state. Table 1-4
outlines the BACnet Notification classes and shows how they relate
to the APOGEE ALMPRI values.

Siemens Building Technologies, Inc.

1-39

1-40

Siemens Building Technologies, Inc.

Program MethodologySpecial Functions

APOGEE PPCL Users Manual

Order of Precedence

Totalized value (TOTAL)


Unitary

pre-APOGEE

APOGEE

BACnet

The order of precedence is the order in which operators (relational,


logical, mathematical, and special function) are evaluated.
Operators that have a higher precedence are evaluated before
operators that have a lower precedence.

Syntax
TOTAL(pt1)
pt1

If all the operators in the formula have equivalent precedence


levels, then the operators are evaluated from left to right.

A point name for which the totalized value is taken.

The following example illustrates how precedence levels are applied


to mathematical operators.

Use
Allows you to access the totalized value of a point.

Example 1

Example 1
800
801
802
803
804
805
810

10 - 5 + 2 * 3 = x

C
C THIS LINE COMPARES THE TOTALIZED VALUE OF FAN1
C TO DETERMINE IF IT IS GREATER THAN 500.
C IF THE CONDITION IS TRUE, FAN1 WILL BE PLACED
C INTO ALARM.
C
IF(TOTAL(FAN1).GT.500.0)THEN ALARM(FAN1)

This equation is solved as follows:


1. Multiplication has the highest precedence level in this equation.
The first step in evaluating the equation is as follows:
2*3=6

Example 2
800
801
802
803
810

After the first level of operators has been evaluated, the equation
appears as follows:

C
C THIS LINE ASSIGNS THE TOTALIZED VALUE
C OF FAN1 TO THE POINT CALLED FANRUN.
C
FANRUN = TOTAL(FAN1)

10 - 5 + 6 = x
2. Since the remaining operators have the same precedence level,
operators are now evaluated from left to right. The last step in
evaluating the equation is as follows:

Notes

10 - 5 = 5

TOTAL must reside in the same field panel as the point on which the
function is being performed.

5 + 6 = 11
3. The solution to this equation is 11.

See also

See Table 1-5 for a complete list of precedence levels for PPCL
operators.

INITTO

Siemens Building Technologies, Inc.

1-41

1-42

Siemens Building Technologies, Inc.

Program MethodologyOrder of Precedence

APOGEE PPCL Users Manual


When the computer evaluates multiple pairs of parentheses, each
pair is evaluated according to how it is positioned in the formula.
Multiple parentheses are evaluated as follows:

Statements containing relational and logical operators are also


assigned a precedence level.
Note that in problems comparing values using relational operators
(.EQ. and .NE.), the result of the comparison can change the output
of the statement.

For a pair of parentheses defined within another pair of


parentheses, the computer always evaluates the innermost set
first.

Example 2

For parentheses defined as individual pairs, each pair is


evaluated from left to right.

If (value1 .EQ. value2 .AND. value1 .NE. value3) then...


This equation is solved as follows:

The following example illustrates how parentheses change the way


the computer evaluates equations.

1. The relational operators (.EQ. and .NE.) have the highest


precedence level in the formula. Since these two operators have
the same precedence level, they are evaluated from left to right.

Example
10 - 5 + 2 * 3 = x

In this example, assume that both comparisons (condition1 and


condition2) are true.
value1 .EQ. value2

(condition1 = true)

value1 .NE. value3

(condition2 = true)

This equation uses two levels of precedence: multiplication and


addition/subtraction. Following the order of precedence rules, the
solution to this equation is 11.
When parentheses are inserted, the same equation produces a
different solution.

After the first level of operators has been evaluated, the equation
now looks like the following:

(10 - 5 + 2) * 3 = x

If (condition1 .AND. condition2) then...

The equation is now solved as follows:

2. The logical operator .AND. is then evaluated.

1. Parentheses give the information within the set of parentheses


the highest order of precedence. The operators within the
parentheses are evaluated from left to right because they all
have the same precedence. The first step in evaluating the
equation is as follows:

3. Since .AND. requires both conditions to be true, the solution to


this problem will also be true.

Changing Precedence Levels with Parentheses

(10 - 5 + 2) = 7

Parentheses can be used to override the normal order of


precedence. Placing parentheses around specific values or
operations gives the information within the set of parentheses the
highest order of precedence. If all the operators within in the
parentheses have equivalent precedence levels, then the operators
are evaluated from left to right.

Siemens Building Technologies, Inc.

1-43

After the operators within parentheses have been evaluated, the


equation appears as follows:
7 * 3 = 21
2. The standard precedence rules now apply to the remaining
operators. With only one operation left, the multiplication
operator is evaluated and produces a solution of 21.

1-44

Siemens Building Technologies, Inc.

Program MethodologyOrder of Precedence

Resident Points

Table 1-5. Order of Precedence for PPCL Operators.


Precedence
Level

Command

APOGEE PPCL Users Manual

Syntax

Resident points provide time-based and system status information.


These points are used to determine the time, date, month, and day
of the month, or to monitor alarms, modes of operation (DAY or
NIGHT), and communication between nodes.

1 (Highest)

Parentheses

(expression or value)

Alarm priority

ALMPRI(pt1)

Arc-tangent

ATN(value1)

Complement

COM(value1)

Cosine

COS(value1)

Natural antilog

EXP(value1)

Natural log

LOG(value1)

Resident points are predefined and maintained by the device.


Since each device maintains its own set of resident points, a
resident point cannot be used across the network.

Sine

SIN(value1)

NOTE:

Square root

SQRT(value1)

Tangent

TAN(value1)

Totalized value

TOTAL(pt1)

Alarm count (ALMCNT)

Root

(value1.ROOT.value2)

Alarm count 2 (ALMCT2)

Multiplication

value1 * value2

Division

value1 / value2

Battery status ($BATT)

Addition

value1 + value2

Decimal time (CRTIME)

Subtraction

value1 - value2

Day (DAY)

Equal to

.EQ.

Day of the month (DAYOFM)

Not equal to

.NE.

Greater than

.GT.

Greater than or equal to

.GE.

Month (MONTH)

Less than

.LT.

Node number (NODE0 through NODE99)

Less than or equal to

.LE.

And

.AND.

Not and

.NAND.

Seconds counter (SECNDS)

Or

.OR.

Seconds counters (SECND1 through SECND7)

Exclusive Or

.XOR.

Military time (TIME)

8 (Lowest)

The value of a resident point can be tested or assigned to other


points.

Do not use resident points in TABLE commands.

PPCL supports the following resident points:

Communications link (LINK)

Peak Demand Limiting point ($PDL)

Each resident point is described in more detail on the following


pages.
Siemens Building Technologies, Inc.

1-45

1-46

Siemens Building Technologies, Inc.

Program MethodologyResident Points

Alarm count (ALMCNT)


Unitary

pre-APOGEE

APOGEE

BACnet

APOGEE PPCL Users Manual

Alarm count 2 (ALMCT2)


Unitary

pre-APOGEE

APOGEE

BACnet

Syntax
Syntax

ALMCNT

ALMCT2
Use
The value of ALMCNT represents the number of points within a field
panel or unitary controller that are currently in the ALARM state.

Use
This resident point is similar to the ALMCNT point. ALMCT2
specifies if the second alarm counter should be incremented when a
point enters the ALARM state.

When a point enters the ALARM state, the computer adds one (1) to
the value of ALMCNT. When a point returns to the NORMAL state,
the computer subtracts one (1) from the value of ALMCNT.

When a point enters the ALARM state, the computer adds one (1) to
both the value of ALMCNT and ALMCT2. When a point returns to
the NORMAL state, the computer subtracts one (1) from both values.

Example
340

IF (ALMCNT.GT.0) THEN ON(ALARM7)

Example
300
310
320
330

Notes
A point must be defined as alarmable in order to be counted
when that point enters the ALARM state.
In all revisions of field panel firmware, the ALMCNT and ALMCT2
counters work the same with enhanced alarms as they do with
regular alarms.

C IF THE SECOND LEVEL ALARM COUNTER BECOMES


C GREATER THAN 5, COMMAND ON ALARM8
C
IF (ALMCT2.GT.5) THEN ON(ALARM8)

Notes
A point must be defined as alarmable and enabled for ALMCT2 in
order to be counted when that point enters the ALARM state.*

The level of alarm does not affect ALMCNT and ALMCT2. In


other words, the counters do not increment again when an
enhanced alarm point changes from one alarm level to another.

In all revisions of field panel firmware, the ALMCNT and ALMCT2


counters work the same with enhanced alarms as with regular
alarms.

If a point is disabled (*PDSB*) or operator disabled (*ODSB*),


ALMCNT will still increment and decrement accordingly.

The level of alarm does not affect ALMCNT and ALMCT2. In


other words, these counters do not increment again when an
enhanced alarm point changes from one alarm level to another.

See also

*For pre-APOGEE, ALMCT2 can only be used with digital points.

ALMCT2, ENALM, DISALM

See also
ALMCNT, ENALM, DISALM
Siemens Building Technologies, Inc.

1-47

1-48

Siemens Building Technologies, Inc.

Program MethodologyResident Points

Battery condition ($BATT)


Unitary

pre-APOGEE

APOGEE

BACnet

APOGEE PPCL Users Manual

Decimal time (CRTIME)

Syntax

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

$BATT

CRTIME

Use

Use

This resident point is used with field panels that can monitor the
strength of their backup battery. Either a numeric value or the
backup battery status indicators indicate the current status of
$BATT.

This resident point maintains the current time and stores the value in
a decimal format. The following examples show how CRTIME stores
values:

$BATT numeric values are 0, 50, or 100.

7:15 a.m. = 7.25

A $BATT value of 0 indicates the battery has discharged and


must be replaced.

7:30 p.m. = 19.50


The values for this point can range from 0.00 to 23.999721.

A $BATT value of 50 indicates the battery is about to discharge


and should be replaced to prevent any loss of data.

Example
500
501
502
503
504
510

A $BATT value of 100 indicates the battery does not need to be


replaced.
$BATT status indicators are LOW, DEAD, or OK.
If $BATT status is LOW or DEAD, then the battery has
discharged and must be replaced.

CRTIME can also be used to assign the current value of time to a


virtual LAO type point which allows you to read the current time on a
graphic, point log, etc. For example:

If $BATT status is OK, then the battery does not need to be


replaced.

100

Example 1
200

IF ($BATT.EQ.0) THEN ALARM(P26BAT)

VTIME = CRTIME

Notes
CRTIME is updated every second.

Example 2
210

C
C THIS CODE DEFINES A TIME PERIOD
C FROM 6:45 A.M. TO 5:30 P.M. FOR
C SFAN TO OPERATE.
C
IF (CRTIME.GE.6.75.AND.CRTIME.LE.17.50)
THEN ON(SFAN)ELSE OFF(SFAN)

IF ($BATT.EQ.DEAD) THEN ALARM(P26BAT)

See also
LOW, DEAD, OK
Siemens Building Technologies, Inc.

1-49

1-50

Siemens Building Technologies, Inc.

Program MethodologyResident Points

Day (DAY)

APOGEE PPCL Users Manual

Day of the month (DAYOFM)

Unitary

pre-APOGEE

APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax

DAY

DAYOFM

Use

Use

This resident point specifies the current day of the week. The values
used for the DAY point are as follows:
Number

This resident point specifies a particular day of any month.


Valid values for DAYOFM are 1 through 31. The value corresponds
to the numerical calendar day of a month.

Day of the Week

Monday

Tuesday

Wednesday

Thursday

Friday

Saturday

Sunday

Example
160
162
164
166
180

Notes
This point is helpful when you have to perform certain operations on
a specific day (for example, generating a report on the first day in the
month).

Example
300

C THIS SECTION OF CODE DETERMINES IF


C IT IS THE FIRST DAY OF THE MONTH.
C IF SO, SET TOTMON TO 0.
C
IF (DAYOFM.EQ.1) THEN TOTMON = 0

IF (DAY.EQ.1) THEN TOTRAN = 0

Notes
These values are not related to the modes used in the TODMOD
statement.

Siemens Building Technologies, Inc.

1-51

1-52

Siemens Building Technologies, Inc.

Program MethodologyResident Points

Communications link (LINK)

APOGEE PPCL Users Manual

Month (MONTH)

Unitary

pre-APOGEE

APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax

LINK

MONTH

Use

Use

This resident point indicates the condition of communications.

This resident point specifies the current month. The values used for
the MONTH point are as follows:

Depending on the status of the communications link, a point contains


the value 0 or 1.

Number

Month

If the LINK value is 0, the node where the LINK point resides is
not communicating with the network.

January

February

If the LINK value is 1, the node where the LINK point resides is
actively communicating with the network.

March

April

Example

May

300

June

July

August

September

10

October

11

November

12

December

IF (LINK.EQ.0) THEN ON(ALARM)

See also
Node Number (NODEn)

Example
950

Siemens Building Technologies, Inc.

1-53

1-54

IF (MONTH.GE.4.AND.MONTH.LE.10) THEN
SEASON = 1 ELSE SEASON = 0

Siemens Building Technologies, Inc.

Program MethodologyResident Points

Node number (NODE0 through NODE99)


Unitary

pre-APOGEE

APOGEE
RS-485

APOGEE
Ethernet

APOGEE PPCL Users Manual

PDL monitor ($PDL)


BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax
Syntax

$PDL

NODEn
n

Use

Represents the number of a NODE.

This resident point takes on the current value of the demand


prediction for each calculated interval made by the PDLMTR
statement. The point can be assigned to a virtual LAO point,
displayed, and trended.

Valid values for NODE are 0 through 99.

Use
This resident point allows the program to check the status of a node
on the network. All devices or CPUs on the network occupy a node
corresponding to its address. This point is generally used to test for
normal operation of nodes for control strategies that depend on
network communication.

Example
350

KWH = $PDL

Example
600

IF (NODE22.EQ.FAILED) THEN ON(ALARM)

Notes
NODE resident points cannot be used in field panels on an Ethernet
Automation Level Network (ALN). To use PPCL to monitor the failure
status of an Ethernet field panel, use the ADDRESS subpoint of the
field panel and equate it to FAILED.
Example
300

IF (!EthernetMBC1:ADDRESS.EQ.FAILED)
THEN ON(ALARM)

See also
Communications Link (LINK)

Siemens Building Technologies, Inc.

1-55

1-56

Siemens Building Technologies, Inc.

Program MethodologyResident Points

Seconds counter (SECNDS)

APOGEE PPCL Users Manual

Seconds counters (SECND1 through SECND7)

Unitary

pre-APOGEE

APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax

SECNDS

SECNDn
n

Use
This resident point counts real time seconds and can be used as a
timer. The computer adds one (1) to the SECNDS variable for every
one second of real time that passes.

Valid values for SECNDn are 1 through 7.

Use
These seven resident points count real time seconds and can be
used as timers. The computer adds one (1) to the SECNDn variable
for every one second of real time that passes.

The initial value of the SECNDS point is set by a PPCL


command.
The SECNDS point can be set to a maximum value of 9,999.

The value of a SECNDn point can only be set by a PPCL


command.

Example
890

The number that describes which SECNDn point is


referenced.

IF (SFAN.NE.PRFON) THEN SECNDS = 0

The maximum value a SECNDn point can be set to is 9,999.

Notes

Example

For APOGEE field panels, each program has a unique SECNDS


point. This point can also be viewed in the interface using the
program name, system delimiter (:)SECNDS format.

600

IF(SECND1.GT.15) THEN ON(RF) ELSE OFF(RF)

Notes
For APOGEE field panels, each program has unique SECNDSn
points. These points can also be viewed in the interface using the
program name, system delimiter (:)SECNDSn format.

Siemens Building Technologies, Inc.

1-57

1-58

Siemens Building Technologies, Inc.

Program MethodologyResident Points

APOGEE PPCL Users Manual

Local Variables

Military time (TIME)


Unitary

pre-APOGEE

APOGEE

BACnet

Local variables are storage locations for data. Local variables


function like virtual points except that they require less memory, are
predefined, and cannot be directly displayed.

Syntax

Local variables can contain analog or digital values.

TIME

Each set of local variables is designed for a specific task.

Use

Local variables are divided into two categories: subroutine and


global storage variables.

This resident point maintains the current time and stores the value in
military time. The TIME value can contain a value from 0:00 to 23:59.
The following examples show how TIME stores values follows:

PPCL supports the following local variables:

7:15 a.m. = 7:15

$ARG1 through $ARG15, which are used for subroutines.

$LOC1 through $LOC15, which are used to store the results of


calculations.

LOCAL (the definition of user-defined local variables in


APOGEE field panels is discussed in Chapter 3 Syntax )

7:30 p.m. = 19:30


Example
500
501
502
503
502
510

C
C THIS CODE DEFINES A TIME PERIOD
C FROM 6:45 A.M. TO 5:30 P.M. FOR
C SFAN TO OPERATE.
C
IF(TIME.GE.6:45.AND.TIME.LE.17:30)THEN
ON(SFAN)ELSE OFF(SFAN)

For APOGEE field panels, each program has unique $ARG and
$LOC variables. $LOC points can also be viewed and commanded
through the interface using the program name, system delimiter (:),
local variable name format.
Each local variable is described in more detail on the following
pages.

Notes
The time is updated every second. TIME cannot be used to assign a
value to a virtual point since its value is not in a standard decimal
form. CRTIME should be used for this purpose. TIME can be used in
PPCL for comparison in the IF/THEN/ELSE statement.

Siemens Building Technologies, Inc.

1-59

1-60

Siemens Building Technologies, Inc.

Program MethodologyLocal Variables

APOGEE PPCL Users Manual


The value of RMTEMP = $ARG2

$ARG1 through $ARG15


Unitary

pre-APOGEE

APOGEE

BACnet

The value of SETPT = $ARG3


Notes
$ARGn points can only be used in subroutines.

Syntax
See also

$ARGn
n

GOSUB

The number that describes what $ARGn point is


referenced.

Valid values are 1 through 15.

Use
A $ARGn variable represents an actual point name used in a
subroutine. Instead of defining actual point names in a subroutine,
values are transferred to $ARGn variables. The $ARGn variables
represent their corresponding points as functions and calculations
are performed in the subroutine.
When the value of a $ARGn variable changes, the value of the
corresponding point is also updated.
When a $ARGn variable is encountered in the subroutine section of
the program, the computer checks the calling GOSUB command for
an available point name.
Example
1000
...
2000
2010
2020

GOSUB 2000 OATEMP, RMTEMP, SETPT


$ARG1 = $ARG1 + 1
$ARG2 = $ARG2 + 1
$ARG3 = $ARG3 + 1

The program branches to line number 2000. When $ARG1 is


encountered in line 2000, the computer assigns the value of the first
point name (OATEMP) to $ARG1. When the computer encounters
$ARG2, it assigns the value of the next point defined in the GOSUB
command (RMTEMP).
In this example, the values would be assigned as follows:
The value of OATEMP = $ARG1
Siemens Building Technologies, Inc.

1-61

1-62

Siemens Building Technologies, Inc.

Program MethodologyLocal Variables

APOGEE PPCL Users Manual

Point Priority Overview

$LOC1 through $LOC15


Unitary

pre-APOGEE

APOGEE

BACnet

APOGEE and pre-APOGEE firmware use a point priority to identify


the level at which a point is commanded. Point priority also
determines if an operator or a particular control program is
responsible for controlling a point.

Syntax

BACnet firmware uses a priority array to perform the same function


as the APOGEE point priority. For BACnet firmware, the priority is
mapped to one of 16 slots defined using the Command Priority
Table. Only one slot in the Priority Array is set for the point when
commanding points with the @priority operator. The value of the
point is set based on the highest slot in the Priority Array.

$LOCn
n

The number that describes what $LOCn point is referenced.

Valid values are 1 through 15.

Use
These points are used to store the results of calculations.

NOTE:

$LOCn variables can store an analog or digital value.


$LOCn variables can be used throughout the program.

APOGEE and pre-APOGEE Point Priority Levels

The maximum value a $LOC point can store is 32767.

APOGEE and pre-APOGEE Firmware Revisions 12.5/1.5 and


12.51/1.51 support the following priority levels:

If you need to store higher values, use a virtual LPACI or


LAO point.

OPER (Operator, highest priority level)

If you are using APOGEE firmware, you might consider


creating a local variable by using a LOCAL statement.

SMOKE (Smoke control)


EMER (Emergency)

Example 1
200

PDL (Peak Demand Limiting)

MIN ($LOC1,PT1,PT2,PT3)

Example 2
100

Unitary firmware does not support the use of priority


indicators and manual priority modifications.

NONE (PPCL priority, lowest priority level)

$LOC7 = (50/VALUE1+10.0) * 2.0

A point can only be commanded by an operation with an equal or


higher priority. For example, a point in EMER priority can be
commanded by an operation with OPER, SMOKE, or EMER priority.

Notes
Local points in APOGEE field panels can store values greater than
32,767 (up to 10,000,000).

Table 1-5 describes the five APOGEE and pre-APOGEE point


priorities in PPCL, listed from highest to lowest priority.

See also
LOCAL

Siemens Building Technologies, Inc.

1-63

1-64

Siemens Building Technologies, Inc.

Program MethodologyPoint Priority Overview

Table 1-6. APOGEE and pre-APOGEE Point Priorities.


Command
Highest
Priority

OPER
(Operator)

SMOKE

EMER
(Emergency)

Lowest
Priority

APOGEE PPCL Users Manual

BACnet Priority Array

Description

APOGEE BACnet firmware uses the Priority Array to determine the


command order for a point. The array contains sixteen slots plus a
Relinquish Default slot. BN01 is the highest position in the array, and
Relinquish Default is the lowest.

The highest priority level. OPER priority


indicates the PPCL program is overridden
and an operator is responsible for
commanding the point. A point in OPER
must be changed to a lower priority before
PPCL can resume control of the point. This
change in priority is called releasing the
point.

Any level in the priority can be commanded at any time. If the


Present Value of the point is at a higher priority slot, the command
will not be executed. Unlike the APOGEE Point Priority, the Priority
Array retains all commands made at lower priority slot levels. When
the Present Value drops to that slot level, the stored point command
is executed.

A program that monitors smoke alarms is


commanding the point. Points in SMOKE
priority can be commanded by operations
with OPER or SMOKE priority.

NOTE:

A program that controls the point during


emergencies is commanding the point.
Points in EMER priority can be commanded
by operations with OPER, SMOKE, or
EMER priority.

PDL
(Peak
Demand
Limiting)

A Peak Demand Limiting (PDL) program


commands the point. Points in PDL priority
can be commanded by operations with
OPER, SMOKE, EMER, or PDL priority.

NONE

The lowest priority level. Any PPCL program


or application can command the point.

The Insight workstation does not save or restore the


Priority Array. After a download from the Insight
workstation, all points are at their Relinquish Default
value.

For more information on BACnet point priorities, see the APOGEE


Field Panel Users Manual (125-3000).
Table 1-7 explains the BACnet command priorities and shows how
they relate to the APOGEE point priority levels.

Table 1-6 explains the BACnet command priorities and shows how
they relate to the APOGEE point priority levels.

Siemens Building Technologies, Inc.

1-65

1-66

Siemens Building Technologies, Inc.

Program MethodologyPoint Priority Overview

At (@) Priority Status Indicators

Table 1-7. APOGEE to BACnet Point Priority Reference.


BACnet
Priority
Slot

APOGEE Point Priority

APOGEE PPCL Users Manual

At (@) priority indicators are used to monitor the priority status on


points defined in a device. They can also be used to test if a point is
at a specific priority or to command a point to a specific priority.

BACnet Name

BN01

Manual Life Safety

BN02

Automatic Life Safety

BN03

Available

BN04

Available

BN05

Critical Equipment Control

BN06

Minimum On/Off

BN07

Available

When using an @ priority indicator within PPCL statements, the


@ priority indicator occupies the first parameter location. This
decreases the total number of points you can define in a
statement to 15.

BN08

Manual Operator

When the @ priority is not used, the default priority is EMER.

BN09

Available

BN10

Available

BN11

Available

BN12

Available

BN13

Available

BN14

Available

BN15

Available

Sched, PPCL, TEC tool*

BN16

Available

Initial value of the point; TEC


Application

NONE

Relinquish Default

OPER (Operator)

SMOK (Smoke)

EMER (Emergency)

PDL (Peak Demand Limiting)

The priority level defined in a statement occupies one of the


parameters.
Statements such as ON, OFF, RELEAS, and SET allow you to
define a total of 16 parameters in one statement.

Testing Point Priorities


Programs sometimes fail because a command outside the operation
being performed interferes with a point inside the operation. Testing
the priority of a point helps prevent this from happening.
If numerous tasks are being performed in the program, testing point
priority levels is one method of preventing those tasks from
interfering with each other.
Example
200

IF (SFAN.EQ.@EMER) THEN ON(@EMER,RFAN)

This statement tests SFAN to determine if it's at EMER priority


before turning ON RFAN. If SFAN is at EMER priority, RFAN will be
command ON.

* The TEC Tool can command Priority slot 16 only if it is not being commanded by PPCL.

Commanding Points to a Specific Priority


Points can be commanded to a specific priority, as well as a specific
status, by placing the at (@) symbol before the priority syntax (see
Table 1-8).

Siemens Building Technologies, Inc.

1-67

1-68

Siemens Building Technologies, Inc.

Program MethodologyAt (@) Priority Status Indicators

Releasing the Point from a Specific Priority to NONE Priority

Table 1-8. System Variables for


Priority Monitoring.
Priority

APOGEE PPCL Users Manual

The second option allows you to release points at a specific priority


to the NONE priority. In the following example, any of the points
included in the RELEAS command that have a priority of EMER or
lower, will be released to the NONE priority:

Priority syntax

Operator

@OPER

Smoke

@SMOKE

Emergency

@EMER

Peak Demand Limiting

@PDL

No priority (PPCL)

@NONE

300

Note that if the point specified is at an equal or lower priority than


EMER, it will also be released to NONE. In other words:

Example
120

RELEAS(@EMER,FAN1,FAN2)

OFF(@OPER,SFAN,RFAN)

When this command is executed, SFAN and RFAN are shut OFF
and their priorities are changed to OPER. An operator interface
command (such as OIP) is not needed to change the point priority.

If the point
specified is at
this priority

Using this
pre-APOGEE
command

OPER

RELEAS(@OPER )

NONE

EMER

NONE
NONE

OPER

RELEAS(@SMOKE )

OPER

SMOKE

or
RELEASE(@EMER )

NONE

EMER

The RELEAS command quickly changes the priority of a point or


group of points. With pre-APOGEE firmware, you have two options
for changing point priorities with the RELEAS command:

NONE

SMOKE

PDL

Pre-APOGEE Firmware

Changes the
priority to

NONE

PDL
OPER

NONE
RELEAS(@PDL )

OPER

Release the point to NONE priority.

SMOKE

SMOKE

Release the point from a specific priority to NONE priority

EMER

EMER

PDL

NONE

Releasing the Point to NONE Priority

For a complete description of the RELEAS command, see Chapter 3


Syntax.

The first option allows you to release points to the NONE priority. In
the following example, the points FAN1 and FAN2 are released to
NONE priority.
160

RELEAS(FAN1,FAN2)

Siemens Building Technologies, Inc.

1-69

1-70

Siemens Building Technologies, Inc.

Program MethodologyAt (@) Priority Status Indicators

At (@) Priority Status Indicators Supported

APOGEE PPCL Users Manual

Emergency (@EMER)
Unitary

PPCL supports the following @ priority indicators:


Operator (@OPER)
Smoke (@SMOKE)

pre-APOGEE

APOGEE

BACnet

Syntax

Emergency (@EMER)

@EMER

Peak Demand Limiting (@PDL)

Use

PPCL (@NONE)

This command identifies the emergency priority level indicator. The


@EMER command is typically used in one of the following situations:

Each @ priority indicator is described in more detail on the following


pages.

To test if a point is currently at emergency priority, an


IF/THEN/ELSE statement would look like the following:
300

IF (SFAN.EQ.@EMER) THEN ON(HORN)

To command a point at emergency priority, the program code


might look like the following:
500

ON(@EMER,SFAN)

To release a point in the device from emergency to PPCL priority,


an example of program code might look like the following:
700

RELEAS(@EMER,SFAN)

NOTE: Using the @ priority indicator in this manner will not


release the point if it has a higher priority (SMOKE or
OPER).
Notes
For APOGEE and pre-APOGEE firmware, if the @ priority
indicator is not used, the field panel will release points from PDL
or EMER priority to NONE.
For BACnet firmware, the field panel releases the slot
corresponding to EMER in the Command Priority Table. The
value of the point is set based on the highest slot in the
Command Priority Array; relinquish default is used if the
Command Priority Array is now empty.
Siemens Building Technologies, Inc.

1-71

1-72

Siemens Building Technologies, Inc.

Program MethodologyAt (@) Priority Status Indicators

PPCL (@NONE)
Unitary

APOGEE PPCL Users Manual

Operator (@OPER)
pre-APOGEE

APOGEE

BACnet

Unitary

Syntax

pre-APOGEE

APOGEE

BACnet

Syntax

@NONE

@OPER

Use

Use

This command identifies the PPCL priority level indicator. The


@NONE command can be used to test if a point currently is at PPCL
priority.

This command identifies the operator priority level indicator. The


@OPER command is typically used in one of the following situations:
To test if a point is currently at operator priority, an
IF/THEN/ELSE statement would look like the following:

Example

300

The IF/THEN/ELSE statement would look like the following:


300

IF (SFAN.EQ.@NONE) THEN OFF(HORN)

IF (SFAN.EQ.@OPER) THEN ON(HORN)

To command a point to operator priority, an example of program


code might look like the following:

Notes

500

For BACnet firmware, the field panel uses the slot corresponding to
the program's "Priority for Writing". The value of the point is set
based on the highest slot in the Command Priority Array; relinquish
default is used if the Command Priority Array is now empty.

ON(@OPER,SFAN)

To release a point from operator to PPCL priority, an example of


program code might look like the following:
700

RELEAS(@OPER,SFAN)

Notes
For APOGEE and pre-APOGEE firmware, the @ priority indicator
must be used to release points in any priority to NONE.
For BACnet firmware, the field panel releases the slot
corresponding to OPER in the Command Priority Table. The
value of the point is set based on the highest slot in the
Command Priority Array; relinquish default is used if the
Command Priority Array is now empty.

Siemens Building Technologies, Inc.

1-73

1-74

Siemens Building Technologies, Inc.

Program MethodologyAt (@) Priority Status Indicators

Peak Demand Limiting (@PDL)


Unitary

APOGEE PPCL Users Manual

Smoke (@SMOKE)

pre-APOGEE

APOGEE

BACnet

Unitary

Syntax

pre-APOGEE

APOGEE

BACnet

Syntax

@PDL

@SMOKE

Use

Use

This command identifies the peak demand limiting priority level


indicator. The @PDL command is typically used in one of the
following situations:

This command identifies the smoke control priority level indicator.


The @SMOKE command is typically used in one of the following
situations:

To test if a point is currently at PDL priority, an IF/THEN/ELSE


statement would look like the following:

To test if a point is currently at smoke priority, an IF/THEN/ELSE


statement would look like the following:

300

IF (SFAN.EQ.@PDL) THEN ON(HORN)

300

To release a point in the device from PDL to PPCL priority, an


example of program code might look like the following:
700

IF (SFAN.EQ.@SMOKE) THEN ON(HORN)

To release a point in the device from smoke to PPCL priority, an


example of program code might look like the following:

RELEAS(@PDL,SFAN)

700

NOTE: Using the @ priority indicator in this manner will not


release the point if it has a higher priority (EMER,
SMOKE, and OPER).

RELEAS(@SMOKE,SFAN)

NOTE: Using the @ priority indicator in this manner will not


release the point if it has a higher priority (OPER).
Notes

Notes

For APOGEE and pre-APOGEE firmware, the @ priority indicator


must be used to release points from SMOKE, EMER, and PDL to
NONE priority.

It is not recommended to release points from PDL priority unless


absolutely necessary.

For BACnet firmware, the field panel releases the slot


corresponding to SMOKE in the Command Priority Table. The
value of the point is set based on the highest slot in the
Command Priority Array; relinquish default is used if the
Command Priority Array is now empty.

For APOGEE and pre-APOGEE firmware, if the @ priority


indicator is not used, the field panel will release points from PDL
to NONE.
For BACnet firmware, the field panel releases the slot
corresponding to PDL in the Command Priority Table. The value
of the point is set based on the highest slot in the Command
Priority Array; relinquish default is used if the Command Priority
Array is now empty.
Siemens Building Technologies, Inc.

1-75

1-76

Siemens Building Technologies, Inc.

Program MethodologyPoint Status Indicators

APOGEE PPCL Users Manual


To verify that the lights are ON in the conference room, you could
use the following test:

Point Status Indicators

740

Point status indicators are used to monitor the current status of


points defined in the device. Point status indicators can be used to
test if a point is at a specific status, and then act accordingly.
Firmware uses syntactical words (ON, OFF, AUTO...) to indicate the
status of a point.
NOTE:

Since these points are related specifically to the functions


of the device, point status indicators cannot be used over
the network.

IF (LIGHTS.EQ.ON) THEN ...

When this line of code is executed, the status of LIGHTS is checked


to see if it is ON. If the point status equals ON, then a particular
action occurs. If the point status does not equal ON, an alternate
action occurs.

Commanding and evaluating the HAND status


Some Point Termination Modules (PTMs), Modular Equipment
Controllers (MECs), and Point Expansion Modules (PXMs) have an
optional HAND-OFF-AUTO (HOA) manual override switch that
enables you to control equipment at the field panel.

Failed Point Values


If a point in a PPCL statement fails, the statement continues to use
the point's last known value. For example:

CAUTION:
The HOA override switch is not to be used as a
safety device when performing maintenance. If the
HOA switch is used as a safety device, it can result
in serious injury to personnel or cause damage to
property or equipment. Always follow safety
procedures when performing maintenance.

MIN(RMMIN,RM1TMP,RM2TMP,RM3TMP)

If RM1TMP is a physical point that fails when it has the lowest value
of the three RMTMP points, the MIN statement will set RMMIN to the
last known value for RM1TMP.

Determining Point Status

The HAND status identifies a point being controlled by an HOA


manual override switch and not the system. The HOA override
switch is only method you can use to control whether a point is
placed into or taken out of HAND status.

Point status indicators can be used with IF/THEN/ELSE commands


to determine the status of a point. When a point is at a specific
status, a certain action is taken.
Example

Points cannot be commanded to HAND by using an operator


interface.

This example uses an L2SL point to explain the methodology of


testing point status. The point name is LIGHTS and its function is to
control the lights for a large conference room.

Points cannot be commanded to or removed from HAND status


by using program statements.
Before attempting to command points that contain HOA override
switches, check the status of the PTM or MEC to ensure that the
point can be commanded.

The configuration for an L2SL point uses two addresses:


The first address controls an ON/OFF switch.
The second address monitors a proof condition. Use of this
address is optional.

Siemens Building Technologies, Inc.

The HAND status appears as part of the overall point status. This
status indicates that an HOA override switch is controlling a piece of
equipment. The equipment cannot be controlled through the operator
interface or PPCL until the HOA override is switched back to the
AUTO position.
1-77

1-78

Siemens Building Technologies, Inc.

Program MethodologyPoint Status Indicators


When a point is at HAND status, PPCL continues to issue
commands to that point. Since the HOA override switch is controlling
the point, the PPCL commands do not take effect. When the HOA
override is switched back to the AUTO position, the last command
issued to that point, while in HAND status, is executed.

APOGEE PPCL Users Manual

Point Status Indicators Supported


APOGEE Firmware supports the following point status indicators:
Alarm (ALARM)

See Table 1-9 for a comparison of the point status while using the
HOA override switch.

Alarm acknowledge (ALMACK)


Auto (AUTO)

Table 1-9. Point Status with the HOA Override Switch.


HOA
Switch
Setting
HAND

Point is being
controlled by
HOA switch

Battery status - discharged (DEAD)


Result

Battery status - almost discharged (LOW)


Battery status - charged (OK)

Digital points: *ON* or *OFF*

Day mode (DAYMOD)

Analog points: Value of the current


HAND position. This value could differ
from the last commanded value.
OFF

HOA switch

Equipment being controlled is OFF.

AUTO

Operator interface
or PPCL

Equipment is being controlled by


operator interface or PPCL.

Failed (FAILED)
Fast (FAST)
Manual override (HAND)
Night mode (NGTMOD)
Off (OFF)

CAUTION:

On (ON)

Be aware of how your system will react before


attempting to control equipment by using an HOA
override switch. Manually controlling equipment can
cause the system to react in an unstable manner.
Once control is returned to the system, you may
need to perform other functions before normal
operations can resume.

Proof on (PRFON)
Slow (SLOW)
Each point status indicator is described in more detail on the
following pages.
Pre-APOGEE Firmware Revisions 12.5/1.5 and 12.51/1.51
Pre-APOGEE Firmware Revisions 12.5/1.5 and 12.51/1.51 support
the following status indicators:
ALARM
AUTO
DAYMOD

Siemens Building Technologies, Inc.

1-79

1-80

Siemens Building Technologies, Inc.

Program MethodologyPoint Status Indicators


DEAD

APOGEE PPCL Users Manual

Alarm (ALARM)

FAILED

Unitary

pre-APOGEE

APOGEE

BACnet

FAST
HAND

Syntax

LOW

if (pt1.eq.ALARM) then...

NGTMOD

pt1

OFF

A point name whose operational status is compared to the


status indicator.

OK

This parameter can be a digital, analog, logical


controller, or pulsed accumulator point type.

Use

ON

This status indicator determines if a point (pt1) is in the ALARM


state. This comparison is true if the point status is ALARM.

PRFON
SLOW

Example

The three status indicators OK, LOW, and DEAD are used
specifically to support the $BATT resident point.

200 IF (TEMP02.EQ.ALARM) THEN ON(FAN)

The HAND status indicator is used to monitor points terminated on


Point Termination Modules (PTMs) with an optional manual override
switch.
Unitary Firmware
Unitary firmware supports the following status indicators:
ALARM
DAYMOD
FAILED
NGTMOD
OFF
ON
PRFON

Siemens Building Technologies, Inc.

1-81

1-82

Siemens Building Technologies, Inc.

Program MethodologyPoint Status Indicators

APOGEE PPCL Users Manual

Action

Alarm acknowledge (ALMACK)


Unitary

pre-APOGEE

APOGEE

BACnet

System Response

FAN is commanded ON

Alarm

Alarm state is acknowledged

pt1 turns ON

FAN is commanded OFF

pt1 remains ON (Fan is OFF and


Normal. The Return to Normal
has been acknowledged
internally)

Syntax
if (pt1.eq.ALMACK) then...
pt1

Notes

A point name that is alarmable

For BACnet firmware, the ALMACK is true if any alarm event has
been acknowledged; that is, OFFNORMAL, NORMAL, or FAULT.

Use
This status indicator determines the status of an alarm
acknowledgement. This comparison is true if the point alarm state
has been acknowledged.
Example 1
In the following statement, FAN is an alarmable point with Normal
Acknowledge Required by Operator Enabled.
200

IF (FAN.EQ.ALMACK) THEN ON(PT1) ELSE OFF(PT1)


Action

System Response

FAN is commanded ON

Alarm

Alarm state is acknowledged

pt1 turns ON

FAN is commanded OFF

pt1 turns OFF (Fan is OFF and


Normal, but requires
acknowledgement)

FAN Return to Normal state is


acknowledged

p1 turns ON

Example 2
In the following statement, FAN is an alarmable point with Normal
Acknowledge Required by Operator Disabled.
200

IF (FAN.EQ.ALMACK) THEN ON(PT1) ELSE OFF(PT1)

Siemens Building Technologies, Inc.

1-83

1-84

Siemens Building Technologies, Inc.

Program MethodologyPoint Status Indicators

Auto (AUTO)

APOGEE PPCL Users Manual

Battery statusdischarged (DEAD)

Unitary

pre-APOGEE

APOGEE

BACnet

Unitary

Syntax

APOGEE

BACnet

Syntax

if (pt1.eq.AUTO) then...
pt1

pre-APOGEE

if ($BATT.eq.DEAD) then...

A point name whose operational status is compared to the


status indicator.

Use
This status indicator compares the value of the $BATT resident point
to determine if the backup battery is discharged. This comparison is
true if the battery is discharged.

This parameter must be a LOOAP or LOOAL point


type.

Use
This status indicator determines if a point (pt1) is in the AUTO state.
This comparison is true if the point status is AUTO.

Example

Example

An alternate method to test the battery strength is to use the numeric


value (0) of DEAD.

600

200 IF (HOAFAN.EQ.AUTO) THEN ON(LIGHT3)

600

IF ($BATT.EQ.DEAD) THEN ALARM(P26BAT)

IF ($BATT.EQ.0) THEN ALARM(P26BAT)

Notes
This function can only be used in field panels that have the ability to
monitor the strength of their backup battery.
See also
LOW, OK

Siemens Building Technologies, Inc.

1-85

1-86

Siemens Building Technologies, Inc.

Program MethodologyPoint Status Indicators

Battery statusalmost discharged (LOW)


Unitary

APOGEE PPCL Users Manual

Battery statuscharged (OK)

pre-APOGEE

APOGEE

BACnet

Unitary

Syntax

pre-APOGEE

APOGEE

BACnet

Syntax

if ($BATT.eq.LOW) then...

if ($BATT.eq.OK) then...

Use

Use

This status indicator compares the value of the $BATT resident point
to determine if the backup battery is about to discharge. This
comparison is true if the battery is close to discharging.

This status indicator compares the value of the $BATT resident point
to determine if the backup battery is operational. This comparison is
true if the battery is charged.

Example

Example

600

600 IF ($BATT.EQ.OK) THEN NORMAL(P26BAT)

IF ($BATT.EQ.LOW) THEN ALARM(P26BAT)

An alternate method to test the battery strength is to use the numeric


value (50) of LOW.

An alternate method to test the battery strength is to use the numeric


value (100) of OK.

600

600

IF ($BATT.EQ.50) THEN ALARM(P26BAT)

Notes

Notes

This function can only be used in field panels that have the ability to
monitor the strength of their backup battery.
See also

This function can only be used in field panels that have the ability to
monitor the strength of their backup battery.
See also

DEAD, OK

Siemens Building Technologies, Inc.

IF ($BATT.EQ.100) THEN NORMAL (P26BAT)

DEAD, LOW

1-87

1-88

Siemens Building Technologies, Inc.

Program MethodologyPoint Status Indicators

Day mode (DAYMOD)


Unitary

APOGEE PPCL Users Manual

Failed (FAILED)

pre-APOGEE

APOGEE

BACnet

Unitary

Syntax

pre-APOGEE

APOGEE

BACnet

Syntax

if (pt1.eq.DAYMOD) then...

if (pt1.eq.FAILED) then...

pt1

pt1

A point name whose operational status is compared to the


status indicator.

For APOGEE firmware, use the TEC application


name.

For pre-APOGEE firmware, define the point as an


LCTLR point type.

A point name whose operational status is compared to the


status indicator.

This parameter can be a digital, analog, logical


controller, or pulsed accumulator point type.

Use
This status indicator determines if a point (pt1) is in the FAILED
state. This comparison is true if the point status is FAILED.

Use
This status indicator determines if an equipment controller is in DAY
mode.

Example
200

IF (AHU2.EQ.FAILED) THEN ON(HORN)

For some equipment controllers, DAY mode is also referred to as


OCC (occupied) mode. If an equipment controller is in occupied
mode, PPCL recognizes this status as DAYMOD.
Example
200

IF (CTLR1.EQ.DAYMOD) THEN DAYSP = 75.0

Notes
This command is only valid for equipment controllers.
For APOGEE firmware, the application name can correspond to a
TEC, LTEC, or UC.
For pre-APOGEE firmware, LCTLR and LTCU point types must
be used.

Siemens Building Technologies, Inc.

1-89

1-90

Siemens Building Technologies, Inc.

Program MethodologyPoint Status Indicators

Fast (FAST)

APOGEE PPCL Users Manual

Manual override (HAND)

Unitary

pre-APOGEE

APOGEE

BACnet

Unitary

Syntax

pre-APOGEE

APOGEE

BACnet

Syntax

if (pt1.eq.FAST) then...

if (pt1.eq.HAND) then...

pt1

pt1

A point name whose operational status is compared to the


status indicator.

A point name whose operational status is compared to the


status indicator.

This parameter must be defined as an LFSSL or


LFSSP point type.

Use
Use
This status indicator determines if a point (pt1) is in the FAST state.
This comparison is true if the point status is FAST.

This status indicator determines if a point (pt1) is in the HAND state.


This comparison is true if the point is currently being controlled
through a manual override switch.

Example

Example

200

200

IF (FAN.EQ.FAST) THEN DAMPER = 8.0

IF (FAN.EQ.HAND) THEN OADAMP = 8.0

Notes
Points must be terminated on a Point Termination Module (PTM) or
field panel with a manual override switch.

Siemens Building Technologies, Inc.

1-91

1-92

Siemens Building Technologies, Inc.

Program MethodologyPoint Status Indicators

Night mode (NGTMOD)


Unitary

APOGEE PPCL Users Manual

Off (OFF)

pre-APOGEE

APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax
if (pt1.eq.NGTMOD) then...

if (pt1.eq.OFF) then...

pt1

pt1

A point name whose operational status is compared to the


status indicator.

A point name whose operational status is compared to the


status indicator.

This parameter must be defined as an LCTLR point


type.

This parameter must be defined as an LDI, LDO,


L2SP, L2SL, LOOAL, LOOAP, LFSSL, or LFSSP
point type.

Use
Use

This status indicator determines if an equipment controller is in


NIGHT mode.

This status indicator determines if a point (pt1) is in the OFF state.


This comparison is true if the point status is OFF.

For some equipment controllers, NIGHT mode is also referred to as


UNOCC (unoccupied) mode. If an equipment controller is in
unoccupied mode, PPCL recognizes this status as NGTMOD.

Example
200

IF (FAN.EQ.OFF) THEN RTDAMP = 3.0

Example
200

IF (CNTRL1.EQ.NGTMOD) THEN NGTSP = 78.0

Notes
This point is only valid for equipment controllers and is only valid
when used with the LCTLR point type or LTCU (pre-APOGEE only)
point type.

Siemens Building Technologies, Inc.

1-93

1-94

Siemens Building Technologies, Inc.

Program MethodologyPoint Status Indicators

On (ON)

APOGEE PPCL Users Manual

Proof on (PRFON)

Unitary

pre-APOGEE

APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax

if (pt1.eq.ON) then...

if (pt1.eq.PRFON) then...

pt1

pt1

A point name whose operational status is compared to the


status indicator.

A point name whose operational status is compared to the


status indicator.

This point must be defined as any LDI, LDO, L2SP,


L2SL, LOOAL, or LOOAP point type.

Use

This point must be defined as any L2SP, L2SL,


LOOAL, or LOOAP point type.

Use

This status indicator determines if a point (pt1) is in the ON state.


This comparison is true if the point status is ON.

This status indicator compares the operational status of a point to


the PRFON status indicator. This comparison is true if the proof for
the point is in the ON state.

Example
200

Example

IF (FAN.EQ.ON) THEN RTDAMP = 3.0

200

Siemens Building Technologies, Inc.

1-95

1-96

IF (FAN.EQ.PRFON) THEN OADAMP = 8.5

Siemens Building Technologies, Inc.

Program MethodologyPoint Status Indicators

Converting a Sequence of Operation into


Program Code

Slow (SLOW)
Unitary

pre-APOGEE

APOGEE

BACnet

APOGEE PPCL Users Manual

Before you begin writing a program, determine the order in which the
PPCL statements are executed. Consider that you will most likely
make modifications during the life of a program, such as:

Syntax
if (pt1.eq.SLOW) then...
pt1

Changing the setpoint of a control loop.

A point name whose operational status is compared to the


status indicator.

Adding code for new equipment.

This point must be defined as an LFSSL or LFSSP


point type.

Modifying the control strategy.

Guidelines

Use
This status indicator determines if a point (pt1) is in the SLOW state.
This comparison is true if the point status is SLOW.

The following guidelines will help you design a well-organized


program that is easy to modify and maintain:

Example

Use point names that describe the function of the point.

200

IF (FAN.EQ.SLOW) THEN DAMPER = 13.0

Organize the flow of the program logic from top to bottom so that
errors are easier to trace.
Use comment lines to document the functions performed by
specific groups of statements.
Use a subroutine (also called a module) for a group of statements
that perform a specific task more than once during each pass of
the program.
Make sure routing commands (GOTO) are used correctly. See
Subroutine Commands in this chapter for more information.
With APOGEE firmware, it is best to create a separate program in
the same field panel rather than duplicate the control strategy
within a single program.

Siemens Building Technologies, Inc.

1-97

1-98

Siemens Building Technologies, Inc.

Program MethodologyConverting a Sequence of Operation into


Program Code

Designing Programs Using a Modular Structure

APOGEE PPCL Users Manual

Benefits of Using Subroutines

Modular programming is a style of programming that logically


organizes code into common functions. This style of programming
can be applied to a single program, or to multiple programs running
on the network or in one field panel.
Objectives of Modular Programming
The objectives of modular programming are to reduce program code
and standardize program code.
Reducing Program Code
If a section of code is used many times during one pass of the
program, that code can be defined as a subroutine (also called a
module). When that routine is needed, control is transferred to that
part of the program.
Standardizing Program Code

By defining functions, procedures, and formulas in subroutines,


programs become faster to create, easier to write, and require less
time to test. A subroutine used for one device can also be adapted
for other devices.
For example, if a specific operation is performed five different times
during one pass of the program, you have two programming options.
1. The first option is to duplicate the code in five different places in
the program.
This option adds five times as much program code.
When making a change to one segment, you must
remember to change all occurrences of that code.
2. The second option is to use a subroutine. Every time the
operation is needed, program control is transferred to the
subroutine.

Subroutines help set programming standards that define where


functionality is placed in the program. If you use an established block
of code and do not change the line numbers, then that subroutine
will always be placed in the same location in the program.

This option reduces the amount of mainline program code.


When making a change, there is only one section of code to
change.
When to Use a Subroutine
Before creating a subroutine, determine if the subroutine contains
enough lines and is accessed enough times through one pass of the
program to be of any benefit. There are times that straight-line
program code will be the optimal solution.
A single line of program code placed in a subroutine will never be
executed enough times to be of any benefit. In this case, you
would create more program code for a subroutine than you would
by using straight-line program code
Conversely, a subroutine containing four lines of program code
becomes beneficial when it is called more than once.

Siemens Building Technologies, Inc.

1-99

1-100

Siemens Building Technologies, Inc.

Program MethodologyConverting a Sequence of Operation into


Program Code
Table 1-10. Efficient Use of Subroutines.

APOGEE PPCL Users Manual

Subroutine Commands

Number of Program Lines


Number of Calls
per Program Pass

1 Line

2 Lines

3 Lines

Using GOTO

4 Lines
or more

1 Call

No

No

No

No

2 Calls

No

No

Even

Yes

3 Calls

No

No

Yes

Yes

4 Calls or more

No

Yes

Yes

Yes

The GOTO command is commonly used to skip over subroutines or


blocks of code and transfer control to another location in the
program. Observe the following guidelines when using a GOTO
command:
Make sure GOTO commands are routing control to a program
line and not a comment line.
Except for the last line of the program, all GOTO commands must
transfer control to a sequentially higher line number.

Use the following steps and Table 1-10 to determine when it


becomes beneficial to use a subroutine:
1. Determine how many program lines a subroutine will contain
(excluding the RETURN command).
2. Determine how many times the subroutine will be called through
one pass of the program.

If the result is "NO," then it is more efficient to use straightline program code.

If the result is "EVEN," then there is no benefit for using


either method.

The GOTO command in the last line of the program is the only
command that transfers control to the top of the program.
If no other program lines need to be read during a pass, transfer
program control to the GOTO command in the last line of the
program
Use GOSUB and RETURN to transfer program control to and
from subroutines. Do not use the GOTO command.
Using GOSUB

If the result is "YES," then it is more efficient to use a


subroutine.

The GOSUB command transfers control to a subroutine. Variable


arguments can be passed to the subroutine from the mainline code
using $ARG local variables (if applicable). The values in the $ARG
points replace their respective point values.
When the subroutine processing is complete, program control is
transferred back to the GOSUB statement by the RETURN
command. The field panel then continues processing at the next
sequential line number.
For information on transferring control to a subroutine, see GOSUB
and RETURN in Chapter 3Syntax.

Siemens Building Technologies, Inc.

1-101

1-102

Siemens Building Technologies, Inc.

Program MethodologyConverting a Sequence of Operation into


Program Code

Multiple Programs versus Subroutines


For APOGEE field panels, individual PPCL programs can be used to
replace subroutines. In some cases, time-based statements should
not be used in subroutines, and therefore require an individual
program.
Example
Five Air Handling Units (AHUs) use the same control strategy. Two
possible options for PPCL programming are as follows:
1. Use one PPCL program that contains five duplicate blocks of
program code.
2. Use five programs that duplicate one block of program code.
When using multiple programs, the DEFINE statement can be
added to each block of code to identify the unique portion of the
point names. A section of code might look like the following:
100
110
...

DEFINE (AHU, BUILDING1.AHU01)


ON (%AHU%SFAN)

Since the DEFINE statement identifies the AHU that this


program controls, there is no need to change the point names
throughout the block of code. This block can be copied to each
program with changes made only to the DEFINE statement.
For more information, see DEFINE in Chapter 3Syntax.

APOGEE PPCL Users Manual

Program Testing
To ensure that a program is working properly, it should be tested.
Testing verifies that the program code works properly under
normal operating conditions.
Testing checks the durability of the program by providing a wide
variety of operating conditions that the program must evaluate.
Modular programming practices make it less time consuming to
completely test a program. Programs with a modular design are
easier to test because there are fewer variables and lines of code to
test.
What Should be Tested?
Tests can be developed for individual modules or the complete
program. When the complete program is tested, the data used
should adequately test all conditions that may be encountered.
Testing conditions should include values that the program does not
expect to encounter. For example, you might include the following
conditions:
Enter an input value of 40F for an input that is defined to accept
values from 50F to 70F.
If the program turns a point ON, find out what happens when you
turn it OFF.
Simulate a sensor or fan motor failure and see how the program
reacts.
The precautions taken in programming and testing will show you
how the program processes errors and help prevent downtime when
the system encounters unusual operating conditions.

Siemens Building Technologies, Inc.

1-103

1-104

Siemens Building Technologies, Inc.

Program MethodologyConverting a Sequence of Operation into


Program Code

APOGEE PPCL Users Manual


External documentation

Program Documentation
Programs should have documentation that identifies the program
functions and the equipment being controlled. Fortunately, the
modular programming method makes an easier task of
documentation.

External documentation refers to physical control diagrams, layouts,


and information written about the program. This information can be
used as a reference to learn about the functions of the control
system. The following two methods are commonly used for external
documentation:

The following documentation methods are described in more detail


on the following pages:

Decision tables

Internal documentation

Pseudocode

External documentation

Decision tables

One or more of these methods can be used to document program


operation. In addition, you can use these documentation methods as
planning tools when designing a PPCL program.

Decision tables provide a visual representation of how a specific


piece of equipment interacts with other equipment during each mode
of operation. Like truth tables, a decision table defines inputs that are
logically compared to produce outputs (results).

Internal documentation
Internal documentation refers to information written into the program
using comment lines.

Inputs for a decision table are the types of equipment and all
possible modes of operation.

Comment lines allow you to enter text information describing the


functionality of a specific section of code.

In each row of the table, a piece of equipment is compared to


each mode of operation to determine the status of that equipment
during the mode.

Comment lines are especially helpful for describing subroutines


and areas of program code that are difficult to understand.

Table 1-11 provides an example of a decision table that defines six


pieces of equipment and four modes of operation.

You must enter the letter C after the line number to prevent the
program from interpreting your comments as program commands.
For example:

Table 1-11. Example of a Decision Table.

200
210
220
230

C
C
C
C

NOTE:

Equipment type

THIS COMMAND WILL TURN ON SFAN01


IF RMTEMP VALUE FALLS BELOW 68 OR
RISES ABOVE 78. SFAN01 WILL REMAIN
ON/OFF FOR AT LEAST 5 MINUTES.

The device and software used to program PPCL


determines how comment lines must be entered. For
more information on using comment lines, see the user's
manual for the device or software you are using.

Siemens Building Technologies, Inc.

Modes of Operation

1-105

Shutdown

Day mode

Smoke

Warm-up

Supply Fan

Off

On

On

On

Return Fan

Off

On

On

On

CC Valve

Closed

Modulate

Modulate

Closed

Mixing Dampers

Closed

Modulate

Modulate

Closed

Supply Fan Vol

Modulate

Modulate

Open

Modulate

Return Fan Vol

Modulate

Modulate

Open

Modulate

1-106

Siemens Building Technologies, Inc.

Program MethodologyConverting a Sequence of Operation into


Program Code

APOGEE PPCL Users Manual

Pseudocode

Developing a Sequence of Operation

Pseudocode is information written in a non-syntactical manner to


document program code. Programmers often use pseudocode to
quickly organize their ideas before writing the code. After the code is
written, the pseudocode becomes a reference that describes the
functionality of the program.

1. Read through the problem to gain an understanding of what the


sequence of operation is asking you to do.

For example, when solving a programming problem, you might start


by asking yourself questions about what is to be accomplished. As
you define what must be accomplished, you can create a logical list
of the steps the program should perform. You might create a
pseudocode list with the following items:

If you have a large sequence of operation, you may want to


break it down into smaller, manageable sections.
2. Determine modes of operation that will be used during system
operation. Examples of operational modes are:
Day mode
Night mode
Emergency mode

1. Check mixed air temperatures

Defining the modes of operation helps you design the code in a


highly organized manner.

2. Check outside air temperatures


3. Open/close dampers as needed

3. Identify specific controls and procedures that need program


code. Look for key phrases, such as:

4. Start/stop fans
From this list, you would begin writing program code to accomplish
these functions.

"This system must control..."


"Will perform..."
"Cycle..."

Solving a Programming Problem

"Calculate..."

When you first start programming in PPCL, you should have a


problem-solving method. The time you spend organizing your ideas
in advance helps prevent program logic flaws.
The following problem-solving example begins with the sequence of
operation, continues through the testing, and ends with documenting
the final program code.

Each of these phrases becomes some type of control for which


you will write PPCL code.
4. Classify each type of control as a mode of operation.
5. Use a decision table or pseudocode to determine the order in
which the tasks should be performed.
Either of these methods is acceptable, or you may find another
method to organize the tasks. Use the method that is the easiest
and most helpful for you.

Siemens Building Technologies, Inc.

1-107

1-108

Siemens Building Technologies, Inc.

Program MethodologyConverting a Sequence of Operation into


Program Code

APOGEE PPCL Users Manual

6. Create program modules and start writing code for each mode of
operation.
Start with one mode and code the solution.
Comment the program where appropriate.
If you have experience writing programs, you might write two
or three modes before continuing.
See Chapter 3Syntax for help with PPCL statements.
7. Type each program module into the computer.
Define any points that are used in the database.
Include comment lines in each module.
Execute and Test the Program Code
Through testing, you may discover an easier method for
accomplishing a particular control strategy.
1. Before you actually use a PPCL program, run the program and
verify that it works.
Depending on your experience writing PPCL programs, you may
not write an error-free program every time. Getting programs to
work properly takes time and patience.
2. Simulate conditions that the program will encounter.
3. Test the program by entering information outside the defined
limits of the program.
4. Simulate an equipment failure and see how the program
responds.
Document the Program
1. Verify that your comment lines clearly describe the functions
being performed in each module.
2. Keep the notes you created while developing the sequence of
operation.

Siemens Building Technologies, Inc.

1-109

1-110

Siemens Building Technologies, Inc.

APOGEE PPCL Users Manual

Duty Cycling (DC)

Chapter 2Control Option


Comparisons

Most building control systems are designed to meet the expected


maximum system demand. However, the maximum demand is
usually required only a few times per year for short periods of time.
As a result, the system is oversized for the normal load so that it can
meet this exceptional demand.

Overview

The duty cycling (DC) function coordinates the operation of all


available equipment to compensate for additional equipment
capacity that is not normally needed. During normal system
operation, some equipment is cycled off for short periods of time to
distribute equipment wear and reduce operating costs.

Chapter 2 discusses the following topics:


Concepts behind some of the major control applications in the
APOGEE Automation System, namely:
Duty Cycling (DC)

Applications that can use ON/OFF switching in hourly patterns work


best with a duty cycling program.

Enthalpy and Dry Bulb Economizer Control


Peak Demand Limiting (PDL)

CAUTION:
Be careful when designing your programs so that
functions do not conflict. If points used for DC are
also commanded by another application, such as
Time-of-Day (TOD), one program may interfere with
the operation of the other if both functions are trying
to control a point during the same time period.

Procedures the system uses to schedule operations and optimize


system use, namely:
Start/Stop Time Optimization (SSTO)
Time-of-Day (TOD)
For specific information on using the PPCL commands identified in
this chapter, see Chapter 3Syntax.

Example
The following example uses duty cycling in a school building to
control a hall fan, called HFAN.
In order to conserve energy, the fan will run only during the times
when students are in the hall.
In this school, classes start on the hour and last for 50 minutes.
Students are in the hall during a 10-minute period before the next
class.
Since the hall that HFAN serves has good ventilation, the fan
should run for the last 15 minutes of the hour and for the first five
minutes of the next hour.
The rest of the time the fan is shut off.

Siemens Building Technologies, Inc.

2-1

2-2

Siemens Building Technologies, Inc.

Control Option ComparisonsDuty Cycling (DC)

The code for duty cycling HFAN is as follows:


1000
1010
1020
1030
1040
1050
1060
1070
1100

APOGEE PPCL Users Manual

Enthalpy and Dry Bulb Economizer


Control

C THIS DC COMMAND DUTY CYCLES HFAN


C ACCORDING TO THE FOLLOWING SCHEDULE:
C
C FIRST 15 MINUTES ON, OFF, OFF (1)
C SECOND 15 MINUTES OFF, OFF, OFF (0)
C THIRD 15 MINUTES OFF, OFF, OFF (0)
C FOURTH 15 MINUTES ON, ON, ON (7)
C
DC(HFAN,7001)

Enthalpy is the total amount of heat energy contained within one


pound of air.
When a coil cools the air, it is cooling both the air and the water
vapor contained in the air as humidity. The higher the humidity, the
more water vapor is in the air. Since humid air takes more energy to
cool than dry air, it would make sense to monitor both the
temperature and the humidity of the outside air when we consider
the economizer control.

Duty Cycling Commands


Duty cycling has two commands that can be used independently of
each other: DC and DCR. The DC and DCR commands do not have
to be defined in a specific order.

Conventional economizer control uses only the temperatures of the


outside air and return air to determine when to minimize the damper
position. The total energy content of the return air may or may not be
higher than the outside air.

The DC Command
The DC command turns points ON and OFF according to a
defined schedule.

ExampleEconomizer Comparison
The cooling coil needs to drop the energy of the air to 23.2 Btu/lb
before it enters the room. With a conventional economizer, the
control system compares the 77F return temperature and the 85F
outside air temperature and closes the outside air dampers to
minimum. This results in each pound of recycled air requiring the
removal of 8.4 Btu of energy.

This command is best applied in situations where the


environment is constant or where there are minor deviations in
temperature or humidity. For example, a storeroom, maintenance
shop, building core, or service area.
For more information, see DC in Chapter 3Syntax.

With an economizer that checks the enthalpy, the total enthalpies


would be compared. In this case, the 28.8 Btu/lb would be compared
to the 31.6 Btu/lb and the outside air dampers would be set to full
open. The supply air now only needs to remove 5.6 Btu for each
pound of air.

The DCR Command


The DCR command turns points ON and OFF according to a
temperature range defined with a dead band (DBSWIT).
DCR checks the temperature point value every five minutes.

Using an enthalpy economizer for this situation has reduced the


cooling energy demand by 50%.

This command is best used in situations where the environment


fluctuates or where deviations in temperature or humidity are
undesirable. For example, a classroom, meeting room, lobby
area, or an area adjacent to an exterior wall.
For more information, see DCR and DBSWIT in Chapter 3Syntax.

Siemens Building Technologies, Inc.

2-3

2-4

Siemens Building Technologies, Inc.

Control Option ComparisonsEnthalpy and Dry Bulb Economizer Control

Enthalpy Economizer Calculations

APOGEE PPCL Users Manual

Peak Demand Limiting (PDL)

Enthalpy economizer control uses a subroutine to perform the


enthalpy calculation. The following calculations can be added to a
PPCL program:

Peak Demand Limiting (PDL) helps companies manage their


electrical consumption during periods of peak demand.

Enthalpy from dry bulb and relative humidity (Btu/lb or kJ/kg)

PDL reduces the electrical consumption of a building control


system by shedding loads (turning OFF equipment) when the
electrical demand exceeds a setpoint.

Enthalpy from dry bulb and dew point (Btu/lb or kJ/kg)


For implementation of enthalpy and dry bulb economizer control,
contact your Siemens Building Technologies representative.

Loads are restored (equipment is turned ON) when electrical


demand falls below the setpoint. However, the equipment
remains OFF if restoring the load will exceed the setpoint.
Example
PDL is monitoring an electrical meter that supplies power to three air
handling units and some auxiliary equipment. Two of the air handlers
are currently ON while the third air handler is about to be turned ON.
If all three air handlers and the auxiliary equipment are operating at
one time, PDL predicts that electrical demand will exceed the peak
setpoint of 500 kWh.
To keep electrical demand from exceeding the setpoint, PDL shuts
OFF (sheds) the auxiliary loads that are not critical. Once the
building is operating at a level where the electrical demand will stay
within the setpoint, the auxiliary equipment will be restored.

Why Use PDL?


Companies often have a contracted rate with the utility company
based on their expected electrical consumption throughout the year.
The contract often limits electrical use during periods of peak
demand and sets a maximum use over a period of time. If the
company exceeds the contractual demand, the utility company can
impose surcharges or charge higher rates.

Siemens Building Technologies, Inc.

2-5

2-6

Siemens Building Technologies, Inc.

Control Option ComparisonsPeak Demand Limiting (PDL)

APOGEE PPCL Users Manual


Distributed Peak Demand Limiting

Why Use PDL Instead of Duty Cycling?

With Distributed PDL, a field panel on the network monitors meter


readings, forecasts the demand, and assigns shed targets to the
other field panels on the network.

Although duty cycling (DC) can also be used to reduce electrical


demand, duty cycling only controls loads according to a time
schedule. The PDL function can monitor the total electrical demand
and prevent the system from exceeding a demand setpoint.

NOTE:

PDL Application Programs

Distributed PDL can only work on Protocol 2 networks.

The Predictor Panel

There are two types of PDL application programs:

PPCL statements are entered in a specified field panel (called the


predictor panel) to control all meter monitoring and demand
forecasts for a meter area. All meter inputs from the field must be
connected directly to the predictor panel.

Target Peak Demand Limiting (TPDL)


Distributed Peak Demand Limiting

The predictor panel compares predicted demand to the demand limit


setpoint and decides how many kilowatts of load must be shed for
the meter area. In addition to monitoring and predicting demand, the
predictor panel is also responsible for keeping data for the reports.

These applications are described in more detail in the following


paragraphs.
Target Peak Demand Limiting (TPDL)

Each predictor panel can control a total of seven load-handling field


panels.

With Target PDL (TPDL), the Insight workstation monitors meter


readings, forecasts the demand, and assigns shed targets to each
field panel. The shed target is based on the percentage of total loads
that can be shed by the field panel.

The Load-Handling Field Panels


Each load-handling field panel receives a demand target from the
predictor panel.

Each field panel is responsible for shedding and restoring the loads
defined in it. If network communication is lost, the field panel
continues to limit demand according to its last assigned target.

The load-handling field panel maintains the demand target level by


shedding and restoring the loads that it controls.

Defining Target PDL


TPDL uses two PPCL commands that are defined in the loadhandling field panel. The commands must be defined in the following
order:
1. PDL Maintains the target kilowatt consumption level by
shedding and restoring loads as needed.
2. PDLDAT Defines the power consumption limit that is used by
the PDL command.

Siemens Building Technologies, Inc.

2-7

2-8

Siemens Building Technologies, Inc.

Control Option ComparisonsPeak Demand Limiting (PDL)

Defining Distributed PDL


Distributed PDL uses five PPCL commands that must be defined in
the following order:

APOGEE PPCL Users Manual

Start/Stop Time Optimization (SSTO)


The Start/Stop Time Optimization (SSTO) feature adjusts the
equipment start and stop based on calculations that optimize use of
the system.

1. PDLMTR Monitors consumption meters to determine power


usage, maintains consumption reports, predicts usage, issues
warnings, and restarts meters.

The equipment start and stop times are based on the outside and
inside temperatures of the building. Each time the value of the indoor
or outdoor air temperature changes, SSTO recalculates the optimal
values for system operation.

2. PDLSET Assigns various consumption limiting setpoints to


specific time intervals.
3. PDLDPG Distributes the difference between the PDL resident
point and the setpoint.

Where to Use SSTO

4. PDL Maintains the target kilowatt consumption level by


shedding and restoring loads as needed.

SSTO programs should be used in areas with extreme outside


zones, unstable environments, or zones where the space
temperature is affected by elements like wind, sunlight, or auxiliary
sources of heating or cooling loads.

5. PDLDAT Defines a power consuming load that will be


controlled by a PDL command.

NOTE:

The predictor field panel must have the PDLMTR, PDLSET,


and PDLDPG commands defined in its PPCL program.

Example

Each load-handling field panel must have the PDL and


PDLDAT statements defined in its PPCL program.

SSTO is controlling the lobby of a building. When the lobby opens at


8:00 A.M.,, the temperature must be 75F.

This configuration assumes that the predictor field panel


does not have any loads defined. If the predictor field
panel is also controlling loads, the PDL and PDLDAT
commands must also be defined in the PPCL program.

If the lobby temperature is 72F at 7:30 A.M., SSTO calculates that


the system needs 10 minutes to warm the lobby to 75F by 8:00.
SSTO starts the warm-up procedure for the lobby at 7:50 A.M.
On another day, the lobby temperature is 69F. SSTO calculates that
the system needs 20 minutes to warm the lobby to 75F by 8:00
A.M. SSTO starts the warm-up procedure at 7:40 A.M.

Siemens Building Technologies, Inc.

2-9

2-10

Siemens Building Technologies, Inc.

Control Option ComparisonsStart/Stop Time Optimization (SSTO)

APOGEE PPCL Users Manual


An adjusted start time (ast) and adjusted stop time (asp) are added
to or subtracted from the times calculated by SSTO. If the ast or asp
value reaches a certain limit, SSTO is forced to start or stop at the
earliest (est) or latest (lst) time.

Defining SSTO
Three PPCL commands are defined in the field panel for SSTO. They
must be specified in the following order:
1. TODMOD Defines the specific mode for each day of the week.
This command is shared with the Time-Of-Day group of
statements and is necessary for SSTO to work.

The variables ast and asp may change to help tune the times. If
allowed to reach a high number, it is possible for the following to
occur:

2. SSTOCO Establishes the thermal characteristics of the


building based on how the building reacts to changes in
temperature.

ast may adjust the calculated start time (cst) past the earliest start
time (est) or latest start time (lst).
asp may adjust the calculated stop time (csp) past the latest start
time (lst) or latest stop time (lsp).

3. SSTO Calculates optimal start and stop times.


All optimization calculations and equipment control are performed in
the field panel where the SSTO and SSTOCO commands are
defined. Each program within a field panel may also perform SSTO
calculations for up to 5 zones.

This means that the equipment always starts or stops at the earliest
or latest start or stop time.
Each day, the SSTO statement uses the heating auto-tune
coefficient (hceof4) and the cooling auto-tune coefficient (ccoef4)
defined in the SSTOCO statement to adjust the calculated start time
(cst) and the calculated stop time (csp).

CAUTION:
Be careful when designing your programs so that
functions do not conflict. If points used for SSTO are
also commanded by another application, such as
Duty Cycling (DC), one program may interfere with
the operation of the other if both functions are trying
to control a point during the same time period.

Ast and Asp Initial Settings


Set the ast and asp variables to zero during initial setup of the SSTO
statement. If the SSTO statement has been set up properly, these
values typically stay below 5 times the variables hcoef4 or ccoef4.

How SSTO Adjusts the Start and Stop Times

If the ast or asp variables are continually incrementing or


decrementing the calculated times, then check the SSTO setup and
examine the SSTOCO coefficients.

The following abbreviations are used in this section:


asp

Adjusted stop time

ast

Adjusted start time

ccoef4

Cooling auto-tune coefficient

csp

Calculated stop time

cst

Calculated start time

est

Earliest start time

hceof4

Heating auto-tune coefficient

lst

Latest start time

Siemens Building Technologies, Inc.

2-11

2-12

Siemens Building Technologies, Inc.

Control Option ComparisonsStart/Stop Time Optimization (SSTO)

SSTO Formulas
The following formulas, used for calculating the optimal start and stop
times during the heating and cooling seasons, are outlined on the
following pages:

APOGEE PPCL Users Manual

Cooling SeasonOptimum Start Time


If the indoor temperature is less than the desired temperature, then the
optimum start time is LB.

Cooling SeasonOptimum Start Time

Where:

Cooling SeasonOptimum Stop Time

LB

Heating SeasonOptimum Start Time

Latest begin time defined in the SSTO command.

If the indoor temperature is greater than or equal to the desired


temperature, then the optimum start time is:

Heating SeasonOptimum Stop Time

OB - (d * CC) - (d * f * (CT/10)) + AB

Cooling Mode at Occupancy Begin

Where:

Cooling Mode at Occupancy End

OB

Occupancy begin time from SSTO command.

Indoor temperature minus the desired temperature.

Heating Mode at Occupancy End

CC

Cooling coefficient (ccoef1) from SSTOCO command.

NOTE:

Outdoor temperature minus the desired temperature.

CT

Cooling transfer coefficient (ccoef3) from SSTOCO


command.

AB

Adjust begin time from SSTO command.

Heating Mode at Occupancy Begin

The example values for coefficients shown in this manual


should not be used without first calculating what the
number should be.

Siemens Building Technologies, Inc.

2-13

2-14

Siemens Building Technologies, Inc.

Control Option ComparisonsStart/Stop Time Optimization (SSTO)

Cooling SeasonOptimum Stop Time


If the indoor temperature is less than the desired temperature, then the
optimum stop time is:

APOGEE PPCL Users Manual

Heating SeasonOptimum Start Time


If the indoor temperature is less than the desired temperature, then the
optimum start time is:

OE + ((10 * CR * d)/f) + AE

OB + (d x HC) - ((d * f * HT) / 25) + AB

Where:

Where:

OE

Occupancy end time from SSTO command.

OB

Occupancy begin time from SSTO command.

CR

Cooling retention coefficient in hours (ccoef2) from


SSTOCO command.

Indoor temperature minus the desired temperature.

HC

Heating coefficient (hcoef1) from SSTOCO command.

Indoor temperature minus the desired temperature.

Outdoor temperature minus the desired temperature.

Outdoor temperature minus the desired temperature.

HT

AE

Adjust end time from SSTO command.

Heating transfer coefficient (hcoef3) from SSTOCO


command.

AB

Adjust begin time from SSTO command.

If the indoor temperature is greater than or equal to the desired


temperature, the optimum stop time is LE:

If the indoor temperature is greater than or equal to the desired


temperature, then the optimum stop time is LB:

Where:
LE

Where:

Latest end time from SSTO command.

LB

Siemens Building Technologies, Inc.

2-15

2-16

Latest begin time from SSTO command.

Siemens Building Technologies, Inc.

Control Option ComparisonsStart/Stop Time Optimization (SSTO)

Heating SeasonOptimum Stop Time


If the indoor temperature is less than the desired temperature, then the
optimum stop time is LE:

APOGEE PPCL Users Manual

Cooling Mode at Occupancy Begin


If the indoor temperature is greater than the desired temperature plus
one degree, then:

Where:
LE

AB = AB - CA
=

Latest end time from SSTO command.

Where:

If the indoor temperature is greater than or equal to the desired


temperature, then the optimum stop time is:

AB

Adjust begin time from SSTO command.

CA

Cooling auto-tune coefficient (ccoef4) from SSTOCO


command.

OE + ((25 * HR * d) / f) + AE
Where:

If the indoor temperature is less than the desired temperature minus one
degree, then:

OE

Occupancy end time from SSTO command.

HR

Heating retention coefficient (hcoef2) from SSTOCO


command.

Where:

AB = AB + CA

Indoor temperature minus the desired temperature.

AB

Adjust begin time from SSTO command.

Outdoor temperature minus the desired temperature.

CA

AE

Adjust end time from SSTO command.

Cooling auto-tune coefficient (ccoef4) from SSTOCO


command.

Siemens Building Technologies, Inc.

2-17

2-18

Siemens Building Technologies, Inc.

Control Option ComparisonsStart/Stop Time Optimization (SSTO)

Cooling Mode at Occupancy End


If the indoor temperature is greater than the desired temperature plus
one degree, then:

APOGEE PPCL Users Manual

Heating Mode at Occupancy Begin


If the indoor temperature is greater than the desired temperature plus
one degree, then:

AE = AE + CA

AB = AB + HA

Where:

Where:

AE

Adjust end time from SSTO command.

AB

Adjust begin time from SSTO command.

CA

Cooling auto-tune coefficient (ccoef4) from SSTOCO


command.

HA

Heating auto-tune coefficient (hcoef4) from SSTOCO


command.

If the indoor temperature is less than the desired temperature minus one
degree, then:

If the indoor temperature is less than desired the temperature minus one
degree, then:
AB = AB - HA

AE = AE - CA
Where:

Where:
AE

Adjust end time from SSTO command.

CA

Cooling auto-tune coefficient (ccoef4) from SSTOCO


command.

Siemens Building Technologies, Inc.

2-19

AB

Adjust begin time from SSTO command.

HA

Heating auto-tune coefficient (hcoef4) from SSTOCO


command.

2-20

Siemens Building Technologies, Inc.

Control Option ComparisonsStart/Stop Time Optimization (SSTO)

Heating Mode at Occupancy End


If the indoor temperature is greater than the desired temperature plus
one degree, then:

APOGEE PPCL Users Manual

Time-of-Day (TOD)
The Time-Of-Day (TOD) function is the software equivalent of the
time clock. TOD starts and stops equipment according to a defined
schedule.

AE = AE - HA
Where:
AE

Adjust end time from SSTO command.

HA

Heating auto-tune coefficient (hcoef4) from SSTOCO


command.

Where to Use TOD


TOD can be used for running equipment on a scheduled basis. For
example, lights, doors (locking and unlocking), or exhaust fans.
CAUTION:

If the indoor temperature is less than the desired temperature minus one
degree, then:

Be careful when designing your programs so that


functions do not conflict. If points used for TOD are
also commanded by another application, such as
Duty Cycling (DC), one program may interfere with
the operation of the other if both functions are trying
to control a point during the same time period.

AE = AE + HA
Where:
AE

Adjust end time from SSTO command.

HA

Heating auto-tune coefficient (hcoef4) from SSTOCO


command.

Defining Time-Of-Day
The following PPCL commands are defined in the field panel for the
TOD function:
TODMOD Defines the types of schedules (normal, weekend,
etc.) for each day of the week. The TODMOD statement must be
defined first.
HOLIDA Used in conjunction with the TOD function to set
schedules for equipment during holidays. The HOLIDA command
must be placed before any TOD or TODSET commands.
TOD Commands up to 16 digital points ON or OFF at specified
times.
TODSET Sets the values of up to ten analog points at specified
start and stop times during the day.
The TOD and TODSET commands do not have to be defined in a
specific order.

Siemens Building Technologies, Inc.

2-21

2-22

Siemens Building Technologies, Inc.

Control Option ComparisonsTime-of-Day (TOD)

NOTE:

Schedules can also be created using the Time-of-Day


(TOD) calendar that offers a menu-driven interface. For
complete information on defining and maintaining daily
operating schedules using the TOD calendar, see the
APOGEE Field Panel Users Manual (125-3000) or the
Field Panel Users Manual (125-1895) for pre-APOGEE
field panels.

APOGEE PPCL Users Manual


Example 2: Holidays defined in TOD calendar, but not in PPCL
The following example illustrates the results when defining holidays
using the TOD Calendar.
The TOD calendar has the following entries:

Example 1: Holidays defined in PPCL, but not in the TOD calendar

Holiday

08-Sep-1994

Holiday

The program contains the following PPCL TOD commands:

The following example illustrates the results when defining holidays


using the PPCL HOLIDA command.
50

03-May-1994

HOLIDA(5,3,9,8)

The following TOD commands are defined in the TOD database:

100

TODMOD(1,1,1,1,1,1,1)

110

TOD(1,1,18:00,07:00,LITE1)

120

TOD(1,1,18:00,19:00,FAN1)

130

TOD(16,1,17:00,10:30,LITE1)

Monday Sunday
07:00:00

OFF

LITE1

18:00:00

ON

FAN1

18:00:00

ON

LITE1

19:00:00

OFF

FAN1

10:30:00

OFF

LITE1

17:00:00

ON

LITE1

Based on this schedule, the following will occur:


Every day except May 3 or September 8, LITE1 will go ON at
18:00 and turn OFF at 07:00, and FAN1 will go ON at 18:00 and
turn OFF at 19:00.
On May 3 and September 8, LITE1 will go ON at 17:00 and turn
OFF at 10:30, while FAN1 will not be commanded.

Holiday

Example 3: Holidays defined in both PPCL HOLIDA and the TOD


calendar
The following example illustrates the results when defining holidays
using both the PPCL HOLIDA statement and the TOD calendar.

Based on this schedule, the following will occur:


Every day except May 3 and September 8, LITE1 will go ON at
18:00 and turn OFF at 07:00, and FAN1 will go ON at 18:00 and
turn OFF at 19:00.

NOTE:

On May 3 and September 8, LITE1 will go ON at 17:00 and turn


OFF at 10:30, while FAN1 will not be commanded.

Problems can occur if different holiday schedules are


defined in the HOLIDA statement and in the TOD
calendar, and then both methods are used at the same
time. The equipment commanded by the PPCL TOD
command will not only execute the holidays defined in the
HOLIDA statement, but also those defined in the TOD
calendar.
If you choose to define a holiday using the PPCL
HOLIDA statement and the TOD calendar, make sure
that the holiday is defined the same in both places.

Siemens Building Technologies, Inc.

2-23

2-24

Siemens Building Technologies, Inc.

Control Option ComparisonsTime-of-Day (TOD)

APOGEE PPCL Users Manual

The following TOD commands are defined in the TOD database:

IF/THEN/ELSE Time-Of-Day

Monday Sunday
07:00:00

OFF

LITE1

18:00:00

ON

FAN1

18:00:00

ON

LITE1

19:00:00

OFF

FAN1

10:30:00

OFF

LITE1

17:00:00

ON

LITE1

Although Time-Of-Day uses actual commands dedicated to


performing TOD functions, time scheduling can be accomplished
using the IF/THEN/ELSE command.
Example
The following example illustrates TOD scheduling using the
IF/THEN/ELSE command to control the outdoor parking lights for a
building.

Holiday

The lights must be ON from 7:00 p.m. until 5:00 A.M. The
IF/THEN/ELSE statement for this schedule might look like the
following:

The PPCL HOLIDA command defines the following holidays:


100

100
102
104
110

HOLIDA(4,1,6,14)

The TOD calendar defines the following holidays:


03-May-1994

Holiday

08-Sep-1994

Holiday

C THIS LINE OF CODE TURNS THE LIGHTS


C OFF AT 5:00 AM AND ON AT 7:00 PM.
C
IF(TIME.GT.5:00.AND.TIME.LT.19:00)THEN
OFF(LITES)ELSE ON(LITES)

Based on these schedules, the following will occur:


LITE1 operates according to the holiday schedule on four days:
April 1, May 3, June 14, and September 8.
This causes a problem if LITE1 should only operate on a holiday
schedule of May 3 and September 8.

Siemens Building Technologies, Inc.

2-25

2-26

Siemens Building Technologies, Inc.

Control Option ComparisonsTime-of-Day (TOD)

APOGEE PPCL Users Manual

APOGEE Interaction with PPCL TOD


APOGEE field panels contain an equipment scheduling application,
which replaces TOD in PPCL. Some portions of TOD programming
are shared by equipment scheduling, specifically the system
calendar.
Equipment scheduling uses replacement days and special days.
The R1 replacement day in equipment scheduling corresponds to
the Holiday Schedule in the TODMOD command.

Siemens Building Technologies, Inc.

2-27

2-28

Siemens Building Technologies, Inc.

APOGEE PPCL Users Manual

Duty Cycling

Chapter 3Command Syntax

DC .............................................................................................. 29
DCR............................................................................................ 31

Enthalpy Optimization

Overview

GOSUB ...................................................................................... 50
RETURN .................................................................................... 94

Chapter 3 describes the syntax, functionality, and special exceptions


for each command, as well as related commands.
This chapter is arranged alphabetically by command. The following
table of contents groups the commands by control function:

GOTO Statement
GOTO......................................................................................... 57

Local Variables
LOCAL........................................................................................ 65

Activate/Deactivate PPCL Lines


ACT .............................................................................................. 4
DEACT ....................................................................................... 33
DISABL....................................................................................... 34
ENABLE ..................................................................................... 45

Operator Interface Program


OIP ............................................................................................. 75

Peak Demand Limiting


PDL ............................................................................................ 80
PDLDAT ..................................................................................... 83
PDLDPG .................................................................................... 85
PDLMTR .................................................................................... 87
PDLSET ..................................................................................... 90

Closed Loop Control


ADAPTM ...................................................................................... 5
ADAPTS ..................................................................................... 16
LOOP ......................................................................................... 66

Point Commands

Conditional Control

ON .............................................................................................. 78
OFF ............................................................................................ 73
STATE......................................................................................105
AUTO ......................................................................................... 25
FAST .......................................................................................... 49
SLOW......................................................................................... 98
SET ............................................................................................ 96
DAY ............................................................................................ 26
NIGHT ........................................................................................ 71

IF/THEN and IF/THEN/ELSE..................................................... 60

COV Control
DISCOV...................................................................................... 37
ENCOV....................................................................................... 47

Emergency Control
EMON......................................................................................... 42
EMOFF....................................................................................... 41
EMFAST..................................................................................... 40
EMSLOW ................................................................................... 44
EMAUTO .................................................................................... 39
EMSET ....................................................................................... 43

Point Control
INITTO........................................................................................ 63
MAX............................................................................................ 69
MIN............................................................................................. 70
TIMAVG....................................................................................108
WAIT ........................................................................................116

Dead Band Switching


DBSWIT ..................................................................................... 27
Siemens Building Technologies, Inc.

3-1

3-2

Siemens Building Technologies, Inc.

Command Syntax

Point Control and Characteristics


ALARM ....................................................................................... 24
DISALM ...................................................................................... 36
ENALM ....................................................................................... 46
HLIMIT........................................................................................ 58
LLIMIT ........................................................................................ 64
NORMAL .................................................................................... 71

APOGEE PPCL Users Manual

ACT (Activate lines)


Unitary

pre-APOGEE

APOGEE

BACnet

Syntax
ACT(line1,...,line16)

Program Control

line1
through
line16

DEFINE ...................................................................................... 34
ONPWRT ................................................................................... 79
SAMPLE..................................................................................... 95
TABLE ......................................................................................106

Release Statement
RELEAS ..................................................................................... 92

Valid PPCL line numbers.

Line numbers must be entered as integers ranging


from 1 to 32767.

A range of PPCL lines cannot be defined using the


ACT command.

Use
Activates lines of PPCL code so they can be examined and
executed.

Start/Stop Time Optimization


SSTO.......................................................................................... 99
SSTOCO ..................................................................................102

The ACT command only affects the lines of PPCL program for
the device where the program resides.

Telephone ID Numbers

ACT only enables PPCL lines that are specifically defined in the
command.

DPHONE.................................................................................... 38
EPHONE .................................................................................... 48

A maximum of 16 lines of PPCL code can be controlled with one


ACT command.

Time of Day
HOLIDA ...................................................................................... 59
TOD..........................................................................................110
TODMOD .................................................................................112
TODSET...................................................................................114

Example
100

IF (TIME.GT.8:00.AND.TIME.LT.17:00) THEN
ACT(120) ELSE DEACT(120)

Notes
The ACT and ENABLE commands can be used interchangeably.
See also
DEACT, DISABL, ENABLE

Siemens Building Technologies, Inc.

3-3

3-4

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual


st

ADAPTM (Adaptive control, multiple)


Unitary

pre-APOGEE

APOGEE

BACnet

Syntax
ADAPTM(pv,cv,sp,matctl,mam,st,kc,tcd,tch,tcc,her,dbr,der,err)
pv

cv

Point name of the process variable being controlled.

This parameter is usually an LAI point, but it can be an


LAO point or a local variable that represents supply air
temperature.

This value should be between -50.0 and 150.0.

1
st Tc
3
Where:
st is the Sample Time, and

Controlled variable (output signal). This signal is 0.0 to 100.0


percent, direct acting, and is intended to go to TABLE
statementsone for each output actuator point (for example,
heating, dampers and cooling).

This parameter can be a point name or local variable.

Tc is the smallest of tcd, tch, and tcc.

sp

Setpoint for the loop against which the process variable is


compared.

This parameter can be a point name, local variable


name, or decimal number.

This value must be between -50.0 and 150.0, and


should be in the same engineering units as pv.

matctl

Represents the output of the mixed air temperature control loop


(usually an ADAPTS loop). When the value of matctl is equal to
or drops below the value of mam, the cv output will not rise
above the her value.

This parameter can be a point name, local variable


name, or decimal number.

This value must be between 0.0 and 100.0.

For applications without dampers or without mixed air


temperature override of the dampers, set matctl to
100.0.

mam

3-5

kc

Control gain.

This parameter can be a point name, local variable


name, or decimal number.

This value must be greater than 0.0.

For English units set kc to 3.0. For SI Units set kc to


6.0.

tcd

Damper time constant (in seconds).

This parameter can be a point name, local variable


name, or decimal number.

This value must be greater than or equal to 3 times the


st value.

For applications with heating and cooling only (no


dampers), set tcd to the value of tcc.
The damper time constant is, itself, very small in valuetypically
equal to that of the supply air temperature sensor and the
damper actuator stroke time. However, since the air from the
dampers must go through the coil(s) before reaching the supply
air temperature sensor, the coil(s) time constant(s) (minus their
actuator times and the supply air temperature sensor's time
constant) must be added to the damper time constant.

Mixed air damper minimum position.

This parameter can be a point name, local variable


name, or decimal number.

This value must be between 0.0 and 100.0.

For applications without dampers (heating and cooling


only), set mam to 0.0.

Siemens Building Technologies, Inc.

Sample time (in seconds). This is the time, in seconds, between


two successive starts of execution of the ADAPTM algorithm. It
is also the time interval between two samples of data by
ADAPTM.

This parameter can be an integer, point name, or local


variable name.

The minimum sample time allowed is 1 second.

For a system with smaller size coils, typically set st to 5


seconds.

For a system with larger size coils, typically set st to


10 seconds.

The Sample Time must be less than or equal to onethird of the smallest Time Constant. That is,

3-6

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual


tch

The ADAPTM damper time constant parameter entry (in


seconds) is calculated using this formula:

tcd = Tdownstream coils + Tsensor + Tdamper actuator


Where:
tcd = ADAPTM damper time constant parameter entry (in
seconds)

Heating time constant (seconds).

This parameter can be a point name, local variable


name, or decimal number.

This value must be greater than or equal to 3 times the


st value.

For applications with dampers and cooling only (no


heating), set tch to the value of tcd.
The time constant of the heating coil alone is calculated using
the following formula:

Tdownstream coils = time constants of coils alone downstream of


dampers (between the dampers and the duct temperature
sensor).

Theating coil = 0.02

Tsensor = time constant of the supply air sensor (usually about

L / sair max
CFM max
= 0.15
GPM max
L / shot water max

Where:
CFMmax = Maximum or design airflow rate in cubic feet per
minute

30 seconds)

Tdamper actuator = stroke time of the damper actuator (often 30


seconds)

GPMmax = Maximum or design hot water flow rate in gallons per


minute

Example
The AHU has mixed air dampers, a heating coil, and a cooling
coil.

l/s air max = Maximum or design air flow rate in liters per second
l/s hot water max = Maximum or design hot water flow rate in liters
per second

The ADAPTM heating time constant parameter entry (in


seconds) is calculated using this formula:

tch = Theating coil + Tdownstream coils + Tsensor + Thcactuator


Where:
tch = ADAPTM heating time constant parameter (in seconds).
The heating coil alone has a 5 second time constant. The
cooling coil alone has a 20 second time constant. The supply
air temperature sensor time constant is 30 seconds. The
damper actuator stroke time is 30 seconds. Therefore, the
damper time constant is:
Heating coil time constant:

T downstream coils = time constants of other coils alone


downstream of heating coil (between heating coil and duct
temperature sensor).

T sensor = time constant of the supply air sensor (usually about


30 seconds).

5 seconds

Cooling coil time constant:

20

T hc actuator = stroke time of the heating coil actuator (often 30

Supply air temp. sensor:

30

seconds).

Damper actuator:

30

Example

Total

85 seconds

An AHU has a design CFM of 50000 and the design flow


through the heating coil is 465 gpm. The heating coil valve has

Siemens Building Technologies, Inc.

3-7

3-8

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual

a 30 second electric actuator. Downstream of the heating coil,


there is a cooling coil with a time constant (alone) of 33
seconds. The time constant of the heating coil alone is:
CFM max
50000
Theating coil = 0.02
= 0.02
= 2.2 seconds ( round to 2 seconds )
465
GPM max

The ADAPTM cooling time constant parameter entry (in


seconds) is calculated using this formula:

tcc = Tcooling coil + Tdownstreamcoils + Tsensor + Tccactuator


Where:
tcc = ADAPTM cooling time constant parameter (in seconds)
Tdownstream coils = time constants of coils alone downstream of
cooling coil (between cooling coil and duct temperature sensor)
Tsensor = time constant of the supply air sensor (often 30
seconds)
Tcc actuator = stroke time of the cooling coil actuator (often 30
seconds)

The tch parameter entry into ADAPTM is:

tch = Theating coil + Tdownstreamcoils + Tsensor + Thcactuator

Example
An AHU has a design CFM of 15000 and the design flow
through the cooling coil is 258 gpm. The cooling coil valve has
a 30 second electric actuator. Downstream of the cooling coil,
there is a heating coil with a time constant (alone) of 15
seconds. The time constant of the cooling coil alone is:
CFM max
15000
Tcooling coil = 0.25
= 0.25
= 14.5 seconds ( round to 15 sec onds )
GPM max
258

tch = 2 + 33 + 30 + 30 = 95 seconds
tcc

Cooling time constant (in seconds).

This parameter can be a point name, local variable


name, or decimal number.

This value must be greater than or equal to 3 times the


st value.

For applications with heating and dampers only (no


cooling coil), set tcc to the value of tcd.

The tcc parameter entry into ADAPTM is:

tcc = Tcooling coil + Tdownstreamcoils + Tsensor + Tccactuator

The time constant of the cooling coil alone is calculated using


the following formula:

Tcooling coil = 0.25

CFM max
GPM max

= 2 .0

tcc = 15 + 15 + 30 + 30 = 90 seconds

L / sair max
L / schilled water max

Where:
CFMmax = Maximum or design airflow rate in cubic feet per
minute
GPMmax = Maximum or design chilled water flow rate in gallons
per minute
L/s air max = Maximum or design air flow rate in liters per second

her

L/s chilled water max = Maximum or design chilled water flow rate in
liters per second
Siemens Building Technologies, Inc.

3-9

3-10

Heating end of range (in percent). This parameter tells


ADAPTM what percentage of its output is used for heating. It is
assumed that the beginning of the heating range is at 0%.

This parameter can be a point name, local variable


Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual

name, or decimal number.

This value must be:

Equal to or greater than 0, and

Less than or equal to dbr.


For applications with dampers and cooling only (no
heating), set her to 0.

The following figure shows the relationship of her to the


operation of the heating, dampers and cooling outputs.

Typically, the value for dbr will be the same as the third
parameter for the TABLE statement controlling the mixed air
damper. For example, as shown below in the line of code
below, this value is 50.
5050

If other PPCL code is used, dbr must still be the value of the
output of ADAPTM at which mixed air dampers begin to open
from minimum position.

Typically, the value for her will be the same as the second to
the last parameter for the TABLE statement controlling the
heating coil. For example, as shown in the line of code below,
this value is 45.
05030

If the value of dbr varies slightly due to the path taken in the
code, choose a nominal value for dbr. ADAPTM can handle
minor variations in the value of dbr.

TABLE (%X%VRT,%X%HCO,0,100,45,0)

der

If the value of her varies slightly due to the path taken in the
code, choose a nominal value for her. ADAPTM can handle
minor variations in the value of her.
dbr

Damper beginning of range. This parameter, along with the


Damper End of Range (der), tells ADAPTM what percentage of
its output is used for mixed air damper control (free cooling).

This parameter can be a point name, local variable


name, or decimal number.

This value must be:

Greater than or equal to her, and

Less than der.

For applications with heating and cooling only (no


dampers), set dbr to the value of der.

For applications with dampers and cooling only (no


heating), set dbr to 0

Damper end of range. This parameter, along with the Damper


Beginning of Range (dbr), tells ADAPTM what percentage of its
output is used for mixed air damper control (free cooling).
Damper End of Range also tells ADAPTM what percentage of
its output is used for cooling since der defines the beginning of
the cooling coil range.

This parameter can be a point name, local variable


name, or decimal number.

This value must be:

Greater than or equal to dbr, and

Less than or equal to 100.

For applications with heating and dampers only (no


cooling), set der to 100.

For applications with heating and cooling only (no


dampers), set der to the value of dbr.

The end of the cooling range is assumed to be at the


adaptive control output of 100%.
The following figure shows the relationship of der to the
operation of the heating, dampers (for cooling), and cooling coil
outputs.

The following figure shows the relationship of dbr to the


operation of the heating, dampers and cooling outputs.

Siemens Building Technologies, Inc.

TABLE (%X%VRT,$MADCTL,50,%X%MAM,65,100)

3-11

3-12

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual

Typically, the value for der will be the same as the third
parameter for the TABLE statement controlling the cooling coil.
If there are two cooling coil TABLE statements because there is
an Economizer, choose the one for Economizer ON. For
example, as shown in the line of code below, this value is 65.
2060

Error reporting point. ADAPTM writes to this point. A zero


means no error. A non-zero means an error.

This parameter is entered as a point name or local


variable name.

ADAPTM(%X%SAT,%X%VRT,%X%SAS,$MATCTL,
%X%MAM,5,%X%KC1,%X%TD1,%X%TH1,%X%TC1,
45.0,50.0,65.0,%X%ER1)
C HEATING COIL SIGNAL
TABLE (%X%VRT,%X%HCO,0,100,45,0)
C DAMPER RAMP
TABLE ($MADRMP,$MADRCT,0,0,10,%X%MAM, 180,100)
C DAMPER CONTROL SIGNAL
TABLE (%X%VRT,$MADCTL,50,%X%MAM,65,100)
C MIXED AIR TEMPERATURE CONTROL LOOP
IF($MADRCT.LT.$MATCTL) THEN GOTO 2056
ADAPTS(%X%MAT,$MATCTL,%X%MLS,10,%X%KC2,
%X%TM2,0,30.0,130.0,0.0,100.0,0.0,0.0,%X%ER2)
C ECONOMIZER CONTROL
IF (%X%ECM .EQ. OFF) THEN GOTO 2072
C COOLING COIL SIGNAL (ECON=ON)
TABLE (%X%VRT,%X%CCO,65,0,100,100)
C FINAL DAMPER SIGNAL
MIN (%X%MAO,$MADRCT,$MADCTL,$MATCTL)
GOTO 2074
C COOLING COIL SIGNAL (ECON=OFF)
TABLE (%X%VRT,%X%CCO,55,0,100,100)

2054
2056
2058
2060
2062
2064
2068
2070
2072
2074

CAUTION:
Each ADAPTM PPCL line of code must have its
own unique error point. Do not share one error
point among multiple ADAPTM lines.
ADAPTM Example
The following example also includes an ADAPTS command for
mixed air temperature.
C
C
C
C
C
C

2034

2036
2038
2040
2042
2044
2046
2048
2050
2052

If the value of der varies slightly due to the path taken in the
code, choose a nominal value for der. ADAPTM can handle
minor variations in the value of der.

2000
2002
2004
2006
2008
2010

C
C
C
C
C
C
C
C
C
C
C

TABLE (%X%VRT,%X%CCO,65,0,100,100)

If other PPCL code is used, der must still be the value of the
output of ADAPTM at which mixed air dampers are fully open
and the cooling coil valve is just beginning to open.

err

2012
2014
2016
2018
2020
2022
2024
2026
2028
2030
2032

Use

ADAPTM CONTROL STATISTICS (LOGICAL


FIRMWARE)
DIRECT CONTROL LOOP
INPUT = %X%SAT
OUTPUT = %X%VRT
SETPOINT = %X%SAS

Siemens Building Technologies, Inc.

MA TEMP CNTRL OUTPUT = $MATCTL


MA MIN POSITION = %X%MAM
SAMPLE TIME = 5 SECONDS
GAIN = %X%KC1
DAMPER TIME CONSTANT = %X%TD1
HEATING TIME CONSTANT = %X%TH1
COOLING TIME CONSTANT = %X%TC1
HEATING END OF RANGE = 45.0
DAMPER BEGIN RANGE = 50.0
DAMPER END OF RANGE = 65.0
ERROR REPORT POINT = %X%ERR

Adaptive control technology is a closed loop control application,


which automatically adjusts the field panel operating parameters to
compensate for changes that continuously occur during the normal
building control process. With adaptive control technology, tuning
and retuning are not required.
3-13

3-14

Siemens Building Technologies, Inc.

Command Syntax
Either the ADAPTM or ADAPTS control statement can be
implemented as a one-line replacement for an existing LOOP
statement in PPCL.

APOGEE PPCL Users Manual

ADAPTS (Adaptive control, single)


Unitary

ADAPTM is specifically designed for supply air temperature control


in which two or three output devices are controlled in sequence
without overlap.

APOGEE

BACnet

Syntax

The output of ADAPTM is direct actingit rises in value as the


process variable rises. To control multiple outputs, ADAPTM must be
connected to TABLE statements with parameters set such that the
mixed air damper output and the cooling coil output have direct
action, and the heating coil output has reverse action.

ADAPTS(pv,cv,sp,st,kc,tc,ra,llpv,hlpv,llcv,hlcv,edb,npv,err)
pv

Process variable that is being controlled.

This parameter can be a point name or local variable. It


is usually an LAI point, but can be an LAO pointa
calculated point representing a temperature, flow rate,
air velocity, etc.

This value should always be between llpv and hlpv.

cv

Controlled variable (loop output).

This parameter can be a point name or local variable. It


is usually an LAO point that represents an actuator
signal.

sp

Setpoint for the loop against which the process variable is


compared.

This parameter can be entered as a point name, local


variable name, or decimal number.

This value must be between llpv and hlpv, and should


represent the same engineering units as the process
variable.

st

Sample time (in seconds). This is the time, in seconds, between


two successive starts of execution of the ADAPTS algorithm. It
is also the time interval between two samples of data by
ADAPTS.

This parameter can be an integer, point name, or local


variable name.

The minimum sample time allowed is 1 second.

The Sample Time must be less than or equal to onethird of the Time Constant. That is,

To be able to control, adaptive control requires that the loop be:


Controllablethis means that the sensor is in the right range and
the output is sufficient to bring the process variable to setpoint.
Open-loop Stablethis means that the process can achieve a
steady state for every position of the final output device. (All AHU
loops are open-loop stable.)
Direct or Reverse Actingthis means the process is either
always direct or always reverse acting. That is, the process does
not change its action (direction or sign) within the control range.
Modulatingthis refers to the loops output device, such as a
cooling coil with a modulating water valve. For example, DX
cooling or step controlled electric heat, cannot be controlled by
the ADAPTM or ADAPTS statements in PPCL.
Not Excessive in Dead Timethis means that the total delay in
the sensor and actuator signals should not exceed two times the
time constant of the process.
NOTE:

pre-APOGEE

The Soft Controller does not support adaptive control


technology.

1
st tc
3

See also
ADAPTS, LOOP

Where:
st is the Sample Time, and
tc is the Time Constant.

Siemens Building Technologies, Inc.

3-15

3-16

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual

Suggested Sample Times

L/s chilled water max = Maximum or design chilled water rate in liters
per second.

Temperature Loops (single input, single output)

5 seconds for fast loops;

10 seconds for slow loops.

Tsensor = time constant of the supply air sensor; typically about 30


seconds.

Humidity Loops

5 to 10 seconds for return air or space loop;

1 or 2 seconds for a discharge air loop.

Tcc actuator = stroke time of the cooling coil actuator; typically 30


seconds.

Heating Coils

Flow and Static Pressure Loops

1 or 2 seconds
kc

tc

Use the following formula:


L / s air max
CFM max
tc = 0 . 02
or 0 . 15
GPM max
L / s hot water max

Control gain.

This parameter can be a point name, local variable


name, or decimal number.

This value must be greater than 0.

Since ADAPTS will adapt to the process it is controlling,


set kc to 3.0 for both English and SI Unit applications.

+ T sensor

+ T hc actuator

Where:
tc = ADAPTS heating time constant parameter entry (in
seconds).
CFMmax = Maximum or design airflow rate in cubic feet per
minute.

Time constant (in seconds). The Time Constant value is a


rough estimate of the time constant of the process.

This parameter can be a point name, local variable


name, or decimal number.

This value must be greater than or equal to 3 times the


st value.
Note: Increasing the value of tc slows down the adaptation
process.

L/s air max = Maximum or design airflow rate in liters per second.
GPMmax = Maximum or design hot water flow rate in gallons per
minute.
l/s hot water max = Maximum or design hot water rate in liters per
second.

Cooling Coils
Tsensor = time constant of the supply air sensor; typically about 30
seconds.

Use the following formula:


tc = 0 . 25

CFM max
GPM

max

L / s air max

+ T sensor

or 2 . 0
L / s chilled

water

+ T cc actuator

Thc actuator = stroke time of the heating coil actuator; typically 30


seconds.

max

Where:
tc = ADAPTS cooling time constant parameter entry (in
seconds).

Mixed Air Temperature


Use the following formula:

tc = T ma

CFMmax = Maximum or design airflow rate in cubic feet per


minute.

GPMmax = Maximum or design chilled water flow rate in gallons


per minute.
3-17

+ T damper

actuator

Where:
tc = ADAPTS mixed air temperature time constant parameter
entry (in seconds); typically 40 seconds.

L/s air max = Maximum or design airflow rate in liters per second.

Siemens Building Technologies, Inc.

sensor

3-18

Tma sensor = time constant of the mixed air temperature sensor;


typically about 30 seconds.
Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual

Example 1

Tdamper actuator = stroke time of the mixed air damper actuator;


typically 30 seconds.

For static pressure control, enter a small negative value (-0.1) to


cover the possibility of a miscalibrated sensor or small negative
air pressures when the fan is off.

Duct Static Pressure

6 seconds for small size systems,


10 seconds for medium size systems, and
20 seconds for large size systems.

Example 2
For supply air temperature control with mixed air dampers, use
30F or 0C. The mixed air dampers should prevent any lower
temperatures from entering the supply duct even if the heating
coil is not operating or hot water is absent.

Airflow Control

6 seconds for small size systems,


10 seconds for medium size systems, and
20 seconds for large size systems.

hlpv

Duct Humidity Control

50 seconds for small size systems,


100 seconds for medium size systems, and
200 seconds for large size systems.

Example 1

Cascade Control (setpoint reset)

For static pressure control, enter the highest pressure that will
occur in the supply duct. The highest pressures occur on startup
and when there are large upsets.

For the return air/room air (outer/slow) temperature or humidity


loop:

100 seconds for small size systems/rooms*,

250 seconds for medium size systems/rooms*, and

500 seconds for large size systems/rooms*.

Example 2
For supply air temperature control, use 130F or 55C.

* A full room should have a longer time constant than an empty room.

ra

llpv

Reverse acting flag. This parameter defines the action of the


ADAPTS controller.

Reverse acting means cv (output) decreases as pv


(input) increases.)

This parameter can be an integer, point name, or local


variable name.

Valid values are 0 and 1.


1 = reverse acting
0 = direct acting
Low limit of process variable. The llpv is typically the lowest
value that the pv is expected to achieve. This value may differ
from the sensors low range.

This parameter can be a point name, local variable


name, or decimal number.

This value must be less than hlpv.

Siemens Building Technologies, Inc.

High limit of process variable. The hlpv is typically the highest


value that the pv is expected to achieve. This value may differ
from the sensors high range.

This parameter can be a point name, local variable


name, or decimal number.

This value must be greater than llpv.

3-19

3-20

llcv

Low limit of control variable. The llcv represents the low limit of
the ADAPTS output.

This parameter can be a point name, local variable


name, or decimal number.

This value must be less than hlcv.

For electric actuators, typically llcv is 0.0% or 0.0 volts.

For pneumatic actuators, typically llcv is the low end of


the actuator spring range.

hlcv

High limit of control variable. The hlcv represents the high limit of
the ADAPTS output.

This parameter can be a point name, local variable


name, or decimal number.

This value must be greater than llcv.

For electric actuators, typically hlcv is 100.0% or 10.0


volts.

For pneumatic actuators, typically hlcv is the high end of


the actuator spring range.
Siemens Building Technologies, Inc.

Command Syntax
edb

APOGEE PPCL Users Manual

Error deadband. This parameter determines how much error


(process variable minus setpoint) must exist before ADAPTS
recalculates its output signal (control variable).

err

Noisy process variable signals can cause much actuator


movement. Setting edb to a value equal to that of the noise will
eliminate unnecessary actuator movement. Thus, actuator
repositioning, and actuator life, can be affected by the use of this
parameter.

This parameter can be a point name, local variable


name, or decimal number.

This value must be greater than or equal to 0.0.

The drawback when setting edb to a non-zero value is


lack of control accuracy when near setpoint. The
effective setpoint becomes the value of parameter sp +/edb.

Initially set edb to the loops maximum allowable


setpoint tolerance.

For temperature and humidity loops, edb can be


very loweven 0.0 is acceptable

For static pressure and flow loops, start with 1% to


3% of the maximum input value.

If small actuator oscillations are observed, edb can be


increased in value until the maximum setpoint tolerance
is reached.
npv

CAUTION:
Each ADAPTS PPCL line of code must have its
own unique error point. Do not share one error
point among multiple ADAPTS lines.
ADAPTS Example
2000
2002
2004
2006
2008
2010
2012
2014
2016
2018
2020
2022
2024
2026
2028
2030
2034
2036
2038

C ADAPTS CONTROL STATISTICS (LOGICAL


C FIRMWARE) STATIC PRESSURE CONTROL
C DIRECT CONTROL LOOP
C INPUT = %X%SSP
C OUTPUT = %X%LP1
C SETPOINT = %X%SSS
C SAMPLE TIME = 1 SECOND
C GAIN = %X%KC
C TIME CONSTANT = %X%TC
C REVERSE ACTING FLAG = 1
C LOW LIMIT OF INPUT = -0.1
C HIGH LIMIT OF INPUT = 5.0
C LOW LIMIT OF OUTPUT = 0.0
C HIGH LIMIT OF OUTPUT = 100.0
C ERROR DEADBAND = %X%DB1
C NOISY PROCESS VARIABLE = %X%NP1
C ERROR REPORT POINT = %X%ERR
IF(%X%RP1.LT.%X%LP1) THEN GOTO 2042
ADAPTS(%X%SSP,%X%LP1,%X%SSS,1,%X%KC,
%X%TC,1,-0.1,5.0,0.0,100.0,%X%DB1,
%X%NP1,%X%ERR)
2040 C SUPPLY FAN RAMP
2042 TABLE ($SPFRMP,%X%RP1,0,0,180,100)
2044 C SUPPLY FAN VFD SIGNAL
2046 MIN (%X%SVO,%X%LP1,%X%RP1)
......

Noisy process variable. Noisy means that the value of the


process variable jumps up or down abruptly from one sensor
scan to another.
Some processes inherently create a noisy process variable
signal. An airflow signal, for example, can be very noisy at the
low end of its sensor range due to a lack of resolution. Other
processes can be noisy under certain conditions. For example, a
static pressure signal can be noisy at certain fan speeds and
with a certain sensor positioned too close to the fan.

This parameter can be an integer, point name, or local


variable name.

In general, follow these rules:

npv = 1 (noisy) for a loop with a very noisy pv, such


as airflow or static pressure control. Adaptation is
slowed with npv = 1.

npv = 0 (not noisy) for a loop with a pv that is not


noisy or only a little noisy, such as temperature
control or humidity control.

Siemens Building Technologies, Inc.

3-21

Error reporting point. ADAPTS writes to this point.

This parameter is entered as a point name or local


variable name.

A zero indicates no error.

A non-zero indicates an error.

3-22

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual

Use
Adaptive control technology is a closed loop control application,
which automatically adjusts the field panel operating parameters to
compensate for changes that continuously occur during the normal
building control process. With adaptive control technology, tuning
and retuning are not required.

ALARM (Alarm state)


Unitary

pre-APOGEE

APOGEE

BACnet

Syntax
Either the ADAPTM or ADAPTS control statement can be
implemented as a one-line replacement for an existing LOOP
statement in PPCL.

ALARM(pt1,...,pt16)

ADAPTS is a general purpose single input, single output controller


for both linear and non-linear processes. Example applications are
mixed air temperature, static pressure, return airflow, and humidity
control.

pt1
through
pt16

Use
Forces the specified points into the ALARM state.

To be able to control, adaptive control requires that the loop be:

A maximum of 16 points can be changed with one ALARM


command.

Controllablethis means that the sensor is in the right range and


the output is sufficient to bring the process variable to setpoint.
Open-loop Stablethis means that the process can achieve a
steady state for every position of the final output device. (All AHU
loops are open-loop stable.)

Example
100

Points must reside in the same device as the program.


Do not use ALARM to command points over the network.
Points must be defined as alarmable and be enabled for alarming
in order to be placed into the alarm-by-command state.

Modulatingthis refers to the loops output device, such as a


cooling coil with a modulating water valve. For example, DX
cooling or step controlled electric heat, cannot be controlled by
the ADAPTM or ADAPTS statements in PPCL.

NOTE:

IF (ROOM.GT.80.0) THEN ALARM(ROOM25)

Notes

Direct or Reverse Actingthis means the process is either


always direct or always reverse acting. That is, the process does
not change its action (direction or sign) within the control range.

Not Excessive in Dead Timethis means that the total delay in


the sensor and actuator signals should not exceed two times the
time constant of the process.

Name of a point to be placed into the ALARM state.

Local variables cannot be used.

The status *AC* is displayed when a point is commanded to the


ALARM state.
See also
DISALM, ENALM, HLIMIT, LLIMIT, NORMAL

The Soft Controller does not support adaptive control


technology.

See also
ADAPTM, LOOP
Siemens Building Technologies, Inc.

3-23

3-24

Siemens Building Technologies, Inc.

Command Syntax

AUTO (Auto status)


Unitary

APOGEE PPCL Users Manual

DAY (Day mode)

pre-APOGEE

APOGEE

BACnet

Unitary

Syntax

pre-APOGEE

APOGEE

BACnet

Syntax

AUTO(pt1,...,pt16)

DAY(pt1,...,pt16)

pt1
through
pt16

pt1
through
pt16

Name of a point to be set to AUTO status.

This parameter must be a LOOAL or LOOAP point


type.

Use

Name of a point to be set to DAY mode.

This parameter must be a logical controller (LCTLR)


point type.

Use

Changes the operational status of an ON/OFF/AUTO point to AUTO.

Changes a LCTLR point to DAY mode status.

A maximum of 16 points can be changed with one AUTO command.

A maximum of 16 points can be changed with one DAY command.

Example

Example

100

100

AUTO(EFAN1,EFAN2,EFAN3)

IF (TIME.LT.7:00.OR.TIME.GT.18:00) THEN
NIGHT(LCTLR2) ELSE DAY(LCTLR2)

See also
Notes

FAST, OFF, ON, SLOW

For some equipment controllers, DAY mode is also referred to as


OCC (occupied) mode. If an equipment controller is in OCC mode,
PPCL recognizes this status as DAY.
See also
NIGHT

Siemens Building Technologies, Inc.

3-25

3-26

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual


The operational status of the point is regulated by an analog point
using a predefined dead band.

DBSWIT (Dead band switch)


Unitary

pre-APOGEE

APOGEE

BACnet

Example 1
200

DBSWIT(1,RMTEMP,LDBAND,HDBAND,SFAN,RFAN)

Example 2

Syntax

200

DBSWIT(1,RMTEMP,55,58,SFAN,RFAN)

DBSWIT(type,input,low,high,pt1,...,pt12)
type

The type of dead band switch action.

Valid values are 0 and 1.


0 = All output points (pt1,...,pt12) are commanded
ON when the input point value rises above the high
limit, and are commanded OFF when the input point
value falls below the low limit.
1 = All output points (pt1,...,pt12) are commanded
ON when the input point value falls below the low
limit, and are commanded OFF when the input point
value rises above the high limit.

input

Point name of the variable being controlled.

This parameter is usually an analog point, but it can


also be a local variable.

low

The low temperature at which a switching action occurs.

This parameter can be an integer, point name, local


variable name, or decimal number.

high

The high temperature at which a switching action occurs.

This parameter can be an integer, point name, local


variable name, or decimal number.

pt1
through
pt12

Name of an output point to be turned ON and OFF.

Local variables can be used.

Use
Provides the ON/OFF switching action of an output point. This is the
software equivalent of a thermostat.
A maximum of 12 points can be controlled with one DBSWIT
command.
Siemens Building Technologies, Inc.

3-27

3-28

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual


Use

DC (Duty cycle)
Unitary

pre-APOGEE

APOGEE

BACnet

Coordinates the operation of all available equipment to compensate


for additional equipment capacity that is not normally needed. During
normal system operation, some equipment is cycled off for short
periods of time to distribute equipment wear and reduce operating
costs.

Syntax
A maximum of 8 points can be controlled with one DC command.

DC(pt1,pat1,...,pt8,pat8)
pt1
through
pt8

pat1
through
pat8

Do the following to create a duty cycle pattern:

Name of the output points to be duty cycled.

This parameter can be an LDO, LOOAL, LOOAP,


L2SL, or L2SP point type.

Local, virtual, and physical points are valid for pt1,


pt2, pt3, and pt4.

1. Divide one-hour into four 15-minute segments.


2. Determine the ON/OFF state for each 5-minute increment of the
segment.
3. Using Table 3-1, assign a number to represent the ON/OFF
pattern for each 15-minute segment.

Hourly pattern that describes how the point is duty cycled.

This parameter can be a local, physical, or virtual


point, as well as an integer.

This pattern is a four-digit code using the numbers 0


through 7.

Each digit represents the on/off pattern for one 15minute segment of an hour. Table 3-1 lists the
numeric codes and their ON/OFF patterns.

4. After the patterns are defined, enter the code numbers in reverse
order. The right-most digit defines the first 15-minute segment of
the hour. The left-most digit defines the last 15-minute segment
of the hour.
Example

Table 3-1. Duty Cycle Patterns and Numerical Codes.


Point Status During this Time
First 5
minutes

Second 5
minutes

Third 5
minutes

Code Number for


this 15-minute
On/Off Pattern

OFF

OFF

OFF

ON

OFF

OFF

OFF

ON

OFF

ON

ON

OFF

OFF

OFF

ON

ON

OFF

ON

OFF

ON

ON

ON

ON

ON

1000
1010
1020
1030
1040
1050
1060
1070
1100

C THIS DC COMMAND DUTY CYCLES HFAN


C ACCORDING TO THE FOLLOWING SCHEDULE:
C
C FIRST 15 MINUTES ON, OFF, OFF (1)
C SECOND 15 MINUTES OFF, OFF, OFF (0)
C THIRD 15 MINUTES OFF, OFF, OFF (0)
C FOURTH 15 MINUTES ON, ON, ON (7)
C
DC(HFAN,7001)

Notes
The DC command has a priority of NONE. Therefore, the PPCL
program must be structured with IF/THEN/ELSE commands to
prevent conflicts between DC and other commands with the same
priority.
See also
DCR

Siemens Building Technologies, Inc.

3-29

3-30

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual


Example

DCR (Duty cycle routine)


Unitary

pre-APOGEE

APOGEE

BACnet

200
210
220
230
240
250

Syntax
DCR(pt1,temp1,high1,low1,...,pt4,temp4,high4,low4)
pt1
through
pt4

Point names of the output points to be duty cycled.

This parameter can be an LDO, logical, physical, or


virtual point type.

temp1
through
temp4

Point names of the space temperature points.

high1
through
high4

High temperature limits of the space points.

This parameter can be a decimal, integer, point


name, or local variable.

low1
through
low4

Low temperature limits of the space points.

This parameter can be a decimal, integer, point


name, or local variable.

C
THIS COMMAND WILL TURN ON IF
C
SFAN'S VALUE FALLS BELOW 68 OR
C
RISES ABOVE 78. THE POINT SFAN01
C
WILL REMAIN ON/OFF FOR AT LEAST 5
C
MINUTES ON EACH CYCLE.
DCR(SFAN01,RM109,78.0,68.0)

Notes
The DCR command has a priority of NONE. Therefore, the PPCL
program must be structured with IF/THEN/ELSE commands to
prevent conflicts between DCR and other commands with the same
priority.
See also
DC

Use
Duty cycles an output point to keep a corresponding temperature
within the low and high values of a dead band.
Makes an ON/OFF decision every 5 minutes according to the
value of the parameters.
The output point is commanded ON when the temperature
point value is above the high limit or below the low limit.
The output point is commanded OFF when the temperature
point value is within the range of the high and low limits.
For each point, a space temperature, high temperature, and low
temperature parameter must be defined.
A maximum of 4 points can be controlled with one DCR
command.
Siemens Building Technologies, Inc.

3-31

3-32

Siemens Building Technologies, Inc.

Command Syntax

DEACT (Deactivate lines)


Unitary

APOGEE PPCL Users Manual

DEFINE (Define abbreviation)

pre-APOGEE

APOGEE

BACnet

Unitary

Syntax

pre-APOGEE

APOGEE

BACnet

Syntax

DEACT(line1,...,line16)

DEFINE(abbrev,string)

line1
through
line16

abbrev

Abbreviation used in other PPCL statements. Represents the


string parameter.

string

Actual text string that will be substituted where the


abbreviation is used. The string text usually contains a
significant portion of a long point name.

Valid PPCL line numbers

Line numbers must be entered as integers ranging


from 1 to 32767.

A range of PPCL lines cannot be defined using the


DEACT command.

Use
Disables lines of PPCL code to prevent them from being examined
or executed.

Use
Creates an abbreviated notation for a long point name. DEFINE
allows program logic to be easily duplicated provided your facility
uses a structured naming convention for point names.

The DEACT command only affects the lines of PPCL program for
the device where the program resides.

A percentage sign (%) must be placed before and after the


abbreviation when it is used in the program.

DEACT only disables PPCL lines that are specifically defined in


the command.

Example

A maximum of 16 lines of PPCL code can be controlled with one


DEACT command.

10
20

DEFINE(AHU,BUILDING1.AHU01.)
ON(%AHU%SFAN)

Example

If DEFINE is not used, this same line of code looks like the following:

100

20

IF (TIME.GT.8:00.AND.TIME.LE.17:00) THEN
ACT(120,130) ELSE DEACT(120,130)

ON(BUILDING1.AHU01.SFAN)

Notes
Notes

This statement is executed when added to the field panel and does
not require enabling or execution in the normal program flow.

The DEACT and DISABL commands can be used interchangeably.


See also
ACT, DISABL, ENABLE

Siemens Building Technologies, Inc.

3-33

3-34

Siemens Building Technologies, Inc.

Command Syntax

DISABL (Disable lines)


Unitary

APOGEE PPCL Users Manual

DISALM (Disable alarm)

pre-APOGEE

APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax
DISABL(line1,...,line16)

DISALM(pt1,...,pt16)

line1
through
line16

pt1
through
pt16

Valid PPCL line numbers.

Line numbers must be entered as integers ranging


from 1 to 32767.

A range of PPCL lines cannot be defined using the


DISABL command.

Point name that should not report alarms.

Use
Disables alarm reporting for the specified points.

Use
Disables lines of PPCL code to prevent them from being examined
or executed.

A maximum of 16 points can be controlled with one DISALM


command.

The DISABL command only affects the lines of PPCL program for
the device where the program resides.

Example

DISABL only disables PPCL lines that are specifically defined in


the command.

50 IF (SFAN.EQ.OFF) THEN DISALM(ROOM1) ELSE


ENALM(ROOM1)

Notes

A maximum of 16 lines of PPCL code can be controlled with one


DISABL command.

Points must reside in the same device as the program.

Example

The status *PDSB* is displayed when a point is commanded to


the DISALM state.

100

Do not use DISALM to disable alarm reporting over the network.

IF (TIME.GT.8:00.AND.TIME.LE.17:00) THEN
ENABLE(120,130) ELSE DISABL (120,130)

For BACnet firmware, all three alarm events are disabled; that is,
OFFNORMAL, NORMAL, and FAULT.

Notes
The DEACT and DISABL commands can be used interchangeably.

See also
See also

ALARM, ENALM, HLIMIT, LLIMIT, NORMAL

ACT, DEACT, ENABLE

Siemens Building Technologies, Inc.

3-35

3-36

Siemens Building Technologies, Inc.

Command Syntax

DISCOV (Disable COV)


Unitary

pre-APOGEE

APOGEE PPCL Users Manual

DPHONE (Disable phone)


APOGEE

BACnet

Unitary

Syntax

pre-APOGEE

APOGEE

2.1 only

BACnet

Syntax

DISCOV(pt1,...,pt16)

DPHONE(pn#1,...,pn#16)

pt1
through
pt16

pn#1
through
pn#16

Point name that should not report updated changes-of-value


(COV).

Use

Telephone ID numbers that are defined in the device.

Use

Stops devices from reporting updated values (COVs) to the Insight


workstation. When this command is executed, all operations that use
COVs to function will stop.

Disables telephone ID numbers. The telephone ID number is a


numeric code that represents the actual telephone number defined in
the device.

Until the points defined in this command are enabled, updates to


graphics, archiving, COV printing, alarming, and in some cases
evaluation of equations, will stop.

A maximum of 16 telephone number IDs can be disabled with one


DPHONE command.
Example

A maximum of 16 points can be controlled with one DISCOV


command.

532

DPHONE(1,2,3,5,6)

Notes
Notes

Do not use the DPHONE command over the network.

Points defined in the statement must reside in the same device as


the DISCOV command.

See also
EPHONE

Example
50

IF (SFAN.EQ.OFF) THEN DISCOV(ROOM1, ROOM2)


ELSE ENCOV(ROOM1,ROOM2)

See also
ENCOV

Siemens Building Technologies, Inc.

3-37

3-38

Siemens Building Technologies, Inc.

Command Syntax

EMAUTO (Emergency, Auto status)


Unitary

APOGEE PPCL Users Manual

EMFAST (Emergency, Fast status)

pre-APOGEE

APOGEE

BACnet

Unitary

Syntax

pre-APOGEE

APOGEE

BACnet

Syntax

EMAUTO(pt1,...,pt16)

EMFAST(pt1,...,pt16)

pt1
through
pt16

pt1
through
pt16

Point name to be set to AUTO status with emergency priority.

This parameter can be a LOOAL or LOOAP point.

Use

Point name to be set to FAST status with emergency priority.

This parameter can be a LFSSL or LFSSP point.

Use

Changes the operational status of an ON/OFF/AUTO point to AUTO


(local control) with emergency priority.

Changes the operational status of a FAST/SLOW/ STOP point to


FAST with emergency priority.

A maximum of 16 points can be changed with one EMAUTO


command.

A maximum of 16 points can be changed with one EMFAST


command.

See also

See also

EMFAST, EMOFF, EMON, EMSET, EMSLOW

Siemens Building Technologies, Inc.

EMAUTO, EMOFF, EMON, EMSET, EMSLOW

3-39

3-40

Siemens Building Technologies, Inc.

Command Syntax

EMOFF (Emergency, Off status)


Unitary

APOGEE PPCL Users Manual

EMON (Emergency, On status)

pre-APOGEE

APOGEE

BACnet

Unitary

Syntax

pre-APOGEE

APOGEE

BACnet

Syntax

EMOFF(pt1,...,pt16)

EMON(pt1,...,pt16)

pt1
through
pt16

pt1
through
pt16

Point name to be set to OFF status with emergency priority.

This parameter can be a LDI, LDO, LFSSL, LFSSP,


LOOAL, LOOAP, L2SL, or L2SP point.

Use

Point name to be set to ON status with emergency priority.

This parameter can be a LDI, LDO, L2SL, L2SP,


LOOAL, or LOOAP point.

Use

Changes the operational status of the specified points to OFF with


emergency priority.

Changes the operational status of the specified points to ON with


emergency priority.

A maximum of 16 points can be changed with one EMOFF


command.

A maximum of 16 points can be changed with one EMON command.


See also

See also

EMAUTO, EMFAST, EMOFF, EMSET, EMSLOW

EMAUTO, EMFAST, EMON, EMSET, EMSLOW

Siemens Building Technologies, Inc.

3-41

3-42

Siemens Building Technologies, Inc.

Command Syntax

EMSET (Emergency, set value)


Unitary

APOGEE PPCL Users Manual

EMSLOW (Emergency, Slow status)

pre-APOGEE

APOGEE

BACnet

Unitary

Syntax

pre-APOGEE

APOGEE

BACnet

Syntax

EMSET(value,pt1,...,pt15)

EMSLOW(pt1,...,pt16)

value

Value to which points are commanded.

This value can be a decimal, integer, point name, or


local variable.

pt1
through
pt16

pt1
through
pt15

Point name to be set to the specified value with emergency


priority.

This parameter can be a LAI or LAO point.

Point name to be set to SLOW status with emergency priority.

This parameter can be a LFSSL or LFSSP point.

Use
Changes the operational status of a FAST/SLOW/ STOP point to
SLOW with emergency priority.

Use

A maximum of 16 points can be changed with one EMSLOW


command.

Changes output points to a new value with emergency priority.


A maximum of 15 points can be changed with one EMSET
command.

See also
EMAUTO, EMFAST, EMOFF, EMON, EMSET

See also
EMAUTO, EMFAST, EMOFF, EMON, EMSLOW

Siemens Building Technologies, Inc.

3-43

3-44

Siemens Building Technologies, Inc.

Command Syntax

ENABLE (Enable lines)


Unitary

APOGEE PPCL Users Manual

ENALM (Enable alarm)

pre-APOGEE

APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax
ENABLE(line1,...,line16)

ENALM(pt1,...,pt16)

line1
through
line16

pt1
through
pt16

Valid PPCL line numbers.

Line numbers must be entered as integers ranging


from 1 to 32767.

A range of PPCL lines cannot be defined using the


ENABLE command.

Each PPCL line must be specified separately.

Point name that should have alarm reporting enabled.

Use
Enables alarm reporting for the specified points.

Use

A maximum of 16 points can be enabled for alarm reporting with one


ENALM command.

Enables lines of PPCL so they can be examined or executed.


The ENABLE command only affects the lines of PPCL program
for the device where the program resides.
ENABLE only enables PPCL lines that are specifically defined in
the command.

Example
50

IF (SFAN.EQ.ON) THEN ENALM(ROOM1) ELSE


DISALM(ROOM1)

Notes

A maximum of 16 lines of PPCL code can be controlled with one


ENABLE command.

Points must reside in the same device as the program.

Example

Points must be set up for alarming and have the ability to report
alarms.

100

This command reverses the DISALM command.

IF (TIME.GT.8:00.AND.TIME.LT.17:00) THEN
ENABLE(120) ELSE DISABL(120)

This command does not override *ODSB*.

Notes

For BACnet firmware, all three alarm events are enabled; that is,
OFFNORMAL, NORMAL, and FAULT.

The ACT and ENABLE commands can be used interchangeably.


See also

See also

ACT, DEACT, DISABL

Siemens Building Technologies, Inc.

ALARM, DISALM, HLIMIT, LLIMIT, NORMAL

3-45

3-46

Siemens Building Technologies, Inc.

Command Syntax

ENCOV (Enable COV)


Unitary

pre-APOGEE

APOGEE PPCL Users Manual

EPHONE (Enable phone)


APOGEE

BACnet

Unitary

Syntax

pre-APOGEE

APOGEE

2.1 only

BACnet

Syntax

ENCOV(pt1,...,pt16)

EPHONE(pn#1,...,pn#16)

pt1
through
pt16

pn#1
through
pn#16

Point name that is enabled to report updated changes-ofvalue (COV).

Use

Telephone ID numbers that are defined in the device.

Use

Enables devices to report change-of-value (COV) information to


other nodes. When this command is executed, all operations that
use COVs to function will start reporting.

Enables telephone ID numbers. The telephone ID number is a


numeric code that represents the actual telephone number defined in
the device.

Unless the points defined in this command are disabled, updates to


graphics, archiving, COV printing, alarming, and in some cases
evaluation of equations are reported.

A maximum of 16 telephone number IDs can be enabled with one


EPHONE command.
Example

Points defined in the statement must reside in the same device


as the command.

530

A maximum of 16 points can be controlled with one ENCOV


command.

Notes

Example

See also

50

EPHONE(1,2,3,5,6)

Do not use the EPHONE command over the network.

IF (SFAN.EQ.ON) THEN ENCOV(ROOM1, ROOM2)


ELSE DISCOV(ROOM1,ROOM2)

DPHONE

See also
DISCOV

Siemens Building Technologies, Inc.

3-47

3-48

Siemens Building Technologies, Inc.

Command Syntax

FAST (Fast status)


Unitary

APOGEE PPCL Users Manual

GOSUB (Go to subroutine)

pre-APOGEE

APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax
FAST(pt1,...,pt16)

GOSUB line# (pt1,...,pt15)

pt1
through
pt16

or parentheses are optional

Point name to be set to FAST status.

This parameter can be a LFSSL or LFSSP point.

GOSUB line# pt1,...,pt15

FAST(@prior, pt1,...,pt15)
@prior

Defines a specific point priority.

pt1
through
pt15

Point name to be set to FAST status.

This parameter can be a LFSSL or LFSSP point

line#

Indicates which program command line number should be


executed next (that is, where the subroutine starts).

Line numbers must be entered as integers ranging


from 1 to 32767.

pt1
through
pt15

Point name or local variables whose values are to be passed


to the subroutine.

This parameter can be omitted if the subroutine does


not use variable arguments.

Use
Changes the operational status of a FAST/SLOW/STOP point to
FAST.

Use
Subroutines are particularly useful for programs in which the same
calculation is carried out several times using different values.

Acceptable point types are: LFSSL or LFSSP.


A maximum of 16 points can be changed with one FAST
command.

The main subroutine commands, GOSUB and RETURN are required


for all subroutines. When this command is executed, the line
specified in the GOSUB command is the next line evaluated. When
the computer encounters the RETURN command, the next line
evaluated is the line following the GOSUB statement.

A maximum of 15 points can be defined with one


FAST(@prior) command.
Example
10

The variable parameters in a subroutine are designated by the local


variables $ARG1 through $ARG15. These variables can be used by
PPCL code in the subroutine in the same way that point names and
constants are used.

IF (RMTEMP.GT.78.0)THEN FAST(@NONE, FAN1,FAN2)

See also
AUTO, OFF, ON, SLOW

Multiple-Level Subroutines
A multiple-level subroutine is a block of program code that is called
from within another subroutine. Each call made within a subroutine
constitutes a level. You are limited to a total of eight levels.

Siemens Building Technologies, Inc.

3-49

3-50

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual

When using multi-level subroutines, the rules that govern $ARGn


variables and point name declarations for GOSUB commands
change as follows:

The program flow through one complete pass is as follows:

$ARGn variables used in multi-level subroutines cannot be


shared between subroutine levels. That is, you cannot assign the
value of PT1 to $ARG1 in the call to level one and then assign
the value of PT2 to $ARG1 in the call to level two.

2. At line 1010, the program assigns a value of 10 to PT1 and the


value of 20 to PT2. Line 1030 branches back to the line after the
GOSUB command (at line 130). After the program returns to the
main line code, the values of the two points become:
PT1 = 10

1. At line 130, the GOSUB command transfers control to line 1010.

When defining a new level in a multi-level subroutine, list the


previously-defined $ARGn variables in sequential order to
preserve their values.

PT2 = 20
3. The program continues to sequentially evaluate program lines
until it encounters the GOSUB command at line 300. The
program branches to line 2010. This command also defines two
values that are passed (PT1 and PT2).

Any new points declared in that level must be placed after the
$ARGn variables. For example, in the third level of a multi-level
subroutine, $ARG1 and $ARG2 would be redefined before the
defining the new value of PT3.

4. At line 2010, a $ARGn point is assigned a value. When the


program encounters a $ARGn point, it checks the calling
GOSUB command for point names. The GOSUB command used
to call this subroutine contains two point names. When the
program encounters the first $ARGn variable at line 2010, it
takes the first point name defined in the GOSUB command
(PT1) and stores that value in $ARG1 (10). Line 2010 also adds
one (1) to the value of $ARG1.

If a previously-defined $ARGn variable is not redefined in the call


to a new level, any values introduced in the new level replace the
values in $ARGn.
Subroutine Examples
To explain the concept of subroutine program control, two examples
of program code are provided in this section:

5. When the program encounters the second $ARGn variable at


line 2020, it takes the second point name defined in the GOSUB
command (PT2) and stores that value in $ARG2 (20). Line 2020
also adds one (1) to the value of $ARG2.
Line 2030 returns control of the program to the line after the
GOSUB command (at line 300). At line 400, the program
executes the GOTO command to line 3000 that returns control
back to mainline code.

Program flow sequence


Multiple level subroutines
Program Flow Sequence
This example demonstrates how a number of PPCL commands are
used in subroutines. Refer to Figure 3-1 as you follow the program
flow sequence.

After one pass of the program, the values of the points after
being updated by the $ARGn variables, will be as follows:

The variables PT1 and PT2 demonstrate the passing of values


between subroutines.

PT1 = 11
PT2 = 21

The $ARG local variable demonstrates how values are passed


between subroutines.
The GOTO command, which is used to bypass subroutines, is
also shown in this example.
Siemens Building Technologies, Inc.

3-51

3-52

Siemens Building Technologies, Inc.

Command Syntax
100
110
112
120
130

APOGEE PPCL Users Manual

C MAINLINE PROGRAM FOR LOGICAL FIRMWARE


C LEARNING HOW TO USE GOSUB, RETURN, AND
C $ARG COMMANDS.***

Multiple-Level Subroutines
The following example demonstrates the use of $ARGn variables
and point declarations used in multiple-level subroutines.

GOSUB 1010
...
...
...
GOSUB 2010 PT1, PT2
...
...
...
GOTO 3000

300

400
1000
1001
1002
1004
1008
1010
1020
1030

C
--SUBROUTINE 1
C
THIS SUBROUTINE ASSIGNS NUMBERS
C
TO PT1 AND PT2. IT THEN RETURNS
C
CONTROL TO THE MAIN PROGRAM.
C
PT1 = 10
PT2 = 20
RETURN

2000
2001
2002
2003
2004
2005
2006
2010
2020
2030

C
--SUBROUTINE 2
C
THIS SUBROUTINE PASSES THE VALUE OF
C
PT1 AND PT2 TO THEIR RESPECTIVE $ARG
C
POINTS. IT THEN ADDS ONE TO BOTH $ARG
C
POINTS AND RETURNS THE NEW VALUES TO
C
PT1 AND PT2.
C
$ARG1 = $ARG1 + 1
$ARG2 = $ARG2 + 1
RETURN

3000
3002
3004

C WHEN THE SUBROUTINE IS FINISHED


C EXECUTING, THE PROGRAM RETURNS TO
C MAINLINE CODE.

This example demonstrates a method for preserving the values of


$ARGn variables as program control is transferred among
subroutines. The example program contains a main line section of
program code and three subroutines. Refer to Figure 3-2 as you
follow the program flow sequence.
The program flow through one complete pass is as follows:
1. At line 1500, the GOSUB command transfers control to line 2030
and passes the value defined in PT1 to $ARG1 in the
subroutine.
2. While executing the first subroutine, the program encounters a
call to a second subroutine at line 2500.

Since the GOSUB command at line 2500 is defined within


another subroutine, this command must redefine $ARG1 in
order to preserve the value from the GOSUB command at
line 1500.

If $ARG1 is not redefined in the call to the second


subroutine, any value introduced in the second subroutine
replaces the value in $ARG1.

The new value introduced in the second subroutine (PT2 in


the example) is defined after the $ARG1 variable.

As the program works with the variables $ARG1 and PT2 in


the second subroutine, $ARG1 continues to represent the
value of PT1, while $ARG2 represents the value of PT2.

3. At line 3200, the second subroutine calls a third subroutine.

Figure 3-1. Example Program with Two Subroutines.

Siemens Building Technologies, Inc.

3-53

3-54

Sine the GOSUB command at line 3200 is defined within two


other subroutines, this command must redefine both $ARG1
and $ARG2 in order to preserve their values.

Note that $ARG1 and $ARG2 are placed in the same order
in which they were originally defined.

Line 3200 also defines a new point called PT3. Note that
PT3 is placed after the two $ARGn variables.
Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual

As the program branches from the second subroutine to the


third subroutine, $ARG1 and $ARG2 continue to represent
PT1 and PT2 respectively.

1000
1010
1020
1030
1040
1050
1100
1200
1300
1350
1360
1370
1380
1500

C MAINLINE PROGRAM FOR LOGICAL FIRMWARE


C
C
THIS PROGRAM TEACHES HOW GOSUBS AND
C
$ARG POINTS WORK IN MULTIPLE
C
LEVEL SUBROUTINES.
C
...
...
...
C THIS GOSUB CALLS THE FIRST SUBROUTINE
C AND PASSES THE VALUE DEFINED IN PT1 TO
C TO $ARG1.
C
GOSUB 2030 PT1

2000
2010
2020
2030
2040
2050
2060
2070
2080
2090
2100
2500
2510

C
C SUBROUTINE #1
C
...
...
C IN ORDER TO PRESERVE THE VALUE LOCATED
C IN $ARG1, YOU MUST DEFINE $ARG1 IN THE
C SECOND SUBROUTINE'S CALLING GOSUB. THE
C PROGRAM ALSO PASSES A SECOND POINT
C VALUE NAMED PT2.
C
GOSUB 3030 $ARG1,PT2
RETURN

3000
3010
3020
3030
3040
3050
3060
3070
3080
3090

C
C SUBROUTINE #2
C
...
...
C IN ORDER TO PRESERVE THE VALUES
C LOCATED IN $ARG1 AND $ARG2, YOU MUST
C DEFINE BOTH POINTS IN THE THIRD
C SUBROUTINE'S CALLING GOSUB. THE
C PROGRAM ALSO PASSES A THIRD POINT

Siemens Building Technologies, Inc.

3100
3200
3210

C VALUE CALLED PT3.


GOSUB 4020 $ARG1,$ARG2,PT3
RETURN

4000
4010
4020
4030
4040

C SUBROUTINE #3
C
...
...
RETURN

Figure 3-2. Multiple Level Subroutines.


Notes
A GOSUB command can only reference point names or local
variables.
A GOTO command can be used inside of a subroutine only if the
command does not transfer program control out of that
subroutine.
The last line of a subroutine must be a RETURN command.
Do not transfer control out of a subroutine without using a
RETURN command.
Do not use time-based commands such as LOOP, SAMPLE,
TOD, and WAIT inside a subroutine.
Do not use an IF/THEN/ELSE command with a GOSUB
command.
See also
GOTO, RETURN

3-55

3-56

Siemens Building Technologies, Inc.

Command Syntax

GOTO (Go to line)

APOGEE PPCL Users Manual

HLIMIT (High limit)

Unitary

pre-APOGEE

APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax

GOTO line#

HLIMIT(value,pt1,...,pt15)

line#

value

New value to which the high limit is set.

This value can be a decimal, a point name, or a local


variable.

Integers are not allowed.

pt1
through
pt15

Logical names of analog points whose high limits are


changed to the new value.

The next line number to which execution is directed.

Line numbers must be entered as integers ranging


from 1 to 32767.

Use
This command is used to control program execution by branching to
a different section of the program.

Use

Example
10

IF (FANRUN.GE.1000) THEN GOTO 50

Sets a new high alarm limit for alarmable analog points.

Notes

A maximum of 15 points can be set to the same high limit with one
HLIMIT command.

A GOTO command should only transfer program control to a


sequentially higher line number.

Example

If the line number indicated in the GOTO does not exist,


execution is transferred to the next line after the line number
specified in the GOTO command.

100

IF (OATEMP.GT.70.0) THEN HLIMIT(84.0,


ROOM16)ELSE HLIMIT(78.0,ROOM16)

Notes

A GOTO command should not transfer program control to a


comment line.

Points must reside in the same device as the program.


Points used in the HLIMIT command must be defined as
alarmable.

Do not use the GOTO command to transfer control to the top of a


program. If the last program line is missed because of this, timebased commands (LOOP, WAIT, etc.) will not function properly.

See also
See also

ALARM, DISALM, ENALM, LLIMIT, NORMAL

GOSUB, RETURN

Siemens Building Technologies, Inc.

3-57

3-58

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual


PPCL HOLIDA statement and the days defined in the TOD
calendar.

HOLIDA (Holiday)
Unitary

pre-APOGEE

APOGEE

BACnet

See also
TOD, TODMOD, TODSET

Syntax
HOLIDA(month1,day1,...,month8,day8)
month1
through
month8

Month of the designated holiday. (January = 1, June = 6,


December = 12, etc.)

day1
through
day8

Day of the month for the designated holiday. The first day
of the month is entered as 1.

Use
Defines the dates of holidays up to a year in advance.
A maximum of eight holidays can be specified with a single HOLIDA
command. If more than eight holiday definitions are needed, multiple
HOLIDA commands can be used.
Example
630

HOLIDA(12,24,12,25,12,26,12,27)

Notes
The HOLIDA and TODMOD commands must precede any TOD
or TODSET commands in order for the program to operate
correctly.
A HOLIDA or TODMOD command in a device will only affect
TOD, TODSET and SSTO commands in that device.
When a holiday date occurs in a HOLIDA command, the mode
number for that day in the TODMOD command is set to 16.
If holidays are defined using both the HOLIDA command and the
TOD calendar, make sure that the holidays are defined as the
same day in both places. Otherwise, the equipment commanded
will operate in holiday mode on both the days defined in the
Siemens Building Technologies, Inc.

3-59

3-60

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual

Example 1

IF/THEN and IF/THEN/ELSE (Conditional control)

110

Unitary

pre-APOGEE

APOGEE

BACnet

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)

Syntax
Notes

IF(exp) THEN x

GOSUB commands should not be used for the x or y parameters.

or

Time-based commands such as WAIT and TODMOD should not


be directly used for the x or y parameters.

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.

Represents a condition, assignment, or course of action to


take if the expression (exp) is true.

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.

Siemens Building Technologies, Inc.

3-61

3-62

Siemens Building Technologies, Inc.

Command Syntax

INITTO (Initialize totalized value)

APOGEE PPCL Users Manual

LLIMIT (Low limit)

Unitary

pre-APOGEE

APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax

INITTO(value,pt1,...,pt15)

LLIMIT(value,pt1,...,pt15)

value

The new value which replaces the current totalized values for
all specified points.

This value can be a decimal, point name, or local


variable. Integers are not allowed.

value

New value to which the low limit is set.

This value can be a decimal, point name, or local


variable. Integers are not allowed.

pt1
through
pt15

Names of points that are defined for totalization. Points must


reside in the same device as the control program.

pt1
through
pt15

Logical names of analog points whose low limits are changed


to the new value. Points must reside in the same device as
the command.

Use
Use

Sets a new low alarm limit for alarmable analog points.

Change the totalized value of a point to a new value (generally 0).


A maximum of 15 points can be set to the same low limit with one
LLIMIT command.

A maximum of 15 point names can receive the new value through


one INITTO command.

Example
Example
10

100

IF (DAYOFM.EQ.1.0) THEN INITTO(0.0, PMP1,PMP2)

Notes

IF (OATEMP.GT.68.0) THEN LLIMIT(76.0,


ROOM16) ELSE LLIMIT(68.0,ROOM16)

Notes

Points must reside in the same device as the command.

Points must reside in the same device as the program.

The INITTO command cannot reset the value of LPACI point


types.

Points used in the LLIMIT command must be defined as


alarmable.

Only points that are defined to be totalized can be initialized by


this command.

See also
ALARM, DISALM, ENALM, HLIMIT, NORMAL

When used in APOGEE field panels (which can totalize individual


states of a point), INITTO will reset all totalized states of a digital
point to zero.

Siemens Building Technologies, Inc.

3-63

3-64

Siemens Building Technologies, Inc.

Command Syntax

LOCAL (Local variable)


Unitary

pre-APOGEE

APOGEE PPCL Users Manual

LOOP (Loop control)


APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax
LOCAL(pt1,... ,pt16)

LOOP(type,pv,cv,sp,pg,ig,dg,st,bias,lo,hi,0)

pt1
through
pt16

type

Designates the type of control action.

Valid values are 0 and 128.


0 = direct acting.
128 = reverse acting.

pv

Point name of the process variable which is being controlled


or regulated.

This parameter is usually an LAI point, but it can be


an LAO point, which represents a temperature, flow
rate, air velocity, etc.

cv

Point name of the loop output (control variable).

This parameter is usually an LAO point that


represents an actuator signal such as pressure,
current, or voltage.

This value can be entered as a local variable.

sp

Setpoint for the loop against which the process variable is


compared. The value of the setpoint should represent the
same engineering units as the process variable.

This parameter can be entered as a point name or a


decimal number.

This value can be entered as a local variable.

pg

Proportional gain determines the part of a PID control action


that is directly proportional to the error between the setpoint
(sp) and the process variable (pv).

This parameter can be entered as a point name, local


variable, integer, or decimal.

Names of virtual points created for the program.

Use
Creates virtual points for the program.
The program can reference these points as $pt1 through $pt16.
Other programs can reference these points by referencing the
program name, followed by the system delimiter (:), followed by
the local point name.
Example 1
The following is an example of commanding a local point contained
within a program:
100
200

LOCAL(FANPT)
ON($FANPT)

Example 2
The following is an example of a program using the value of a local
point in a different program (where PROG1 is the program name):
300

IF(PROG1:FANPT.EQ.ON)THEN ...

Proportional gain is calculated using the following formula:


pg =

Siemens Building Technologies, Inc.

3-65

3-66

Full range of controlled device


Throttling range to change the output
device from full open to full close.

1000

Siemens Building Technologies, Inc.

Command Syntax
ig

APOGEE PPCL Users Manual

Integral gain. The contribution of integral control action to the


total control action of the loop. Integral action minimizes offset
(the difference between the process variable and the
setpoint). Adding integral gain can increase the time required
to tune the loop.
When using integral gain, be sure to reduce the proportional
gain so that the total gain of the loop is not high enough to
cause instability and cycling. Begin with a low integral gain
and increase it slowly, if required. A recommended starting
point is 2% of the proportional gain.

This parameter can be a point name, integer,


decimal, or local variable.

If using an integral gain, use the following calculation:


ig = pg .02

If not using an integral gain, set ig to 0.

dg

Derivative gain. The time rate of response of the control


system. Derivative gain is usually applied to fast responding
systems. Adding derivative gain can increase the time
required to tune the loop.

This parameter is entered as an integer, decimal,


point name, or local variable.

When derivative gain is not used, enter a zero.

st

Sample time. How frequently (in seconds) the process


variable (pv) is sampled.

The minimum sampling time allowed is 1 second.

This parameter is entered as an integer, decimal,


point name, or local variable.

bias

Low limit of the loop output. The low limit should be set to
match the low end range of the controlled device.

This parameter is entered as a decimal, integer, point


name, or local variable.

hi

High limit of the loop output. The high limit should be set to
match the high end range of the controlled device.

This parameter is entered as a decimal, integer, point


name, or local variable.

Not used. Enter zero.

Example
2000
2002
2004
2006
2008
2010
2012
2014
2016
2018

C CONTROL LOOP STATISTICS


C DIRECT CONTROL LOOP
C INPUT = RM100 OUTPUT = HVALVE
C SETPOINT = HSETPT
C PROPORTIONAL GAIN = PGAIN-NO I OR D GAINS
C SAMPLE TIME = 1 SECOND
C BIAS = 5.5
C LOW = 3.0
C HIGH = 9.0
LOOP(0,RM100,HVALVE,HSETPT,PGAIN,0,0,1,5.5,3.0,
9.0,0)

Use
This command performs closed loop control by using any
combination of proportional, integral, and derivative control actions in
either direct or reverse acting modes.

Bias is the value (in engineering units) of the control output


(cv), in a proportional only loop, when the measured variable
(pv) equals the setpoint (sp).

This parameter entered as a decimal number, integer,


point name, or logical point.

The bias value should always be between the high


and low value.

LOOP monitors an input point (process variable), compares it with a


desired value (the setpoint), and adjusts an output (control variable)
to bring the input closer to the setpoint.
The LOOP command is the software counterpart to a pneumatic
receiver controller.
Anti-windup is automatically prevented for the integral action
once the high or low limit is reached.

Bias is calculated by adding 50% of the output control span to


the low limit. For example, you would do the following to
calculate the bias for a valve with a 3 to 8 psi spring range:

Find one-half of the spring range. (5 psi spring range


2 = 2.5)

Add that value to the low limit of the valve (3 psi).

The bias for this device is 5.5 psi.


Siemens Building Technologies, Inc.

lo

See also
ADAPTM, ADAPTS

3-67

3-68

Siemens Building Technologies, Inc.

Command Syntax

MAX (Maximum value)

APOGEE PPCL Users Manual

MIN (Minimum value)

Unitary

pre-APOGEE

APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax

MAX(result,pt1,...,pt15)

MIN(result,pt1,...,pt15)

result

Point name where the largest value is stored.

This parameter can be a virtual point name or a local


variable.

result

Point name where the lowest value is stored.

This parameter can be a virtual point name or local


variable.

pt1
through
pt15

Values which are compared.

The values can be any combination of point names,


decimals, integers, and local variables.

pt1
through
pt15

Values which are compared.

The values can be any combination of point names,


decimals, integers, and local variables.

Use

Use

This command selects the largest value from 2 to 15 point names or


numbers, (numbers must be in decimal format), and stores that
value in the result point.

This command selects the lowest value from 2 to 15 point names or


numbers (numbers must be in decimal format), and stores that value
in the result point.

Example

Example

10

10

MAX(HOTZON,ZONE1,ZONE2,ZONE3, 9.0)

See also

See also

MIN

Siemens Building Technologies, Inc.

MIN(COOLZN,ZONE1,ZONE2,ZONE3,9.0)

MAX

3-69

3-70

Siemens Building Technologies, Inc.

Command Syntax

NIGHT (Night mode)


Unitary

APOGEE PPCL Users Manual

NORMAL (Normal operating mode)

pre-APOGEE

APOGEE

BACnet

Unitary

Syntax

pre-APOGEE

APOGEE

BACnet

Syntax

NIGHT(pt1,...,pt16)

NORMAL(pt1,...,pt16)

pt1
through
pt16

pt1
through
pt16

Name of a point to be set to NIGHT mode.

This parameter must be a logical controller (LCTLR)


point type.

Name of a point to be removed from the alarm-by-command


state.

Use

Use

Removes the specified points from the alarm-by-command condition


and returns them to their normal operating mode.

Changes a LCTLR point to NIGHT mode status.


A maximum of 16 points can be changed with one NIGHT command.

A maximum of 16 points can be changed with one NORMAL


command.

Example
100

IF (TIME.LT.7:00.OR.TIME.GT.18:00) THEN
NIGHT(LCTLR2) ELSE DAY(LCTLR2)

Example
100

Notes
For some equipment controllers, NIGHT mode is also referred to as
UNOCC (unoccupied) mode. If an equipment controller is in UNOCC
mode, PPCL recognizes this status as NIGHT.

Notes
Points must reside in the same device as the program.
See also

See also

ALARM, DISALM, ENALM, HLIMIT, LLIMIT

DAY

Siemens Building Technologies, Inc.

IF (RM90T.GT.80.0) THEN ALARM(ROOM90)


ELSE NORMAL(ROOM90)

3-71

3-72

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual


See also

OFF (Off status)

AUTO, FAST, ON, SLOW

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax
OFF(pt1,...,pt16)
pt1 through
pt16

Point names that are commanded to OFF.

OFF(@prior,pt1,...,pt15)
@prior

Defines a specific point priority.

pt1 through
pt15

Point names of LDI, LDO, L2SL, L2SP, LOOAL, LOOAP,


LFSSL, or LFSSP points.

NOTE:

The OFF(@prior) command is not available in Unitary


firmware.

Use
Changes the operational status of an ON/OFF/AUTO point to OFF.
Acceptable point types are: LDI, LDO, L2SL, L2SP, LOOAL,
LOOAP, LFSSL, and LFSSP.
A maximum of 16 points can be changed with one OFF
command.
A maximum of 15 points can be defined with one OFF(@prior)
command.
Example
20

IF (OATEMP.GE.63.0) THEN OFF(@NONE,PUMP1,PUMP2)

Notes
FAST/SLOW/STOP points (LFSSL, LFSSP) use the OFF command
for STOP.

Siemens Building Technologies, Inc.

3-73

3-74

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual


Example

OIP (Operator interface program)


Unitary

pre-APOGEE

APOGEE

BACnet

100
102
104
106
108
110
112
114
116
118
120
122
124
130
150

Syntax
OIP(trigger, ''seq'')
trigger

seq

The trigger for the operator interface sequence.

This parameter can be an LDO or LDI point name or


a local variable.
This variable represents the sequence of keystrokes you
would enter if you were using a terminal.

The sequence must not exceed 80 characters


(including slashes) in length.

The sequence must be enclosed in double quotes


('' '').

For each level in the sequence that you advance, you


must enter a slash (/).

If a pause is needed in a phone number, do the


following:

For APOGEE firmware, enter a comma.

For pre-APOGEE firmware, enter a period.

C
C OIP COMMAND INFORMATION:
C OPERATOR SEQUENCE
C
C - POINT
C - DISPLAY
C - PRINTER
C - YES
C - VALUE
C - ANY
C - NAME
C - ALL NAMES
C
C TRIGGER POINT - RPT7AM
OIP(RPT7AM,"P/D/P/Y/V/A/N/*")

Example to Dial Out Using a ModemAPOGEE Firmware


100
102
110

C APOGEE OIP COMMAND INFORMATION:


C DIAL-OUT TO MODEM
OIP(TRIGGER,S/H/P/I/C/P/<field panel
#>/<partner id>)

Example to Dial Out Using a Modempre-APOGEE Firmware


100
102
110

Use
Allows most operator functions to be executed from within a PPCL
program. This command is generally used for the following functions:

C PRE-APOGEE OIP COMMAND INFORMATION:


C DIAL-OUT TO MODEM
OIP(TRIGGER,S/D/<cabinet #>/O/C/<phone # id>/)

Notes
Generating reports

OIP commands used to generate messages, displays, and


reports should be staggered in time (that is, do not use the same
trigger point for all OIP commands). This allows one command to
complete before another begins.

Changing point priorities


Sending messages
Triggering auto-dial

The OIP command will appear as FAILED if the operator


sequence was entered incorrectly and the control program
attempts to execute it.

The OIP command uses a trigger point to determine the conditions


for execution. When the trigger point is turned on, the operator
sequence is executed once. To execute the operator sequence
again, the trigger point must be turned OFF, and then turned ON
again.

Siemens Building Technologies, Inc.

3-75

On return from power failure, after an enable command has been


executed, or during the first execution of the control program after
a database load, the OIP command will not execute until the
trigger point toggles.
3-76

Siemens Building Technologies, Inc.

Command Syntax
After the OIP command has been executed, the trigger point
must be reset (commanded back to its original state) before the
OIP command can be executed again.
When using an OIP command with an LDO type subpoint, you
must command the point ON/OFF with the number 1 or 0. Using
any text other than 1 or 0 will cause the statement to fail.

APOGEE PPCL Users Manual

ON (On status)
Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

If the trigger point name begins with a number, then the point
name should be preceded by an @ sign. If a variable in the
keystroke sequence begins with a number, then the point name
should not be preceded by an @ sign.

ON(pt1,...,pt16)
pt1
through
pt16

Point names that are commanded to ON.

Correct
100

ON(@prior,pt1,...,pt15)

OIP(TRIG,"P/T/D/H///FAN/1FAN//60/")

Incorrect
100

OIP(TRIG,"P/T/D/H///FAN/@1FAN//60/")

The OIP command must be executed with every pass of the


program in order to see the trigger point change value.
The OIP command cannot be used to perform loop tuning.

@prior

Defines a specific point priority.

pt1
through
pt15

Point names of LDO, L2SL, L2SP, LOOAL, or LOOAP points.

Use

In an OIP statement, a slash / can be used to represent a


carriage return. An example of a multi-point trend display would
look like:

Changes the operational status of an ON/OFF/AUTO point to ON.


Acceptable point types are: LDO, L2SL, L2SP, LOOAL, or
LOOAP.

OIP (TRIG, "P/T/D/P/// Name1/Name2/Name3//10/")

To specify which trend instance should display, use the following


syntax for the Multi-Point Trend Report:

A maximum of 16 points can be changed with one ON command.


A maximum of 15 points can be defined with one ON(@prior)
command.

OIP (TRIG, "P/T/D/P/// Name1//Name2//Name3//10/")

Example
100

IF (OATEMP.LT.60.0)THEN ON(@NONE,
PUMP1,PUMP2)

See also
AUTO, FAST, OFF, SLOW

Siemens Building Technologies, Inc.

3-77

3-78

Siemens Building Technologies, Inc.

Command Syntax

ONPWRT (On after power return)


Unitary

APOGEE PPCL Users Manual

PDL (Peak demand limiting)

pre-APOGEE

APOGEE

BACnet

Unitary

Syntax

APOGEE

BACnet

Syntax

ONPWRT(line#)

PDL(area,totkw,target,g1s,g1e,sh1,...,g4s,g4e,sh4)

Line number at which execution begins in the control


program after returning from power failure.

Line numbers must be entered as integers ranging


from 1 to 32767.

If the line number is invalid, this command is


ignored.

line#

area

Meter area number.

Enter this number as an integer.

totkw

Total amount of power consumed by the loads that are


controlled by the PDL command.

The same virtual LAO point must be used for both


the PDL totkw parameter and the kwtot parameter in
the owning PDLDPG command. The value of this
parameter is calculated by the PDL command.

Use
This command is similar to a GOTO command and allows you to
select the first program line that is executed when power has
returned. The ONPWRT command is only executed once and is then
ignored as long as power stays ON.

A power-consuming load is controlled by a PDL command if


the following criteria are met:

The power-consuming load is defined in a PDLDAT


command that is associated with a PDL command.

The load is currently in NONE or PDL priority.

The PDL command is traced and is enabled.

The PDLDPG command is enabled.

The PDLDAT command is enabled.

Example
10

pre-APOGEE

ONPWRT(1800)

Notes
The ONPWRT command should be the first command in a PPCL
program since program execution returns to the first line of a
PPCL program after a power failure.

target

Power consumption limit that is maintained by the PDL


command.

The same virtual LAO point must be used for both


the PDL target parameter and the target parameter in
the corresponding PDLDPG command. The value of
this parameter is calculated by the PDLDPG
command.

g1s

Start line for the group 1 load definition in the corresponding


PDLDAT commands. This is the first group to shed when
demand exceeds the setpoint.

g1e

End line for the group 1 load definition.

sh1

Shedding sequence for group 1.

Valid values are 0 and 1.


0 = Fixed shedding
1 = Round robin shedding
Siemens Building Technologies, Inc.

If the database for a field panel is lost due to a power failure, the
ONPWRT command is not executed when power is restored.

Siemens Building Technologies, Inc.

3-79

3-80

Command Syntax
g4s

APOGEE PPCL Users Manual

Start line for the group 4 load definition in the corresponding


PDLDAT commands. This is the last group to shed when
demand exceeds the setpoint.

g4e

End line for the group 4 load definition.

sh4

Shedding sequence for group 4.

Valid values are 0 and 1.


0 = Fixed shedding
1 = Round robin shedding

Example
100

PDL(1,TOTKW1,TGT1,100,199,0,200,299,1,
300,399,0,400,499,0)

Notes
PDL must control 10-20% of the building demand to be effective.
When points are controlled by the PDL command, they are
placed into PDL priority. Group 1 is shed first, while Group 4 is
shed last.

Use
Maintains a defined level of kilowatt use (or target) for a group of
loads.

With APOGEE firmware, one meter can be defined in each


program.

NOTE:

With pre-APOGEE firmware, only one meter can be defined in a


field panel.

For a detailed explanation of Peak Demand Limiting


(PDL), see Chapter 2Control Option Comparisons.

The PDL statement fails if more than four shedding groups are
defined.

A single PDL command is responsible for the direct control of a


group of PDLDAT commands in a load-handling field panel. The
PDL command control includes:

Do one of the following if all four shedding groups are not used:

Maintaining a target kilowatt (kW) value by shedding and


restoring loads. The target value is passed to the PDL command
through an LAO point value from the PDLDPG command.
Monitoring the total available kilowatts under its control. The PDL
command determines which of the loads defined in the
associated PDLDAT command is available for peak demand
limiting control. The total kilowatts available to the PDL command
are placed in an LAO point.

With Firmware Revision 2.6/2.6.1 and later, no entry is


required for unused groups.
With Firmware Revision 2.5.2 and earlier, enter the integer 0
for the starting line, ending line, and shedding type for all the
unused groups.
See also
PDLDAT, PDLDPG, PDLMTR, PDLSET

Maintaining the timing as defined in the PDLDAT command for


minon, minoff, and maxoff.
Defining how each load under PDL control fits into one of four
priority groups. This is accomplished by referring to the line
numbers of the PDLDAT commands.
Defining and controlling the sequence of shedding and restoring
for each priority group.
There are two types of shedding and restoring: fixed and
round robin.
Shedding begins at 90% of the setpoint.
Siemens Building Technologies, Inc.

3-81

3-82

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual


Example

PDLDAT (PDL, define load attributes)


Unitary

pre-APOGEE

APOGEE

BACnet

100
102
104
106
108
110
112
114
116
118

Syntax
PDLDAT(ptname,minon,minoff,maxoff,kwval)
ptname

Point name of the load.

minon

Minimum time (in minutes) that the load must remain ON


after PDL has restored it.

This parameter must be less than 546 and can be


defined as a decimal, integer, point name, or a local
variable.

minoff

maxoff

kwval

C
C PDLDAT COMMAND INFORMATION:
C
C - CONTROLLED POINT - FAN17
C - MINIMUM ON TIME
- 10 MINUTES
C - MINIMUM OFF TIME - 5 MINUTES
C - MAXIMUM OFF TIME - 180 MINUTES
C - KILOWATT RATING
- 10KW
C
PDLDAT(FAN17,10,5,180,10)

Notes
In a network system, a load defined by a PDLDAT statement
must reside in the same field panel as the PDL statement.
A PDLDAT statement is referenced by only one PDL statement.
Using multiple references produces unpredictable results.

Minimum time (in minutes) that the load must remain OFF
before PDL can restore it.

This parameter must be less than 546 and can be


defined as a decimal, integer, point name, or a local
variable.

The PDLDAT statement should be in the same field panel as the


load.

Maximum time (in minutes) that PDL can keep the load off
after shedding it.

This parameter can be a decimal, integer, point


name, or a local variable.

The maximum allowable value of maxoff is


(minoff + 546).

See also
PDL, PDLDPG, PDLMTR, PDLSET

Kilowatt value for the load.

This parameter can be a decimal, integer, point


name, or a local variable.

Use
Defines the minimum on-time, minimum off-time, maximum off-time,
and kilowatt value for a specific load.
A group of PDLDAT commands in a load handling field panel are
controlled by a single PDL command that defines load parameters
and maintains a certain level of kilowatt use (or target) for a group of
loads.

Siemens Building Technologies, Inc.

3-83

3-84

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual

PDLDPG (PDL, digital point group)


Unitary

pre-APOGEE

APOGEE

BACnet

Each of these kwtot parameters must be the same


virtual LAO point that is specified as the kwtot
parameter for the corresponding PDL and PDLDPG
statements. The value of the parameter is assigned
by the PDL statement in which it is defined.

Use
Syntax

Keeps track of how many kilowatts worth of load are available in


each load-handling field panel and how many kilowatts are to be
shed or restored at any time in each field panel.

PDLDPG(area,kwtot1,target1,...,kwtot7,target7)
area

kwtot1
through
kwtot7

Meter area designation.

In order for the program to operate correctly, the


same numeric value must be used for the meter area
parameter in the PDLDPG, PDLMTR, and PDLSET
statements.

The PDLDPG statement proportionally distributes the target value to


each PDL statement according to the values of kwtot1 through
kwtot7.

Total amount of power consumed by the loads that are


controlled by the PDL command.

The same virtual LAO point must be used for both


the PDL totkw parameter and the kwtot parameter in
the owning PDLDPG command. The value of this
parameter is calculated by the PDL command.

Example
100

PDLDPG(1,TOTKW1,TGT1,TOTKW2,TGT2)

See also

A power-consuming load is controlled by a PDL command if


the following criteria are met:

The power-consuming load is defined in a PDLDAT


command that is associated with a PDL command.

The load is currently in NONE or PDL priority.

The PDL command is traced and is enabled.

The PDLDPG command is enabled.

The PDLDAT command is enabled.


target1
through
target7

Sets the target value for each PDL command associated with a
meter area.

PDL, PDLDAT, PDLMTR, PDLSET

Power consumption target value. One target parameter must


be specified for the corresponding PDL command in the loadhandling field panels.

The same virtual LAO point must be used for both


the PDL target parameter and the target parameter in
the corresponding PDLDPG command. The value of
this parameter is calculated by the PDLDPG
command.
One kwtot parameter must be specified for each PDL
statement that is a number of this meter area. The sum of the
value of all kwtot parameters is used by the PDLDPG
command to calculate the power consumption target value for
each PDL command.

Siemens Building Technologies, Inc.

3-85

3-86

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual


warning

Determines if warning messages are issued as predicted


demand nears or exceeds the setpoint.

Valid values are 0 and 1.


0 = Warning messages disabled
1 = Warning messages enabled

mt1
through
mt5

Logical point names for demand consumption meters.

This parameter can be an LPACI or analog point.

When an LPACI points is used, the engineering


units are kWH.

When an analog point is used, the engineering


units are kW.

def1
through
def5

The default values are used instead of the meter values (mt1
through mt5) when communication is lost or the meters
cannot be read.

This parameter can be a decimal, integer, point


name, or local variable.

For historical (latest, best) reading, enter -1


(default value), or enter a constant or a fixed
default value.

Default values are expressed in kilowatts


(demand) for both analog and pulse inputs.

PDLMTR (PDL, meter monitor)


Unitary

pre-APOGEE

APOGEE

BACnet

Syntax
PDLMTR(area,hist,calc,window,plot,warning,mt1, def1,...,mt5,def5)
area

hist

calc

window

plot

Meter area.

In order for the program to operate correctly, the


same numeric value must be used for the meter area
parameter in the PDLDPG, PDLMTR, and PDLSET
statements.

This parameter can be an integer (1 to 32,767), a


point name, or a local variable.
Historical forecast weighting factor (in percent) for the sliding
window predictions.

This parameter can be a decimal or integer.

The weighting factor should be less than 50% to


anticipate demand.

The recommended value is 30%.

Use
The PDLMTR command is responsible for the following actions:

Interval (in minutes) for how often demand predictions are


calculated.

This parameter is usually a decimal or integer, but


can be a point name or a local variable.

The minimum time allowed is one minute.

Defining meters by point name.


Monitoring meters.
Making demand predictions that are used by the PDLDPG
command.

Predictions on the width of the sliding window interval (in


minutes).

This parameter is usually a decimal or integer, but


can be a point name or a local variable.

Up to 30 samples can be stored per window.

Updating report information pertaining to demand and


consumption.
Deciding when warning messages should be issued.

Maximum value for the Time versus Demand plot section of


the PDL Activity Report.

This parameter can be a decimal, integer, point


name, or a local variable.

This value should be greater than the highest


setpoint used in PDLSET.

Siemens Building Technologies, Inc.

Initializing a meter area.


Defining default meter values.

3-87

3-88

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual

Example
200
202
204
206
208
210
212
214
216
218
220
222
224
226
228
230
250

PDLSET (PDL, setpoints)

C
C PDLMTR COMMAND INFORMATION:
C
C - HISTORICAL WEIGHTING FACTOR - 30%
C - CALCULATION INTERVAL - 1 MINUTE
C - PREDICTION WINDOW - 15 MINUTES
C - THE TIME VERSUS DEMAND SECTION OF
C
THE ACTIVITY REPORT PLOT HAS A
C
FULL SCALE OF 500 KILOWATTS.
C - WARNING MESSAGES ARE ENABLED TO
C
BE SENT TO ALARM DEVICES.
C - THE DEFAULT VALUES OF THE TWO
C
METER POINTS (METER1 AND
C
METER2) ARE 100 KILOWATTS AND
C
50 KILOWATTS RESPECTIVELY.
C
PDLMTR(1,30,1,15,500,1,METER1,100,
METER2,50)

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax
PDLSET(area,exceed,set1,time1,...,set7,time7)

Notes
Only one PDLMTR command can be defined per meter area.
For APOGEE field panels, one PDLMTR command can be
defined per program.
With pre-APOGEE firmware, one meter area can be defined in a
field panel.
If a LPACI point is used in a PDLMTR statement, then PDL
should be restarted for that meter area after the LPACI is reset.

area

Meter area.

In order for the program to operate correctly, the


same numeric value must be used for the meter area
parameter in the PDLDPG, PDLMTR, and PDLSET
statements.

This parameter is an integer.

exceed

DO point which is turned ON if the actual floating window


peak exceeded the setpoint at any time during the preceding
interval. This point is reset to OFF at the end of each setpoint
interval.

set1
through
set7

Demand setpoint (in kilowatts) that is not to be exceeded.

This parameter can be a decimal, integer, point


name, or a local variable.

time1
through
time7

The time at which the corresponding setpoint ends.

This parameter is usually entered as a clock time in


military format (7:30 p.m. = 19:30). It can also be
entered as a decimal, integer, or a local variable.

Times must be in ascending order.

Use
The PDLSET command designates the peak demand limiting (PDL)
levels and ensures that the PDL levels for a meter area are not
exceeded during the time those setpoints are in effect.

See also
PDL, PDLDAT, PDLDPG, PDLSET

Demand predictions made by the PDLMTR command are compared


with the appropriate setpoints defined by the PDLSET command.
The PDLSET command then determines the number of kilowatts (if
any) that must be shed or restored for the meter area.

Siemens Building Technologies, Inc.

3-89

3-90

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual

Example
100
101
102
103
104
105
106
107
108
109
110
111
120

RELEAS (Release)

C
C PDLSET COMMAND INFORMATION:
C
C - THIS COMMAND CONTROLS METER AREA 1.
C - THE VIRTUAL LDO POINT WHICH WILL
C
TOGGLE ON AND OFF AT THE END OF
C
THE SET POINT INTERVALS WHEN THE
C
SET POINT WAS EXCEEDED IS
C
CALLED PEAKEX.
C - PDLST1 SET POINT ENDS AT 11:00 A.M.
C - PDLST2 SET POINT ENDS AT 4:30 P.M.
C
PDLSET(1,PEAKEX,PDLST1,11:00,PDLST2,16:30)

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax
RELEAS(pt1,...,pt16)
pt1
through
pt16

Notes

Point name to be released to NONE priority.

This parameter can be a LFSSL or LFSSP point.

This command only works for points in EMER or PDL


priority. To release points in OPER or SMOKE
priority, the RELEAS(@prior) command must be
used.

RELEAS(@prior, pt1,...,pt15)

The PDLSET command requires at least two setpoint/time definitions


for each day in order to generate reports.
See also
PDL, PDLDAT, PDLDPG, PDLMTR

@prior

Defines a specific point priority that the point is being


released from.

pt1
through
pt15

Point name to be released to NONE priority.

Use
Changes the operational status of a point to NONE priority.
A maximum of 16 points can be changed with one RELEAS
command.
A maximum of 15 points can be defined with one
RELEAS(@prior) command.
An LAO or LDO point that is used in a RELEAS statement can
generate multiple entries in the Trend Data Report if a command
statement such as SET, =, ON, or OFF is used on the same point at
the same time.
Example 1
110

IF(TEMP.NE.ALARM.AND.PT2.NE.@NONE)THEN
RELEAS(@EMER, PT2)

In this example, PT2 will only be released if its priority is not equal to
NONE and TEMP is not in alarm.
Siemens Building Technologies, Inc.

3-91

3-92

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual

Example 2
120

RETURN (Return/end subroutine)

RELEAS(@SMOKE, PT1, PT2, PT3)

In this example, all three points will be released to NONE priority if


they currently have a priority of SMOKE, EMER, or PDL. If any point
is in OPER priority, it will not be released.

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Notes
With APOGEE and pre-APOGEE firmware, always use a priority
at least as high as the one that the point will be in to ensure
proper release. If the point has been commanded from the
keyboard, it will require an @OPER entry to release the priority of
the point to NONE.

RETURN
Use
Marks the end of a subroutine.
RETURN must be the last command of any GOSUB subroutine.
When a RETURN command is encountered, the program returns to
the line following the GOSUB command

With BACnet firmware, the RELEAS(@prior, pt1,,pt15)


command releases the BACnet slot which is mapped to the
stated APOGEE priority, but it may not release all the way to
NONE priority. The BACnet Command Priority levels must be
emptied to allow lower priority levels to control the point.

Example
100 GOSUB 310
110 ...
120 ...
130 ...
290 ...GO TO 350

The standard BACnet Priority Array rules control the @prior


release process as follows:
If a value exists in a higher priority slot than the slot mapped
to @prior, the value is not released.

300 C THIS SUBROUTINE PERFORMS...


310 ...
320 ...
330 ...
340 RETURN
350 CONTINUE WITH REST OF PROGRAM

If the slot mapped to @prior is the highest slot, the value is


released. The new value is determined by the presence, in
order from higher to lower priority levels, of values in the
slots below.
If no values exist in the lower priority slots, the relinquished
default value is used.

See also
GOSUB, GOTO

Siemens Building Technologies, Inc.

3-93

3-94

Siemens Building Technologies, Inc.

Command Syntax

SAMPLE (Sample a statement)

APOGEE PPCL Users Manual

SET (Set point value)

Unitary

pre-APOGEE

APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax

SAMPLE(sec) line

SET(value,pt1,...,pt15)

sec

Interval in seconds between evaluations of state.

This value must be entered as an integer ranging


from 1 to 32,767.

value

Value to which points are commanded.

This value can be a decimal, a logical point, or a local


variable. Integers are not allowed.

line

Any PPCL statement that does not include its own timing
function. This includes: WAIT, PDL, TOD, TIMAVG, LOOP,
SSTO, or another SAMPLE command.

pt1
through
pt15

Point names of logical points.

Use

SET(@prior, value, pt1,...,pt14)

Defines how often a command is evaluated. The SAMPLE command


can be helpful in situations, such as preventing short cycling in
ON/OFF decisions or reducing COVs from noisy flow transmitters.

@prior

Defines a specific point priority.

value

Value to which points are commanded. This value can be a


decimal, a logical point, or a local variable. Integers are
allowed in APOGEE firmware.

pt1
through
pt14

Point names of LAO or LDO, L2SL, L2SP, LOOAL, LOOAP,


LFSSL, LFSSP, and LPACI point types.

Example
200

SAMPLE(600) ON(HALFAN)

Notes
The SAMPLE command executes immediately on a return from
power failure, after an ENABLE command, or during the first
execution of PPCL following a database load.

NOTE:

Valid commands can include assignment, calculations, and program


control (GOTO, GOSUB).

The SET(@prior) command is not available in Unitary


firmware.

Use
Changes output points to a new value.
Acceptable point types are: LAO or LDO, L2SL, L2SP, LOOAL,
LOOAP, LFSSL, LFSSP, and LPACI.
A maximum of 15 points can be changed with one SET
command.
A maximum of 14 points can be changed with one
SET(@ prior) command.

Siemens Building Technologies, Inc.

3-95

3-96

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual

Example 1
450

SLOW (Slow status)

SET(75.0,RMSET1,RMSET2,RMSET3)

Unitary

Example 2
550

pre-APOGEE

APOGEE

BACnet

SET(@EMER,75.0,RMSET1,RMSET2,RMSET3)

Notes

Syntax

Do not use resident points in either the SET or the TABLE


command. With both the SET and TABLE commands, the following
should be used for resident points:

SLOW(pt1,...,pt16)
pt1
through
pt16

Virtual point = Resident point

Point names of LFSSL or LFSSP points that are commanded


to SLOW.

SLOW(@prior, pt1,...,pt15)
@prior

Defines a specific point priority.

pt1
through
pt15

Point names of LFSSL or LFSSP point types.

Use
Changes the operational status of a FAST/SLOW/STOP point to
SLOW.
Acceptable point types are: LFSSL or LFSSP.
A maximum of 16 points can be changed with one SLOW
command.
A maximum of 15 points can be defined with one
SLOW(@prior) command.
Example
20

IF (RMTEMP.LT.75.0)THEN SLOW(@NONE, FAN1,FAN2)

See also
AUTO, FAST, OFF, ON

Siemens Building Technologies, Inc.

3-97

3-98

Siemens Building Technologies, Inc.

Command Syntax

SSTO (Start/stop time optimization)


Unitary

pre-APOGEE

APOGEE

BACnet

APOGEE PPCL Users Manual

esp

Earliest stop time.

This parameter can be a military time (7:30 p.m. =


19:30), a decimal time (7:30 p.m. = 19.50), a logical
point name, or a local variable.

lsp

Latest stop time.

This parameter can be a military time (7:30 p.m. =


19:30), a decimal time (7:30 p.m. = 19.50), a logical
point name, or a local variable.

osp

Occupancy stop time.

This parameter can be a military time (7:30 p.m. =


19:30), a decimal time (7:30 p.m. = 19.50), a logical
point name, or a local variable.

ast

Total adjustment to the calculated start time. This value is


changed from day-to-day.

A decimal value or virtual LAO point type can be


defined to store the adjustment value.

asp

Total adjustment to the calculated stop time. This value is


changed from day to day.

A decimal value or virtual LAO point type can be


defined to store the adjustment value.

Syntax
SSTO(zone,mode,cst,csp,est,lst,ost,esp,lsp,osp,ast,asp)
NOTE:

Valid mode values are described in the table following the


parameter descriptions.

zone

SSTO zone number.

Valid values are 1 to 5.

mode

Mode number.

Valid entries are any combination of 1, 2, 4, 8, or 16


as defined in the following table.

Mode numbers can be added together to create


customized schedules for the TOD program. See the
TODMOD command for more information.
Calculated start time.

This parameter is a virtual LAO point name.

If SSTO is disabled (season = 0 in the SSTOCO


command), then cst is assigned to the latest start
time.

cst

csp

Calculated stop time.

This parameter is a virtual LAO point name.

If SSTO is disabled (season = 0 in the SSTOCO


command), then csp is assigned the latest stop time.

est

Earliest start time.

This parameter can be a military time (7:30 p.m. =


19:30), a decimal time (7:30 p.m. = 19.50), a logical
point name, or a local variable.

lst

ost

Mode
1
2
4
8
16*

Schedule
Normal schedule
Extended schedule
Shortened schedule
Weekend schedule
Holiday schedule

*Mode number 16 (Holiday) should only be used with the HOLIDA command.

Use
The SSTO command calculates the optimal start and stop times for
each zone based on information derived from the SSTOCO
command (outside air temperature, zone temperature, desired zone
temperature, etc.) as well as parameters for earliest, latest, and
occupancy start times provided in the SSTO command.

Latest start time.

This parameter can be a military time (7:30 p.m. =


19:30), a decimal time (7:30 p.m. = 19.50), a logical
point name, or a local variable.
Occupancy start time.

This parameter can be a military time (7:30 p.m. =


19:30), a decimal time (7:30 p.m. = 19.50), a logical
point name, or a local variable.

Siemens Building Technologies, Inc.

Valid SSTO Mode Values.

This command has the ability to tune itself by incrementing or


decrementing the start time after calculating an adjust time (ast)
3-99

3-100

Siemens Building Technologies, Inc.

Command Syntax
when errors between actual temperatures and desired temperatures
occur.

APOGEE PPCL Users Manual

SSTOCO (SSTO coefficients)


Unitary

Example
60

SSTO(1,1,ONTIM,OFTIM,6:30,7:45,8:00,15:30,
16:45,17:00,0.0,0.0)

APOGEE

BACnet

Syntax

Notes
The SSTO command only calculates the optimal start and stop
times. TOD and TODSET commands are needed to command
the point.
When ast or asp is defined as zero, the current adjustment value
is displayed each time the command is displayed. If a virtual LAO
point name is entered, the operator can specify (command) an
initial value for ast or asp.

SSTOCO(zone,season,intemp,outemp,ctemp,ccoef1,ccoef2,
ccoef3,ccoef4,htemp,hcoef1,hcoef2,hcoef3,hcoef4)
NOTE:

SSTO zone number.

Valid values are 1 to 5.

season

Current season. Point name whose value represents the


coefficients to be used.

Heat = 2

Cool = 1

Disable SSTO = 0

intemp

Point name or average of indoor zone temperature sensor.

outemp

Point name or average of outdoor air temperature sensor.

ctemp

Desired zone temperature for cooling season.

This parameter can be a floating point (decimal)


number, an integer, a point name, or a local variable.

ccoef1

Cooling coefficient. The time, in hours, required to lower the


zone temperature one degree while ignoring external load
factors.

This value must be entered in fractions of an hour.

ccoef2

Cooling retention coefficient. The time, in hours, required to


raise the zone temperature one degree with the cooling
equipment off, outside air dampers open, and the outside
temperature 10 degrees higher than the desired zone
temperature for the cooling season.

This value must be entered in fractions of an hour.

SSTOCO, TOD, TODSET

3-101

For variables used in this command, you can use


numbers, point names, or local variables.

zone

See also

Siemens Building Technologies, Inc.

pre-APOGEE

3-102

Siemens Building Technologies, Inc.

Command Syntax
ccoef3

Cooling transfer coefficient. The time, in hours, required to


lower the zone temperature one degree with outside air
dampers closed and the outside temperature 10 degrees
higher than the desired zone temperature for the cooling
season.

This value must be entered in fractions of an hour.

APOGEE PPCL Users Manual


Example
100

SSTOCO(1,1,ROOM10,OATEMP,75.0, 0.01,0.3,
0.05,0.083,72.0,0.1,0.1,0.2,0.083)

See also

ccoef4

Cooling auto-tune coefficient. The time, in hours, added to or


subtracted from the adjusted time (ast or asp) in the SSTO
command as part of the self-tuning feature.

This value must be entered in fractions of an hour.

htemp

Desired zone temperature for heating season.

This parameter can be a floating point (decimal)


number, an integer, a point name, or a local variable.

hcoef1

Heating coefficient. The time, in hours, required to raise the


zone temperature one degree while ignoring external load
factors.

This value must be entered in fractions of an hour.

hcoef2

Heating retention coefficient. The time, in hours, required to


lower the zone temperature one degree with the heating
equipment off, outside air dampers open, and the outside
temperature 25 degrees lower than the desired zone
temperature for the heating season.

This value must be entered in fractions of an hour.

hcoef3

Heating transfer coefficient. The time, in hours, required to


raise the zone temperature one degree with outside air
dampers closed and the outside temperature 25 degrees
lower than the desired zone temperature for the heating
season.

This value must be entered in fractions of an hour.

hcoef4

Heating auto-tune coefficient. The time, in hours, added to or


subtracted from the adjusted time (ast or asp) in the SSTO
command as part of the self-tuning feature.

This value must be entered in fractions of an hour.

SSTO, TOD, TODMOD

Use
This command defines the thermal characteristics of a zone based
on the season, indoor temperature, outdoor temperature, and a
variety of heating and/or cooling coefficients that are necessary to
calculate optimal start and stop times.
Siemens Building Technologies, Inc.

3-103

3-104

Siemens Building Technologies, Inc.

Command Syntax

STATE (State text command)


Unitary

pre-APOGEE

APOGEE PPCL Users Manual

TABLE (Table of coordinates)


APOGEE

BACnet

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Syntax
STATE(statetext,pt1...pt15)

TABLE(input,output,x1,y1,...,x7,y7)

pt1
through
pt15

input

Point name of the input (x) variable.

This parameter can be a local variable or virtual LAI


point type.

output

Point name of the output (y) variable.

This parameter can be a local variable or virtual LAO


point type.

x1,y1
through
x7,y7

Pairs of coordinates that define the x-y relationship. y1 is the


value of the output when the input equals x1; y2 is the value
of the output when the input is x2, etc.

The coordinates can be integers or decimals.

Points that are commanded to a particular state.

STATE(@pri,statetext,pt1...pt14)
@pri

Defines a specific point priority.

statetext

State text that can be found in the associated state text table.

pt1
through
pt14

Points that are commanded to a particular state.

Use
Use

This command allows you to define a general function of two


variables by specifying pairs of coordinates (x,y).

Commands points using a state text value.


A maximum of 15 points can be changed with one STATE
command.

The TABLE command makes a straight line interpolation for the


output (y) when the input is between a pair of x values.

A maximum of 14 points can be changed with one


STATE(@pri,statetext,) command.

The x points must be entered in ascending order (that is x3 must


be larger than x2, etc.).
For inputs lower than x1, the output will always equal y1.

Example
500

For inputs larger than the last x used, the output will equal the
last y value entered.

STATE(NIGHT,TEC1,TEC2,TEC3,TEC4)

Siemens Building Technologies, Inc.

3-105

3-106

Siemens Building Technologies, Inc.

Command Syntax

Example
500
502
504
506
508
510
512
514
520

APOGEE PPCL Users Manual

TIMAVG (Average over time)

C
C TABLE COMMAND INFORMATION:
C
C OATEMP (X)
HWSP (Y)
C ------------------C
0 DEG F
180 DEG F
C 60 DEG F
100 DEG F
C
TABLE(OATEMP,HWSP,0,180,60,100)

Unitary

pre-APOGEE

APOGEE

BACnet

Syntax
TIMAVG(result,st,samples,input)
result

A point name used to store the result of the average value.

This parameter can be a point name or a local


variable.

st

Sample time. This is the time, in seconds, between each


sample.

This parameter can be an integer, a point name, or a


local variable.

TABLE statements can be cascaded by overlapping x-y pairs using


virtual points.

samples

Number of samples to be used to calculate the average.

This must be an integer between 1 and 10.

Do not use resident points in either the SET or the TABLE


command. With both the SET and TABLE commands, the following
should be used for resident points:

input

Point name whose average value is to be calculated.

This parameter can be an LAI or LAO point or a local


variable.

The hot water setpoint will remain at 180F when the outside
temperature is below 0F. The hot water setpoint will remain at 100
F when the outside temperature is above 60F.
Notes

Use

Virtual point = Resident point

This command is used to find an average value over time. You


decide how often the values should be taken (sample time) and the
number of values to be taken.
The average is always over the most recent sample count and all
previous values are discarded.
Example
In the following statement, RMAVG would change every 600
seconds (assuming RMTEMP is changing frequently). The average
value (RMAVG) will also be updated every sample time.

Siemens Building Technologies, Inc.

3-107

3-108

Siemens Building Technologies, Inc.

Command Syntax
10
20
30
40
50
60

C SIX SAMPLES WILL BE TAKEN TO


C CALCULATE THE RMAVG.
C THE INTERVAL BETWEEN EACH SAMPLE
C WILL BE 10 MINUTES. RMTEMP WILL
C BE AVERAGED EVERY 60 MINUTES.
TIMAVG(RMAVG,600,6,RMTEMP)

APOGEE PPCL Users Manual

TOD (Time of day, digital points)


Unitary

pre-APOGEE

APOGEE

BACnet

Syntax

Notes
On a return from power failure, after an ENABLE command, or
during the first execution of PPCL following a database load, the
TIMAVG command begins executing with one sample. The value of
the result will equal the current value of input.

TOD(mode,recomd,time1,time2,pt1,...,pt12)
NOTE:
mode

recomd

Valid mode values are described in the table following the


parameter descriptions.
Mode number.

Valid values are any combination of 1, 2, 4, 8, or 16.

Mode numbers can be added together to create


customized schedules for the TOD program.

Mode number 16 should only be used with the


HOLIDA command.
Determines if the points defined will be commanded after a
return from a power failure (fail-safe position). Recomd (recommand) is sometimes necessary for field panel
warmstarts.

Valid values are 0 and 1.


0 = Does not re-command pt1 through pt12 on return
from power failure.
1 = Re-commands pt1 through pt12 on return from
power failure.

Siemens Building Technologies, Inc.

3-109

time1

Time at which an ON command is executed.

This parameter can be a military time (7:30 p.m. =


19:30), a decimal time (7:30 p.m. = 19.50), a logical
point name, or a local variable.

time2

Time at which an OFF command is executed.

This parameter can be a military time (7:30 p.m. =


19:30), a decimal time (7:30 p.m. = 19.50), a logical
point name, or a local variable.

pt1
through
pt12

Point names of digital output points that are commanded ON


or OFF.

3-110

Siemens Building Technologies, Inc.

Command Syntax

Valid TOD Mode Values.


Mode
1
2
4
8
16*

TODMOD (TOD modes)

Schedule

Unitary

Normal schedule
Extended schedule
Shortened schedule
Weekend schedule
Holiday schedule

pre-APOGEE

APOGEE

BACnet

Syntax
TODMOD(momode,tumode,wemode,thmode,frmode,samode,
sumode)

*Mode number 16 (Holiday) should only be used with the HOLIDA command.

Use

NOTE:

This command changes digital output point ON and OFF based on


the day of the week and the time of day. If the mode number in the
TOD command matches the mode number in the TODMOD
command, then TOD commands the particular output points ON and
OFF at the specified times.
Example
10

APOGEE PPCL Users Manual

TOD(1,1,17:00,07:00,OLITE1,OLITE2)

The command time can also be a relative time point that is assigned
a value of time. When you calculate a value of time to be used in a
TOD command and assign it to the relative time point, make sure
that the calculated time is greater later than or equal to the current
time. The TOD command will not execute properly if the relative time
point is commanded to a time that precedes or is equal to the current
time.

Valid mode values are described in the table following the


parameter descriptions.

momode

Mode number for Monday.

Valid values are 1, 2, 4, or 8.

tumode

Mode number for Tuesday.

Valid values are 1, 2, 4, or 8.

wemode

Mode number for Wednesday.

Valid values are 1, 2, 4, or 8.

thmode

Mode number for Thursday.

Valid values are 1, 2, 4, or 8.

frmode

Mode number for Friday.

Valid values are 1, 2, 4, or 8.

samode

Mode number for Saturday.

Valid values are 1, 2, 4, or 8.

sumode

Mode number for Sunday.

Valid values are 1, 2, 4, or 8.

See also
HOLIDAY, SSTO, TODMOD, TODSET

Valid TODMOD Mode Values.


Mode
1
2
4
8
16*

Schedule
Normal schedule
Extended schedule
Shortened schedule
Weekend schedule
Holiday schedule

*Mode number 16 (Holiday) should only be used with the HOLIDA command.

Siemens Building Technologies, Inc.

3-111

3-112

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual

Use
This command defines specific modes (normal, weekend, etc.) for
each day of the week. Days that have the same schedule are
assigned the same mode.
The mode assigned to a specific day of the week is used in
conjunction with the TOD and TODSET commands to command
points on that day.
Example
110

TODSET (Time of day, analog points)


Unitary

In this example, Monday through Thursday are assigned to a normal


schedule, Friday is assigned to an extended schedule, Saturday is
assigned to the shortened schedule, and Sunday is assigned to the
weekend schedule.

Valid mode values are described in the table following the


parameter descriptions.

recomd

Determines if the points defined will be commanded after a


return from a power failure (fail-safe position). Recomd (recommand) is sometimes necessary for field panel
warmstarts.

Valid values are 0 and 1.


0 = Does not re-command pt1 through pt10 on return
from power failure.
1 = Re-commands pt1 through pt10 on return from
power failure.

See also

3-113

Mode number.

Valid values are 1, 2, 4, 8, or 16.

Mode numbers can be added together to create


customized schedules for the TOD program.

Mode number 16 should only be used with the


HOLIDA command.

When a holiday date occurs in a HOLIDA command, the system


sets the TODMOD mode number for that day to 16.

Siemens Building Technologies, Inc.

mode

A HOLIDA or TODMOD command in a field panel will only affect


TOD and TODSET commands in that field panel.

HOLIDA, SSTO, TOD, TODSET

BACnet

TODSET(mode,recomd,time1,val1,time2,val2,pt1,..., pt10)

Notes
The HOLIDA and TODMOD commands must precede any TOD
or TODSET commands in order for the program to operate
correctly.

APOGEE

Syntax

NOTE:

TODMOD(1,1,1,1,2,4,8)

pre-APOGEE

time1

Time at which the output points (pt1 through pt10) are


commanded to val1.

This parameter can be a military time (7:30 p.m. =


19:30), a decimal time (7:30 p.m. = 19.50), a logical
point name, or a local variable.

val1

Analog value which the output points (pt1 through pt10)


assume at time1.

This parameter can be a military time (7:30 p.m. =


19:30), a decimal time (7:30 p.m. = 19.50), a logical
point name, or a local variable.

3-114

Siemens Building Technologies, Inc.

Command Syntax
time2

val2

pt1
through
pt10

Time at which the output points (pt1 through pt10) are


commanded to val2.

This parameter can be a military time (7:30 p.m. =


19:30), a decimal time (7:30 p.m. = 19.50), a logical
point name, or a local variable.

WAIT (Wait time)

Analog value which the output points (pt1 through pt10)


assume at time2.

This parameter can be a military time (7:30 p.m. =


19:30), a decimal time (7:30 p.m. = 19.50), a logical
point name, or a local variable.

Syntax

1
2
4
8
16*

Unitary

pre-APOGEE

APOGEE

BACnet

WAIT(time,pt1,pt2,mode)
NOTE:

Names of analog output points that are commanded to a


value.

Valid TODSET Mode Values.


Mode

APOGEE PPCL Users Manual

time

Time delay in seconds.

This parameter can be entered an integer (1 to 32,767),


a point name, or a local variable.

pt1

Point name of a digital trigger point.

This parameter can be a LDI, LDO, L2SL, L2SP,


LOOAL, or LOOAP point.

Local variables can also be used.

pt2

Point name of digital point to be commanded.

This parameter can be an LDI, LDO, L2SL, L2SP,


LOOAL, or LOOAP point.

Local variables can also be used.

mode

Defines the value to which pt2 should be commanded based on


the value of pt1.

Valid values are 11, 10, 01, and 00.

Schedule
Normal schedule
Extended schedule
Shortened schedule
Weekend schedule
Holiday schedule

Valid mode values are described in the table following the


parameter descriptions.

*Mode number 16 (Holiday) should only be used with the HOLIDA command.

Use
This command is the counterpart of the TOD command for analog
points. It commands analog output points based on the day of the
week and the time of day.

Valid WAIT Modes.


Trigger Point
(pt1) Action

After Wait (time)


Seconds

11

Turns ON

pt2 turns ON

Example

10

Turns ON

pt2 turns OFF

550

01

Turns OFF

pt2 turns ON

00

Turns OFF

pt2 turns OFF

If the mode number in the TODSET command matches the mode


number in the TODMOD command, then TODSET will command the
particular output points to val1 and val2 at the specified times.

Mode

TODSET(1,1,9:00,72.0,17:00,55.0, SPTEMP)

See also
HOLIDAY, TOD, TODMOD

Siemens Building Technologies, Inc.

3-115

3-116

Siemens Building Technologies, Inc.

Command Syntax

APOGEE PPCL Users Manual

Use
The WAIT command turns a point ON or OFF based on the trigger
point switching ON or OFF. Selection of trigger/result action is based
on the mode you enter.
Example
70
72
74
75
76

C WHEN CNPUMP IS TURNED ON,


C THE FIELD PANEL WAITS 60 SECONDS
C BEFORE TURNING CHPUMP ON.
WAIT(60,CNPUMP,CHPUMP,11)
ON(CNPUMP)

Notes
The position of the WAIT statement in a program affects its
operation. The WAIT statement only works if it sees a change of
value (COV) through both states for the trigger point.
On a return from power failure or when the WAIT command is
enabled, the trigger point must be toggled before the command
executes regardless of the current state of either pt1 or pt2.
The command to pt2 is only issued once during the normal
operation of the program until triggered again.

Siemens Building Technologies, Inc.

3-117

3-118

Siemens Building Technologies, Inc.

APOGEE PPCL Users Manual

command

Glossary

Instruction evaluated by the computer.

The glossary contains programming terminology you will encounter


in this manual.

APOGEE firmware
Firmware used in APOGEE field panels; Firmware Revision 2.x and
later.

argument

comment line
Information that is written into the program but is not interpreted as a
program command. The compiler skips over the comment line during
compilation. Comment lines allow you to enter text information
describing the functionality of a specific section of code. Comment
lines are especially helpful for describing subroutines and areas of
program code that are difficult to understand.

condition

Type of variable whose value is not a direct function of another


variable. Arguments can represent the location of a number in a
mathematical operation, or the number with which a function works
to produce its result.

Result of a comparison between two values.

debugging
Process by which the logic of the program is tested for errors. A
program is said to have bugs when it fails to function properly.

arithmetic function
Function that performs mathematical calculations on a value
(number). When used in PPCL, the value derived from the
calculation is usually assigned to a point name for future reference.

device
In PPCL, a device represents any field panel or equipment controller
that can execute PPCL statements.

arithmetic operator
Mathematically related functions that are performed on two or more
operands (numbers). When used in PPCL, the value of the
calculation is determined and assigned to a point name or local
variable for future reference.

at (@) priority indicators


Indicators that are used to test if a point is at a specific priority, or to
command a point to a specific priority. A maximum of 16 parameters
can be used in one PPCL statement. When using a @ Priority
indicator with PPCL statements, the priority level you define in that
statement occupies one of the parameters.

Siemens Building Technologies, Inc.

Glossary-1

execute
To carry out the instruction of an expression or program.

expression
Statement that describes a set of variables, constants, or values
combined with arithmetic, logical, or relational operators.

firmware
Portion of software used in a controller that is stored in non-volatile
memory. See APOGEE, pre-APOGEE, or Unitary firmware.

Glossary-2

Siemens Building Technologies, Inc.

Glossary

integer

APOGEE PPCL Users Manual

pseudocode

Whole number (non-decimal number).

Non-syntactical description of program logic.

line

relational operators

Statement of program code assigned to a unique line number.

local variable
Points in a program of a field panel that can be used in place of userdefined points to store temporary values ($LOC1 through $LOC15).

Relational operators compare two values. The result of the


comparison is called a condition, and determines the type of action
that should be taken.

resident point
Predefined logical point that permanently resides in the PPCL
program in the field panel.

logical operators
Operator that compares two conditions. The result of a comparison
between the two conditions is called a condition. If the result of the
condition is true, then a specific action is taken. If the result is false,
then an alternative action is performed.

modular programming

routing
Method for altering the flow of a program to transfer control to a line
of the program other than the next sequential line number.

special function

Style of programming that logical organizes code into common


functions, such as operational modes.

order of precedence
Order in which operators (mathematical, relational, logical, and
special function) are evaluated in a command statement. Operators
that have a higher precedence are evaluated before operators that
have a lower precedence. If all the operators in the statement have
equivalent precedence levels, then the operators are evaluated from
left to right.

pre-APOGEE firmware

PPCL functions such as Alarm Priority (ALMPRI) that are used to


access a specific value that is unique to a point. The value of the
point can then be tested or assigned to other points. Since special
functions are maintained by the system, they cannot be manually
commanded to a different value. Special functions cannot be used
over the network.

statement
Collection of instructions to the computer in order to perform an
operation. A statement can also be considered a line of PPCL code.

subroutine

Firmware Revision 1.5 and earlier, and Revision 12.x and earlier.

Portion of program code referenced repeatedly through one pass of


the program.

program
Collection of instructions combined in a logical order to accomplish a
specific task.
Siemens Building Technologies, Inc.

Glossary-3

Glossary-4

Siemens Building Technologies, Inc.

Glossary

APOGEE PPCL Users Manual

Unitary firmware
Firmware for Unitary Controllers that uses a subset of the PPCL
commands found in pre-APOGEE firmware.

Siemens Building Technologies, Inc.

Glossary-5

Glossary-6

Siemens Building Technologies, Inc.

APOGEE PPCL Users Manual

Appendix APPCL Reserved Word


List

ATN

AUTO

C (comment)

COM

COS

CRTIME

Appendix A contains the PPCL Reserved Word List. The words,


letters, and groups of letters placed on this list are used by the PPCL
compiler. If you use any of the entries on the word list in a way other
than the way they are designed (for example, defining a reserved
word as a point name), your PPCL program will not operate properly.

DAY

DAYMOD

DAYOFM

DBSWIT

DC

DCR

DEACT

DEAD

The following predefined points permanently reside in the field


panels point database. These names are reserved for specific
functions and should not be used as point names

DEFINE

DISABL

DISALM

DISCOV

$ARG1 through $ARG15

$BATT

DPHONE

ELSE

$LOC1 through $LOC15

$PDL

EMAUTO

EMER

.AND.

.EQ.

EMFAST

EMOFF

.GE.

.GT.

EMON

EMSET

.LE.

.LT.

EMSLOW

ENABLE

.NAND.

.NE.

ENALM

ENCOV

.OR.

.ROOT.

EPHONE

EQ

.XOR.

@EMER

EQUAL

EXP

@NONE

@OPER

FAILED

FAST

@PDL

@SMOKE

GE

GOSUB

ACT

ALARM

GOTO

GT

ALMACK

ALMCNT

HAND

HLIMIT

ALMCT2

ALMPRI

HOLIDA

IF

AND

ARG1 through ARG15

INITTO

LE

LINK

LLIMIT

LOC1 through LOC15

LOCAL

Siemens Building Technologies, Inc.

A-1

A-2

Siemens Building Technologies, Inc.

Appendix APPCL Reserved Word List

APOGEE PPCL Users Manual

LOG

LOW

TIME

TOD

LOOP

LT

TODMOD

TODSET

MAX

MIN

TOTAL

WAIT

MONTH

NAND

XOR

NE

NGTMOD

NIGHT

NODE1 through NODE99

NONE

NOR

NORMAL

OFF

OIP

OK

ON

ONPWRT

OPER

OR

PDL

PDLDAT

PDLDPG

PDLMTR

PDLSET

PRFON

RELEAS

RETURN

ROOT

SAMPLE

SECND1 through
SECND7

SECNDS

SET

SIN

SLOW

SMOKE

SQRT

SSTO

SSTOCO

STATE

TABLE

TAN

THEN

TIMAVG

Siemens Building Technologies, Inc.

A-3

A-4

Siemens Building Technologies, Inc.

APOGEE PPCL Users Manual


alarm
acknowledge (point status indicator)............................................... 1-83
commands
ALARM......................................................................................... 3-24

Index
$

DISALM........................................................................................ 3-36

$ARG1 through $ARG15 (local variable)............................................ 1-61

ENALM......................................................................................... 3-46

$BATT (resident point) ........................................................................ 1-49

HLIMIT ......................................................................................... 3-58

$LOC1 through $LOC15 (local variable) ............................................ 1-63

LLIMIT .......................................................................................... 3-64

$PDL (resident point) .......................................................................... 1-56

NORMAL...................................................................................... 3-72

@
@EMER (priority status indicator)....................................................... 1-72
@NONE (PPCL, priority status indicator) ........................................... 1-73

count (resident point)....................................................................... 1-47


count 2 (resident point).................................................................... 1-48
priority (special function) ................................................................. 1-39

@PDL (priority status indicator ........................................................... 1-75

ALARM
command......................................................................................... 3-24
point status indicator........................................................................ 1-82

@SMOKE (priority status indicator) .................................................... 1-76

ALMACK (point status indicator)......................................................... 1-83

@OPER (priority status indicator)....................................................... 1-74

ALMCNT (resident point) .................................................................... 1-47

A
abbreviating point names .................................................................... 3-34
ACT (command).....................................................................................3-4
activate/deactivate PPCL lines
ACT.....................................................................................................3-4
DEACT............................................................................................. 3-33
DISABL ............................................................................................ 3-35
ENABLE........................................................................................... 3-45
adaptive control............................................................................ 3-5, 3-16
ADAPTM (command) .............................................................................3-5
ADAPTS (command)........................................................................... 3-16
addition (arithmetic operator) .............................................................. 1-23

ALMCT2 (resident point) ..................................................................... 1-48


ALMPRI (special function) .................................................................. 1-39
AND (logical operator)......................................................................... 1-18
antilog, natural (arithmetic function).................................................... 1-32
APOGEE firmware
commanding points to a priority ...................................................... 1-68
defining a meter in a PDL command ............................................... 3-82
defining a meter in a PDLMTR command ....................................... 3-89
dialing out to a modem .................................................................... 3-76
maximum number of characters per line............................................1-4
point priority ..................................................................................... 1-64
point status indicators...................................................................... 1-80
RELEAS(@prior) ............................................................................. 3-93
arc-tangent (arithmetic function) ......................................................... 1-29

Siemens Building Technologies, Inc

Index1

Index2

Siemens Building Technologies, Inc.

Index
arithmetic functions ............................................................................. 1-28
arc-tangent ...................................................................................... 1-29
complement ..................................................................................... 1-30
cosine .............................................................................................. 1-31
natural antilog .................................................................................. 1-32
natural log........................................................................................ 1-33
root................................................................................................... 1-34
sine .................................................................................................. 1-35
square root ...................................................................................... 1-36
tangent............................................................................................. 1-37
arithmetic operators ............................................................................ 1-22
addition ............................................................................................ 1-23
assignment (equals) ........................................................................ 1-24
division............................................................................................. 1-25
multiplication.................................................................................... 1-26
subtraction ....................................................................................... 1-27
assignment (arithmetic operator) ........................................................ 1-24
at (@) priority status indicators ........................................................... 1-68
EMER .............................................................................................. 1-72
OPER............................................................................................... 1-74
PDL.................................................................................................. 1-75
PPCL @NONE ................................................................................ 1-73
SMOKE............................................................................................ 1-76
ATN (arithmetic function) .................................................................... 1-29
AUTO
command......................................................................................... 3-25
point status indicator........................................................................ 1-85
B
BACnet firmware
@NONE status ................................................................................ 1-73
ALMACK .......................................................................................... 1-84
ALMPRI values................................................................................ 1-39
DISALM ........................................................................................... 3-36
Siemens Building Technologies, Inc.

Index3

APOGEE PPCL Users Manual


ENALM ............................................................................................ 3-46
maximum number of characters per line............................................1-4
point priority ..................................................................................... 1-64
priority array..................................................................................... 1-66
RELEAS(@prior) ............................................................................. 3-93
value of released point .........................................1-72, 1-74, 1-75, 1-76
battery condition (resident point)......................................................... 1-49
battery status (point status indicator)
almost discharged ........................................................................... 1-87
charged............................................................................................ 1-88
discharged ....................................................................................... 1-86
C
changing
order of precedence ........................................................................ 1-43
point priority ..................................................................................... 3-92
closed loop control
ADAPTM.............................................................................................3-5
ADAPTS .......................................................................................... 3-16
LOOP............................................................................................... 3-66
COM (arithmetic function) ................................................................... 1-30
commanding points to a priority .......................................................... 1-68
comment lines ................................................................................... 1-105
communications link (resident point)................................................... 1-53
compatibility bar ...................................................................................... XI
complement (arithmetic function)........................................................ 1-30
conditional control
IF/THEN........................................................................................... 3-61
IF/THEN/ELSE ................................................................................ 3-61
converting a sequence of operation to program code ........................ 1-98
COS (arithmetic function).................................................................... 1-31
Index4

Siemens Building Technologies, Inc.

Index

APOGEE PPCL Users Manual

cosine (arithmetic function) ................................................................. 1-31

designing a program ......................................................................... 1-107

COV control
DISCOV ........................................................................................... 3-37
ENCOV ............................................................................................ 3-47

determining point status ...................................................................... 1-77

creating a program ............................................................................ 1-107


CRTIME (resident point) ..................................................................... 1-50
current time (resident point) ....................................................... 1-50, 1-59

dialing out to a modem........................................................................ 3-76


DISABL (command) ............................................................................ 3-35
DISALM (command)............................................................................ 3-36
DISCOV (command) ........................................................................... 3-37
distributed peak demand limiting (PDL) .................................................2-8

division (arithmetic operator)............................................................... 1-25

DAY
command......................................................................................... 3-26
resident point ................................................................................... 1-51

documenting a program .................................................................... 1-105


decision tables............................................................................... 1-106
external documentation ................................................................. 1-106
internal documentation .................................................................. 1-105
pseudocode ................................................................................... 1-107

day mode (point status indicator)........................................................ 1-89


day of the month (resident point) ........................................................ 1-52
DAYMOD (point status indicator)........................................................ 1-89
DAYOFM (resident point).................................................................... 1-52
DBSWIT (command) ........................................................................... 3-27
DC
command......................................................................................... 3-29
control option ......................................................................................2-2
DCR
command......................................................................................... 3-31
control option ......................................................................................2-2
DEACT (command)............................................................................. 3-33
DEAD (point status indicator).............................................................. 1-86
dead band switching (DBSWIT).......................................................... 3-27
decimal time (resident point)............................................................... 1-50
decision logic....................................................................................... 3-61
DEFINE (command)............................................................................ 3-34
defining points in a PPCL program ........................................................1-6
Siemens Building Technologies, Inc.

Index5

DPHONE (command).......................................................................... 3-38


duty cycling
control option ......................................................................................2-2
DC.................................................................................................... 3-29
DCR ................................................................................................. 3-31
E
economizer
GOSUB............................................................................................ 3-50
GOTO .............................................................................................. 3-57
RETURN.......................................................................................... 3-94
EMAUTO (command).......................................................................... 3-39
emergency (priority status indicator)................................................... 1-72
emergency control
EMAUTO ......................................................................................... 3-39
EMFAST .......................................................................................... 3-40
EMOFF ............................................................................................ 3-41
EMON .............................................................................................. 3-42
EMSET ............................................................................................ 3-43
Index6

Siemens Building Technologies, Inc.

Index

APOGEE PPCL Users Manual

EMSLOW......................................................................................... 3-44

syntax page .......................................................................................... X


truth tables.......................................................................................... XII

EMFAST (command) .......................................................................... 3-40


EMOFF (command) ............................................................................ 3-41

exclusive or (logical operator) ............................................................. 1-21

EMON (command) .............................................................................. 3-42

EXP (arithmetic function) .................................................................... 1-32

EMSET (command)............................................................................. 3-43

extending program line length................................................................1-4

EMSLOW (command) ......................................................................... 3-44

ENABLE (command)........................................................................... 3-45

FAILED (point status indicator) ........................................................... 1-90

enable COV......................................................................................... 3-47

FAST (command)................................................................................ 3-49

enable/disable telephone ID numbers ....................................... 3-38, 3-48

FAST (point status indicator) .............................................................. 1-91

ENALM (command)............................................................................. 3-46

firmware types......................................................................................... XI

ENCOV (command) ............................................................................ 3-47


energy conservation
DC.................................................................................................... 3-29
DCR ................................................................................................. 3-31
PDL.................................................................................................. 3-80
PDLDAT .......................................................................................... 3-83
PDLDPG .......................................................................................... 3-85
PDLMTR .......................................................................................... 3-87
PDLSET........................................................................................... 3-90
enthalpy............................................................................................... 3-57
enthalpy optimization
GOSUB............................................................................................ 3-50
RETURN.......................................................................................... 3-94
EPHONE (command).......................................................................... 3-48

G
GE (relational operator)....................................................................... 1-12
global storage variable ........................................................................ 1-63
GOSUB
command......................................................................................... 3-50
program methodology ................................................................... 1-102
used with $ARGn............................................................................. 1-61
GOTO
command......................................................................................... 3-57
guidelines ...................................................................................... 1-102
greater than (relational operator) ........................................................ 1-13
greater than or equal to (relational operator) ...................................... 1-12
GT (relational operator)....................................................................... 1-13

EQ (relational operator)....................................................................... 1-11


equal to (relational operator)............................................................... 1-11
equals (assignment)............................................................................ 1-24
example
dialing out to a modem .................................................................... 3-76
duty cycling.........................................................................................2-2
Siemens Building Technologies, Inc.

Index7

H
HAND (point status indicator) ............................................................. 1-92
HMLIMIT (command) .......................................................................... 3-58
HOLIDA (command)............................................................................ 3-59

Index8

Siemens Building Technologies, Inc.

Index
I
IF/THEN .............................................................................................. 3-61
IF/THEN/ELSE .................................................................................... 3-61
INITTO (command) ............................................................................. 3-63

APOGEE PPCL Users Manual


maximum number of characters
per comment line ................................................................................1-5
per program line .................................................................................1-4
military time (resident point) ................................................................ 1-59
MIN (command) .................................................................................. 3-70

modular programming ......................................................................... 1-99

LE (relational operator) ....................................................................... 1-14


less than (relational operator) ............................................................. 1-15
less than or equal to (relational operator) ........................................... 1-14
LINK (resident point) ........................................................................... 1-53
LLIMIT (command).............................................................................. 3-64

module................................................................................................. 1-99
monitoring point status ........................................................................ 1-77
MONTH (resident point) ...................................................................... 1-54
multiple programs vs. subroutines .................................................... 1-103
multiplication (arithmetic operator)...................................................... 1-26

LOCAL (command) ............................................................................. 3-65


local variables ............................................................................ 1-60, 3-65
$ARGn ............................................................................................. 1-61
$LOCn ............................................................................................. 1-63
global storage .................................................................................. 1-63
subroutines ...................................................................................... 1-61
LOG (arithmetic function) .................................................................... 1-33
logical operators.................................................................................. 1-17
AND ................................................................................................. 1-18
conditions ........................................................................................ 1-17
exclusive or...................................................................................... 1-21
not and............................................................................................. 1-19
OR ................................................................................................... 1-20

N
naming a program ..................................................................................1-7
naming points, rules ...............................................................................1-6
NAND (logical operator) ...................................................................... 1-19
NE (relational operator)....................................................................... 1-16
nested subroutines.............................................................................. 3-54
NGTMOD (point status indicator)........................................................ 1-93
NIGHT (command).............................................................................. 3-71
night mode (point status indicator)...................................................... 1-93
node number (resident point).............................................................. 1-55
NODEn (resident points) ..................................................................... 1-55

LOOP (command) ............................................................................... 3-66

NORMAL (command).......................................................................... 3-72

LOW (point status indicator) ............................................................... 1-87

not and (logical operator) .................................................................... 1-19

LT (relational operator)........................................................................ 1-15

not equal to (relational operator)......................................................... 1-16

notepad with comment lines ..................................................................1-5

manual override (point status indicator).............................................. 1-92


MAX (command) ................................................................................. 3-69
Siemens Building Technologies, Inc.

Index9

Index10

Siemens Building Technologies, Inc.

Index

APOGEE PPCL Users Manual

Occupied mode (OCC) ................................................................See DAY

PDL
command......................................................................................... 3-80
control option ......................................................................................2-6
distributed peak demand limiting........................................................2-8
monitor (resident point) ................................................................... 1-56
target peak demand limiting (TPDL)...................................................2-7

OFF
command......................................................................................... 3-73
point status indicator........................................................................ 1-94
OIP (command)................................................................................... 3-75
dialing out to a modem .................................................................... 3-76
OK (point status indicator) .................................................................. 1-88
ON
command......................................................................................... 3-78
point status indicator........................................................................ 1-95
ONPWRT (command) ......................................................................... 3-79
operator (priority status indicator) ....................................................... 1-74
Operator Interface Program (OIP) ...................................................... 3-75
optimizing system performance
DC.................................................................................................... 3-29
DCR ................................................................................................. 3-31
GOSUB............................................................................................ 3-50
GOTO .............................................................................................. 3-57
PDL.................................................................................................. 3-80
PDLDAT .......................................................................................... 3-83
PDLDPG .......................................................................................... 3-85
PDLMTR .......................................................................................... 3-87
PDLSET........................................................................................... 3-90
RETURN.......................................................................................... 3-94
SSTO ............................................................................................... 3-99
SSTOCO ....................................................................................... 3-102
OR (logical operator)........................................................................... 1-20
order of precedence ............................................................................ 1-42
changing with parentheses.............................................................. 1-43

Siemens Building Technologies, Inc.

Index11

PDLDAT (command)........................................................................... 3-83


PDLDPG (command) .......................................................................... 3-85
PDLMTR (command) .......................................................................... 3-87
PDLSET (command) ........................................................................... 3-90
peak demand limiting
control option ......................................................................................2-6
PDL.................................................................................................. 3-80
PDLDAT .......................................................................................... 3-83
PDLDPG .......................................................................................... 3-85
PDLMTR .......................................................................................... 3-87
PDLSET........................................................................................... 3-90
priority status indicator .................................................................... 1-75
point command
AUTO............................................................................................... 3-25
DAY ................................................................................................. 3-26
FAST................................................................................................ 3-49
NIGHT.............................................................................................. 3-71
OFF.................................................................................................. 3-73
ON ................................................................................................... 3-78
SET.................................................................................................. 3-96
SLOW .............................................................................................. 3-98
STATE ........................................................................................... 3-105
point control
ALARM ............................................................................................ 3-24
dead band switching........................................................................ 3-27
DISALM ........................................................................................... 3-36
Index12

Siemens Building Technologies, Inc.

Index
ENALM ............................................................................................ 3-46
HLIMIT ............................................................................................. 3-58
INITTO ............................................................................................. 3-63
LLIMIT.............................................................................................. 3-64
MAX ................................................................................................. 3-69
MIN .................................................................................................. 3-70
NORMAL ......................................................................................... 3-72
TIMAVG ......................................................................................... 3-108
WAIT.............................................................................................. 3-116
point names
abbreviating ..................................................................................... 3-34
rules ....................................................................................................1-6
structured......................................................................................... 3-34
point priority......................................................................................... 1-64
APOGEE and pre-APOGEE firmware............................................. 1-64
BACnet firmware ............................................................................. 1-66
point status indicators ......................................................................... 1-77
ALARM ............................................................................................ 1-82
ALMACK .......................................................................................... 1-83
AUTO............................................................................................... 1-85
DAYMOD ......................................................................................... 1-89
DEAD............................................................................................... 1-86
FAILED ............................................................................................ 1-90
FAST................................................................................................ 1-91
HAND............................................................................................... 1-92
LOW................................................................................................. 1-87
NGTMOD......................................................................................... 1-93
OFF.................................................................................................. 1-94
OK.................................................................................................... 1-88
ON ................................................................................................... 1-95
PRFON ............................................................................................ 1-96
SLOW .............................................................................................. 1-97
Powers Process Control Language ............................ See PPCL program
Siemens Building Technologies, Inc.

Index13

APOGEE PPCL Users Manual


PPCL program
@NONE (priority status indicator)................................................... 1-73
assigning line numbers............................................................... 1-4, 1-8
control after power return ................................................................ 3-79
documentation ............................................................................... 1-105
execution ............................................................................................1-4
guidelines ...........................................................................................1-8
introduction to PPCL...........................................................................1-3
maximum comment line length...........................................................1-5
maximum number of characters per line............................................1-4
maximum number of lines permitted ..................................................1-4
naming ................................................................................................1-7
point definitions...................................................................................1-6
point priorities .................................................................................. 1-65
rules for creating.................................................................................1-4
testing ............................................................................................ 1-104
transferring control to another line................................................. 1-102
pre-APOGEE firmware
defining a meter in a PDL command ............................................... 3-82
defining a meter in a PDLMTR command ....................................... 3-89
dialing out to a modem .................................................................... 3-76
maximum number of characters per line............................................1-5
OIP command.................................................................................. 3-75
point priority ..................................................................................... 1-64
point status indicators...................................................................... 1-80
RELEAS(@prior) ............................................................................. 3-93
releasing point priorities .................................................................. 1-69
precedence, order of evaluation ......................................................... 1-42
predictor panel .......................................................................................2-8
PRFON (point status indicator) ........................................................... 1-96
priority array, BACnet firmware........................................................... 1-66
priority status indicators ...................................................................... 1-68
program ....................................................................... See PPCL program
Index14

Siemens Building Technologies, Inc.

Index
program control
DEFINE............................................................................................ 3-34
ONPWRT......................................................................................... 3-79
SAMPLE .......................................................................................... 3-95
TABLE ........................................................................................... 3-106

APOGEE PPCL Users Manual


TIME ................................................................................................ 1-59
RETURN (command) .......................................................................... 3-94
ROOT (arithmetic function) ................................................................. 1-34
S

proof on (point status indicator) .......................................................... 1-96

SAMPLE (command) .......................................................................... 3-95

scheduling
HOLIDA ........................................................................................... 3-59
TOD ............................................................................................... 3-110
TODMOD....................................................................................... 3-112
TODSET ........................................................................................ 3-114

quotes in programs ................................................................................1-6


R
relational operators ............................................................................. 1-10
EQ.................................................................................................... 1-11
GE.................................................................................................... 1-12
GT.................................................................................................... 1-13
LE .................................................................................................... 1-14
LT..................................................................................................... 1-15
NE.................................................................................................... 1-16

SECNDn (resident point) .................................................................... 1-58


SECNDS (resident point) .................................................................... 1-57
seconds counter (resident points)....................................................... 1-57
SET (command) .................................................................................. 3-96
SIN (arithmetic function)...................................................................... 1-35

RELEAS (command)........................................................................... 3-92

sine (arithmetic function) ..................................................................... 1-35

release statement................................................................................ 3-92

SLOW
point status indicator........................................................................ 1-97

resident points..................................................................................... 1-46


$BATT.............................................................................................. 1-49
$PDL................................................................................................ 1-56
ALMCNT .......................................................................................... 1-47
ALMCT2 .......................................................................................... 1-48
CRTIME ........................................................................................... 1-50
DAY ................................................................................................. 1-51
DAYOFM ......................................................................................... 1-52
limitations..................................................................... 1-46, 3-97, 3-107
LINK................................................................................................. 1-53
MONTH ........................................................................................... 1-54
NODEn ............................................................................................ 1-55
SECNDn .......................................................................................... 1-58
SECNDS.......................................................................................... 1-57
Siemens Building Technologies, Inc.

Index15

SLOW (command) .............................................................................. 3-98


SMOKE (priority status indicator)........................................................ 1-76
solving a programming problem........................................................ 1-107
special functions.................................................................................. 1-38
ALMPRI ........................................................................................... 1-39
limitations......................................................................................... 1-38
TOTAL ............................................................................................. 1-41
SQRT (arithmetic function) ................................................................. 1-36
square root (arithmetic function) ......................................................... 1-36
SSTO
command......................................................................................... 3-99
formulas ........................................................................................... 2-13
Index16

Siemens Building Technologies, Inc.

Index

APOGEE PPCL Users Manual

SSTOCO (command)........................................................................ 3-102

subtraction (arithmetic operator) ......................................................... 1-27

start/stop time optimization


SSTO ............................................................................................... 3-99
SSTOCO ....................................................................................... 3-102

syntax
compatibility bar................................................................................... XI
notes .................................................................................................. XIII
use ...................................................................................................... XII

Start/Stop Time Optimization (control option) ..................................... 2-10


STATE (command) ........................................................................... 3-105

status indicators
ALARM ............................................................................................ 1-82
ALMACK .......................................................................................... 1-83
AUTO............................................................................................... 1-85
DAYMOD ......................................................................................... 1-89
DEAD............................................................................................... 1-86
FAILED ............................................................................................ 1-90
FAST................................................................................................ 1-91
HAND............................................................................................... 1-92
LOW................................................................................................. 1-87
NGTMOD......................................................................................... 1-93
OFF.................................................................................................. 1-94
OK.................................................................................................... 1-88
ON ................................................................................................... 1-95
PRFON ............................................................................................ 1-96
SLOW .............................................................................................. 1-97

TABLE (command)............................................................................ 3-106

structured naming convention............................................................. 3-34


subroutine .................................................................................... 1-8, 1-99
$ARGn ............................................................................................. 1-61
commands ..................................................................................... 1-102
GOSUB............................................................................................ 3-50
GOTO .............................................................................................. 3-57
nested .............................................................................................. 3-54
RETURN.......................................................................................... 3-94
transferring program control ...............................................................1-4
using .............................................................................................. 1-100
versus multiple programs .............................................................. 1-103
Siemens Building Technologies, Inc.

Index17

TAN (arithmetic function) .................................................................... 1-37


tangent (arithmetic function) ............................................................... 1-37
target peak demand limiting (TPDL) ......................................................2-7
telephone ID numbers
DPHONE ......................................................................................... 3-38
EPHONE ......................................................................................... 3-48
testing a program .............................................................................. 1-104
testing point priorities .......................................................................... 1-68
TIMAVG (command) ......................................................................... 3-108
TIME (resident point)........................................................................... 1-59
time of day
HOLIDA ........................................................................................... 3-59
TOD ............................................................................................... 3-110
TODMOD....................................................................................... 3-112
TODSET ........................................................................................ 3-114
Time of Day
control option ................................................................................... 2-22
time-based commands...........................................................................1-9
TOD (command) ............................................................................... 3-110
TODMOD (command) ....................................................................... 3-112
TODSET (command) ........................................................................ 3-114
TOTAL (special function) .................................................................... 1-41
transferring program control (subroutines) ....................................... 1-102
Index18

Siemens Building Technologies, Inc.

Index

APOGEE PPCL Users Manual

truth tables.............................................................................................. XII


U
unitary firmware
point status indicators...................................................................... 1-81
Unoccupied mode (UNOCC) ................................................... See NIGHT
using subroutines .............................................................................. 1-100
V
variables, local .................................................................................... 3-65
W
WAIT (command) .............................................................................. 3-116
writing a program .............................................................................. 1-107
X
XOR (logical operator) ........................................................................ 1-21

Siemens Building Technologies, Inc.

Index19

Index20

Siemens Building Technologies, Inc.

You might also like