Mitsubishi MELSEC L Series User Manual page 84

Cpu module, built-in ethernet function
Hide thumbs Also See for MELSEC L Series:
Table of Contents

Advertisement

Remark
The set values will take effect at the following timing of the SP.SOCRMODE instruction execution.
• Before opening: Values take effect after opening a connection.
• When there are data in the Socket communication receive data area:
Values take effect 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 take effect 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
• 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 theTCP 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.
• Device used
D400
• Program
82
is other than 1 to 16.
S1
exceeds the device point range.
S2
Device number
Application
SP.SOCRMODE instruction control data
Setting TCP receive mode to 1
Setting receive data size to 256
Changing receive mode of
Connection No.1
(Error code: 4101)
(Error code: 4101)
(Error code: 4004)

Advertisement

Table of Contents
loading

Table of Contents