SECTION 12. PROGRAM CONTROL INSTRUCTIONS

c)End loop with Instruction 95.

d)Use the If Time Instruction (#92) to set the Output Flag every hour.

e)Use the Average Instruction (#71) with 5 repetitions starting at input location 21 to average the vapor pressure over the hour.

The actual keyboard entries for the examples are shown below with the first example Instruction location equal to 10. The Input Instructions to make the pressure and temperature measurements are assumed.

TABLE 12-3. Loop Example: Block DataTransform

10:P87 Beginning of Loop

01:

0

Delay

02:

5

Loop Count

11:P57 Wet/Dry Bulb Temp to VP

01:10 Pressure Loc

02:11-- Dry Bulb Temp Loc DRY BLB#1

03:16-- Wet Bulb Temp Loc VP #1

04:

21--

Loc [:VP #1 ]

12:

P95

End

13:

P92

If time is

01:

0

minutes into a

02:

60

minute interval

03:

10

Set high Flag 0 (output)

14:

P71

Average

01:

5

Reps

02:

21

Loc VP #1

The Loop with a delay may be used so that only those instructions within the Loop are executed while certain conditions are met. As a simple example, suppose it is desired to execute one set of instructions from midnight until 6 AM, another set between 6 AM and 4 PM, and a third set between 4 PM and midnight. Between 6 AM and 4 PM, samples are desired every 10 seconds; the rest of the time one minute between samples is sufficient. The execution interval is set to 10 seconds; when a one minute sample rate is desired, a delay of 6 (6 x 10s = 60s) is used in the loop.

12-4