Claims
- 1. In an embedded microcontroller based control system reading field parameters and keeping a historical database of the field parameters in a memory device, a method of storing the historical data comprising:
a) grouping a first parameter and a second parameter into a first segment; b) writing a data value for the first parameter and a data value for the second parameter to the historical database; c) writing a first segment time-stamp associated with both the data values for the first and second parameters; d) grouping a third parameter and a fourth parameter into a second segment; e) writing a data value for the third parameter and a data value for the fourth parameter to the historical database; f) writing a second segment time-stamp associated with both the data values for the third and fourth parameters; g) repeating steps b) and c) at a first sample rate; and h) repeating steps e) and f) at a second sample rate different than the first sample rate.
- 2. The method of storing the historical data as defined in claim 1 further comprising changing one of the first and second sample rates.
- 3. The method of storing the historical data as defined in claim 1 wherein steps b) and c) further comprising:
b1) writing a short interval data value and a long interval data value for the first parameter; b2) writing a short interval data value and a long interval data value for the second parameter; and c1) writing a plurality of first segment time-stamps, wherein one time-stamp is associated with the short interval data values of the first and second parameters, and one time-stamp is associated with the long interval data values of the first and second parameters.
- 4. The method of storing the historical data as defined in claim 3 wherein steps e) and f) further comprising:
e1) writing a short interval data value and a long interval data value for the third parameter; e2) writing a short interval data value and a long interval data value for the fourth parameter; and f1) writing a plurality of second segment time-stamps, wherein one time-stamp is associated with the short interval data values of the third and fourth parameters, and one time-stamp is associated with the long interval data values parameters of the third and fourth parameters.
- 5. A system for maintaining a historical database of information comprising:
a microcontroller; a read only memory (ROM) device coupled to the microcontroller, the ROM device storing programs executable by the microcontroller that stores data in the historical database; a random access memory (RAM) device coupled to the microcontroller and containing the historical database, the RAM device comprising a set of continuously addressed memory locations, and wherein a first portion of the memory locations comprises a segment component, a second portion of the memory locations comprises a point component, a third portion of the memory locations comprises time-stamp data, and fourth portion of the memory locations comprises log data; and wherein the first portion is continuous with the second portion which is continuous with the third portion which is continuous with the fourth portion.
- 6. The system for maintaining a historical database of information as defined in claim 5 wherein the segment component in the first portion of the continuously addressed memory locations further comprises:
a plurality of segments, each segment comprising:
a list of points of the second portion of continuously addressed memory locations associated with the segment; and a list of locations in the third portion of the continuously addressed memory space associated with the segment.
- 7. The system for maintaining a historical database of information as defined in claim 5 wherein the point information of the second portion of the continuously addressed memory locations further comprises a plurality of points, each point comprising a list of locations in the fourth portion of the continuously addressed memory space where log data corresponding to the points are stored.
- 8. The system for maintaining a historical database of information as defined in claim 7 wherein the time-stamp data of the third portion of the continuously addressed memory locations further comprises a set of time-stamp data for each of the segments in the first portion of the continuously addressed memory space.
- 9. The system for maintaining a historical database of information as defined in claim 8 wherein the point information of the second portion of the continuously addressed memory locations further comprises a plurality of points, each point comprising a list of locations in the fourth portion of the continuously addressed memory space where log data corresponding to the point is stored.
- 10. The system for maintaining a historical database of information as defined in claim 9 wherein the point information of the second portion of the continuously addressed memory locations further comprises a plurality of points, each point comprising a list of locations in the fourth portion of the continuously addressed memory space where log data corresponding to the points are stored.
- 11. The system for maintaining a historical database of information as defined in claim 10 wherein the segment component in the first portion of the continuously addressed memory locations further comprises:
a plurality of segments, each segment comprising:
a list of points of the second portion of continuously addressed memory locations associated with the segment; and a list of locations in the third portion of the continuously addressed memory space associated with the segment.
- 12. In a microcontroller based flow computer calculating volumetric flows and keeping a historical database of field parameters in a memory device, a method of storing the historical data comprising:
a) writing an entry for a first parameter and an entry for a second parameter to the historical database; b) writing a first grouping time-stamp associated with both the entries for the first and second parameters; c) writing an entry for the third parameter and an entry for the fourth parameter to the historical database; d) writing a second grouping time-stamp associated with both the entries for the third and fourth parameters; e) repeating steps a) and b) at a first frequency; and f) repeating steps c) and d) at a second frequency different than the first frequency.
- 13. The method of storing the historical data as defined in claim 12 further comprising changing one of the first and second frequencies.
- 14. The method of storing the historical data as defined in claim 12 wherein steps a) and b) further comprise:
a1) writing a short interval entry and a long interval entry for the first parameter; a2) writing a short interval entry and a long interval entry for the second parameter; and b1) writing a plurality of first grouping time-stamps, wherein one time-stamp is associated with the short interval entries of the first and second parameters, and one time-stamp is associated with the long interval entries of the first and second parameters.
- 15. The method of storing the historical data as defined in claim 14 wherein steps c) and d) further comprising:
e1) writing a short interval entry and a long interval entry for the third parameter; e2) writing a short interval entry and a long interval entry for the fourth parameter; and f1) writing a plurality of second grouping time-stamps, wherein one time-stamp is associated with the short interval entries of the third and fourth parameters, and one time-stamp is associated with the long interval entries parameters of the third and fourth parameters.
- 16. A natural gas flow measurement computer comprising:
a microcontroller; a read only memory (ROM) device coupled to the microcontroller and storing a software programs executable by the microcontroller that calculate natural gas volumetric flow; and a historical database of volumetric flow data stored in a random access memory (RAM) device coupled to the microcontroller, the RAM device comprising a set of memory locations, and wherein a first portion of the memory locations comprises a segment component, a second portion of the memory locations comprises a point component, a third portion of the memory locations comprises time-stamp, and fourth portion of the memory locations comprises log data.
- 17. The natural gas flow measurement computer as defined in claim 16 further comprising wherein the first portion is continuous with the second portion which is continuous with the third portion which is continuous with the fourth portion.
- 18. The natural gas flow measurement computer as defined in claim 16 wherein the segment component in the first portion of the memory locations further comprises:
a plurality of segments, each segment comprising:
a list of points of the second portion of memory locations associated with the segment; and a list of locations in the third portion of the memory space associated with the segment.
- 19. The natural gas flow measurement computer as defined in claim 16 wherein the point information of the second portion of the memory locations further comprises a plurality of points, each point comprising a list of locations in the fourth portion of the memory space where log data corresponding to the points are stored.
- 20. The natural gas flow measurement computer as defined in claim 16 wherein the time-stamp data of the third portion of the memory locations further comprises a set of time-stamp data for each of the segments in the first portion of the continuously addressed memory space.
- 21. The natural gas flow measurement computer as defined in claim 20 wherein the point information of the second portion of the memory locations further comprises a plurality of points, each point comprising a list of locations in the third portion of the memory space where log data corresponding to the point is stored.
- 22. The natural gas flow measurement computer as defined in claim 21 wherein the point information of the second portion of the memory locations further comprises a plurality of points, each point comprising a list of locations in the fourth portion of the memory space where log data corresponding to the points are stored.
- 23. The natural gas flow measurement computer as defined in claim 22 wherein the segment component in the first portion of the memory locations further comprises:
a plurality of segments, each segment comprising:
a list of points of the second portion of memory locations associated with the segment; and a list of locations in the third portion of the memory space associated with the segment.
- 24. The natural gas flow measurement computer as defined in claim 23 further comprising wherein the first portion is continuous with the second portion which is continuous with the third portion which is continuous with the fourth portion.
- 25. A method comprising:
operating a volumetric flow computer; maintaining a historical database of calculated volumetric flows, each calculated volumetric flow having a fixed number of entries in the historical database; and increasing a number of entries in the historical database for a calculated volumetric flow without loss of existing log entries.
- 26. The method as defined in claim 25 wherein operating a volumetric flow computer further comprises calculating a plurality of volumetric flows one each for a plurality of metering locations.
- 27. The method as defined in claim 26 further comprising:
wherein maintaining a historical database of calculated volumetric flows, each calculated volumetric flow having a fixed number of entries in the historical database, further comprises:
maintaining a set of logs for a first calculated volumetric flow, the set of logs in a first fixed size portion of a memory device; and maintaining a set of time-stamps that correspond to the logs, the time-stamps in second fixed size portion of the memory device; wherein increasing a number of entries in the historical database for a calculated volumetric flow without loss of existing entries further comprises:
increasing an overall size of the first fixed size portion of the memory device to accommodate additional entries; and increasing an overall size of the second fixed size portion of the memory device to accommodate additional time-stamps.
- 28. The method as defined in claim 27 wherein increasing an overall size of the first fixed size portion of the memory device further comprises:
moving portions of the historical database to create free space continuous with the first fixed size portion of the memory device; and increasing the size of the first fixed size portion to encompass the free space.
- 29. The method as defined in claim 28 wherein increasing an overall size of the second fixed size portion of the memory device further comprises:
moving portions of the historical database to create free space continuous with the second fixed size portion of the memory device; and increasing the size of the second fixed size portion to encompass the free space.
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application is related to co-pending application Ser. No. ______ (Att'y Docket No. 1787-70800) titled “Method and System for Limiting Use of Embedded Software,” which is incorporated by reference as if reproduced in full below.