Mitsubishi L02CPU User Manual page 117

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

Advertisement

● Data of the receive data length can be read out by setting the number of read data to one word. This allows change of the
device storing receive data, upon execution of the SP.SOCRCV or S.SOCRCVS instruction.
● In the following order, based on the data currently received, the size of the data received the next time can be specified.
1. Check the data currently received using the S(P).SOCRDATA instruction.
2. Specify the size of the data to be received the next time using the SP.SOCRMODE instruction.
3. Read out the data currently received using the SP.SOCRCV or S.SOCRCVS instruction.
Remark
● Even if the S(P).SOCRDATA instruction is executed, the next receive data will not be stored in the Socket communication
receive data area because the area is not cleared and the Receive state signal does not change.
● To update the receive data, read out the data using the SP.SOCRCV or S.SOCRCVS instruction.
(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 numbers specified for
• An invalid device is specified.
• When the value of the device designated by "n" exceeds 1024
(5) Program example
When M4000 is turned on, the receive data length of connection No.1 is read out.
• Devices used
Device number
SD1282
SD1286
D400
D4000
K1
• Program
CHAPTER 7 SOCKET COMMUNICATION FUNCTION
is other than 1 to 16.
S1
,
, and n exceed the device point range.
S2
D
Open completion signal
Receive state signal
S.SOCRDATA instruction control data
Storage location where data are read out
Number of read data (one word)
(Error code: 4101)
(Error code: 4101)
(Error code: 4004)
(Error code: 4100)
Application
Reading receive data
length of Connection
No.1
7
115

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents