Energy log single record retrieval – Rockwell Automation 1426 PowerMonitor 5000 Unit User Manual

Page 111

Advertising
background image

Rockwell Automation Publication 1426-UM001F-EN-P - November 2013

111

Logging

Chapter 6

Energy Log Single Record Retrieval

A controller or application can sequentially retrieve records from the Energy Log
files by following the process described in this section, following these general
tasks.

1.

Read the number of log files from the Statistics.Logging table.

2.

Write the Configuration.Log_Read table and read the filename from the
LoggingResults.EnergyLog_FileName table until the desired log file is
selected.

3.

Write the selected file name into the Configuration.EnergyLogFile table.

4.

Perform sequential reads of the LoggingResults.Energy_Log table and
store the results in a suitable location.

The Statistics.Logging table contains the following Energy Log information:

Element 5 and 6, the number of Energy Log records

Element 10, the number of Energy Log files

The Configuration.LogRead table contains the following elements:

Element 0. Write a value of 8 to request the next Energy Log file name

Element 1: Write a 0 to return the most recent file name first or a 1 to
return the oldest file name first

The LoggingResults.EnergyLog_FileName table returns a string containing the
requested file name. The file name contains the starting date and time of the log
file, as described above in

File Names on page 109

.

The Configuration.EnergyLogFile table contains the file selection string.
Options include the following:

The desired Energy Log file name from which to return records

Alternately, ‘allfiles’, to return records from all Energy Log files

An appended chronology switch:

‘/r’ to begin with the most recent record

‘/f ’ to return the oldest record first (default if no chronology switch is
appended)

For example, writing the string ‘EnergyLog_20130112_0630_11/r’ selects the
file EnergyLog_20130112_0630_11. Successive reads of the
LoggingResults.Energy_Log table return sequential energy log records, starting
with the last record.

Advertising