2 - 30 2 - 30
MELSEC-Q
2 USING THE E-MAIL FUNCTION
(3) Sample program
The following shows a sample program for sending e-mail by the PLC CPU.
Perform e-mail transmission processing the send command (X20).
The contents of the send data are shown in (4).
When I/O signals of the Ethernet module are X/Y00 to X/Y1F
Designate main text as the
send data format.
Designate the subject length.
Designate Subject.
Send the e-mail.
Designate the main text.
Designates the send destination
number.
Designate the send data length.
Processing program when normal completion
Processing program when abnormal completion
REMARK
When an error occurs while sending e-mail from the sending mail server to an
external device, an error code is stored in the receiving error log area.
1 The following shows the transmission format of the main text designated in the
control data of the MSEND instruction.
If data is sent as the main text of e-mail, the Ethernet module does not convert
the transmission format.
Designate the main text data in ASCII characters in sequence programs.
Completion type
Designates the transmission format of the main text.
b8
b12 to
Setting values for designating the main text
data transmission format
b12
b11
b10
b9
b8
Format set
Applicable
station
Description of processing
1
0
0
0
0
No conversion
PC/UNIX/
portable
terminal
Send the main text data.
The Ethernet module does not convert the transmission format.
Designate the main text data in ASCII characters in
sequence programs.