
Section 8. Processing and Program Control Examples
8-13
03:
P86
Do
01:
11
Set high Flag 1
04:
P94
Else
05:
P86
Do
01:
21
Set low Flag 1
06:
P95
End
07:
P31
Z=X
01:
2
X Loc 0-360 WD
02:
10
Z Loc [:0-540 WD]
08:
P89
If X<=>F
01:
10
X Loc 0-540 WD
02:
4
<
03:
180
F
04:
30
Then Do
09:
P91
If Flag/Port
01:
11
Do if flag 1 is high
02:
30
Then Do
10:
P34
Z=X+F
01:
10
X Loc 0-540 WD
02:
360
F
03:
10
Z Loc [:0-540 WD]
11:
P31
Z=X
01:
10
X Loc 0-540 WD
02:
6
Z Loc [0-540 out]
12:
P95
End
13:
P95
End
14:
P95
End
15:
P
End Table 3
8.8 Use of Two Final Storage Areas – Saving Data
Prior to Event
One of the uses of two Final Storage Areas is to save a fixed amount of data be-
fore and after some event.
In this example, the output of a load cell is measured every second. It is assumed
that at some random interval the load will exceed 11.4kg for less than 10 seconds.
Exceeding 11.4kg is the event to be captured. The data from the 10 seconds
before the event and 10 seconds after the event is to be saved (21 seconds
including the scan in which the load first exceeds 11.4kg).
Every second the output of the load cell is measured; hours-minutes, seconds and
the load are output to Final Storage Area 2 (four values with the Array ID).