Mitsubishi Electric MELSEC-L Special Instructions Manual page 271

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

Advertisement

Setting data
Device
Item
(s2)[0]
System area
(s2)[1]
Completion status
(s2)[2]
TCP Receive Mode
(s2)[3]
Receive Data Size
*1 Unavailable for a UDP connection.
Precautions
• Use the Built-in Ethernet port QCPU of which the function version is B or later and the first five digits of the serial number
are '11012' or higher.
• Use the LCPU other than L02SCPU and L02SCPU-P.
Program example
• The following program changes the receive mode of the connection number 1 to TCP fixed length receive mode and
changes its receive data length to 256 bytes.
• After instruction execution, the connection number 1 turns the receive status signal ON when the length of receive data
reaches 256 bytes.
[Structured ladder/FBD]
[ST]
IF(Var_Flag_Inst=TRUE)THEN
MOVP(TRUE, 1, Var_ControlData[2]); (* Sets TCP receive mode to 1 *)
MOVP(TRUE, 256, Var_ControlData[3]); (* Sets receive data size to 256 *)
SP_SOCRMODE( TRUE, "00", 1, Var_ControlData); (*Changes the receive mode of the connection number 1 *)
END_IF;
Setting data
The instruction completion status is stored.
0: Normal completion
Other than 0: Error completion (error code)
*1
Specify the TCP receive mode.
0: TCP normal receive mode
1: TCP fixed length receive mode
Specify the receive data size of the socket communication.
(number of bytes)
Setting range
0, 1
1 to 2046
Sets TCP receive
mode to 1
Sets receive
data size to 256
Changes the receive
mode of the
connection number 1
7 SOCKET COMMUNICATION FUNCTION INSTRUCTION
7.6 Changing Receive Mode
Setting side
System
User
User
7
269

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-q

Table of Contents