Download Mitsubishi ETH-1000 User`s manual

Transcript
CHAPTER4 SOCKET COMMUNICATION FUNCTION INSTRUCTIONS
(4) Error
An operation processing error which turns on the Error flag (SM0) will occur, and a corresponding error code is
stored in SD0 when:
• When the instruction is executed in the CPU module of the Built-in Ethernet port QCPU with the first 5 digits
of the serial number, which is older than "11011" or other than the Built-in Ethernet port QCPU.
(Error code: 4002)
• The connection number specified in
S1
3
is other than 1 to16.
(Error code: 4101)
• The device points of the devices specified by
S2
are exceeding the limit.
4
(Error code: 4101)
• Invalid device is specified.
(Error code: 4004)
Remark
When the Receive status signal does not turn on in the TCP fixed-length receive mode, whether the data sent from the
external device is adequate or not can be checked by reading out the data received as of this moment, using the
SP.SOCRDATA instruction.
(5) Program example
In the following programs, Connection No.1 is set to the TCP fixed-length receive mode and the receive data size
is set to 256 bytes upon turning on M4000.
After executing the instruction, Connection No.1 turns on the Receive status signal when receive data size
reaches to 256 bytes.
4.8 Changing the Receive Mode of a Connection (SP.SOCRMODE)
[Ladder mode]
1 is set to TCP receive mode
256 is set to receive data size
Connection No. 1 setting change
[List mode]
Step
Instruction
Device
4 - 27