Mitsubishi Electric MELSEC-L Special Instructions Manual page 222

Melsec-q/l structured programming manual
Hide thumbs Also See for MELSEC-L:
Table of Contents

Advertisement

Setting option
Processing
Request
• E-mail read processing from the mail server is performed.
(read)
• After the execution of the MRECV instruction, inquiry (read) processing for information
on the received mails remaining in the mail server is performed. (Inquiry for receiving
of a mail is made immediately.)
Program example
• The following program performs the e-mail receiving process by the receive instruction (X21).
(The I/O signals of the Ethernet module are X/Y00 to X/Y1F)
[Structured ladder/FBD]
[ST]
IF (X21=TRUE) THEN
SET(TRUE,Var_Flag_Exe);
END_IF;
IF((Var_Flag_Exe=TRUE) AND (U0\G9858.F=TRUE))THEN
MOVP(TRUE,H200,Var_ControlData[0]); (* Sets to inquire to server *)
MOVP(TRUE,0,Var_ControlData[2]); (* Sets to read the first mail *)
MOVP(TRUE,0,Var_ControlData[9]); (* Sets to adjust data length to that of the received mail *)
MOVP(TRUE,0,Var_ControlData[10]); (* Sets to adjust header data length to that of the received mail *)
ZP_MRECV(TRUE,"00",Var_ControlData,D100,Var_Result); (* Reads received e-mail *)
RST(TRUE,Var_Flag_Exe);
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
(* Process on normal completion *)
ELSE (* Error completion *)
(* Process on error completion *)
END_IF;
END_IF;
5 MODULE DEDICATED INSTRUCTION
220
5.4 Network Dedicated Instruction
Process on normal completion
Process on error completion
Advantage
Disadvantage
Received mails
Inquiries to the mail
stored in the mail
server are made more
server can be read
often.
in series.
Internal processing of
the module increases,
which affects other
internal processing to a
certain degree.
Sets to inquire
to server
Sets to read
the first mail
Sets to adjust data
length to that of
the received mail
Sets to adjust header
data length to that
of the received mail
Reads received
e-mail
Normal completion
Error completion

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-q

Table of Contents