Log Mail Module
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.
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.
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.
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.
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.
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.
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.
This output indicates the number of records sent in the last successful email.
This output pulses when the module successfully sends an email.
This output pulses when the module fails to send an email.
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
additional user-defined meter identification information labeled “Tag1” and “Tag2”; Tag1 and Tag2 are meter settings for information of your choice
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|
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.
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.
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.