User Guide
Table Of Contents
- Table of Contents
- How to Use This Manual
- Chapter 1–Program Methodology
- Overview
- Introduction to PPCL
- PPCL Rules
- PPCL Program Design Guidelines
- Relational Operators
- Logical Operators
- Arithmetic Operators
- Arithmetic Functions
- Special Functions
- Order of Precedence
- Resident Points
- Local Variables
- Point Priority Overview
- At (@) Priority Status Indicators
- Point Status Indicators
- Converting a Sequence of Operation intoProgram Code
- Chapter 2–Control OptionComparisons
- Chapter 3–Command Syntax
- Overview
- ACT (Activate lines)
- ADAPTM (Adaptive control, multiple)
- ADAPTS (Adaptive control, single)
- ALARM (Alarm state)
- AUTO (Auto status)
- DAY (Day mode)
- DBSWIT (Dead band switch)
- DC (Duty cycle)
- DCR (Duty cycle routine)
- DEACT (Deactivate lines)
- DEFINE (Define abbreviation)
- DISABL (Disable lines)
- DISALM (Disable alarm)
- DISCOV (Disable COV)
- DPHONE (Disable phone)
- EMAUTO (Emergency, Auto status)
- EMFAST (Emergency, Fast status)
- EMOFF (Emergency, Off status)
- EMON (Emergency, On status)
- EMSET (Emergency, set value)
- EMSLOW (Emergency, Slow status)
- ENABLE (Enable lines)
- ENALM (Enable alarm)
- ENCOV (Enable COV)
- EPHONE (Enable phone)
- FAST (Fast status)
- GOSUB (Go to subroutine)
- GOTO (Go to line)
- HLIMIT (High limit)
- HOLIDA (Holiday)
- IF/THEN and IF/THEN/ELSE (Conditional control)
- INITTO (Initialize totalized value)
- LLIMIT (Low limit)
- LOCAL (Local variable)
- LOOP (Loop control)
- MAX (Maximum value)
- MIN (Minimum value)
- NIGHT (Night mode)
- NORMAL (Normal operating mode)
- OFF (Off status)
- OIP (Operator interface program)
- ON (On status)
- ONPWRT (On after power return)
- PDL (Peak demand limiting)
- PDLDAT (PDL, define load attributes)
- PDLDPG (PDL, digital point group)
- PDLMTR (PDL, meter monitor)
- PDLSET (PDL, setpoints)
- RELEAS (Release)
- RETURN (Return/end subroutine)
- SAMPLE (Sample a statement)
- SET (Set point value)
- SLOW (Slow status)
- SSTO (Start/stop time optimization)
- SSTOCO (SSTO coefficients)
- STATE (State text command)
- TABLE (Table of coordinates)
- TIMAVG (Average over time)
- TOD (Time of day, digital points)
- TODMOD (TOD modes)
- TODSET (Time of day, analog points)
- WAIT (Wait time)
- Overview
- Glossary
- Appendix A—PPCL Reserved WordList
- Index
Program Methodology—Local Variables
Siemens Building Technologies, Inc. 1-61
$ARG1 through $ARG15
Unitary pre-APOGEE APOGEE BACnet
Syntax
$ARGn
n The number that describes what $ARGn point is
referenced.
• Valid values are 1 through 15.
Use
A $ARGn variable represents an actual point name used in a
subroutine. Instead of defining actual point names in a subroutine,
values are transferred to $ARGn variables. The $ARGn variables
represent their corresponding points as functions and calculations
are performed in the subroutine.
When the value of a $ARGn variable changes, the value of the
corresponding point is also updated.
When a $ARGn variable is encountered in the subroutine section of
the program, the computer checks the calling GOSUB command for
an available point name.
Example
1000 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
APOGEE PPCL User’s Manual
1-62 Siemens Building Technologies, Inc.
The value of RMTEMP = $ARG2
The value of SETPT = $ARG3
Notes
$ARGn points can only be used in subroutines.
See also
GOSUB