6 - 8 6 - 8
MELSEC-Q
6 DEDICATED INSTRUCTIONS
Control data
Device Item Set data Setting range
Set by (
1
)
b15 b7 b0to
1)2)
b12
00
toto
b8
1) Complete type (bit 7)
Designate whether or not the setting of the clock data is
required at abnormal completion.
0: Clock data setting is not required.
The clock data at error occurrence is not set in (S1) + 11
to (S1) + 15.
1: Clock data setting is required.
The clock data at error occurrence is set in (S1) + 11 to
(S1) + 15.
2) Send data format (bit 12 to bit 8)
Designate the format of data to be sent.
(When sending data as an attached file)
b12 b11 b10 b9 b8 Data format
00000Binary data
01000
ASCII data (converted from binary
to ASCII)
01001
CSV data (converted from binary
to CSV)
(When sending data as the main text)
b12 b11 b10 b9 b8 Data format
10000Binary data
(S1) + 0
Execution/complete type
Send data format
[Precautions when designating the main text of e-mail]
• The setting of (bit 11 to bit 8) is invalid when the main text is
designated.
• Designate the main text using ASCII characters in a
sequence program (the Ethernet module does not convert it
to ASCII).
• The following binary code data is treated as control codes.
0D0A
H
: Line feed code, CR + LF
00
H
: End of the main text
• It is recommended to limit the data written in one line of the
main text to 78 characters or less.
(Be sure to add a line feed code, CR + LF (0D0A
H
), at the
end of lines of the main text.)
(As described in
the left)
User
(S1) + 1 Completion status
Store the status at completion of the instruction.
0: Normal
Other than 0: Abnormal (error code) (
2
)
—System
(S1) + 2 Send destination number
Designate the opposite device to which the e-mail is sent by the
setting number of the "Ethernet send mail address setting" with
GX Developer.
1 to 16: The setting number of the destination external device
1 to 16 User
(S1) + 3 to (S1) + 8 System area — — —
(S1) + 9 Send data length
Designate the data length ((Subject + attached file) or (Subject +
main text)) of the e-mail stored in (S2) + 0 to (S2) + n.
1) When sending data as an attached file (Subject: 0 to 373,
attached file: 1 to 6144)
1 to 6517: The data length of e-mail (words)
2) When sending data as the main text
(Subject: 0 to 373, Main text: 1 to 960)
1 to 1333: The data length of e-mail (words)
1 to 6517
or
1 to 1333
User
(S1) + 10 Subject length
Designate the data length of the Subject of the e-mail stored in
(S2) + 0 to (S2) + n.
0 to 373: The data length of the Subject (words)
0 to 373 User
(S1) + 11 Clock set flag
This stores the valid/invalid status of the clock data in ((S1) + 12
to (S1) + 15).
0: Invalid
1: Valid
0, 1 System
(S1) + 12
Higher 8 bits: month (01
H
to 12
H
),
lower 8 bits: last 2 digits of year (00
H
to 99
H
)
(S1) + 13
Higher 8 bits: hour (00
H
to 23
H
),
lower 8 bits: date (01
H
to 31
H
)
(S1) + 14
Higher 8 bits: second (00
H
to 59
H
),
lower 8 bits: minute (00
H
to 59
H
)
(S1) + 15
Clock data
(set only when abnormal)
Higher 8 bits: first 2 digits of year (00
H
to 99
H
),
lower 8 bits: day of the week (00
H
(Sunday) to 06
H
(Saturday))
—System