10 - 18
MELSEC-F
USING THE E-MAIL FUNCTION10
10 - 18
10.7.2When receiving data in an attached file
This section explains the buffer memory addresses and a program to receive e-mail
from external devices.
The following instruction shows how to read the received attached file.
1) Read the value in BFM#22640 to check if there is incoming mail in the mail
server.
2) Write "0001
H" in BFM#14500 to receive a mail.
(Only e-mails with an attached file are possible to be read.)
3) The received mail data is written in the buffer memory address.
4) The received mail is deleted from the mail server.
The number of receivable mail is reconfirmed and stored in BFM#22640.
The table below shows the buffer memory to be used for receiving mail.
BFM number
Item Description
Decimal
(Hexadecimal)
22640
(5870
H)
E-mail status Stores the number of receivable mail on the server
14500
(38A4
H)
Mail receiving command Start mail receiving (0001
H)
14501
(38A5
H)
Mail receiving status
Initial status (0000
H)
Mail receiving normally completed (0001
H)
Mail receiving abnormally completed (0002
H)
Mail being received (8000
H)
14502
(38A6
H)
Error status while receiving mail Stores the error code while receiving mail
14503 to 14534
(38A7 to 38C6
H)
Message ID Stores the message ID of the received mail
14535
(38C7
H)
Character string length of
message header
Stores the character string length of message header
14536 to 14727
(38C8 to 3987
H)
Message header Stores the message header (maximum 384 characters)
14728 to 14759
(3988 to 39A7
H)
Send source mail address Stores the source mail address (size)
14792 to 14855
(39C8 to 3A07
H)
Subject Stores the subject (maximum 128 characters)
14856 to 14871
(3A08 to 3A17
H)
File name of attached file Stores the file name of an attached file (maximum 32 characters)
14872
(3A18
H)
Word count of attached file Stores the number of words (0 to 2048) used in the attached file
14873 to 16920
(3A19 to 4218
H)
Data attached to e-mail Stores the data attached to the e-mail (size)