Mitsubishi MELSEC-L series Programming Manual page 345

Hide thumbs Also See for MELSEC-L series:
Table of Contents

Advertisement

Control Data
Device
Item
System area
[0]
s2
Completion status
[1]
s2
*1
[2]
TCP Receive Mode
s2
Receive Data Size
[3]
s2
*1:
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.
Program Example
The following program changes the receive mode of the connection number1 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]
[ST]
IF(LDP(TRUE, Var_Flag_Inst))THEN
MOVP(TRUE, 1, Var_ControlData[2]);
MOVP(TRUE, 256, Var_ControlData[3]);
SP_SOCRMODE(TRUE, "U0", 1, Var_ControlData);
END_IF;
The instruction application status is stored.
0
: Normal completion
Other than 0
: Error completion (error code)
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)
Unavailable for a connection.
(*Changes the receive mode of the connection number 1 *)
Setting data
(* Sets TCP receive mode to 1 *)
(* Sets receive data size to 256 *)
7.8 SOCRMODE Instruction
SP_SOCRMODE
Setting range
Setting side
System
1, 0
User
1 to 2046
User
Sets TCP receive
mode to 1
Sets receive
data size to 256
Changes the receive
mode of the
connection number 1
7-23
7

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-q series

Table of Contents