7EN02-0290-11

Log Mail Module

The Log Mail module is designed to take data from a Data Recorder module, format it as an email message, and deliver that email message to an address specified by the user.

Module icon

Overview

NOTE: The Log Mail module is available only on certain meters (those with older firmware). The Log Export module completely replaces the Log Mail module in newer meters.

NOTE: The registers and settings available in this module depend on the device or node you are configuring, as well as its firmware and template versions. Not all registers or settings are available on all devices or the Virtual Processor, and labels may vary.

Inputs

Source

This input is linked to the Data Log output of a Data Recorder module. The data from this Data Log output will be transported via email. Linking this input is mandatory.

Enable

If the Enable input is false, the Log Mail module will not respond to pulses arriving at the Send input. Linking this input is optional. If this is left unlinked, the module is enabled by default.

Send

When a pulse arrives at the Send input, the Log Mail module emails all Source data records that have not previously been sent. Linking this input is mandatory.

Setup registers

Email Address

This register contains the destination email address that the data logs will be sent to. The default value of this register is enter email address- the module will not go online unless the Email Address register is changed. You can only enter one email address per Log Mail module. The Email Address can be a maximum of 80 characters long.

NOTE: Make sure you set the SMTP Address setup register in the Ethernet Communications module.

Max Send Records

This register contains the maximum number of data records that the Log Mail module will attempt to send in any single email. The default value is 0 - the module will not go online unless this register is changed to a non-zero value.

Email From

This register contains the address that appears in the From: field of the email sent by the Log Mail module; refer to “Detailed Module Operation” for default values. Some SMTP servers only accept emails from valid Internet domains, so you may be required to alter the default address. You can use a maximum of 80 characters.

Output registers

Sending

A value of true at this output indicates the module is in the process of sending an email. If further pulses arrive at the Send input while the module is in this state, they will be ignored and an Event will be generated.

Records Sent

This output indicates the number of records sent in the last successful email.

Success

This output pulses when the module successfully sends an email.

Fail

This output pulses when the module fails to send an email.

Event

Any events produced by the Log Mail module are recorded in the Event register as follows:

Event priority group Priority Description
Send Pulsed While Already Sending 30 A pulse arrived on the Send input while the module was already in the sending state.
Email Send Failed 30 An email message failed to be sent successfully, for any number of reasons. The logged event will contain some indication of the reason for the failure.
Send Pulsed But No Records To Send 30 A pulse arrived at the Send input, but the Data Recorder which is linked to the Source input of the Log Mail module does not contain any unsent data records.

The Event output register stores the following information for each ION event: time stamp, priority, cause, effect, and any values or conditions associated with the cause and effect.

Detailed module operation

The following section details the format of the emails sent by the Log Mail module. You can customize some of the properties of the email including the information in the email’s header and body. A discussion on a few Log Mail applications follows.

Viewing Email Data Logs

The meter emails logged data daily, hourly, or at any interval that your Power Monitoring Expert or ION Setup software administrator sets up. The data log email shows the following:

  • name of the data log

  • device (meter) type

  • meter serial number

  • meter owner

  • additional user-defined meter identification information labeled “Tag1” and “Tag2”; Tag1 and Tag2 are meter settings for information of your choice

  • record number

  • UTC (Universal Coordinated Time) that the data was recorded

  • names of the logged data fields (e.g. Vln a, Vln b, Vln c)

  • numeric values of the logged data

The last two lines of the data log email above are represented in the following table. The Record Number is 0 (the number of records emailed at one time is determined by the meter configuration). The time that the data record was logged is given as the number of seconds elapsed since midnight on January 1, 1970. This format is called “UNIX Time (UTC).” The logged data fields Vln a, Vln b, Vln c (the Data Recorder module Source inputs 1–3) and each corresponding value are also indicated.

Record Number UTC Vln a Vln b Vln c
0 970093500 117.3777 116.9874 117.0674

Customizing Emails

Some information in the email header and body can be customized to meet your system requirements. The email’s header is comprised of the following elements within the module and your meter:

From:LogMail <module number> @ <meter serial number>

To:Email Address setup register

Subject:[metermail] <Data Recorder number from output > from meter <serial

Date:Date and Time the email left the meter

The email’s body contains many of the Factory module’s setup registers including DeviceType (Read Only), Serial Number (Read Only), Owner, Tag1, and Tag2. Logs are arranged in comma-separated columns at the end of the email; each record number and its UTC timestamp precede the values recorded by the Data Recorder module. The following is an example of a typical Log Mail email:

Using the Log Mail Module

The applications for this module are numerous. Presented below are frameworks you can implement in your meter to utilize this module.

Presented below is the base framework you can use to send the contents of a Data Recorder module via email.

Emailing data as it’s recorded

The link from the Record Complete output to the Send input ensures that every time new data is recorded in the Data Recorder, it is sent out via email.

Emailing numerous records

This sample framework allows 12 data records to be accumulated in the Data Recorder before it is sent from the meter to the email server. The Periodic Timer modules connected to the Record and Send inputs ensure the timing.

QR Code is a registered trademark of DENSO WAVE INCORPORATED in Japan and other countries.

Was this helpful?