ProSoft Technology PTQ-AFC User Manual
Page 126
Quick Start
PTQ-AFC ♦ Modicon Quantum Platform
User Manual
Liquid and Gas Flow Computer for Hydrocarbon Products
Page 126 of 259
ProSoft Technology, Inc.
June 23, 2011
6.12.12 Event numbers and Event Log Download
For auditing purposes, each event has a "number" assigned sequentially, starting
at 0 for the first event written and increasing up through 65535 then wrapping to
0 again.
An event record properly includes its event number along with the information
listed in the preceding sections. To conserve space, and to make transmittal
more efficient, the event number is not stored as part of the event record.
Instead, the Event Log header contains sufficient information to calculate for any
event its event number from the position of its record in the Log and vice versa.
The following procedures use these terms:
Term
Meaning
my_record
Known record position.
Input to procedures (A) and (C)
event_number
Desired event number.
Output from procedure (A).
Modbus_address
Desired Modbus address.
Output from procedure (C).
my_event
Known event number.
Input to procedure (B).
record_position
Desired record position.
Output from procedure (B).
number_of_records
Maximum number of records.
Contents of register 40000. In this version of the AFC
"number_of_records" is 1999; however, to be compatible with future
versions that may store a different number of events, an application
should use the value from the header instead of a constant 1999.
next_record
Next new record position.
Contents of register 40001.
next_event
Next new event number.
Contents of register 40002.
oldest_event
Oldest event number on file.
Contents of register 40003.
oldest_not_downloaded
Oldest event number not yet downloaded.
Contents of register 40004.
events_on_file
Total number of events on file.
Calculated. This value starts at 0 upon cold start, then, as events are
logged, it rises to a maximum of "number_of_records" and stays there.
downloadable_event
Event number of event being downloaded.
Calculated.
event_age
The age of the event in question.
Calculated. The next event to be written (which of course is not yet on
file) has age 0; the newest event already on file has age 1, the next
older event has age 2, and so on up to age "number_of_records".