
12
4.4 Configuring and Accessing Log Files
Configuring Memory for Logging
To use the onboard data logging, allocate a separate log partition for each specific data you want to be recorded
in your instrument. The PM172 provides concurrent recording data in 9 different memory partitions, one of which
is intended to record event log data, and the others to store 8 different data logs using different sets of data
parameters. Additionally, the two last data logs #7 and #8 can be configured to automatically record TOU monthly
and daily profile data respectively using season TOU tariffs. Refer to Section 5.19 for information on how to
allocate a memory partition for your specific data. Refer to Section 5.20 on how to configure a set of parameters to
be recorded to each data log.
Each memory partition you allocated for logging is organized as a sequential file of records where all data is
recorded in chronological order with a time and date stamp. When a partition is filled up, recording can be stopped
or can continue over the oldest records if you specified a partition with a wrap-around (circular) attribute. TOU
profile log partitions are automatically configured as wrap-around.
Each record within a log file has a unique sequence number that guards against missing or duplicated records
when reading the log file. This number is incremented (modulo 65536) with each log and will not be replicated
within the following 65535 logs. If a record is missing because of a communication problem, the read sequence for
the log can be restored from the record with the desired sequence number.
Accessing Log Files
Each log file has a separate file read pointer which always points to the current file record that will be read next,
and a separate register window which gives access to the record pointed to by this pointer. Initially, the read
pointer is associated with the oldest record in the file. Reading a record via the file window returns the current
record data, and then the pointer automatically advances to the following record in the file. Consequent requests
addressed to the file window will return a new record each time in the direction from the oldest record to the more
recent records. Because the file window advances automatically after the instrument responds to the master
request (regardless of the number of registers in the window being accessed), the entire window must be read at
once using a single request.
After the last record of the file has been read, the file read pointer is automatically shifted to the beginning of the
file. Using circular read requests always allows you to read the entire log file regardless of the current file status.
You can simply poll the file window registers just as you poll ordinal data in your SCADA applications, without the
need to manipulate the file pointer. Refer to Sections 5.29, 5.30 and 5.31 for information on read requests you can
use to access your log files.
A log file can be read both in an arbitrary order and in sequence as explained above. To access the log records in
a random order, the file read pointer can be re-written with the desired sequence number to point to the desired
record. Refer to Sections 5.5 and 5.6 for information on how to check the log file status and how to re-write the file
read pointer. Writing to the memory partition command register (see Section 5.6) allows you to force the file
pointer to point to the oldest record in the file or to the first new, unread record in the file. You can also use the
instrument reset registers (see Section 5.7) to restore the file read pointer to the oldest record in your log file if you
want to re-read the file from the beginning.
IMPORTANT: Take into consideration the fact that in a wrap-around (circular) log partition, the oldest records may
be overwritten by the most recent records since you have read either log status register. An attempt to point to the
particular record directly by using its sequence number may fail if the addressed record has just been overwritten.
4.5 Password Protection
The PM172 has a password protection option allowing you to protect your setups, cumulative registers and logs
from being changed or cleared through communications. You can disable or enable password protection for
communications via the front panel. For details, refer to your instrument Installation and Operation Manual. When
password protection is enabled, the user password you set in your instrument should be written into the
communications password register (see Section 5.23) before another write request will be issued. If the correct
password is not supplied while password protection is enabled, the instrument will respond to all write requests
with the exception code 01 (illegal operation). It is recommended to clear the password register after you have
completed your changes in order to activate password protection.