Professional Documents
Culture Documents
PPCL Manual
PPCL Manual
PPCL Manual
A6V10374898
2023-05-15
Edition notice
Edition notice
Technical specifications and availability subject to change without notice.
This document may not be reproduced, disseminated to third parties or processed and its contents may not be
used or disclosed without express permission. Non-compliance shall result in compensation for damages. All rights,
including those resulting from a successful patent application and registration of a utility model or design patent,
are reserved.
Edition: 2023-05-15
Document ID: A6V10374898
125-1986
© Siemens 2023
Copyright
This document may be duplicated and distributed only with the express permission of Siemens, and may be
passed only to authorized persons or companies with the required technical knowledge.
Manual Organization.....................................................................................................................................................9
Manual Conventions .....................................................................................................................................................9
Syntax Page Example ......................................................................................................................................10
Chapter 1 - Program Methodology..........................................................................................................................12
What's New .................................................................................................................................................................13
Obsolete PPCL Statements Removed from the Language..............................................................................13
Redundant PPCL Statements ..........................................................................................................................14
New and Modified PPCL Statements ...............................................................................................................14
General PPCL Rules ........................................................................................................................................15
PPCL Rules for PXC.A Controllers ..................................................................................................................16
BACnet Point Naming (Encoded names) ...................................................................................................................18
Equal to (.EQ.) ..................................................................................................................................................22
Greater than (.GT.) ...........................................................................................................................................22
Greater than or equal to (.GE.).........................................................................................................................23
Less than (.LT.) ................................................................................................................................................24
Less than or equal to (.LE.) ..............................................................................................................................24
Not equal to (.NE.)............................................................................................................................................25
And (.AND.) ......................................................................................................................................................26
Not And (.NAND.) .............................................................................................................................................27
Or (.OR.) 28
Exclusive Or (.XOR.) ........................................................................................................................................29
Addition 30
Assignment .......................................................................................................................................................31
Division 31
Multiplication .....................................................................................................................................................32
Subtraction .......................................................................................................................................................32
Arc-Tangent (ATN) ...........................................................................................................................................33
Complement (COM) .........................................................................................................................................34
Cosine (COS) ...................................................................................................................................................34
Natural Antilog (EXP) .......................................................................................................................................35
Natural Log (LOG) ............................................................................................................................................35
Root (.ROOT.) ..................................................................................................................................................36
Square Root (SQRT) ........................................................................................................................................36
Tangent (TAN) ..................................................................................................................................................37
Alarm priority (ALMPRI)....................................................................................................................................39
Totalized value (TOTAL) ..................................................................................................................................40
Changing Precedence Levels with Parentheses..............................................................................................42
Alarm count (ALMCNT) ....................................................................................................................................45
Alarm count 2 (ALMCT2)..................................................................................................................................46
Manual Organization
The PPCL User's Manual contains the following chapters:
● 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.
● Chapter 2 – Control Option Comparisons describes different control applications, how they should be used, and
how their PPCL commands should be organized.
● Chapter 3 – Syntax lists all control commands. This chapter describes the syntax, functionality, and special
exceptions for each command, as well as related commands.
● 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.
Manual Conventions
The following table lists text conventions used in this manual.
Convention Example
Syntax commands are in uppercase ON
User-defined parameters are in lowercase and italics. This (pt1, pt2, pt3)
indicates parameters that you must specify depending on
your job.
Error messages and computer code are displayed in 610 IF (FANDO1.EQ.1.0) THEN ...
Courier New font.
Three periods placed after program code denotes a 610 IF (FANDO1.EQ.1.0) THEN ...
continuation of program code.
This convention is used to prevent programming examples
from becoming cluttered.
Compatibility bar
The compatibility bar indicates if the command can be used with a specific type of firmware.
The symbol indicates the command is available in all supported firmware revisions of that type. The bar shown
indicates all firmware types are supported.
Syntax
The Syntax section provides the command format. You’ll also find a description for each parameter in the
command, as well as the valid inputs and any calculations you may need.
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.
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).
Notes
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.
Overview
This chapter contains information related to the design, coding, and implementation of a program. The following
concepts are discussed in this chapter:
● Introduction to PPCL
● What's New
– Obsolete PPCL Statements Removed from the Language
– Redundant PPCL Statements Planned for Removal from the Language
– New and Modified PPCL Statements
● PPCL Rules
– General PPCL Rules
– Defining Objects in a PPCL Program
– Rules for Naming Objects
– Rules for Naming a PPCL Program
– PPCL Program Design Guidelines
– Designing a Program that is Easy to Maintain
– 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
● Using Resident Objects and Storage Locations for Data
– Resident Objects
– Local Variables
● Understanding the Relationship Between Point Priority and Status
– Point Priority Overview
– At (@) Priority Status Indicators
– Point Status Indicators
● Converting a Sequence of Operation into Program Code
– Guidelines
– Designing Programs Using a Modular Structure
– Subroutine Commands
– Multiple Programs versus Subroutines
– Program Testing
– Program Documentation
Introduction
Siemens Building Automation controllers use PPCL (Powers Process Control Language) to control all aspects of
the building’s mechanical systems, in a simple to understand text-based program structure.
● Programs should be logically thought out and their processes understood before writing program code.
● Programs can be organized differently, but still perform the same function.
What's New
PPCL Updates
● Add user role limitations on write and read privileges in the PPCL Editor.
● Add support for point resolutions for TECs. PPCL now supports constructed names with the inclusion of TECs
in the PXC.A platform.
DISCOV (Disable COV Reporting) Programmatic COV enable/disable is not supported in PXC.A devices.
ENCOV (Enable COV Reporting)
DPHONE (Disable phone) Dialup modems are not supported in PXC.A devices.
EPHONE (Enable phone)
OIP (Operator interface program) The PRMMI, along with its menu prompt tree, is not supported in
PXC.A devices. Based on need, limited alternative to the OIP
statement may be provided in a future product release.
ONPWRT (On after power return) PXC.A devices do not have warmstart functionality, therefore a PPCL
program will always start at the first line after a power failure.
ALARM (Command to alarm state) Commanding into and out of alarm state is not supported in PXC.A
NORMAL (Command to normal state) devices.
The current PPCL statements are still supported by the compiler and will continue to
be supported for migration projects.
DEACT(deactivate lines) Replace with GoTo( ) [➙ 139]/ Return( ) [➙ 165] logic or alternate.
OFF (set to OFF @NONE priority) Replace with Set() [➙ 167] or OFF_STATE.
HLIMIT (set high alarm limit) Replace with SETVAL (Write property values).
LLIMIT (set low alarm limit) Replace with SETVAL (Write property values).
STATE (set value by state text) For binary objects, replace with Set() [➙ 167].
See also
SET (Set point value) [➙ 167]
SETVAL (Write property values) [➙ 169]
GOSUB (Go to subroutine) [➙ 134]
of disabling and enabling lines in new programs for PXC.A controllers. Uncommenting (enabling) and commenting
out (disabling) statements that use ACT, DEACT, ENABL, and DISABL cause the device to use more system
resources. Commenting out or uncommenting statements or using the new statements to go around the logic have
the same effect on the program, but do not use as many system resources.
Statement Description
SetVal() A new statement that writes the value of a specified property in one or
more object instances.
State() In PXC.A firmware, State() can only be used with multistate objects.
State() has been modified to support BACnet command prioritization
and to support values passed as either object references or state text
strings.
PPCL Rules
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.
● When the last line of the program is reached, the computer automatically returns to the first line of the program
and continues processing.
● Any program line that begins with C must be enclosed by parentheses ( ).
● PPCL statements that do not follow the correct structure may produce unexpected results.
Syntax Errors
Syntax errors include missing line numbers, missing parentheses, missing statement parentheses, and incorrectly
spelled statement names. Lines that include syntax errors are indicated by the line status S.
In the example below, line 20 has a syntax error (missing parenthesis).
10 ET LOCAL(MYPOINT)
20 E S SET(50, MYPOINT
BAC_15 _AI_10
*
BACnet supports many object types. In this example, the object is a point.
In this example:
● BAC identifies this as a BACnet device.
● 15 is the device object instance, unique throughout the network.
● AI is the BACnet object type specifier. It identifies the object as a physical Analog Input point.
● 10 is the BACnet object instance for this Analog Input object. The number is unique for this object type within
the BAC_15 device.
BACnet Object Type Abbreviation Value BACnet Object Type Abbreviation Value
Syntax Errors
Syntax errors include missing line numbers, missing parentheses, missing statement parentheses, and incorrectly
spelled statement names. Lines that include syntax errors are indicated by the line status S.
In the example below, line 20 has a syntax error (missing parenthesis).
10 ET LOCAL(MYPOINT)
20 E S SET(50, MYPOINT
NOTE:
Since PPCL requires a unique database, you must modify the object names in the
reused program code to reflect the database for that device.
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
[➙ 41].
The following example describes the function of the relational operator.
Example
You are reading the newspaper one morning and find that it is going to be a beautiful day. You say to yourself, "If it
gets warmer than 80F, I will go to the beach. If not, then I will stay home."
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.
PPCL supports the following relational operators:
● Equal to (.EQ.)
● Greater than or equal to (.GE.)
● Greater than (.GT.)
● Less than or equal to (.LE.)
● Less than (.LT.)
● Not equal to (.NE.)
Equal to (.EQ.)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ● ●
Syntax
If (value1.EQ.value2) then...
value1,value2 These values are defined as analog or digital numbers, local variables, or object names.
Use
Compares two values to determine if the first value (value1) is equal to the second value (value2). The comparison
is true if value1 is equal to value2.
Example
500 C IF THE ROOM TEMP IS EQUAL TO 80,
510 C THEN SET THE SET OBJECT TO 70.
520 C
530 IF (RMTEMP.EQ.80.0) THEN RMSET = 70.0
Notes
Check the object format and number of decimal places used before comparing values with this relational operator.
Certain objects (primarily analog input) may contain precise values. When comparing a object value to a whole
number, the result will be false if the values are not identical.
Syntax
If (value1.GT.value2) then...
value1,value2 These values are defined as analog or digital numbers, local variables, or object names.
Use
Compares two values to determine if the first value (value1) is greater than the second value (value2). The
comparison is true if value1 is equal to value2.
Example
250 C IF THE ROOM TEMP IS GREATER THAN
260 C 80, THEN SET THE SET OBJECT TO 70
270 C
280 IF (RMTEMP.GT.80.0) THEN RMSET = 70.0
Syntax
If (value1.GE.value2) then...
value1,value2 These values are defined as analog or digital numbers, local variables, or object names.
Use
Compares two values to determine if the first value (value1) is greater than or equal to the second value (value2).
The comparison is true if value1 is equal to value2.
Example
700 C IF THE ROOM TEMP IS GREATER THAN
710 C OR EQUAL TO 80, THEN SET THE SET
720 C OBJECT TO 70
730 C
740 IF (RMTEMP.GE.80.0) THEN RMSET = 70.0
Syntax
If (value1.LT.value2) then...
value1,value2 These values are defined as analog or digital numbers, local variables, or object names.
Use
Compares two values to determine if the first value (value1) is less than the second value (value2). The
comparison is true if value1 is equal to value2.
Example
900 C IF THE ROOM TEMP IS LESS THAN 80,
910 C THEN SET THE SET OBJECT TO 70.
920 C
930 IF (RMTEMP.LT.80.0) THEN RMSET = 70.0
value1,value2 These values are defined as analog or digital numbers, local variables, or object names.
Use
Compares two values to determine if the first value (value1) is less than or equal to the second value (value2). The
comparison is true if value1 is equal to value2.
Example
300 C IF THE ROOM TEMP IS LESS THAN OR
310 C EQUAL TO 80, THEN SET THE SET OBJECT
320 C TO 70
330 C
340 IF (RMTEMP.LE.80.0) THEN RMSET = 70.0
Syntax
If (value1.NE.value2) then...
value1,value2 These values are defined as analog or digital numbers, local variables, or object names.
Use
Compares two values to determine if the first value (value1) is not equal to the second value (value2). The
comparison is true if value1 is equal to value2.
Example
600 C IF THE ROOM TEMP IS NOT EQUAL TO
610 C 80, THEN SET THE SET OBJECT TO 70.
620 C
630 IF (RMTEMP.NE.80.0) THEN RMSET = 70.0
Logical Operators
Both relational operators and logical operators compare two values and produce a result that is called a
condition. With logical operators, there is a related action for each possible outcome of the condition. If the
condition is true, then a specific action is taken. If the condition is false, then an alternate action is performed. For
information on the order in which logical operators are evaluated, see the Order of Precedence [➙ 41].
The following example describes the function of the logical operator.
Example
You are reading the newspaper one morning and find that it is going to be a beautiful day. You say to yourself, "If it
gets warmer than 80F and I do not have to work, then I will go to the beach."
You have just used a logical operator to define two conditions. Your first condition is that the temperature must be
greater than 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.
PPCL supports the following logical operators:
● And (.AND.)
● Not And (.NAND.)
● Or (.OR.)
● Exclusive Or (.XOR.)
And (.AND.)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ● ●
Syntax
If (cond1.AND.cond2) then...
cond1,cond2 Defines a condition that is the result of a comparison between two values.
Use
● Used to compare two logical conditions.
● If both conditions are true, the result of the comparison is true.
● A single statement can incorporate a combined total of 16 relational and logical operators.
See Table 1-1 for a comparison of conditions used with the .AND. logical operator:
Example
200 IF (TIME LT.19:00.AND.TIME.GT.5:00) THEN ON(LIGHTS)
Syntax
If (cond1.NAND.cond2) then...
cond1,cond2 Defines a condition that is the result of a comparison between two values.
Use
● Used to compare two logical conditions.
● If both conditions are true, then the result of the .NAND. statement is false.
● A single statement can incorporate a combined total of 16 relational and logical operators.
Example
00 IF (LDO1.EQ.ON.NAND.LDO2.EQ.ON) THEN ON(LDO3) ELSE OFF(LDO3)
OFF ON ON TRUE
ON OFF ON TRUE
ON ON OFF FALSE
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)
Or (.OR.)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ● ●
Syntax
If (cond1.OR.cond2) then...
cond1,cond2 Defines a condition that is the result of a comparison between two values.
Use
● Used to compare two logical conditions.
● If 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.
See Table 1-2 for a comparison of conditions used with the .OR. logical operator:
Example
200 IF (TIME.LT.5:00.OR.TIME.GT.17:00) THEN ON(LIGHTS)
Exclusive Or (.XOR.)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ● ●
Syntax
If (cond1.XOR.cond2) then...
cond1,cond2 Defines a condition that is the result of a comparison between two values.
Use
● Used to compare two logical conditions.
● If 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.
● A single statement can incorporate a combined total of 16 relational and logical operators.
See Table 1-3 for a comparison of conditions used with the .XOR. logical operator:
Example
200 IF (PMP1.EQ.ON.XOR.PMP2.EQ.ON) THEN NORMAL(PMPALM)
Arithmetic Operators
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
[➙ 41].
NOTE:
A maximum of 15 arithmetic operators can be used in one PPCL program line.
Addition
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ● ●
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.
Use
Adds two or more values and stores the sum in a defined location as pt1.
Example
560 COUNT = COUNT + 1.0
Assignment
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ● ●
Syntax
pt1 = (value1)
pt1 The point name or local variable that receives the value from value1.
value1 A point name, local variable, expression, or number that is assigned to pt1.
Use
Assigns the value of value1 to the value of pt1.
Example
COUNT = COUNT + 1.0
Notes
Do not to assign values to reserved words. See the Appendix A - Reserved Word List.
Example
500 C = OATEMP
The code in this example would fail due to the “C” being used like a variable, when instead the automation station
interprets the line as a comment.
Division
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ● ●
Syntax
pt1 = value1 / value2
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.
Value2 A point name, local variable, expression or number used in the calculation. In PPCL, value2 represents the denominator.
Use
Divides two values (value1 by value2) and stores the quotient in a defined location (pt1).
Example
890 AVERAG = TOTAL / 5.0
Multiplication
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ● ●
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 used in the calculation.
Use
Multiplies two or more values (value1 and value2) and stores the product in a defined location (pt1).
Example
300 SETPT = TEMP * 0.00438
Subtraction
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ● ●
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.
Use
Subtracts a value (value2) from another value (value1) and stores the difference in a defined location (pt1).
Example
300 COUNT = COUNT - 1.0
Arithmetic Functions
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 [➙ 41].
PPCL supports the following arithmetic functions:
● Arc-Tangent (ATN)
● Complement (COM)
● Cosine (COS)
● Natural Antilog (EXP)
● Natural Log (LOG)
● Root (.ROOT.)
● Sine (SIN)
● Square Root (SQRT)
● Tangent (TAN)
Arc-Tangent (ATN)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ●
Syntax
pt1 = ATN(value1)
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.
Use
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
500 THETA = ATN(VALUE1)
Complement (COM)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ● ●
Syntax
pt1 = COM(value1)
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 complement is calculated.
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).
Example
500 LLSTAT = COM(PROF01)
Cosine (COS)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ●
Syntax
pt1 = COS(value1)
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.
Use
A trigonometric function that calculates the cosine 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
700 C
701 C THIS FORMULA COMPUTES REAL POWER
702 C WHEN VOLTS, AMPS, AND PHASE ANGLE
703 C ARE KNOWN.
704 C
706 PWR = V * I * COS(THETA)
Syntax
pt1 = EXP(value1)
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 antilog is calculated.
Use
Calculates the natural antilog of a point (value1) and stores the result of the calculation in a defined location (pt1).
Example
860 NATANT = EXP(VALUE1)
Syntax
pt1 = LOG(value1)
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.
Use
Calculates the natural log of a point (value1) and stores the result of the calculation in a defined location (pt1).
Example
200 ENTH = LOG(VALUE1)
Root (.ROOT.)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ●
Syntax
pt1 = (value1.ROOT.value2)
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 root is calculated.
Use
This function calculates the root of the defined points by raising the value of value1to the inverse power of value2.
The result of the calculation is then stored in a defined location (pt1).
The following example demonstrates the same values defined as a line of PPCL program code:
Example
310 RVAL = (TEMP.ROOT.3.0)
Syntax
pt1 = SQRT(value1)
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 square root is calculated.
Use
Derives the square root of a value. The result of the calculation is then stored in a defined location (pt1).
Example
180 SRPT1 = SQRT(PT1)
Sine (SIN)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ●
Syntax
pt1 = SIN(value1)
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.
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).
All values used with this function are expressed in degrees.
Example
180 VAR = SIN(THETA)
Tangent (TAN)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ●
Syntax
pt1 = TAN(value1)
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 tangent is calculated.
Use
A trigonometric function that calculates the 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
930 TANPT1 = TAN(PT1)
Special Functions
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 [➙ 41].
NOTE:
Special functions cannot be used over the network.
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 C
232 C THIS LINE TESTS IF THE POINT CALLED
234 C RMTEMP IS AT ALARM PRIORITY LEVEL 1.
236 C
240 IF (ALMPRI(RMTEMP).EQ.1) THEN ON (OPBELL)
Example 2
330 C
332 C THIS LINE ASSIGNS THE ALARM PRIORITY LEVEL
334 C OF RMTEMP TO THE POINT CALLED TMPPRI.
336 C
340 TMPPRI = ALMPRI(RMTEMP)
Notes
ALMPRI must reside in the same automation station 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 point’s current
alarm state. Table 1-4 outlines the BACnet Notification classes and shows how they relate to the APOGEE
ALMPRI values.
Syntax
TOTAL(pt1)
pt1 A point name for which the current alarm priority is taken.
Use
Allows you to access the totalized value of a point.
Example 1
800 C
801 C THIS LINE COMPARES THE TOTALIZED VALUE OF FAN1
802 C TO DETERMINE IF IT IS GREATER THAN 500.
803 C IF THE CONDITION IS TRUE, FAN1 WILL BE PLACED
804 C INTO ALARM.
805 C
810 IF(TOTAL(FAN1).GT.500.0)THEN ALARM(FAN1)
Example 2
800 C
801 C THIS LINE ASSIGNS THE TOTALIZED VALUE
802 C OF FAN1 TO THE POINT CALLED FANRUN.
803 C
810 FANRUN = TOTAL(FAN1)
Notes
TOTAL must reside in the same automation station as the point on which the function is being performed.
See also the INITTO topic.
Order of Precedence
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.
If all the operators in the formula have equivalent precedence levels, then the operators are evaluated from left to
right.
The following example illustrates how precedence levels are applied to mathematical operators.
Example 1
10 - 5 + 2 * 3 = x
This equation is solved as follows:
● Multiplication has the highest precedence level in this equation. The first step in evaluating the equation is as
follows:
2 * 3 = 6
After the first level of operators has been evaluated, the equation appears as follows:
10 - 5 + 6 = x
● 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:
10 - 5 = 5
5 + 6 = 11
● The solution to this equation is 11.
See Table 1-5 for a complete list of precedence levels for PPCL operators.
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.
Example 2
If (value1 .EQ. value2 .AND. value1 .NE. value3) then...
This equation is solved as follows:
● 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.
In this example, assume that both comparisons (condition1 and condition2) are true.
value1 .EQ. value2 (condition1 = true)
value1 .NE. value3 (condition2 = true)
● After the first level of operators has been evaluated, the equation now looks like the following:
If (condition1 .AND. condition2) then...
● The logical operator .AND. is then evaluated.
Since .AND. requires both conditions to be true, the solution to this problem will also be true.
Arc-tangent ATN(value1)
Complement COM(value1)
Cosine COS(value1)
Sine SIN(value1)
Tangent TAN(value1)
3 Root (value1.ROOT.value2)
Equal to .EQ.
And .AND.
7 Not and .NAND.
Or .OR.
8 (Lowest) Exclusive Or .XOR.
Resident Points
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.
The value of a resident point can be tested or assigned to other points.
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.
NOTE:
Do not use resident points in TABLE commands.
Syntax
ALMCNT
Use
The value of ALMCNT represents the number of points within an automation station or unitary controller that are
currently in 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.
Example
340 IF (ALMCNT.GT.0) THEN ON(ALARM7)
Notes
● A point must be defined as alarmable in order to be counted when that point enters the ALARM state.
● In all revisions of automation station firmware, the ALMCNT counter works the same with enhanced alarms as
it does with regular alarms.
● The level of alarm does not affect ALMCNT. In other words, the counter does not increment again when an
enhanced alarm point changes from one alarm level to another.
● If a point is disabled (*PDSB*) or operator disabled (*ODSB*), ALMCNT will still increment and decrement
accordingly.
See also the ENALM and DISALM topics.
Syntax
ALMCT2
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 both the value of ALMCNT and ALMCT2.
When a point returns to the NORMAL state, the computer subtracts one (1) from both values.
Example
300 C IF THE SECOND LEVEL ALARM COUNTER BECOMES
310 C GREATER THAN 5, COMMAND ON ALARM8
320 C
330 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.*
● In all revisions of field panel firmware, the ALMCNT and ALMCT2 counters work the same with enhanced
alarms as with regular alarms.
● 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.
*For pre-APOGEE, ALMCT2 can only be used with digital points.
See also the ALMCNT, ENALM [➙ 129], and DISALM [➙ 123] topics.
Syntax
$BATT
Use
This resident point is used with automation stations 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.
$BATT numeric values are 0, 50, or 100.
● A $BATT value of 0 indicates the battery has discharged and must be replaced.
● A $BATT value of 50 indicates the battery is about to discharge and should be replaced to prevent any loss of
data.
● 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.
● If $BATT status is OK, then the battery does not need to be replaced.
Example 1
200 IF ($BATT.EQ.0) THEN ALARM(P26BAT)
Example 2
210 IF ($BATT.EQ.DEAD) THEN ALARM(P26BAT)
See also the LOW, DEAD, and OK topics.
Notes
The PPCL runtime for PXC.A controllers considers $BATT, DEAD, LOW, and OK to be unresolved names.
Syntax
LINK
Use
This resident point indicates the condition of communications.
Depending on the status of the communications link, a point contains the value 0 or 1.
● If the LINK value is 0, the node where the LINK point resides is not communicating with the network.
● If the LINK value is 1, the node where the LINK point resides is actively communicating with the network.
Example
300 IF (LINK.EQ.0) THEN ON(ALARM1)
See also the Node Number (NODEn) topic.
Day (DAY)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ● ●
Syntax
DAY
Use
This resident point specifies the current day of the week. The values used for the DAY point are as follows:
2 Tuesday
3 Wednesday
4 Thursday
5 Friday
6 Saturday
7 Sunday
Example
300 IF (DAY.EQ.1) THEN TOTRAN = 0
Notes
These values are not related to the modes used in the TODMOD statement.
Syntax
DAYOFM
Use
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.
Example
160 C THIS SECTION OF CODE DETERMINES IF
162 C IT IS THE FIRST DAY OF THE MONTH.
164 C IF SO, SET TOTMON TO 0.
166 C
180 IF (DAYOFM.EQ.1) THEN TOTMON = 0
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).
Syntax
CRTIME
Use
This resident point maintains the current time and stores the value in a decimal format. The following examples
show how CRTIME stores values:
7:15 a.m. = 7.25
7:30 p.m. = 19.50
The values for this point can range from 0.00 to 23.999721.
Example
500 C
501 C THIS CODE DEFINES A TIME PERIOD
502 C FROM 6:45 A.M. TO 5:30 P.M. FOR
503 C SFAN TO OPERATE.
504 C
510 IF (CRTIME.GE.6.75.AND.CRTIME.LE.17.50) THEN ON(SFAN)ELSE OFF(SFAN)
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:
100 VTIME = CRTIME
Notes
CRTIME is updated every second.
It is not recommended to check for exact time as the time of execution could create inconsistent results.
Syntax
TIME
Use
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:
7:15 a.m. = 7:15
7:30 p.m. = 19:30
Example
500 C
501 C THIS CODE DEFINES A TIME PERIOD
502 C FROM 6:45 A.M. TO 5:30 P.M. FOR
503 C SFAN TO OPERATE.
502 C
510 IF(TIME.GE.6:45.AND.TIME.LE.17:30)THEN ON(SFAN)ELSE OFF(SFAN)
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.
Month (MONTH)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ● ●
Syntax
MONTH
Use
This resident point specifies the current month. The values used for the MONTH point are as follows:
Number Month
1 January
2 February
3 March
4 April
5 May
6 June
7 July
8 August
9 September
10 October
11 November
12 December
Example
950 IF (MONTH.GE.4.AND.MONTH.LE.10) THEN SEASON = 1 ELSE SEASON = 0
Syntax
$PDL
Use
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.
Example
350 KWH = $PDL
Syntax
SECNDS
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.
● 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.
● SECNDS points do not roll over. The present value will stay at 9,999 until it is written to a value less than 9,999.
Example
890 IF (SFAN.NE.PRFON) THEN SECNDS = 0
Notes
For APOGEE automation stations, each program has a unique SECNDS point. This point can also be viewed in the
interface using the program name, system delimiter (:)SECNDS format.
SECNDS are also local variables and can only be seen locally in the device, not over BACnet. If necessary, they
can be linked to BACnet AV, BV, or MSV to be read over the network.
Syntax
SECNDn
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 value of a SECNDn point can only be set by a PPCL command.
● The maximum value a SECNDn point can be set to is 9,999.
Example
600 IF(SECND1.GT.15) THEN ON(RF) ELSE OFF(RF)
Notes
For APOGEE automation stations, each program has unique SECNDSn points. These points can also be viewed in
the interface using the program name, system delimiter (:)SECNDSn format.
Local Variables
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.
● Local variables can contain analog or digital values.
● Each set of local variables is designed for a specific task.
● Local variables are divided into two categories: subroutine and global storage variables.
● Local variables are only local to the device through the web interface. They are not available over BACnet.
● Local variables cannot be read by other devices on the BACnet network and cannot be used in their
applications.
● Local points using the Local statements can be seen in the PXC.A controller web interface.
● To make a point network-visible, it must be created outside of the PPCL program (BACnet AV, BV, or MSV).
Local variables in PPCL can be bound to these BACnet virtual points and in turn can be ready by other devices
over the network.
PPCL supports the following local variables:
● $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 automation stations is discussed in Chapter 3
– Syntax.
For APOGEE automation stations, 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.
Syntax
$ARGn
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 GOSUB 2000 OATEMP, RMTEMP, SETPT
...
2000 $ARG1 = $ARG1 + 1
2010 $ARG2 = $ARG2 + 1
2020 $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
The value of RMTEMP = $ARG2
The value of SETPT = $ARG3
Notes
$ARGn points can only be used in subroutines.
See also the Using GOSUB [➙ 79] topic.
Syntax
$LOCn
Use
These points are used to store the results of calculations.
● $LOCn variables can store an analog or digital value.
● $LOCn variables can be used throughout the program.
● There is no limit to the value that can be stored in a $LOC point.
Example 1
200 MIN ($LOC1,PT1,PT2,PT3)
Example 2
100 $LOC7 = (50/VALUE1+10.0) * 2.0
Notes
Local points in APOGEE automation stations can store values greater than 32,767 (up to 10,000,000)
See also the LOCAL Variables [➙ 55] topic.
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 command priority specifiers will be formatted as @PRI[prio], where prio is a value between 1 and 16. For
example:
10 SET(@PRI11, 73, SETPT)
.
.
50 RELEASE(@PRI11, SETPT)
Conversion from Apogee priority specifiers to BACnet priority specifiers are automated by database migration tools.
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).
Operator @OPER
Smoke @SMOKE
Emergency @EMER
Example
120 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.
Notes
There is no warm start on PXC.A. Only Priority 8 and Relinquish Default values are stored to memory and used in
case of an unexpected power loss.
Operator (@OPER)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ●
Syntax
@OPER
Use
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:
300 IF (SFAN.EQ.@OPER) THEN ON(HORN)
● To command a point to operator priority, an example of program code might look like the following:
500 ON(@OPER,SFAN)
● To release a point from operator to PPCL priority, an example of program code might look like the following:
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 automation station 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.
Smoke (@SMOKE)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ●
Syntax
@SMOKE
Use
This command identifies the smoke priority level indicator. The @SMOKE command is typically used in one of the
following situations:
● To test if a point is currently at smoke priority, an IF/THEN/ELSE statement would look like the following:
300 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:
700 RELEAS(@SMOKE,SFAN)
NOTE:
Using the @ priority indicator in this manner will not release the point if it has a
higher priority (OPER).
NOTES
● For APOGEE and pre-APOGEE firmware, the @ priority indicator must be used to release points from SMOKE,
EMER, and PDL to NONE priority.
● For BACnet firmware, the automation station 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.
Emergency (@EMER)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ●
Syntax
@EMER
Use
This command identifies the emergency priority level indicator. The @EMER command is typically used in one of
the following situations:
● 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 automation station will
release points from PDL or EMER priority to NONE.
● For BACnet firmware, the automation station 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.
Syntax
@PDL
Use
This command identifies the peak demand limiting priority level indicator. The @PDL 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:
300 IF (SFAN.EQ.@PDL) THEN ON(HORN)
● To release a point in the device from PDL to PPCL priority, an example of program code might look like the
following:
700 RELEAS (@PDL,SFAN)
NOTE:
Using the @ priority indicator in this manner will not release the point if it has a
higher priority (EMER, SMOKE, and OPER.
Notes
● It is not recommended to release points from PDL priority unless absolutely necessary.
● For APOGEE and pre-APOGEE firmware, if the @ priority indicator is not used, the automation station will
release points from PDL to NONE.
● For BACnet firmware, the automation station 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.
PPCL (@NONE)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ●
Syntax
@NONE
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.
Example
The IF/THEN/ELSE statement would look like the following:
300 IF (SFAN.EQ.@NONE) THEN OFF(HORN)
Notes
● For BACnet firmware, the automation station 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.
Pre-APOGEE Firmware
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:
● Release the point to NONE priority.
● Release the point from a specific priority to NONE priority.
If the point specified is at this priority… Using this pre-APOGEE command… Changes the priority to…
OPER RELEAS(@OPER … ) NONE
SMOKE NONE
EMER NONE
PDL NONE
SMOKE NONE
EMER NONE
PDL NONE
SMOKE SMOKE
EMER EMER
PDL NONE
For a complete description of the RELEAS command, see the RELEAS [➙ 163] topic.
NOTE:
Since these objects are related specifically to the functions of the device, object
status indicators cannot be used over the network.
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.
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.
● Points cannot be commanded to HAND by using an operator interface.
● 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 controller to
ensure that the point can be commanded.
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.
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.
See Table 1-9 for a comparison of the point status while using the HOA override switch.
AUTO Operator interface or PPCL Equipment is being controlled by operator interface or PPCL.
CAUTION
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.
Alarm (ALARM)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ● ●
Syntax
If (pt1.eq ALARM) then...
pt1 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 ALARM state. This comparison is true if the point status is
ALARM.
Example
200 IF (TEMP02.EQ.ALARM) THEN ON(FAN)
Syntax
If (pt1.eq ALMACK) then...
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)
FAN is commanded OFF pt1 turns OFF (Fan is OFF and Normal, but requires
acknowledgement)
Example 2
In the following statement, FAN is an alarmable point with Normal Acknowledge Required by Operator Disabled.
200 IF (TEMP02.EQ.ALARM) THEN ON(FAN)
FAN is commanded OFF pt1 remains ON (Fan is OFF and Normal. The Return to Normal has
been acknowledged internally.)
Notes
For BACnet firmware, the ALMACK is true if any alarm event has been acknowledged; that is, OFFNORMAL,
NORMAL, or FAULT
Auto (AUTO)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ●
Syntax
If (pt1.eq AUTO) then...
pt1 A point name whose operational status is compared to the status indicator.
- 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
200 IF (HOAFAN.EQ.AUTO) THEN ON(LIGHT3)
Syntax
If ($BATT.eq.OK) then...
Use
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
600 IF ($BATT.EQ.LOW) THEN ALARM(P26BAT)
An alternate method to test the battery strength is to use the numeric value (50) of LOW.
600 IF ($BATT.EQ.50) THEN ALARM(P26BAT)
Notes
This function can only be used in automation stations that have the ability to monitor the strength of their backup
battery.
See also the Battery Status – Discharged (DEAD) [➙ 71] and Battery Status – Almost Discharged (LOW) topics.
Syntax
If ($BATT.eq.DEAD) then...
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.
Example
600 IF ($BATT.EQ.DEAD) THEN ALARM(P26BAT)
An alternate method to test the battery strength is to use the numeric value (0) of DEAD.
600 IF ($BATT.EQ.0) THEN ALARM(P26BAT)
Notes
This function can only be used in automation stations that have the ability to monitor the strength of their backup
battery.
See also Battery Status – Almost Discharged (LOW) and Battery Status – Charged (OK) [➙ 70] topics.
Syntax
If ($BATT.eq LOW) then...
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.
Example
600 IF ($BATT.EQ.LOW) THEN ALARM(P26BAT)
An alternate method to test the battery strength is to use the numeric value (50) of LOW.
600 IF ($BATT.EQ.50) THEN ALARM(P26BAT)
Notes
This function can only be used in automation stations that have the ability to monitor the strength of their backup
battery.
See also the Battery Status – Discharged (DEAD) [➙ 71] and Battery Status – Charged (OK) [➙ 70] topics.
Syntax
If (pt1.eq.DAYMOD) then...
pt1 A point name whose operational status is compared to the status indicator.
Use the equipment controller application name.
- For APOGEE firmware, use the TEC application name.
- For pre-APOGEE firmware, define the point as an LCTLR point type
Use
This status indicator determines if an equipment controller is in DAY mode.
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 FLN controllers and is not recommended for use with PXC.A firmware.
● For BACnet firmware, the application name corresponds to PTECs and DXR2s.
● 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.
Failed (FAILED)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ●
Syntax
If (pt1.eq.FAILED) then...
pt1 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.
Example
200 IF (AHU2.EQ.FAILED) THEN ON(HORN)
Fast (FAST)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ●
Syntax
If (pt1.eq.FAST) then...
pt1 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
This status indicator determines if a point (pt1) is in the FAST state. This comparison is true if the point status is
FAST.
Example
200 IF (FAN.EQ.FAST) THEN DAMPER = 8.0
Syntax
If (pt1.eq.HAND) then...
pt1 A point name whose operational status is compared to the status indicator.
Use
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
200 IF (FAN.EQ.HAND) THEN OADAMP = 8.0
Notes
Points must be terminated on an automation station with a manual override switch.
Syntax
If (pt1.eq.NGTMOD) then...
pt1 A point name whose operational status is compared to the status indicator.
- This parameter must be defined as an LCTLR point type.
Use
This status indicator determines if an equipment controller is in NIGHT mode.
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 (CNTRL1.EQ.NGTMOD) THEN NGTSP = 78.0
Notes
For PXC.A, controllers use SET (Set point value).
This point is only valid for equipment controllers and is only valid when used with the LCTLR or LTCU (pre-
APOGEE only) point type.
Off (OFF)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ● ●
Syntax
If (pt1.eq.OFF) then...
pt1 A point name whose operational status is compared to the status indicator.
- This parameter must be defined as an LDI, LDO, L2SP, L2SL, LOOAL, LOOAP, LFSSL, or LFSSP point type.
Use
This status indicator determines if a point (pt1) is in the OFF state. This comparison is true if the point status is
OFF.
Example
200 IF (FAN.EQ.OFF) THEN RTDAMP = 3.0
On (ON)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ● ●
Syntax
If (pt1.eq.ON) then...
pt1 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 status indicator determines if a point (pt1) is in the ON state. This comparison is true if the point status is ON.
Example
200 IF (FAN.EQ.ON) THEN RTDAMP = 3.0
Proof on (PRFON)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ● ●
Syntax
If (pt1.eq.PRFON) then...
pt1 A point name whose operational status is compared to the status indicator.
- This point must be defined as any L2SP, L2SL, LOOAL, or LOOAP point type.
Use
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 IF (FAN.EQ.PRFON) THEN OADAMP = 8.5
Slow (SLOW)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ●
Syntax
If (pt1.eq.SLOW) then...
pt1 A point name whose operational status is compared to the status indicator.
- This point must be defined as an LFSSL or LFSSP point type.
Use
This status indicator determines if a point (pt1) is in the SLOW state. This comparison is true if the point status is
SLOW.
Example
200 IF (FAN.EQ.SLOW) THEN DAMPER = 13.0
Guidelines
The following guidelines will help you design a well-organized program that is easy to modify and maintain:
● Use point names that describe the function of the point.
● 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 [➙ 79] for more
information.
● With APOGEE firmware, it is best to create a separate program in the same automation station rather than
duplicate the control strategy within a single program.
1 Call No No No No
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 straight-line program code.
If the result is "EVEN," then there is no benefit for using either method.
If the result is "YES," then it is more efficient to use a subroutine.
Subroutine Commands
Using GOTO
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 the same or a sequentially
higher line number.
● 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
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 automation station then continues processing at the next sequential line number.
For information on transferring control to a subroutine, see the GOSUB and RETURN topics.
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 topic.
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.
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.
The following documentation methods are described in more detail on the following pages:
● Internal documentation
● External documentation
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.
Internal Documentation
Internal documentation refers to information written into the program using comment lines.
● 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.
You must enter the letter C after the line number to prevent the program from interpreting your comments as
program commands. For example:
200 C THIS COMMAND WILL TURN ON SFAN01
210 C IF RMTEMP VALUE FALLS BELOW 68 OR
220 C RISES ABOVE 78. SFAN01 WILL REMAIN
230 C ON/OFF FOR AT LEAST 5 MINUTES.
NOTE:
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.
External 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:
● Decision tables
● Pseudocode
Decision Tables
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).
● Inputs for a decision table are the types of equipment and all possible modes of operation.
● 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.
Table 1-11 provides an example of a decision table that defines six pieces of equipment and four modes of
operation.
Pseudocode
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.
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:
● Check mixed air temperatures
● Check outside air temperatures
● Open/close dampers as needed
● Start/stop fans
From this list, you would begin writing program code to accomplish these functions.
Overview
Chapter 2 discusses the following topics:
● Concepts behind some of the major control applications in the APOGEE Automation System, namely:
– Duty Cycling (DC)
– Enthalpy and Dry Bulb Economizer Control
– Peak Demand Limiting (PDL)
● 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 3 –Syntax.
CAUTION
Be careful when designing your programs so that functions do not conflict.
If objects 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 object during the same time period.
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.
The code for duty cycling HFAN is as follows:
The DC Command
● The DC command turns objects ON and OFF according to a defined schedule.
● 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 the DC topic.
Example—Economizer 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 77°F return temperature and the 85°F 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.
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.
Using an enthalpy economizer for this situation has reduced the cooling energy demand by 50%.
NOTE:
Distributed PDL can only work on Protocol 2 networks.
NOTE:
This configuration assumes that the predictor automation station does not have any
loads defined. If the predictor automation station is also controlling loads, the PDL
and PDLDAT commands must also be defined in the PPCL program.
NOTE:
This configuration assumes that the predictor automation station does not have any
loads defined. If the predictor automation station is also controlling loads, the PDL
and PDLDAT commands must also be defined in the PPCL program.
Defining SSTO
Three PPCL commands are defined in the automation station 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.
2. SSTOCO – Establishes the thermal characteristics of the building based on how the building reacts to changes
in temperature.
3. SSTO – Calculates optimal start and stop times.
All optimization calculations and equipment control are performed in the automation station where the SSTO and
SSTOCO commands are defined. Each program within an automation station may also perform SSTO calculations
for up to 5 zones.
CAUTION
Be careful when designing your programs so that functions do not conflict.
If objects 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 object during the same time period.
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 topics:
● Cooling Season—Optimum Start Time
● Cooling Season—Optimum Stop Time
● Heating Season—Optimum Start Time
● Heating Season—Optimum Stop Time
● Cooling Mode at Occupancy Begin
● Cooling Mode at Occupancy End
● Heating Mode at Occupancy Begin
● Heating Mode at Occupancy End
NOTE:
The example values for coefficients shown in this manual should not be used without
first calculating what the number should be.
If the indoor temperature is greater than or equal to the desired temperature, then the optimum start time is:
OB - (d * CC) - (d * f * (CT/10)) + AB
Where:
If the indoor temperature is greater than or equal to the desired temperature, the optimum stop time is LE:
Where:
If the indoor temperature is greater than or equal to the desired temperature, then the optimum stop time is LB:
Where:
If the indoor temperature is greater than or equal to the desired temperature, then the optimum stop time is:
OE - ((25 * HR * d) / f) + AE
Where:
If the indoor temperature is less than the desired temperature minus one degree, then:
AB = AB + CA
Where:
If the indoor temperature is less than the desired temperature minus one degree, then:
AE = AE - CA
Where:
If the indoor temperature is less than desired the temperature minus one degree, then:
AB = AB - HA
Where:
If the indoor temperature is less than the desired temperature minus one degree, then:
AE = AE + HA
Where:
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.
CAUTION
Be careful when designing your programs so that functions do not conflict.
If objects 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 object during the same time period.
Defining Time-of-Day
The following PPCL commands are defined in the automation station 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 objects ON or OFF at specified times.
● TODSET – Sets the values of up to ten analog objects at specified start and stop times during the day.
● The TOD and TODSET commands do not have to be defined in a specific order.
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 PXC.A Reference Manual
(A6V12954388) or the PXC.A Web Interface User Guide (A6V12893115).
Monday - Sunday
07:00:00 OFF LITE1
18:00:00 ON FAN1
18:00:00 ON LITE1
19:00:00 OFF FAN1
Holiday
10:30:00 OFF LITE1
17:00:00 ON LITE1
03-May-1994 Holiday
08-Sept-1994 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.
NOTE:
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.
The following TOD commands are defined in the TOD database:
Monday - Sunday
07:00:00 OFF LITE1
18:00:00 ON FAN1
18:00:00 ON LITE1
19:00:00 OFF FAN1
Holiday
10:30:00 OFF LITE1
17:00:00 ON LITE1
03-May-1994 Holiday
08-Sept-1994 Holiday
IF/THEN/ELSE Time-Of-Day
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.
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:
100 C THIS LINE OF CODE TURNS THE LIGHTS
102 C OFF AT 5:00 AM AND ON AT 7:00 PM.
104 C
110 IF(TIME.GT.5:00.AND.TIME.LT.19:00)THEN OFF(LITES)ELSE ON(LITES)
Overview
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 list groups the commands by control function:
Conditional Control
IF/THEN and IF/THEN/ELSE
COV Control
DISCOV
ENCOV
Emergency Control
EMON
EMOFF
EMFAST
EMSLOW
EMAUTO
EMSET
Enthalpy Optimization
GOSUB
RETURN
GOTO Statement
GOTO
Local Variables
LOCAL
Point Commands
ON
OFF
STATE
AUTO
FAST
SLOW
SET
DAY
NIGHT
Point Control
INITTO
MAX
MIN
TIMAVG
WAIT
Program Control
DEFINE
ONPWRT
SAMPLE
TABLE
Release Statement
RELEAS
Telephone ID Numbers
DPHONE
EPHONE
Time of Day
HOLIDA
TOD
TODMOD
TODSET
Syntax
ACT(line1,...,line16)
Use
For PXC.A devices, this statement has been replaced with GOTO( ) [➙ 139], GOSUB( ) [➙ 134] and RETURN( )
[➙ 165].
Activates lines of PPCL code so they can be examined and executed.
● The ACT command only affects the lines of PPCL program for the device where the program resides.
● ACT only enables PPCL lines that are specifically defined in the command.
● A maximum of 16 lines of PPCL code can be controlled with one ACT command.
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 the DEACT [➙ 120], DISABL [➙ 122], and ENABLE [➙ 128] topics.
Syntax
ADAPTM(pv,cv,sp,matctl,mam,st,kc,tcd,tch,tcc,her,dbr,der,err)
Where:
st is the Sample Time, and
tc is the smallest of tcd, tch, and tcc.
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.
Where:
CFMmax = Maximum or design airflow rate in cubic feet per minute
GPMmax = Maximum or design hot water flow rate in gallons per minute
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:
Where:
tch = ADAPTM heating time constant parameter (in seconds).
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).
T hc actuator = stroke time of the heating coil actuator (often 30 seconds).
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
L/s chilled water max = Maximum or design chilled water flow rate in liters per second
The ADAPTM cooling time constant parameter entry (in seconds) is calculated using this formula:
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)
her 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 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 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 TABLE (%X%VRT,%X%HCO,0,100,45,0)
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.
The following figure shows the relationship of dbr 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 TABLE (%X%VRT,$MADCTL,50,%X%MAM,65,100)
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.
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.
der 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.
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 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.
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.
err 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.
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.
2000 C ADAPTM CONTROL STATISTICS (LOGICAL
2002 C FIRMWARE)
2004 C DIRECT CONTROL LOOP
2006 C INPUT = %X%SAT
2008 C OUTPUT = %X%VRT
2010 C SETPOINT = %X%SAS
2012 C MA TEMP CNTRL OUTPUT = $MATCTL
2014 C MA MIN POSITION = %X%MAM
2016 C SAMPLE TIME = 5 SECONDS
2018 C GAIN = %X%KC1
2020 C DAMPER TIME CONSTANT = %X%TD1
2022 C HEATING TIME CONSTANT = %X%TH1
2024 C COOLING TIME CONSTANT = %X%TC1
2026 C HEATING END OF RANGE = 45.0
2028 C DAMPER BEGIN RANGE = 50.0
2030 C DAMPER END OF RANGE = 65.0
2032 C ERROR REPORT POINT = %X%ERR
2034 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)
2036 C HEATING COIL SIGNAL
2038 TABLE (%X%VRT,%X%HCO,0,100,45,0)
2040 C DAMPER RAMP
2042 TABLE ($MADRMP,$MADRCT,0,0,10,%X%MAM, 180,100)
2044 C DAMPER CONTROL SIGNAL
2046 TABLE (%X%VRT,$MADCTL,50,%X%MAM,65,100)
2048 C MIXED AIR TEMPERATURE CONTROL LOOP
2050 IF($MADRCT.LT.$MATCTL) THEN GOTO 2056
2052 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)
2054 C ECONOMIZER CONTROL
2056 IF (%X%ECM .EQ. OFF) THEN GOTO 2072
2058 C COOLING COIL SIGNAL (ECON=ON)
Use
This statement is no longer supported in PXC.A devices. The PXC.A PPCL runtime will consider this statement
invalid, and no replacements have been provided.
Adaptive control technology is a closed loop control application, which automatically adjusts the automation station
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.
Either the ADAPTM or ADAPTS control statement can be implemented as a one-line replacement for an existing
LOOP statement in PPCL.
ADAPTM is specifically designed for supply air temperature control in which two or three output devices are
controlled in sequence without overlap.
The output of ADAPTM is direct acting–it 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.
To be able to control, adaptive control requires that the loop be:
● Controllable–this means that the sensor is in the right range and the output is sufficient to bring the process
variable to setpoint.
● Open-loop Stable–this 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 Acting–this 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.
● Modulating–this refers to the loop’s 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 Time–this means that the total delay in the sensor and actuator signals should not
exceed two times the time constant of the process.
NOTE:
The Soft Controller does not support adaptive control technology.
tcd Example
The AHU has mixed air dampers, a heating coil, and a cooling coil.
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: 5 seconds
Cooling coil time constant: 20
Supply air temp. sensor: 30
Damper actuator: 30
Total 85 seconds
tch Example
An AHU has a design CFM of 50000 and the design flow through the heating coil is 465 gpm. The heating coil
valve has 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:
Fig. 1:
tcc 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:
Syntax
ADAPTS(pv,cv,sp,st,kc,tc,ra,llpv,hlpv,llcv,hlcv,edb,npv,err)
cv Controlled variable (loop output). This signal is 0.0 to 100.0 percent, direct acting, and is intended to go to TABLE
statements–one for each output actuator point (for example, heating, dampers and cooling).
- 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 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.
- The Sample Time must be less than or equal to one-third of the Time Constant. That is,
Where:
st is the Sample Time, and
tc is the Time Constant.
Suggested Sample Times
Temperature Loops (single input, single output)
- 5 seconds for fast loops;
- 10 seconds for slow loops.
Humidity Loops
- 5 to 10 seconds for return air or space loop;
- 1 or 2 seconds for a discharge air loop.
Flow and Static Pressure Loops
- 1 or 2 seconds
kc Control gain.
- This parameter can be a point name, local variable name, or decimal number.
- This value must be greater than 0.0.
- Since ADAPTS will adapt to the process it is controlling, set kc to 3.0 for both English and SI Unit applications.
tc 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.
Cooling Coils
Use the following formula:
Where:
tc = ADAPTS cooling time constant parameter entry (in seconds).
CFMmax = Maximum or design airflow rate in cubic feet per minute.
L/s air max = Maximum or design airflow rate in liters per second.
GPMmax = Maximum or design chilled water flow rate in gallons per minute.
L/s chilled water max = Maximum or design chilled water rate in liters per second.
Tsensor = time constant of the supply air sensor; typically about 30 seconds.
Tcc actuator = stroke time of the cooling coil actuator; typically 30 seconds.
Heating Coils
Use the following formula:
Where:
tc = ADAPTS heating time constant parameter entry (in seconds).
CFMmax = Maximum or design airflow rate in cubic feet per minute.
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.
Tsensor = time constant of the supply air sensor; typically about 30 seconds.
Thc actuator = stroke time of the heating coil actuator; typically 30 seconds.
Mixed Air Temperature
Use the following formula:
Where:
tc = ADAPTS mixed air temperature time constant parameter entry (in seconds); typically 40 seconds.
Tma sensor = time constant of the mixed air temperature sensor; typically about 30 seconds.
Tdamper actuator = stroke time of the mixed air damper actuator; typically 30 seconds.
Duct Static Pressure
- 6 seconds for small size systems,
- 10 seconds for medium size systems, and
- 20 seconds for large size systems.
Airflow Control
- 6 seconds for small size systems,
- 10 seconds for medium size systems, and
- 20 seconds for large size systems.
Duct Humidity Control
- 50 seconds for small size systems,
- 100 seconds for medium size systems, and
- 200 seconds for large size systems.
Cascade Control (setpoint reset)
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
110 | 195 2023-05-15 A6V10374898
- 500 seconds for large size systems/rooms*.
* A full room should have a longer time constant than an empty room.
Chapter 3 - Command Syntax
ADAPTS (Adaptive control, single)
ra 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
llpv 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 sensor’s low range.
- This parameter can be a point name, local variable name, or decimal number.
- This value must be less than hlpv.
hlpv 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 sensor’s high range.
- This parameter can be a point name, local variable name, or decimal number.
- This value must be greater than llpv.
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.
edb Error deadband. This parameter determines how much error (process variable minus setpoint) must exist before ADAPTS
recalculates its output signal (control variable).
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 loop’s maximum allowable setpoint tolerance.
- For temperature and humidity loops, edb can be very low–even 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 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.
CAUTION
Each ADAPTS PPCL line of code must have its own unique error point.
Do not share one error point among multiple ADAPTM lines.
ADAPTS Example
The following example also includes an ADAPTS command for mixed air temperature.
2000 C ADAPTS CONTROL STATISTICS (LOGICAL
2002 C FIRMWARE) STATIC PRESSURE CONTROL
2004 C DIRECT CONTROL LOOP
2006 C INPUT = %X%SSP
2008 C OUTPUT = %X%LP1
2010 C SETPOINT = %X%SSS
2012 C SAMPLE TIME = 1 SECOND
2014 C GAIN = %X%KC
2016 C TIME CONSTANT = %X%TC
2018 C REVERSE ACTING FLAG = 1
2020 C LOW LIMIT OF INPUT = -0.1
2022 C HIGH LIMIT OF INPUT = 5.0
2024 C LOW LIMIT OF OUTPUT = 0.0
2026 C HIGH LIMIT OF OUTPUT = 100.0
2028 C ERROR DEADBAND = %X%DB1
2030 C NOISY PROCESS VARIABLE = %X%NP1
2034 C ERROR REPORT POINT = %X%ERR
2036 IF(%X%RP1.LT.%X%LP1) THEN GOTO 2042
2038 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)
......
Use
This statement will not be supported in PXC.A automation stations. The PXC.A PPCL runtime will consider this
statement invalid, and no replacements have been provided.
Adaptive control technology is a closed loop control application, which automatically adjusts the automation station
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.
Either the ADAPTM or ADAPTS control statement can be implemented as a one-line replacement for an existing
LOOP statement in PPCL.
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.
To be able to control, adaptive control requires that the loop be:
● Controllable–this means that the sensor is in the right range and the output is sufficient to bring the process
variable to setpoint.
● Open-loop Stable–this 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 Acting–this 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.
● Modulating–this refers to the loop’s 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 Time–this means that the total delay in the sensor and actuator signals should not
exceed two times the time constant of the process.
NOTE:
The Soft Controller does not support adaptive control technology.
llpv Example 1
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.
llpv Example 2
For supply air temperature control with mixed air dampers, use 30°F or 0°C. 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.
hlpv Example 1
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.
hlpv Example 2
For supply air temperature control, use 130°F or 55°C.
Syntax
ALARM(line1,...,line16)
Use
This statement will not be supported in PXC.A automation station. The PXC.A PPCL runtime will consider this
statement invalid, and no replacements have been provided.
For PXC.A devices, commanding into and out of alarm state is not supported.
Forces the specified points into the ALARM state.
A maximum of 16 points can be changed with one ALARM command.
Example
100 IF (ROOM.GT.80.0) THEN ALARM(ROOM25)
Notes
● 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.
● The status *AC* is displayed when a point is commanded to the ALARM state.
See also the DISALM [➙ 123], ENALM [➙ 129], HLIMIT [➙ 140], LLIMIT [➙ 144], and NORMAL [➙ 150] topics.
Syntax
AUTO(line1,...,line16)
Use
For PXC.A devices, this statement has been replaced with SET (Set point value) [➙ 167].
Changes the operational status of an ON/OFF/AUTO point to AUTO.
A maximum of 16 points can be changed with one AUTO command.
Example
100 AUTO(EFAN1,EFAN2,EFAN3)
See also the FAST [➙ 132], OFF [➙ 151], ON [➙ 154], and SLOW [➙ 170] topics.
Syntax
DAY(line1,...,line16)
Use
For PXC.A devices, this statement has been replaced with SET (Set point value) [➙ 167]
Changes a LCTLR point to DAY mode status.
A maximum of 16 points can be changed with one DAY command.
Example
100 IF (TIME.LT.7:00.OR.TIME.GT.18:00) THEN NIGHT(LCTLR2) ELSE DAY(LCTLR2)
Notes
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 the NIGHT [➙ 149] topic.
Syntax
DBSWIT(type,input,low,high,pt1,...,pt12)
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.
● The operational status of the point is regulated by an analog point using a predefined dead band.
Example 1
200 DBSWIT(1,RMTEMP,LDBAND,HDBAND,SFAN,RFAN)
Example 2
200 DBSWIT(1,RMTEMP,55,58,SFAN,RFAN)
Notes
The ACT and ENABLE commands can be used interchangeably.
See also the DEACT [➙ 120], DISABL [➙ 122], and ENABLE [➙ 128] topics.
DC (Duty cycle)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ●
Syntax
DC(pt1,pat1,...,pt8,pat8)
Use
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.
A maximum of 8 points can be controlled with one DC command.
Do the following to create a duty cycle pattern:
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.
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
1070 C
1100 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 the DCR [➙ 119] topic.
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 Point names of the space temperature points.
temp4
high1 through High temperature limits of the space points.
high4 - 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.
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.
Example
200 C THIS COMMAND WILL TURN ON IF
210 C SFAN'S VALUE FALLS BELOW 68 OR
220 C RISES ABOVE 78. THE POINT SFAN01
230 C WILL REMAIN ON/OFF FOR AT LEAST 5
240 C MINUTES ON EACH CYCLE.
250 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 the DC [➙ 117] topic.
Syntax
DEACT(line1,...,line16)
Use
For PXC.A devices, this statement has been replaced with GOTO( ) [➙ 139], GOSUB( ) [➙ 134] and RETURN( )
[➙ 165].
Disables lines of PPCL code to prevent them from being examined or executed.
● The DEACT command only affects the lines of PPCL program for the device where the program resides.
● DEACT only disables PPCL lines that are specifically defined in the command.
● A maximum of 16 lines of PPCL code can be controlled with one DEACT command.
Example
100 IF (TIME.GT.8:00.AND.TIME.LE.17:00) THEN
ACT(120,130) ELSE DEACT(120,130)
Notes
The DEACT and DISABLE commands can be used interchangeably.
See also the ACT [➙ 99], DISABL [➙ 122], and ENABLE [➙ 128] topics.
Syntax
DEFINE(abbrev,string)
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.
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.
A percentage sign (%) must be placed before and after the abbreviation when it is used in the program.
For PXC.A controllers, it is recommended to use GOTO (Go to line) [➙ 139].
Example
10 DEFINE(AHU,”BUILDING1.AHU01.”)
20 ON(“%AHU%SFAN”)
If DEFINE is not used, this same line of code looks like the following:
20 ON(“BUILDING1.AHU01.SFAN”)
Notes
This statement is executed when added to the automation station and does not require enabling or execution in the
normal program flow.
Abbreviation texts that begin with C will fail to compile.
Syntax
DISABL(line1,...,line16)
Use
Disables lines of PPCL code to prevent them from being examined or executed.
● The DISABL command only affects the lines of PPCL program for the device where the program resides.
● DISABL only disables PPCL lines that are specifically defined in the command.
● A maximum of 16 lines of PPCL code can be controlled with one DISABL command.
Example
100 IF (TIME.GT.8:00.AND.TIME.LE.17:00) THEN
ENABLE(120,130) ELSE DISABL (120,130)
Notes
The DEACT and DISABL commands can be used interchangeably.
See also the ACT [➙ 99], DEACT [➙ 120], ENABLE [➙ 128], and Redundant PPCL Statements [➙ 14] topics.
Syntax
DISALM(pt1,...,pt16)
pt1 through pt16 Point name that should not report alarms.
Use
For PXC.A devices, this statement has been replaced with SETVAL (Write property values).
Disables alarm reporting for the specified points.
A maximum of 16 points can be controlled with one DISALM command.
Example
50 IF (SFAN.EQ.OFF) THEN DISALM(ROOM1) ELSE ENALM(ROOM1)
Notes
● Points must reside in the same device as the program.
● Do not use DISALM to disable alarm reporting over the network.
● The status *PDSB* is displayed when a point is commanded to the DISALM state.
● For BACnet firmware, all three alarm events are disabled; that is, OFFNORMAL, NORMAL, and FAULT.
See also the ALARM [➙ 114], ENALM [➙ 129], HLIMIT [➙ 140], LLIMIT [➙ 144], and NORMAL [➙ 150] topics.
Syntax
DISCOV(pt1,...,pt16)
pt1 through pt16 Point name that should not report updated changes-of-value (COV).
Use
This statement will not be supported in PXC.A automation stations. The PXC.A PPCL runtime will consider this
statement invalid, and no replacements have been provided.
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.
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 points can be controlled with one DISCOV command.
Example
50 IF (SFAN.EQ.OFF) THEN DISCOV(ROOM1, ROOM2) ELSE ENCOV(ROOM1,ROOM2)
Notes
Points defined in the statement must reside in the same device as the DISCOV command.
See also the ENCOV [➙ 130] topic.
Syntax
DPHONE(pn#1,...,pn#16)
Use
This statement will not be supported in PXC.A automation stations. The PXC.A PPCL runtime will consider this
statement invalid, and no replacements have been provided.
Disables telephone ID numbers. The telephone ID number is a numeric code that represents the actual telephone
number defined in the device.
A maximum of 16 telephone number IDs can be disabled with one DPHONE command.
Example
532 DPHONE(1,2,3,5,6)
Notes
Do not use the DPHONE command over the network.
See also the EPHONE [➙ 131] topic.
Syntax
EMAUTO(pt1,...,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
For PXC.A devices, this statement has been replaced with SET (Set point value).
Changes the operational status of an ON/OFF/AUTO point to AUTO (local control) with emergency priority.
A maximum of 16 points can be changed with one EMAUTO command.
See also the EMFAST [➙ 126], EMOFF [➙ 126], EMON [➙ 127], and EMSET [➙ 127] topics.
Syntax
EMFAST(pt1,...,pt16)
pt1 through pt16 Point name to be set to FAST status with emergency priority.
- This parameter can be a LFSSL or LFSSP point.
Use
For PXC.A devices, this statement has been replaced with SET (Set point value).
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 EMFAST command.
See also the EMAUTO [➙ 125], EMOFF [➙ 126], EMON [➙ 127], EMSET [➙ 127], and EMSLOW [➙ 128] topics.
Syntax
EMOFF(pt1,...,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
For PXC.A devices, this statement has been replaced with SET (Set point value).
Changes the operational status of the specified points to OFF with emergency priority.
A maximum of 16 points can be changed with one EMOFF command.
See also the EMAUTO [➙ 125], EMFAST [➙ 126], EMON [➙ 127], EMSET [➙ 127], and EMSLOW [➙ 128]
topics.
Syntax
EMON(pt1,...,pt16)
pt1 through pt16 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
For PXC.A devices, this statement has been replaced with SET (Set point value).
Changes the operational status of the specified points to ON with emergency priority.
A maximum of 16 points can be changed with one EMON command.
See also the EMAUTO [➙ 125], EMFAST [➙ 126], EMOFF [➙ 126], EMSET [➙ 127], and EMSLOW [➙ 128]
topics.
Syntax
EMSET(value,pt1,...,pt15)
Use
For PXC.A devices, this statement has been replaced with SET (Set point value) [➙ 167].
Changes output points to a new value with emergency priority.
A maximum of 15 points can be changed with one EMSET command.
See also the EMAUTO [➙ 125], EMFAST [➙ 126], EMOFF [➙ 126], EMON [➙ 127], and EMSLOW [➙ 128]
topics.
Syntax
EMSLOW(pt1,...,pt16)
pt1 through pt16 Point name to be set to SLOW status with emergency priority.
- This parameter can be a LFSSL or LFSSP point
Use
For PXC.A devices, this statement has been replaced with SET (Set point value) [➙ 167].
Changes the operational status of a FAST/SLOW/ STOP point to SLOW with emergency priority.
A maximum of 16 points can be changed with one EMSLOW command.
See also the EMAUTO [➙ 125], EMFAST [➙ 126], EMOFF [➙ 126], EMON [➙ 127], and EMSET [➙ 127] topics.
Syntax
ENABLE(line1,...,line16)
Use
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.
● A maximum of 16 lines of PPCL code can be controlled with one ENABLE command.
Example
100 IF (TIME.GT.8:00.AND.TIME.LT.17:00) THEN
ENABLE(120) ELSE DISABL(120)
Notes
The ACT and ENABLE commands can be used interchangeably.
See also the ACT [➙ 99], DEACT [➙ 120], DISABL [➙ 122] Redundant PPCL Statements [➙ 14] topics.
Syntax
ENALM(pt1,...,pt16)
pt1 through pt16 Point name that should have alarm reporting enabled.
Use
For PXC.A devices, this statement has been replaced with SETVAL (Write property values).
Enables alarm reporting for the specified points.
A maximum of 16 points can be enabled for alarm reporting with one ENALM command.
Example
50 IF (SFAN.EQ.ON) THEN ENALM(ROOM1) ELSE DISALM(ROOM1)
Notes
Points must reside in the same device as the program.
● This command reverses the DISALM command.
● Points must be set up for alarming and have the ability to report alarms.
● This command does not override *ODSB*.
● For BACnet firmware, all three alarm events are enabled; that is, OFFNORMAL, NORMAL, and FAULT.
See also the ALARM [➙ 114], DISALM [➙ 123], HLIMIT [➙ 140], LLIMIT [➙ 144], and NORMAL [➙ 150] topics.
Syntax
ENCOV(pt1,...,pt16)
pt1 through pt16 Point name that is enabled to report updated changes-of-value (COV.
Use
This statement is no longer supported in PXC.A devices. The PXC.A PPCL runtime will consider this statement
invalid, and no replacements have been provided.
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.
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.
● Points defined in the statement must reside in the same device as the command.
● A maximum of 16 points can be controlled with one ENCOV command.
Example
50 IF (SFAN.EQ.ON) THEN ENCOV(ROOM1, ROOM2)
ELSE DISCOV(ROOM1,ROOM2)
See also the DISCOV [➙ 124] topic.
Syntax
EPHONE(pn#1,...,pn#16)
Use
This statement is no longer supported in PXC.A devices. The PXC.A PPCL runtime will consider this statement
invalid, and no replacements have been provided.
Enables telephone ID numbers. The telephone ID number is a numeric code that represents the actual telephone
number defined in the device.
A maximum of 16 telephone number IDs can be enabled with one EPHONE command.
Example
530 EPHONE(1,2,3,5,6)
Notes
Do not use the EPHONE command over the network.
See also the DPHONE [➙ 125] topic.
Syntax
FAST(pt1,...,pt16)
FAST(@prior, pt1,...,pt15))
Use
Changes the operational status of a FAST/SLOW/STOP point to FAST.
● Acceptable point types are: LFSSL or LFSSP.
● A maximum of 16 points can be changed with one FAST command.
● A maximum of 15 points can be defined with one FAST(@prior…) command.
Example
10 IF (RMTEMP.GT.78.0)THEN FAST(@NONE, FAN1,FAN2)
See also the AUTO [➙ 115], OFF [➙ 151], ON [➙ 154], and SLOW [➙ 170] topics.
GETVAL(targObjRef)
targObjRef A specifier for the target object, using the format for an object reference (for
example, BAC_7_AO_11, KwMeter). The value read from the source object
property will be written to the target object's present value property.
GETVAL(srcObjRef)
srcObjRef A specifier for the source object, using the format for an object reference (for
example, BAC_7_AO_11, KwMeter).
GETVAL(srcPropSpec)
srcPropSpec A specifier for the property to be read from the source object. srcPropSpec may
be passed in as:
- A numeric BACnetPropertyIdentifier from the standard range or a proprietary
range
- An abbreviated property name
GETVAL(srcIndex)
srcIndex An optional specifier for the target object(s) of the write operation. Between 1-
14 objects may be specified. The same property will be written in each target
object. An objectRef may be passed in using the format for an object reference
(for example, BAC_7_AO_11, KwMeter).
Use
GetVal is a new statement that allows PPCL access to individual object properties and supports either a numeric
property number or a textual property short name. Note that only properties with numeric data types or arrays of
numeric data types can be read or written in PPCL programs. The PPCL engine will handle conversions between
numeric types (Real, Unsigned, Integer).
Example
To read the reliability value from object RoomTemp10 GetVal(TheRoomTemp, [Room101]RoomTemp), Rlb in
device Room101 and save it as the present-value of local object TheRoomTemp:
10 GetVal(TheRoomTemp, [Room101]RoomTemp), Rlb
To read priority slot 5 from object RoomTemp in device Room101 and save it in local object TheLockVal:
10 GetVal(TheLockVal, [Room101]RoomTemp, PrioArr, 5)
Notes
Only properties of numeric data types can be read using GetVal.
See Appendix B−Property Short Names, Numbers, and Descriptions [➙ 190].
Syntax
GOSUB line# (pt1,...,pt15)
or parentheses are optional
GOSUB line# pt1,...,pt15
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
Subroutines are particularly useful for programs in which the same calculation is carried out several times using
different values.
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.
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.
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.
When using multi-level subroutines, the rules that govern $ARGn variables and point name declarations for
GOSUB commands change 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.
● When defining a new level in a multi-level subroutine, list the previously-defined $ARGn variables in sequential
order to preserve their values.
● 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.
● 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:
● 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.
● The variables PT1 and PT2 demonstrate the passing of values between subroutines.
● 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.
1000 C --SUBROUTINE 1
1001 C THIS SUBROUTINE ASSIGNS NUMBERS
1002 C TO PT1 AND PT2. IT THEN RETURNS
1004 C CONTROL TO THE MAIN PROGRAM.
1008 C
1010 PT1 = 10
1020 PT2 = 20
1030 RETURN
2000 C --SUBROUTINE 2
2001 C THIS SUBROUTINE PASSES THE VALUE OF
2002 C PT1 AND PT2 TO THEIR RESPECTIVE $ARG
2003 C POINTS. IT THEN ADDS ONE TO BOTH $ARG
2004 C POINTS AND RETURNS THE NEW VALUES TO
1380 C
1500 GOSUB 2030 PT1
2000 C
2010 C SUBROUTINE #1
2020 C
2030 ...
2040 ...
2050 C IN ORDER TO PRESERVE THE VALUE LOCATED
2060 C IN $ARG1, YOU MUST DEFINE $ARG1 IN THE
2070 C SECOND SUBROUTINE'S CALLING GOSUB. THE
2080 C PROGRAM ALSO PASSES A SECOND POINT
2090 C VALUE NAMED PT2.
2100 C
2500 GOSUB 3030 $ARG1,PT2
2510 RETURN
3000 C
3010 C SUBROUTINE #2
3020 C
3030 ...
3040 ...
3050 C IN ORDER TO PRESERVE THE VALUES
3060 C LOCATED IN $ARG1 AND $ARG2, YOU MUST
3070 C DEFINE BOTH POINTS IN THE THIRD
3080 C SUBROUTINE'S CALLING GOSUB. THE
3090 C PROGRAM ALSO PASSES A THIRD POINT
3100 C VALUE CALLED PT3.
3200 GOSUB 4020 $ARG1,$ARG2,PT3
3210 RETURN
4000 C SUBROUTINE #3
4010 C
4020 ...
4030 ...
4040 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 the GOTO [➙ 139] and RETURN [➙ 165] topics.
Syntax
GOTOline#
Use
This command is used to control program execution by branching to a different section of the program.
Example
10 IF (FANRUN.GE.1000) THEN GOTO 50
Notes
● A GOTO command should only transfer program control to the same or a sequentially higher line number.
● 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.
● A GOTO command should not transfer program control to a comment line.
● 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, time-based commands (LOOP, WAIT, etc.) will not function properly.
See also the GOSUB [➙ 134] and RETURN [➙ 165] topics.
Syntax
HLIMIT(value,pt1…pt15)
Use
For PXC.A devices, this statement has been replaced with SETVAL (Write property values).
Sets a new high alarm limit for alarmable analog points.
A maximum of 15 points can be set to the same high limit with one HLIMIT command.
Example
100 IF (OATEMP.GT.70.0) THEN HLIMIT(84.0,
ROOM16)ELSE HLIMIT(78.0,ROOM16)
Notes
● Points must reside in the same device as the program.
● Points used in the HLIMIT command must be defined as alarmable.
See also the ALARM [➙ 114], DISALM [➙ 123], ENALM [➙ 129], LLIMIT [➙ 144], and NORMAL [➙ 150] topics.
HOLIDA (Holiday)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ●
Syntax
HOLIDA(month1,day1,...,month8,day8)
lmonth1 through Month of the designated holiday. (January = 1, June = 6, December = 12, etc.)
month8
day1 through Day of the month for the designated holiday. The first day of the month is entered as 1.
day8
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 PPCL HOLIDA statement and the days defined in the TOD calendar.
See also the TOD [➙ 179], TODMOD [➙ 180], and TODSET [➙ 182] topics.
Syntax
IF(exp) THENx
or
IF(exp) THENxELSEy
exp Expression representing one or more logical or relational tests that are the basis for the THEN/ELSE decision making.
- The logical test can compare variables, constants, status indicators, priority indicators, and/or numbers, state text, and
system points.
- Several logical tests can be linked together with relational or logical operators.
- A maximum of 13 operands can be tested.
- Operands can be point names, status indicators (i.e., ON, ALARM, etc.), @ priority indicators, and/or numbers.
x Represents a condition, assignment, or course of action to take if the expression (exp) is true.
y Represents a condition, assignment, or course of action to take if the expression (exp) is false.
Use
This conditional logic command is used to provide customized decision logic.
● When the IF expression is true, the THEN command is executed.
● When the IF expression is false, the ELSE command (if defined) is executed.
● If the IF expression is false and no ELSE command is defined, execution continues with the next line of code.
Example 1
110 IF (OATEMP.GT.70.0) THEN OADPR = 80.0
Example 2
310 IF (TIME.GT.8:00.AND.TIME.LT.16:00) THEN
ON(@NONE,SFAN) ELSE ON(@OPER, SFAN)
Notes
● GOSUB commands should not be used for the x or y parameters.
● Time-based commands such as WAIT and TODMOD should not be directly used for the x or y parameters.
Syntax
INITTO(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.
pt1 through pt15 Names of points that are defined for totalization. Points must reside in the same device as the control program
Use
Change the totalized value of a point to a new value (generally 0).
A maximum of 15 point names can receive the new value through one INITTO command.
Example
10 IF (DAYOFM.EQ.1.0) THEN INITTO(0.0, PMP1,PMP2)
Notes
● Points must reside in the same device as the command.
● The INITTO command cannot reset the value of LPACI point types.
● Only points that are defined to be totalized can be initialized by this command.
● When used in APOGEE automation stations (which can totalize individual states of a point), INITTO will reset
all totalized states of a digital point to zero.
Syntax
LLIMITl(value,pt1,...,pt15)
Use
For PXC.A devices, this statement has been replaced with SETVAL (Write property values).
Sets a new low alarm limit for alarmable analog points.
A maximum of 15 points can be set to the same low limit with one LLIMIT command.
Example
100 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 program.
● Points used in the LLIMIT command must be defined as alarmable.
See also the ALARM [➙ 114], DISALM [➙ 123], ENALM [➙ 129], HLIMIT [➙ 140], and NORMAL [➙ 150] topics.
Syntax
LOCAL(pt1,... ,pt16)
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.
● For PXC.A controllers, these points can only be accessed from within the device.
● For PXC.A controllers, there is no limit to the number of local objects that can be generated.
Example 1
The following is an example of commanding a local point contained within a program:
10 IF (FANRUN.GE.1000) THEN GOTO 50
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 ...
Syntax
LOOP(type,pv,cv,sp,pg,ig,dg,st,bias,lo,hi,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 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.
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.
lo 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.
0 Not used. Enter zero.
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.
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.
Regardless of PPCL program execution rate property setting, the LOOP statement
will execute at user defined second intervals. The system will ensure the user
defined Sample time (st) is achieved.
Example
2000 C CONTROL LOOP STATISTICS
2002 C DIRECT CONTROL LOOP
2004 C INPUT = RM100 OUTPUT = HVALVE
2006 C SETPOINT = HSETPT
2008 C PROPORTIONAL GAIN = PGAIN-NO I OR D GAINS
2010 C SAMPLE TIME = 1 SECOND
2012 C BIAS = 5.5
2014 C LOW = 3.0
2016 C HIGH = 9.0
2018 LOOP(0,RM100,HVALVE,HSETPT,PGAIN,0,0,1,5.5,3.0, 9.0,0)
See also the ADAPTM [➙ 100] and ADAPTS [➙ 109] topics.
Syntax
MAX(result,pt1,...,pt15)
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.
Example
10 MAX(HOTZON, ZONE1, ZONE2, ZONE3, 9.0)
See also the MIN [➙ 148] topic.
Syntax
MIN(result,pt1,...,pt15)
Use
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
10 MIN(COOLZN,ZONE1,ZONE2,ZONE3,9.0)
See also the MAX [➙ 148] topic.
Syntax
NIGHT(pt1,...,pt16)
Use
For PXC.A devices, this statement has been replaced with SET (Set point value) [➙ 167]
Changes a LCTLR point to NIGHT mode status.
A maximum of 16 points can be changed with one NIGHT command.
Example
100 IF (TIME.LT.7:00.OR.TIME.GT.18:00) THEN
NIGHT(LCTLR2) ELSE DAY(LCTLR2)
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.
See also the DAY [➙ 115] topic.
Syntax
NORMAL(result,pt1,...,pt15)
pt1 through pt15 Name of a point to be removed from the alarm-by-command state.
Use
This statement is no longer supported in PXC.A devices. The PXC.A PPCL runtime will consider this statement
invalid, and no replacements have been provided.
Removes the specified points from the alarm-by-command condition and returns them to their normal operating
mode.
A maximum of 16 points can be changed with one NORMAL command.
Example
100 IF (RM90T.GT.80.0) THEN ALARM(ROOM90) ELSE NORMAL(ROOM90)
Notes
Points must reside in the same device as the program.
See also the ALARM [➙ 114], DISALM [➙ 123], ENALM [➙ 129], HLIMIT [➙ 140], and LLIMIT [➙ 144] topics.
Syntax
OFF(pt1,...,pt15)
OFF(@prior,pt1,...,pt15)
Use
For PXC.A devices, this statement has been replaced with SET (Set point value) [➙ 167]
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.
See also the AUTO [➙ 115], FAST [➙ 132], ON [➙ 154], and SLOW [➙ 170] topics.
Syntax
OIP(trigger, ''seq'')
Use
This statement is no longer supported in PXC.A devices. The PXC.A PPCL runtime will consider this statement
invalid, and no replacements have been provided.
Allows most operator functions to be executed from within a PPCL program. This command is generally used for
the following functions:
● Generating reports
● Changing point priorities
● Sending messages
● Triggering auto-dial
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.
Example
100 C
102 C OIP COMMAND INFORMATION:
104 C OPERATOR SEQUENCE
106 C
108 C - POINT
110 C - DISPLAY
112 C - PRINTER
114 C - YES
116 C - VALUE
118 C - ANY
120 C - NAME
122 C - ALL NAMES
124 C
130 C TRIGGER POINT - RPT7AM
150 OIP(RPT7AM,"P/D/P/Y/V/A/N/*")
Example to Dial Out Using a Modem—APOGEE Firmware
100 C APOGEE OIP COMMAND INFORMATION:
102 C DIAL-OUT TO MODEM
110 OIP(TRIGGER,”S/H/P/I/C/P/<field panel #>/<partner id>”)
Notes
● 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.
● The OIP command will appear as FAILED if the operator sequence was entered incorrectly and the control
program attempts to execute it.
● 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.
● 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.
● 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.
Correct
100 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.
● 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:
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:
OIP (TRIG, "P/T/D/P/// Name1//Name2//Name3//10/")
ON (On status)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ● ●
Syntax
ON(pt1,...,pt15)
ON(@prior,pt1,...,pt15)
Use
For PXC.A devices, this statement has been replaced with SET (Set point value) [➙ 167]
Changes the operational status of an ON/OFF/AUTO point to ON.
● Acceptable point types are: LDO, L2SL, L2SP, LOOAL, or LOOAP.
● 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.
Example
100 IF (OATEMP.LT.60.0)THEN ON(@NONE, PUMP1,PUMP2)
Notes
FAST/SLOW/STOP points (LFSSL, LFSSP) use the OFF command for STOP.
See also the AUTO [➙ 115], FAST [➙ 132], OFF [➙ 151], and SLOW [➙ 170] topics.
Syntax
ONPWRT(line#)
line# 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.
Use
This statement is no longer supported in PXC.A devices. The PXC.A PPCL runtime will consider this statement
invalid, and no replacements have been provided.
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.
Example
10 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.
● If the database for an automation station is lost due to a power failure, the ONPWRT command is not executed
when power is restored. See also the AUTO, FAST, ON, and SLOW topics.
Syntax
PDL(area,totkw,target,g1s,g1e,sh1,...,g4s,g4e,sh4)
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.
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.
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.
Use
Maintains a defined level of kilowatt use (or target) for a group of loads.
NOTE:
For a detailed explanation of Peak Demand Limiting (PDL), see Control Option
Comparisons.
A single PDL command is responsible for the direct control of a group of PDLDAT commands in a load-handling
automation station. The PDL command control includes:
● 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.
● 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.
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.
● With APOGEE firmware, one meter can be defined in each program.
● With pre-APOGEE firmware, only one meter can be defined in an automation station.
● The PDL statement fails if more than four shedding groups are defined.
● Do one of the following if all four shedding groups are not used:
– 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 the PDLDAT [➙ 158], PDLDPG [➙ 159], PDLMTR [➙ 160], and PDLSET [➙ 162] topics.
Syntax
PDLDAT(ptname,minon,minoff,maxoff,kwval)
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 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.
maxoff 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).
kwval 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 automation station 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.
Example
100 C
102 C PDLDAT COMMAND INFORMATION:
104 C
106 C - CONTROLLED POINT - FAN17
108 C - MINIMUM ON TIME - 10 MINUTES
110 C - MINIMUM OFF TIME - 5 MINUTES
112 C - MAXIMUM OFF TIME - 180 MINUTES
114 C - KILOWATT RATING - 10KW
116 C
118 PDLDAT(FAN17,10,5,180,10)
Notes
● In a network system, a load defined by a PDLDAT statement must reside in the same automation station as the
PDL statement.
● A PDLDAT statement is referenced by only one PDL statement. Using multiple references produces
unpredictable results.
● The PDLDAT statement should be in the same automation station as the load.
See also the PDL [➙ 156], PDLDPG [➙ 159], PDLMTR [➙ 160], and PDLSET [➙ 162] topics.
Syntax
PDLDPG(area,kwtot1,target1,...,kwtot7,target7)
Use
Keeps track of how many kilowatts worth of load are available in each load-handling automation station and how
many kilowatts are to be shed or restored at any time in each automation station.
Sets the target value for each PDL command associated with a meter area.
The PDLDPG statement proportionally distributes the target value to each PDL statement according to the values
of kwtot1 through kwtot7.
Example
100 PDLDPG(1,TOTKW1,TGT1,TOTKW2,TGT2)
Notes
● In a network system, a load defined by a PDLDAT statement must reside in the same automation station as the
PDL statement.
● A PDLDAT statement is referenced by only one PDL statement. Using multiple references produces
unpredictable results.
● The PDLDAT statement should be in the same automation station as the load.
See also the PDL [➙ 156], PDLDAT [➙ 158], PDLMTR [➙ 160], and PDLSET [➙ 162] topics.
Syntax
PDLMTR(area,hist,calc,window,plot,warning,mt1, def1,...,mt5,def5)
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.
Use
The PDLMTR command is responsible for the following actions:
● Defining meters by point name.
● Monitoring meters.
● Making demand predictions that are used by the PDLDPG command.
● Updating report information pertaining to demand and consumption.
● Deciding when warning messages should be issued.
● Initializing a meter area.
● Defining default meter values.
Example
200 C
202 C PDLMTR COMMAND INFORMATION:
204 C
206 C - HISTORICAL WEIGHTING FACTOR - 30%
208 C - CALCULATION INTERVAL - 1 MINUTE
210 C - PREDICTION WINDOW - 15 MINUTES
212 C - THE TIME VERSUS DEMAND SECTION OF
214 C THE ACTIVITY REPORT PLOT HAS A
216 C FULL SCALE OF 500 KILOWATTS.
218 C - WARNING MESSAGES ARE ENABLED TO
220 C BE SENT TO ALARM DEVICES.
222 C - THE DEFAULT VALUES OF THE TWO
224 C METER POINTS (METER1 AND
226 C METER2) ARE 100 KILOWATTS AND
228 C 50 KILOWATTS RESPECTIVELY.
230 C
250 PDLMTR(1,30,1,15,500,1,METER1,100, METER2,50)
Notes
● Only one PDLMTR command can be defined per meter area.
● For APOGEE automation stations, one PDLMTR command can be defined per program.
● With pre-APOGEE firmware, one meter area can be defined in an automation station.
● If a LPACI point is used in a PDLMTR statement, then PDL should be restarted for that meter area after the
LPACI is reset.
See also the PDL [➙ 156], PDLDAT [➙ 158], PDLDPG [➙ 159], and PDLSET [➙ 162] topics.
Syntax
PDLSET(area,exceed,set1,time1,...,set7,time7)
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.
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.
Example
100 C
101 C PDLSET COMMAND INFORMATION:
102 C
103 C - THIS COMMAND CONTROLS METER AREA 1.
104 C - THE VIRTUAL LDO POINT WHICH WILL
105 C TOGGLE ON AND OFF AT THE END OF
106 C THE SET POINT INTERVALS WHEN THE
107 C SET POINT WAS EXCEEDED IS
108 C CALLED PEAKEX.
109 C - PDLST1 SET POINT ENDS AT 11:00 A.M.
110 C - PDLST2 SET POINT ENDS AT 4:30 P.M.
111 C
120 PDLSET(1,PEAKEX,PDLST1,11:00,PDLST2,16:30)
Notes
The PDLSET command requires at least two setpoint/time definitions for each day in order to generate reports.
See also the PDL [➙ 156], PDLDAT [➙ 158], PDLDPG [➙ 159], and PDLMTR [➙ 160] topics.
RELEAS (Release)
Unitary Pre-APOGEE APOGEE BACnet PXC.A
● ● ● ●
cmdPriority A command priority specifier. cmdPriority may be specified as @1 through @16, indicating BACnet priorities 1 (highest)
through 16 (lowest).
Appending a '+' to the priority specifier will release the specified priority slot and lower. For example, @9+ will release
priority slots 9 through 16.
If cmdPriority is not specified when writing a commandable object, the program's PPCL Program Priority value shall be
used.
RELEAS(targObjRefs)
targObjRefs A specifier for the target object(s) of the set operation. Multiple objects may be specified. The same priority slot will be
written in each target object. A targObjRef may be passed as an object reference (for example, BAC_7_AO_11,
KwMeter).
Use
The updated RELEAS() statement writes the value null to one or more specified command priority array slots of a
specified object instance. RELEAS() has been modified to support BACnet command prioritization and to support
releasing multiple priority slots with a single statement.
Notes
● Database migration tools should automate the transformation of Apogee proprietary priorities to BACnet
priorities.
● In general, the program should limit itself to commanding at its specified priority as defined by the PPCL
Program Priority property.
● If the PXC.A automation station is unable to resolve one or more object references, whether the reference is
specified in valueSpec or one of the objrefs, the PPCL line will be marked unresolved.
RELEAS(@prior, pt1,...,pt15)
@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.
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.
● 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.
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.
● 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.
Syntax
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.
Example
100 GOSUB 310
110 ...
120 ...
130 ...
290 ...GO TO 350
300 C THIS SUBROUTINE PERFORMS...
310 ...
320 ...
330 ...
340 RETURN
350 CONTINUE WITH REST OF PROGRAM
Notes
● In a network system, a load defined by a PDLDAT statement must reside in the same automation station as the
PDL statement.
● A PDLDAT statement is referenced by only one PDL statement. Using multiple references produces
unpredictable results.
● The PDLDAT statement should be in the same automation station as the load.
See also the GOSUB [➙ 134] and GOTO [➙ 139] topics.
Syntax
SAMPLE(sec) line
line Any PPCL statement that does not include its own timing function. This includes:
WAIT, PDL, TOD, TIMAVG, LOOP, SSTO, or another SAMPLE command.
Use
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.
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.
Valid commands can include assignment, calculations, and program control (GOTO, GOSUB).
cmdPriority An optional command priority specifier. cmdPriority may be specified as @1 through @16, indicating priorities 1 (highest)
through 16 (lowest).
If cmdPriority is not specified when writing a commandable object, the program's PPCL Program Priority value shall be
used.
SET(srcValSpec)
srcValSpec A specifier for the value to write to the set of object properties. srcValSpec may be passed in as:
- A literal numeric value (for example, 1.0, -50)
- A reserved word specifying binary or multistate objects/bundled points
- An object reference (for example, BAC_7_AO_11, KwMeter)
SET(targObjRefs)
targObjRefs A specifier for the target object(s) of the set operation. Multiple objects may be specified. The same priority slot will be
written in each target object. A targObjRef may be passed as an object reference (for example, BAC_7_AO_11,
KwMeter).
Use
The update SET() statement writes the present-value property of a specified object instance. For commandable
properties, SET() has been modified to support BACnet command prioritization.
Notes
● Database migration tools should automate the transformation of Apogee proprietary priorities to BACnet
priorities.
● In general, the program should limit itself to commanding at its specified priority as defined by the PPCL
Program Priority property.
● If the PXC.A automation station is unable to resolve one or more object references, whether the reference is
specified in valueSpec or one of the objrefs, the PPCL line will be marked unresolved.
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.
NOTE:
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.
Example 1
450 SET(75.0,RMSET1,RMSET2,RMSET3)
Example 2
550 SET(@EMER,75.0,RMSET1,RMSET2,RMSET3)
Notes
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:
Virtual point = Resident point
Syntax
SETVAL(srcValSpec)
srcValSpec A specifier for the value to write to the set of object properties. srcValSpec may
be passed in as:
- A literal numeric value (for example, 1.0, -50)
- A reserved word specifying an enumerated value
- An object reference (for example, BAC_7_AO_11, KwMeter)
SETVAL(targPropSpec)
targPropSpec A specifier for the property to be written. targPropSpec may be passed in as:
- A numeric BACnetPropertyIdentifier from the standard range or a proprietary
range
- An abbreviated property name.
targObjRefs A specifier for the target object(s) of the write operation. Multiple objects may
be specified. The same property will be written in each target object. An
targObjectRef may be passed in using the format for an object reference (for
example, BAC_7_AO_11, KwMeter).
Use
Writes the value of a specified property in one or more object instances.
SetVal is a new statement that allows PPCL access to individual object properties and supports either a numeric
property number or a textual property short name. Note that only properties with numeric data types or arrays of
numeric data types can be read or written in PPCL programs. The PPCL engine will handle conversions between
numeric types (Real, Unsigned, Integer).
Example
To write the suppress event notification value to objects SupplyTemp and RoomTemp in device Room101:
10 SetVal(0, @SupEvtNotf, [Room101]SupplyTemp, [Room101]RoomTemp)
or
10 SetVal(0, 4972, [Room101]SupplyTemp, [Room101]RoomTemp)
Notes
Only properties of numeric data types and binary data types can be written using SetVal.
See Appendix B−Property Short Names, Numbers, and Descriptions [➙ 190].
Syntax
SLOW(pt1,...,pt16)
pt1 through pt16 Point names of LFSSL or LFSSP points that are commanded to SLOW.
SLOW(@prior, pt1,...,pt15)
Use
For PXC.A devices, this statement has been replaced with SET (Set point value) [➙ 167]
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 the AUTO [➙ 115], FAST [➙ 132], OFF [➙ 151], and ON [➙ 154] topics.
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.
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.
1 Normal schedule
2 Extended schedule
4 Shortened schedule
8 Weekend 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.
This command has the ability to tune itself by incrementing or decrementing the start time after calculating an
adjust time (ast) when errors between actual temperatures and desired temperatures occur.
Example
60 SSTO(1,1,ONTIM,OFTIM,6:30,7:45,8:00,15:30,
16:45,17:00,0.0,0.0)
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.
See also the SSTOCO [➙ 173], TOD [➙ 179], and TODSET [➙ 182] topics.
Syntax
STTOCO(zone,season,intemp,outemp,ctemp,ccoef1,ccoef2, ccoef3,ccoef4,htemp,hcoef1,hcoef2,hcoef3,hcoef4)
NOTE:
For variables used in the command, you can use numbers, point names, or local
variables.
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.
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.
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.
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 the SSTO [➙ 170], TOD [➙ 179], and TODMOD [➙ 180] topics.
STATE(srcValSpec)
srcValSpec A specifier for the value to write to the set of object properties. srcValSpec may
be passed in as:
- One of the strings in the object's state-text array
- An object reference (for example, BAC_7_AO_11, KwMeter). The referenced
object's present-value property will provide the source value.
targObjRefs A specifier for the target object(s) of the release operation. Multiple objects may
be specified. The same priority slot will be written in each target object. A
targObjRef may be passed as an object reference (for example,
BAC_7_AO_11, KwMeter).
Use
STATE() has been modified to support BACnet command prioritization and to support values passed as object
references as well as state text strings.
Notes
● State text arrays may be localized, meaning that PPCL programs may need to be language-specific if
srcValSpec is passed as a text string.
● Passing in srcValSpec as an object reference allows users to define reusable programs with local objects
representing specific values. This eliminates concerns about localization and customized state texts. For
example,
● In general, the program should limit itself to commanding at its specified priority as defined by the PPCL
Program Priority property.
● If the PXC.A automation station is unable to resolve one or more object references, whether the reference is
specified in srcValSpec or one of the targObjRefs, the PPCL line will be marked unresolved.
STATE(@pri,statetext,pt1...pt14)
Use
For PXC.A devices, this statement has been replaced with SET (Set point value) [➙ 167].
Commands points using a state text value.
● A maximum of 15 points can be changed with one STATE command.
● A maximum of 14 points can be changed with one STATE(@pri,statetext,…) command.
Example
500 STATE(NIGHT,TEC1,TEC2,TEC3,TEC4)
Syntax
TABLE(input,output,x1,y1,...,x7,y7)
Use
This command allows you to define a general function of two variables by specifying pairs of coordinates (x,y).
The TABLE command makes a straight line interpolation for the output (y) when the input is between a pair of x
values.
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.
For inputs larger than the last x used, the output will equal the last y value entered.
Example
500 C
502 C TABLE COMMAND INFORMATION:
504 C
506 C OATEMP (X) HWSP (Y)
508 C ---------- ----------
510 C 0 DEG F 180 DEG F
512 C 60 DEG F 100 DEG F
The hot water setpoint will remain at 180F when the outside temperature is below 0F. The hot water setpoint will
remain at 100F when the outside temperature is above 60F.
Notes
TABLE statements can be cascaded by overlapping x-y pairs using virtual points.
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:
Virtual point = Resident point
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.
samples Number of samples to be used to calculate the average.
- This must be an integer between 1 and 10.
input Point name whose average value is to be calculated.
- This parameter can be an LAI or LAO point or a local variable.
Use
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.
10 C SIX SAMPLES WILL BE TAKEN TO
20 C CALCULATE THE RMAVG.
30 C THE INTERVAL BETWEEN EACH SAMPLE
40 C WILL BE 10 MINUTES. RMTEMP WILL
50 C BE AVERAGED EVERY 60 MINUTES.
60 TIMAVG(RMAVG,600,6,RMTEMP)
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.
Syntax
TOD(mode,recomd,time1,time2,pt1,...,pt12)
pt1 through pt12 Point names of digital output points that are commanded ON or OFF.
1 Normal schedule
2 Extended schedule
4 Shortened schedule
8 Weekend schedule
* Mode number 16 (Holiday) should only be used with the HOLIDA command.
Use
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 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.
Syntax
TODMOD(momode,tumode,wemode,thmode,frmode,samode, sumode)
NOTE:
Valid mode values are described in the table following the parameter descriptions.
1 Normal schedule
2 Extended schedule
4 Shortened schedule
8 Weekend schedule
* Mode number 16 (Holiday) should only be used with the HOLIDA command.
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 TODMOD(1,1,1,1,2,4,8)
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.
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 automation station will only affect TOD and TODSET commands in that
automation station.
When a holiday date occurs in a HOLIDA command, the system sets the TODMOD mode number for that day to
16.
See also the HOLIDA [➙ 141], SSTO [➙ 170], TOD [➙ 179], and TODSET [➙ 182] topics.
Syntax
TODSET(mode,recomd,time1,val1,time2,val2,pt1,..., pt10)
NOTE:
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 (re-
command) is sometimes necessary for automation station 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.
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.
time2 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.
val2 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.
pt1 through pt10 Names of analog output points that are commanded to a value.
1 Normal schedule
2 Extended schedule
4 Shortened schedule
8 Weekend schedule
* 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.
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.
Example
550 TODSET(1,1,9:00,72.0,17:00,55.0, SPTEMP)
See also the HOLIDA [➙ 141], TOD [➙ 179], and TODMOD [➙ 180] topics.
Syntax
WAIT(time,pt1,pt2,mode)
NOTE:
Valid mode values are described in the table following the parameter descriptions.
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 C WHEN CNPUMP IS TURNED ON,
72 C THE FIELD PANEL WAITS 60 SECONDS
74 C BEFORE TURNING CHPUMP ON.
75 WAIT(60,CNPUMP,CHPUMP,11)
76 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.
● .AND.
● .EQ.
● .GE.
● .GT.
● .LE.
● .LT.
● .NAND.
● .NE.
● .OR.
● .ROOT.
● .XOR.
● @EMER
● @NONE
● @OPER
● @PDL
● @SMOKE
● ACT
● ALMACK
● ALMCNT
● ALMCT2
● ALMPRI
● AND
● ARG1 through ARG15
● ATN
● AUTO
● C (comment)
● COM
● COS
● CRTIME
● DAY
● DAYMOND
● DAYOFM
● DBSWIT
● DC
● DCR
● DEACT
● DEAD
● DEFINE
● DISABL
● DISALM
● ELSE
● EMAUTO
● EMER
● EMFAST
● EMOFF
● EMON
● EMSET
● EMSLOW
● ENABLE
● ENALM
● EQ
● EQUAL
● EXP
● FAILED
● FAST
● GE
● GOSUB
● GOTO
● GT
● HAND
● HLIMIT
● HOLIDA
● IF
● INITTO
● LE
● LINK
● LLIMIT
● MAX
● MIN
● MONTH
● NAND
● NE
● NGTMOD
● NIGHT
● NODE1 through NODE99
● NONE
● NOR
● OFF
● OK
● ON
● OPER
● OR
● PDL
● PDLDAT
● PDLDAT
● PDLMTR
● PDLSET
● PRFON
● RELEAS
● RETURN
● ROOT
● SAMPLE
● SECND1 through SECND7
● SECNDS
● SET
● SIN
● SLOW
● SMOKE
● SQRT
● SSTO
● SSTOCO
● STATE
● TABLE
● TAN
● THEN
● TIMAVG
● TIME
● TOD
● TODMOD
● TODSET
● TOTAL
● WAIT
● XOR
84 Pol Polarity
86 Prio Priority
99 ReadOnly Read-only
117 Un Units
TABLE($ARG1,$ARG2,2.65442,7.222,2.80645,4.445,2.98405,1.667,3.13403,-1.111,3.30652,-
3.889,3.44764,-6.667,3.60785,-9.444) ELSE GOTO 2060
02050 GOTO 2190
02060 IF($ARG1 .GE. 3.60785 .AND. $ARG1 .LT. 4.30938) THEN
TABLE($ARG1,$ARG2,3.60785,-9.444,3.73637,-12.223,3.87885,-15.0,3.991,-
17.778,4.11338,-20.556,4.20746,-23.334,4.30938,-26.111) ELSE GOTO 2080
02070 GOTO 2190
02080 IF($ARG1 .GE. 4.30938) THEN TABLE($ARG1,$ARG2,4.30938,-26.111,4.38506,-
28.889,4.46687,-31.667,4.52618,-34.444,4.58958,-37.222,4.63445,-40.0,4.68464,-42.778)
ELSE GOTO 2100
02090 GOTO 2190
02100 IF($ARG1 .GE. 0.6112 .AND. $ARG1 .LT. 1.04172) THEN
TABLE($ARG1,$ARG2,0.6112,57.222,0.66539,54.445,0.7305,51.667,0.7939,48.889,0.87265,46
.111,0.94866,43.333,1.04172,40.556) ELSE GOTO 2120
02110 GOTO 2190
02120 IF($ARG1 .GE. 0.36031 .AND. $ARG1 .LT. 0.6112) THEN
TABLE($ARG1,$ARG2,0.36031,73.889,0.39269,71.111,0.42917,68.334,0.46666,65.556,0.51237
,62.778,0.55631,60.0,0.6112,57.222) ELSE GOTO 2140
02130 GOTO 2190
02140 IF($ARG1 .GE. 0.2185 .AND. $ARG1 .LT. 0.36031) THEN
TABLE($ARG1,$ARG2,0.2185,90.556,0.23623,87.778,0.25706,85.0,0.2785,82.223,0.30543,79.
444,0.33031,76.667,0.36031,73.889) ELSE GOTO 2160
02150 GOTO 2190
02160 IF($ARG1 .GE. 0.13669 .AND. $ARG1 .LT. 0.2185) THEN
TABLE($ARG1,$ARG2,0.13669,107.223,0.1476,104.444,0.15817,101.667,0.17214,98.889,0.185
78,96.111,0.20214,93.333,0.2185,90.556) ELSE GOTO 2180
02170 GOTO 2190
02180 IF($ARG1 .LT. 0.13669) THEN
TABLE($ARG1,$ARG2,0.08726,123.889,0.09545,121.111,0.10124,118.333,0.10942,115.556,0.1
176,112.778,0.12578,110.0,0.13669,107.223)
02190 RETURN
02200 GOTO 1020
02210 C -------------------- END PROGRAM MEC100K -------------------
© Siemens 2023
Technical specifications and availability subject to change without notice.
A6V10374898