**APPENDIX "B"**

**[GENERAL PROGRAM LAYOUT]{.underline}**

Program lines are executed by the FID microprocessor Comment lines are
ignored by the microprocessor.

Comment lines provide an opportunity for copious description of a
functional block's operation and the points used.

Comment lines start from a multiple of one hundred and are numbered by
ones (e.g., 100, 101, 102,...)

Program lines will start from the next higher multiple of ten and be
numbered by tens (e.g., 110, 120, 130,...)

Comment blocks should begin and end with a C line as in below examples.
This structure provides eight lines of comment text and nine lines of
program code for each functional block. If a function cannot be
described in eight comment lines and performed in nine program lines it
can probably be broken down further into smaller functional blocks.

Lines 1-9 Introductory comments and outside air point identifiers

Lines 10-90 Outside air temperature code

Lines 100-109 Comments for next functional block

Lines 110-990 Code passing values to/from other panel virtual points &
other "boiler plate" code

Lines 1000-1009 Comments for next functional block

Lines 1010-1990 Code to control a specific major system such as an air
handler

Lines 1100-1109 Comments for next functional block

Lines 1110-1190 Code to control one component of that system such as fan
speed for duct static pressure

Lines 1200-1209 Comments for next functional block

Lines 1210-1290 Code to control the next system component

Lines 2000-2009 Comments for next functional block

Lines 2010-2990 Code to control the next major system

Lines 3000-3009 Comments for next functional block

Lines 3010-3990 Code to control the next major system

Et cetera

Last line 10010 GOTO 10

Program must flow from top to bottom. Top line and bottom line must be
evaluated on each pass-through. Do not condense program size at the
expense of clarity or ease of troubleshooting. If possible perform
control of all parts of a system in the same general area of the
program. Use virtual points instead of local variables where it is
necessary to check the progress/accuracy of program operation.

[Example Program]{.underline}

1 C

2 C \[Building and FID location\] \[systems controlled\] \[author and
date\]

3 C

4 C GET OA TEMP FROM 960 IF NETWORK IS CONNECTED

5 C A9605S = PRIMARY OUTSIDE AIR TEMPERATURE SENSOR

6 C A96333 = SECONDARY OUTSIDE AIR TEMPERATURE SENSOR

7 C C963O1 = OUTSIDE AIR TEMPERATURE VIRTUAL POINT FOR THIS FID

8 C NODE12 = THE NODE RESIDENT POINT FOR FID A AT 960

9 C

10 IF (A9605S .NE. FAILED) THEN GOTO 40

20 C963O1 = A96333

30 GOTO 110

40 IF (NODE12 .NE. FAILED) THEN GOTO 70

50 C963O1 = A96333

60 GOTO 110

70 C963O1 = A9605S

*Note:* *The outside air temperature code has been developed to work
under several different failure scenarios. The lines must appear in
exactly the order show above and with no consolidation of the lines. The
secondary temperature sensor should be one that is located in the same
building and on the same trunk segment as the new control panel. If no
such sensor exists, then the secondary outside air temperature sensor
for the trunk is used.*

100 C

101 C STORE VALUE OF COLDEST ROOM TEMPERATURE IN VIRTUAL POINT C963T1

102 C

110 MIN(C963T1, \[room temp sensors\])

200 C

201 C SET VALUE OF LOW TEMPERATURE ALARM C963A1

202 C

210 IF (C963O1 .GT. 30.0 .AND. C963T1 .GT. 60.0) THEN OFF (C963A1)

220 IF (C963O1 .LE. 25.0 .OR. C963T1 .LE. 55.0) THEN ON (C963A1)

300 C

301 C RESET WEEKEND

302 C

310 IF (DAY .LE. 2) THEN C963W1 = 2.0

400 C

401 C SET VALUE OF WORK DAY C963B1

402 C C963H1 IS COMMANDED ON DURING HOLIDAYS

403 C C963W1 VALUE OF: 5 OR LESS = M-F; 6 = M-F & SATURDAY;

404 C C963W1 VALUE OF: 7 = M-F & SUNDAY, 13 = M-F & SAT & SUN

405 C

410 IF (C963H1 .EQ. ON ) THEN GOTO 450

420 IF (DAY .LE. 5 .OR. C963W1 .GT. 12.5 .AND. C963W1 .LE. 13.5) THEN
GOTO 470

430 IF (DAY .EQ. 6 .AND. C963W1 .GT. 5.5 .AND. C963W1 .LE. 6.5) THEN
GOTO 470

440 IF (DAY .EQ. 7 .AND. C963W1 .GT. 6.5 .AND. C963W1 .LE. 7.5) THEN
GOTO 470

4 50 OFF (C963B1)

460 GOTO 510

470 ON (C963B1)

500 C

501 C TEST 24 HOUR RUN C963B2, 4 HOUR OCCUPY DEMAND C963D5, & NORMAL

502 C START/STOP TIME POINTS TO SET VALUE OF AH07 SYSTEM RUN POINT
C963B5

503 C C963B3 = START TIME FOR AH07

504 C C963B4 = STOP TIME FOR AH07

505 C

510 IF (C963B2 .OR. C963D5 .OR. C963A1) THEN GOTO 550

520 IF (C963B1.EQ.ON.AND.CRTIME.GT.C963B3.AND.CRTIME.LT.C963B4)THEN GOTO
550

5 30 OFF (C963B5)

540 GOTO 610

550 ON (C963B5)

600 C

601 C TOGGLE/INCREMENT LEAD PUMP SELECTORS ON FIRST OF EACH MONTH AT 6
AM

602 C C963L1 = DIGITAL LEAD/LAG SELECTOR FOR 1 OF 2 HW COIL PUMPS

603 C C963L2 = ANALOG LEAD/LAG/STANDBY SELECTOR FOR 1 OF 3 CW COIL PUMPS

604 C

610 IF (DAYOFM .NE. 1) THEN OFF(\$LOC1)

620 IF (DAYOFM .NE. 1 .OR. \$LOC1 .OR. CRTIME .NE. 6.0) THEN GOTO 710

630 IF (C963L1) THEN OFF(C963L1) ELSE ON(C963L1)

640 IF (C963L2 .GT. 2.0) THEN (C963L2 = 1.0 ) ELSE (C963L2 = C963L2 +
1.0 )

650 OFF (\$LOC1)

700 C

701 C TEST UNOCCUPY OVERRIDE BUTTON TO SET OCCUPY FOR 4 HOURS

702 C C96332 = BUTTON

703 C C963D5 = OVERRIDE DEMAND

704 C

710 IF (C96332 .AND. C963D5 .EQ. 0) THEN C963D5 = 2

720 IF (C963D5 .EQ. 0) THEN SECND4 = 0

730 IF (SECND4 .LT. 7200) THEN GOTO 1010

740 SECND4 = 0

750 IF (C963D5 .EQ. 2) THEN C963D5 = 1 ELSE C963D5 = 0

1000 C

1001 C TEST SYSTEM RUN (C963B5) TO RUN SUPPLY FAN C96300

1002 C TEST FAN RUN STATUS TO DETERMINE CONTROL STRATEGY

1003 C

1010 IF (C963B5) ON (C96300) ELSE OFF (C96300)

1020 IF (C96300 .EQ. PRFON) THEN GOTO 1210

1100 C

1101 C FAN IS OFF. CLOSE RELIEF DAMPER, MINIMUM OA DAMPER, & COIL VALVES

1102 C SET FAN SPEED CONTROL TO IDLE

1103 C

1110 SET (0.0,C96322,C96323, C96326)

1120 SET (15.0, C96325)

1130 SET (8.0,C96321)

1140 GOTO 2010

1200 C

1201 C FAN RUNS. CONTROL FAN SPEED TO MAKE DUCT STATIC PRESSURE MEET
SETPT

1202 C C96355 = DUCT STATIC PRESSURE

1203 C C96321 = FAN SPEED CONTROL

1204 C C963S1 = DUCT STATIC SETPOINT

1205 C

1210 LOOP (0,C96355,C96321,C963S1,2000,40,0,2,8.0,4.0,20.0,0)

1300 C

1301 C OPEN MIN OUTSIDE AIR DAMPER C96323 WHEN FAN RUNS

1302 C

1310 SET(15.0,C96323)

1400 C

1401 C TAKE 10 SAMPLES OF BLDG STATIC PRESSURE OVER 20 SECONDS & GET
AVERAGE

1402 C CONTROL RELIEF DAMPER TO MAKE AVERAGED PRESSURE MEET SETPT

1403 C C96353 = BUILDING STATIC PRESSURE

1404 C C963S2 = BUILDING STATIC PRESSURE SETPOINT

1405 C C96322 = RELIEF DAMPER

1406 C

1410 TIMAVG (\$LOC2,2,10,C96353)

1420 \$LOC3 = \$LOC2 \* 100.0

1430 \$LOC4 = C963S2 \* 100.0

1440 LOOP (128,\$LOC3,C96322,\$LOC4,375,8,1,1,7.0,7.0,14.0,0)

1500 C

1501 C CONTROL HW & CW COIL VALVES TO MAKE SA TEMP MEET SETPT

1502 C

1510 LOOP (0,C96352,\$LOC7,C963S0,800,16,0,2,7.5,1.0,14.0,0)

1520 TABLE (\$LOC7,C96325,7.0,7.0,14.0,14.0)

1530 TABLE (\$LOC7,C96326,1.0,1.0,7.0,7.0)

2000 C

2001 C TEST OA TEMP & COMPARE SA TEMP TO SETPT TO SET HW PUMP DEMAND

2003 C

2010 IF ((C963S0 - C96352) .GT. 5.0) THEN GOTO 2030

2020 SECNDS = 0

2030 IF (SECNDS .GT. 600) THEN ON (\$LOC5) ELSE OFF (\$LOC5)

2040 IF (C963O1 .LE. 60.0 .OR. \$LOC5) THEN ON (C963D2)

2050 IF (C963O1 .GT. 65.0 .AND. \$LOC5 .NE. ON) THEN OFF (C963D2)

2100 C

2101 C TEST DEMAND FOR HW COIL PUMP TO DETERMINE PUMP OPERATION

2102 C

2110 IF (C963D2) THEN GOTO 2310

2200 C

2201 C DEMAND FOR PUMP IS OFF. TURN OFF BOTH PUMPS

2202 C

2210 OFF (C96303, C96304)

2220 GOTO 3010

2300 C

2301 C DEMAND IS ON. TEST LEAD SELECTOR TO DETERMINE PUMP ASSIGMENT

2302 C

2310 IF (C963L1) THEN GOTO 2510

2400 C

2401 C RUN NORTH PUMP AS LEAD, SOUTH AS LAG

2402 C

2410 ON (C96303)

2420 IF (C96303 .NE. PRFON) THEN ON(C96304) ELSE OFF (C96304)

2430 GOTO 3800

2500 C

2501 C RUN SOUTH PUMP AS LEAD, NORTH AS LAG

2502 C

2510 ON (C96304)

2520 IF (C96304 .NE. PRFON) THEN ON(C96303) ELSE OFF (C96303)

3000 C

3001 C TEST OA TEMP & COMPARE SA TEMP TO SETPT TO SET CW COIL PUMP
DEMAND

3002 C

3010 IF ((C96352 - C963S0) .GT. 5.0) THEN GOTO 3030

3020 SECND1 = 0

3030 IF (SECND1 .GT. 600) THEN ON (\$LOC6) ELSE OFF(\$LOC6)

3040 IF (C963O1 .GT. 70.0 .OR. \$LOC6) THEN ON(C963D3)

3050 IF (C963O1 .LE. 65.0 .AND. \$LOC6 .NE. ON) THEN OFF(C963D3)

3 100 C

3101 C TEST DEMAND FOR CW PUMP TO DETERMINE PUMP OPERATION

3102 C

3110 IF(C963D3)THEN GOTO 3310

3200 C

3201 C NO DEMAND FOR CW. TURN OFF PUMPS

3202 C

3210 OFF(C96301,C96302,C96303)

3220 GOTO 10010

3300 C

3301 C TEST VALUE OF LEAD SELECTOR & SET PUMP ASSIGNMENTS

3302 C RUN EAST AS LEAD, CENTER AS LAG, WEST AS STANDBY

3303 C

3310 IF(C963L2.GT.1.0)THEN GOTO 3410

3320 ON(C96301)

3330 IF(C96301.EQ.PRFON)THEN GOTO 3370

3340 ON(C96302)

3350 IF(C96302.EQ.PRFON)THEN OFF(C96303)ELSE ON(C96303)

3360 GOTO 10010

3370 OFF(C96302,C96303)

3380 GOTO 10010

3400 C

3401 C TEST VALUE OF LEAD SELECTOR & SET PUMP ASSIGNMENTS

3402 C RUN CENTER AS LEAD, WEST AS LAG, EAST AS STANDBY

3403 C

3410 IF(C963L2.GT.2.0)THEN GOTO 3510

3420 ON(C96302)

3430 IF(C96302.EQ.PRFON)THEN GOTO 3470

3440 ON(C96303)

3450 IF(C96303.EQ.PRFON)THEN OFF(C96301)ELSE ON(C96301)

3460 GOTO 10010

3470 OFF(C96303, C96301)

3480 GOTO 10010

3500 C

3501 C TEST VALUE OF LEAD SELECTOR & SET PUMP ASSIGNMENTS

3502 C RUN WEST AS LEAD, EAST AS LAG, CENTER AS STANDBY

3503 C

3520 ON(C96303)

3530 IF(C96303.EQ.PRFON)THEN GOTO 3570

3540 ON(C96301)

3550 IF(C96301.EQ.PRFON)THEN OFF(C96302)ELSE ON(C96302)

3560 GOTO 10010

3570 OFF(C96301, C96302)

10000 C

10001 C THE END. GO BACK TO THE TOP AND DO IT AGAIN

10002 C

10010 GOTO 10

Control strategies shown are basic. Application may call for more
detailed control with time delay, anti-toggle protection, emergency on
or lockout, etc.

Boiler control is similar to the hot and cold water pump control shown
above. There is a demand point, usually based on outside air
temperature, and there is a minimum run time for the boiler.

Chiller/Tower control strategies vary because the systems vary. Demand
points are used, but are not always based on outside air temperature.
Pumps and chillers require lead/lag points as show in the example code.