DVP-ES2/EX2/EC5/SS2/SA2/SX2/SE&TP Operation Manual - Programming
API
Mnemonic Operands Function
113 ETHRW
Type
OP
Bit Devices Word devices Program Steps
X Y M S K H KnX
KnY
KnM
KnS
T C D E F
ETHRW: 9 steps
SS2
2
SX2
SS2
SA2
SX2
Operands:
S
1
: IP address, communication port number, and read/write mode S
2
: Device address D:
Source/Destination data register n: Data length; Range: K1~K96 (word), K1~K256 (bit)
Explanations:
1. S
1
: IP address, communication port number, and read/write mode
The operand S
1
occupies five consecutive data registers. The functions are as follows.
IP address: Two data registers are occupied, that is, S
1
+0 and S
1
+1.
IP addressIP3.IP2.IP1.IP0192.168.0.2
If S
1
is D100, the values in D100 and D101 are H’0002 and H’C0A8 respectively.
S
1
+2: Communication port number
The communication port number of the Ethernet port on DVP-SE/ES2-E and that of the
communication card installed in DVP-EH3 are K108. The communication ports on the
left-side Ethernet modules connected to a CPU module are numbered according to their
distances from the CPU module. The numbers start from K100 to K107.
S
1
+3: Station address of a slave
S
1
+4: Read/Write function code setting
The definition is the same as Modbus. The function codes supported are H’01, H’02, H’03,
H’04, H’05, H’06, H’0F and H’10.
2. S
2
: Device address
The definition is the same as Modbus.
3. The operand D specifies a source data register or a destination data register. For example, D
specifies D10 and set the function code to H’03; when it reads 2 length of data, the data will be
stored in D10 and D11.