Mitsubishi Electric Q03UDVCPU User Manual page 130

Qnucpu series (communication via built-in ethernet port)
Hide thumbs Also See for Q03UDVCPU:
Table of Contents

Advertisement

(3) Function
This instruction changes the IP address and port number of the target device of which connection is specified in
.
S1
(Note that this instruction is available only for UDP/IP communications.)
● The target device can be changed without closing the connection by using the SP.SOCCSET instruction.
● The set values take effect at the following SP.SOCCSET instruction execution timing:
• When data exist in the socket communication receive data area: After execution of the SP.SOCRCV or
S.SOCRCVS instruction, only once after execution of the SP.SOCCSET instruction
• When no data exists in the socket communication receive data area: After execution of the SP.SOCCSET
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 instruction is executed in the QnUDE(H)CPU with a serial number (first five digits) of "11011" or earlier
or a CPU module other than the Built-in Ethernet port QCPU.
• The connection number specified for
• The device number specified for
• An invalid device is specified.
(5) Precaution
Do not change the target device using the SP.SOCCSET instruction during execution of the SP.SOCSND
instruction.
(6) Program example
When M4000 is turned on, the connection destination (IP address and port number of the target device) of
connection No.1, which is open, is changed.
• Devices used
SD1282
D400
• Program
128
is other than 1 to 16.
S1
exceeds the device point range.
S2
Device number
Application
Open completion signal
SP.SOCCSET instruction control data
(Error code: 4002)
(Error code: 4101)
(Error code: 4101)
(Error code: 4004)
Setting target IP address to
10.97.85.222
Setting port No. of target
device to 8193
Changing setting of
Connection No.1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents