Send Email
Original instructions
Description
The electronic mail notification service allows controller-based projects to report alarms or events. The controller monitors the system and dynamically creates an electronic mail message, which alerts local or remote users.
A user-defined event or condition triggers the MSTR block to create a message. Each message uses one of three user-defined headers. Each message sent from the controller can contain text and variable information (with a maximum of 238 bytes).
The project selects the appropriate header. Each header contains:
To program an MBP_MSTR block to send email, use function code 13.
Network Implementation
A send email operation can be performed on a TCP/IP Ethernet network.
Control Block Usage for TCP/IP Ethernet
Register
Meaning
CONTROL[1]
13 = send Email
CONTROL[2]
CONTROL[3]
Number of words transferred
CONTROL[4]
Not used
CONTROL[5]
High byte: slot address of the NOE module or 0xFE for the 140 CPU 651 60
Low byte: always 0
CONTROL[6]
...
CONTROL[9]
Not used
DATABUF Parameter Description
Register
Contents
DATABUF 1
The mail header is the least significant byte with a value of 1, 2, or 3.
The most significant byte contains the number (n) of characters in the subject, a value between 0 and 238.
DATABUF 2
...
DATABUF 119
The data (in ASCII format) that will be copied into the Email message.
The first n characters are added to the configured Email subject. The remaining characters (2 * N -2 - n) are part of the message body, where N is the number of words transferred.