Operator`s manual
SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES
8-14
13: P87 Beginning of Loop
01: 0 Delay
02: 512 Loop Count
14: P86 Do
01: 10 Set high Flag 0 (output)
15: P78 Resolution
01: 1 High Resolution
16: P70 Sample
01: 1 Rep
02: 1-- Loc
17: P95 End
18: P86 Do
01: 11 Set high Flag 1
19: P End Table 1
* A Mode 10 Memory Allocation
01: 1030 Input Locations
02: 260 Intermediate Locations
8.8.2 EXAMPLE WITH BIN AVERAGING
The 21X was used to generate data simulating
wave data from an ocean buoy with four
superimposed sine wave signals, 0.1, 0.125,
0.14, and 0.2 Hz. The 2048 generated samples
simulate a sampling rate of 0.5 Hz or a 2.0
second scan rate. Figure 8.8-3 shows a plot of
part of the simulated signal. A FFT with 8 bin
averaging was performed on the data. A
multiplier of 0.1 was used to keep the FFT
results smaller than the +6999 upper limit of low
resolution Final Storage. The results of the FFT
are shown Table 8.8-4 and are illustrated in
Figure 8.8-4.
In the example program, a multiplier of 0.1 is
used in the FFT Instruction. By reducing the
FFT results by a factor of 10, the Low
Resolution output format can be used, thus
maximizing the Final Storage capacity. A Low
Resolution data point requires 2 bytes of Final
Storage memory, while a High Resolution data
point requires 4 bytes. When memory is a
limiting factor, the data should be scaled to be
less than 6999, so the Low Resolution format
can be used.
SIMULATED OCEAN WAVE BUOY DATA
TIME IN SECONDS
WAVE HEIGHT IN FEET
FREQ/AMPL .1/11, .125/9, .14/6, .2/4
0 6 121824303642485460667278849096102108114
30
20
10
0
-10
-20
-30
FIGURE 8.8-3. Simulated Ocean Buoy Wave
Data
SIMULATED OCEAN WAVE BUOY FFT RESULTS
FFT FREQUENCIES (0.00195-0.24765 Hz)
FFT RESUTLS - MULTIPLIER = 0.1
(Thousands)
FREQ/AMPL .1/11, .125/9, .14/6, .2/4
0.001950.03120.060450.08970.118950.14820.177450.20670.23595
1.3
1.2
1.1
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
FIGURE 8.8-4. Simulated Ocean Buoy FFT
Results