Log Export Module

The Log Export module delivers XML data gathered from one or more meters to a user-defined destination.

Module icon

Overview

NOTE: Before the Log Export module can work, you need to properly configure certain setup registers in both the Factory module and Ethernet (Communications) module. The Factory module requires you to configure the Device Namespace and Device Name registers, while the Ethernet (Communications) module must have the SMTP Server register configured correctly.

NOTE: The registers and settings available in this module depend on the device you are configuring, as well as its firmware and template versions. Not all registers or settings are available on all devices, 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 is transported as an XML message. Linking this input is mandatory.

Enable

If the Enable input is false, the Log Export 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 Export module sends all Source data records that have not previously been sent. Linking this input is mandatory.

Setup registers

Destination

This is the Uniform Resource Identifier (URI) of the destination. Current support is limited to email URIs (e.g. mailto:john.doe@anywhere.com). The default value is enter destination address, which means you must specify a destination in order for the module to go online. The destination string can be anywhere between 0 and 80 characters.

NOTE: You must include mailto: as a prefix to the email address string in order to send records via email. For example, an entry such as mailto:john.doe@anywhere.com is a valid Destination value.

Max Send Records

This register contains the maximum number of data records that the Log Export module attempts to send in any single message. The default value is set to 0, essentially disabling the module. This register must be changed to a non-zero value for the Log Export module to go online.

Email From

This register contains the address that appears in the From: field of the email sent by the Log Export module. This register only applies to messages sent via email. The default value depends on which Log Export module you are using and the meter's serial number. Email arriving from a meter have a default format similar to LogExport<module number>@<serial number>.

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.

Gatewayed Device Namespace

The string value in this register is used as the namespace attribute in the Device element of XML messages generated by the module. The default value is default. When it is set to default, the namespace attribute of the Device element inherits the value from the Factory module's Device Namespace setup register. The value range for this string is up to 80 characters; these characters must be alphanumeric but can also include a dash (hyphen) or a dot (period). Refer to the MeterM@il Internal Email Client Feature technical note for an example that illustrates the use of this register.

Note: A namespace uniquely identifies a set of names so that there is no ambiguity when objects with different origins but the same names are mixed together. A namespace is commonly given the name of a Uniform Resource Identifier (URI) - such as a web site address - both because the namespace may be associated with the site or page of that URI (for example, a company name) and because a URI is likely to be a unique name.

Gatewayed Device Name

The string value in this register is used as the name attribute in the Device element of XML messages generated by the module. The default value is default. When it is set to default, the name attribute of the Device element inherits the value from the Factory module's Device Name setup register. The value range for this string is up to 80 characters; these characters must be alphanumeric but can also include a dash (hyphen) or a dot (period). Refer to the MeterM@il Internal Email Client Feature technical note for an example that illustrates the use of this register.

Note: The Factory module's Device Name and Device Namespace setup registers must be changed from their defaults in order for the Log Export module to go online.
Note: If only one meter is used for sending XML data, then Gatewayed Device Name and Gatewayed Device Namespace can remain at default: the meter's Factory module can supply the necessary identification since there are no gatewayed devices. However, these registers are particularly important when a device is collecting data from multiple gatewayed devices via Modbus Master - each gatewayed device's XML data can be uniquely identified.

Gatewayed Device Type

This value is used as the type attribute in the Device element of XML messages generated by the module. The default value is default. When set to default, the type attribute of the Device element inherits the value from the Factory module's DeviceType register. The value range is 0-80 characters with no spaces or slashes. Characters must be alphanumeric but can also include a dash (hyphen) or a dot (period).

MIME Type

This register's value is used for the MIME (Multipurpose Internet Mail Extension) type in the header that accompanies the XML message. The default value is application/xml. The value range is 0-80 characters with no spaces.

Attachment Extension

This register's value specifies the extension to use in the filename for the XML message attachment. The default is mma, though the value range can be 0-20 characters. This setup register only applies to emails.

Output registers

Sending

A value of true at this output indicates the module is in the process of sending a message. 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 message transmission.

Success

This output pulses when the module successfully sends a message.

Fail

This output pulses when the module fails to send a message.

Event

Any events produced by the Log Export 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 Export 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 applications for this module are numerous. Presented below are frameworks you can implement in your meter to utilize the Log Export module.

Sending Data Via Email

The following illustration shows how to create the basic framework for sending data to a specified email address via the Log Export module.

The Data Recorder module's Source inputs record the data you want and store these values in the module's Data Log output register every time the module's Record input is pulsed by a Periodic Timer module. (These Source inputs can be linked to the Boolean, numeric, or numeric bounded registers of ION devices.)

When the values have been successfully recorded, the Data Recorder module's Record Complete output pulses the Send input of the Log Export module. When this pulse arrives at the Send input, the Log Export module sends all its Source data records that have not previously been sent to the email address specified in the Destination setup register.

In the previous framework, data is sent to the destination email address as it is gathered. It is also possible to create a framework that allows a certain number of data records to be accumulated in the Data Recorder module before the "batch" is sent to the destination email address. A sample framework is illustrated below.

This sample framework allows 12 data records to be accumulated in the Data Recorder before it is sent from the meter to the email destination. The first Periodic Timer module has its Trigger output connected to the Data Recorder module's Record input, while a second Periodic Timer module has its Trigger linked to the Send input of the Log Export module. Rather than the Data Recorder module's Record Complete pulsing the Log Export module every time the data log is successfully recorded (as seen in the previous example), the Periodic Timer modules control when the data is sent.