User Guide

Table Of Contents
Program Methodology—Converting a Sequence of Operation into
Program Code
Siemens Building Technologies, Inc. 1-103
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 DEFINE (AHU, “BUILDING1.AHU01”)
110 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 3–Syntax.
APOGEE PPCL User’s Manual
1-104 Siemens Building Technologies, Inc.
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 40°F for an input that is defined to accept
values from 50°F to 70°F.
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.