43
CHAPTER 6 SOCKET COMMUNICATION FUNCTION
6
6.
1
C
o
mm
uni
cat
ion Using T
C
P
(c) Sample program
*1
There are two kinds of TCP receive modes: TCP standard receive mode and TCP fixed-length receive mode.
For fixing the data size, run the program enclosed by a dotted line.
(It can be omitted when the data size is not fixed.)
For the TCP receive mode, refer to the section for the SP.SOCRMODE instruction. (
*
1
Setting TCP receive mode to 1
Setting receive data size to 6
Changing TCP receive mode of
Connection No.1
Setting Execution/completion
type to 0
Connection No.1 open
Normal completion
Error completion
Setting send data length
Setting send data
Sending data to Connection No.1
Normal completion
Error completion
Normal completion
Error completion
Normal completion
Error completion
Processing for disconnection
by the target
Connection No.1 close
Setting closing flag
Resetting closing flag
Receiving data
<<Fixed length mode setting>>
<<Connection No.1 open processing (Active)>>
<<Data sending>>
<<Data receiving>>
<<Connection No.1 close processing>>
Summary of Contents for MELSEC L Series
Page 1: ......
Page 2: ......
Page 19: ...17 CHAPTER 1 OVERVIEW 1 Memo ...
Page 116: ...114 Memo ...
Page 123: ......