Use Of 2 Final Storage Areas - Saving Data Prior To Event - Campbell CR510 Operator's Manual

Datalogger
Hide thumbs Also See for CR510:
Table of Contents

Advertisement

12:
End (P95)
13:
End (P95)
14:
End (P95)
INPUT LOCATIONS
2 0_360_WD
6 0_540_out
10 0_540_WD
8.6 USE OF 2 FINAL STORAGE AREAS
- SAVING DATA PRIOR TO EVENT
One of the uses of 2 Final Storage Areas is to
save a fixed amount of data before and after
some event.
In this example, a load cell is measured every
second. It is assumed that at some random
interval the load will exceed 25 pounds for less
than 10 seconds. Exceeding 25 pounds 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 25
pounds).
Every second the load cell is measured; hours-
minutes, seconds, and the load are output to
Final Storage Area 2 (4 values with the Array
ID). 84 locations are allocated to Final Storage
Area 2. Thus, Area 2 holds 21 seconds (4
values/second x 21 seconds = 84 locations).
When 25 pounds is exceeded, 10 is loaded into
an input location and flag 1 is set high. The
input location is used as a down counter. The
flag indicates an event has occurred and
prevents the input location from being reloaded
until 11 seconds have passed.
The down counter is decremented by 1 each
time the table is executed. When it equals 0 all
the data in Final Storage Area 2 is transferred to
Final Storage Area 1 (using Instruction 96) and
Flag 1 is set low.
The down counter is set to 10 instead of 11
because it is decremented after checking to see
if it is 0.
SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES
*
01:
02:
03:
04:
05:
06:
07:
08:
09:
10:
11:
12:
PROGRAM
Table 1 Program
01:
1
Execution Interval (seconds)
Full Bridge (P6)
1:
1
Reps
2:
22
±7.5 mV 60 Hz Rejection Range
3:
1
DIFF Channel
4:
1
Excite all reps w/Exchan 1
5: 2500
mV Excitation
6:
1
Loc [ Force_kg ]
7:
15.120
Mult
8:
0
Offset
Do (P86)
1:
10
Set Output Flag High
Set Active Storage Area (P80)
1:
2
Final Storage Area 2
2:
10
Array ID or Loc
[ _________ ]
Real Time (P77)
1:
11
Hour/Minute,Seconds
Sample (P70)
1:
1
Reps
2:
1
Loc [ Force_kg ]
IF (X<=>F) (P89)
1:
1
X Loc [ Force_kg ]
2:
3
>=
3:
25
F
4:
30
Then Do
If Flag/Port (P91)
1:
21
Do if Flag 1 is Low
2:
30
Then Do
Do (P86)
1:
11
Set Flag 1 High
Z=F (P30)
1:
10
F
2:
0
Exponent of 10
3:
2
Z Loc [ Down_cnt ]
End (P95)
End (P95)
IF (X<=>F) (P89)
1:
2
X Loc [ Down_cnt ]
2:
1
=
3:
0
F
4:
30
Then Do
8-5

Advertisement

Table of Contents
loading

Table of Contents