84
●
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
is other than 1 to 16.
(Error code: 4101)
• The device numbers specified for
ÅC
, and n1 exceed the device point range.
(Error code: 4101)
• An invalid device is specified.
(Error code: 4004)
(5) Program example
When M4000 is turned on, the receive data length of connection No.1 is read out.
• Devices used
• Program
Device number
Application
SD1282
Open completion signal
SD1286
Receive state signal
D400
S.SOCRDATA instruction control data
D4000
Storage location where data are read out
K1
Number of read data (one word)
S1
S2
D
Reading receive data
length of Connection
No.1
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: ......