4 |
Example
The example below calculates Words per Sweep for a CGR935. It uses the following data:
User Program Size = 239000
Program Size = User Program Size + 11000 = 239000 + 11000 = 250000 bytes
Sweep Time = 100 ms
Max Completion Time = 60000 (1 minute)
| 250000 x 100 |
Words per Sweep = | |
| [60000 - (250000 x 0.0014) - 376] x 2 |
Words per Sweep = 216 (rounded up to next number divisible by 8)
Finding the Background Window Time
Next, use the calculated Words per Sweep in the following formula to determine how long to set the background window time.
C x (Sweep Time + Words per Sweep x F x 2)
Background Window Time =
(Max. Completion Time - C)
Here, the background window time is the time in milliseconds that you should set the background window timer. The other elements in the formula are described above. For our example, the background window time is:
| 376 x (100 + 216 x 0.0014 x 2) |
Background Window Time = | |
| (60000 - 376) |
Background Window Time = 1ms (rounded up to next ms)
Finding the Total Sweep Time
The final sweep time can therefore be estimated to be:
Final Sweep Time = Sweep Time + (Words per Sweep x F x 2) + Background Window Time
For our example, the sweep time is:
Final Sweep Time = 100 + (216 X 0.0014 X 2) + 1 = 101.6ms
Series |