Mitsubishi L02CPU User Manual page 115

Melsec-l series
Hide thumbs Also See for L02CPU:
Table of Contents

Advertisement

Remark
The set values will be enabled at the following timing of the SP.SOCRMODE instruction execution.
• Before opening: Values will be enabled after opening a connection.
• When there are data in the Socket communication receive data area: Values will be enabled after execution of the
SP.SOCRCV or S.SOCRCVS instruction once after the S.SOCRMODE instruction.
• When there is no data in the Socket communication receive data area: Values will be enabled after the
SP.SOCRMODE instruction is executed.
(4) Error
A detection of an operation error turns on the Error flag (SM0) and a corresponding error code is stored in SD0
when:
• The connection number specified for
• The device number specified for
• An invalid device is specified.
Remark
Even when the Receive state signal is not on in the TCP fixed-length receive mode, the data received at the point can be
read out with the SP.SOCRDATA instruction. This allows you to check whether the data sent from the connected device is
adequate in size.
(5) Program example
When M4000 is turned on, connection No.1 is set to the TCP fixed-length receive mode and the receive data size
is set to 256 bytes. After execution of the instruction and when the receive data size of connection No.1 reaches
256 bytes, the Receive state signal is turned on.
• Devices used
Device number
D400
• Program
CHAPTER 7 SOCKET COMMUNICATION FUNCTION
is other than 1 to 16.
S1
exceeds the device point range.
S2
SP.SOCRMODE instruction control data
(Error code: 4101)
(Error code: 4101)
(Error code: 4004)
Application
Setting TCP receive mode to 1
Setting receive data size to 256
Changing receive mode of
Connection No.1
7
113

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents