SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES
8-5
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.
PROGRAM
*
Table 1 Program
01:
1
Execution Interval (seconds)
01:
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
02:
Do (P86)
1:
10
Set Output Flag High
03:
Set Active Storage Area (P80)
1:
2
Final Storage Area 2
2:
10
Array ID or Loc
[ _________ ]
04:
Real Time (P77)
1:
11
Hour/Minute,Seconds
05:
Sample (P70)
1:
1
Reps
2:
1
Loc [ Force_kg ]
06:
IF (X<=>F) (P89)
1:
1
X Loc [ Force_kg ]
2:
3
>=
3:
25
F
4:
30
Then Do
07:
If Flag/Port (P91)
1:
21
Do if Flag 1 is Low
2:
30
Then Do
08:
Do (P86)
1:
11
Set Flag 1 High
09:
Z=F (P30)
1:
10
F
2:
0
Exponent of 10
3:
2
Z Loc [ Down_cnt ]
10:
End (P95)
11:
End (P95)
12:
IF (X<=>F) (P89)
1:
2
X Loc [ Down_cnt ]
2:
1
=
3:
0
F
4:
30
Then Do
Содержание CR510
Страница 1: ...CR510 DATALOGGER OPERATOR S MANUAL REVISION 2 03 COPYRIGHT c 1986 2003 CAMPBELL SCIENTIFIC INC ...
Страница 2: ...This is a blank page ...
Страница 4: ...This is a blank page ...
Страница 10: ...This is a blank page ...
Страница 44: ...SECTION 1 FUNCTIONAL MODES 1 14 This is a blank page ...
Страница 56: ...SECTION 3 INSTRUCTION SET BASICS 3 8 ...
Страница 104: ...SECTION 8 PROCESSING AND PROGRAM CONTROL EXAMPLES 8 8 This is a blank page ...
Страница 128: ...SECTION 10 PROCESSING INSTRUCTIONS 10 8 This is a blank page ...
Страница 144: ...SECTION 12 PROGRAM CONTROL INSTRUCTIONS 12 10 This is a blank page ...
Страница 172: ...SECTION 14 INSTALLATION AND MAINTENANCE 14 10 This is a blank page ...
Страница 176: ...APPENDIX A GLOSSARY A 4 This is a blank page ...
Страница 184: ...This is a blank page ...
Страница 188: ...APPENDIX D DATALOGGER INITIATED COMMUNICATIONS D 4 This is a blank page ...
Страница 196: ...APPENDIX F MODBUS ON THE CR10 X AND CR510 F 4 This is a blank page ...
Страница 197: ...APPENDIX G TD OPERATING SYSTEM ADDENDUM FOR CR510 CR10X AND CR23X MANUALS ...
Страница 198: ...This is a blank page ...
Страница 200: ...This is a blank page ...
Страница 206: ...TABLE DATA ADDENDUM AD 6 This is a blank page ...
Страница 222: ...TD ADDENDUM SECTION 1 FUNCTIONAL MODES AD 1 8 This is a blank page ...
Страница 238: ...TD ADDENDUM SECTION 8 PROCESSING AND PROGRAM CONTROL EXAMPLES AD 8 10 This is a blank page ...
Страница 240: ...This is a blank page ...