Chapter 9. Modbus/TCP Client
GFK-2224Q
January 2017
159
Read/Write Multiple Registers to/from a Modbus Server Device
(3005)
The Read/Write Multiple Registers to/from a Modbus Server Device COMMREQ is used to read and write data
between the remote server and the PLC with one COMMREQ operation. Note, the write operation occurs first
and the data exchange does not occur coherently (i.e. data can change in the server between the write and
read operations).
Command 3005, Example – Read/Write Multiple Register
Write 10 values starting at %R100 in the Local PLC to register address 200 in the remote Modbus/TCP server
and read 20 values starting from register 300 in the remote Modbus/TCP server and write this value to %R300
in the Local PLC. Return the COMMREQ Status word to %R10. Use channel 6, a channel previously opened with
the Open Modbus/TCP Client Connection COMMREQ.
Dec (Hex)
Word 1
00014 (000E)
Length of Channel command Data Block
Word 2
00000 (0000) Always 0 (no-wait mode request)
Word 3
00008 (0008) Memory type of CRS word (%R)
Word 4
00009 (0009) CRS word address minus 1 (%R10)
Word 5
00000 (0000) Reserved
Word 6
00000 (0000) Reserved
Word 7
03005 (0BBD) Read/Write Multiple Registers to/from a Modbus/TCP Device
Word 8
00006 (0006) Channel number (6)
Word 9
00023 (0017) Modbus Function Code – Read/Write Multiple Registers
Word 10 00008 (0008) Local PLC Memory Type of memory to write with data read from Remote Device
Word 11 00300 (012C) Local PLC Starting Address (LSW) of memory to write with data read from Remote
Device
Word 12 00000 (0000) Local PLC Starting Address (MSW) of memory to write with data read from
Remote Device (normally 0 unless %W is used)
Word 13 00300 (012C) Address to Read From on Remote Server
Word 14 00020 (0014) Number of Memory Units to Read from Remote Device (1 to 125)
Word 15 00008 (0008) Local PLC Memory Type of memory to use for writing to the Remote Device
Word 16 00100 (0064) Local PLC Starting Address (LSW) of memory to use for writing to the Remote
Device
Word 17 00000 (0000) Local PLC Starting Address (MSW) of memory to use for writing to the Remote
Device (normally 0 unless %W is used)
Word 18 00200 (00C8) Address to Write to on the Remote Server
Word 19 00010 (000A) Number of Memory Units to Write to the Remote Device (1 to 121)
Word 20 00001 (0001) Unit Identifier
(Word 7) Channel Command Number:
Word 7 identifies the COMMREQ as a Read/Write Multiple Register
operation on remote Modbus/TCP device.
(Word 8) Channel Number:
Word 8 identifies the channel number previously allocated for communication with
the remote Modbus/TCP server.
Содержание PACSystems RX7i
Страница 45: ......
Страница 54: ...Chapter 4 Configuration GFK 2224Q January 2017 41 Figure 18 CPE400 Advanced Ethernet Configuration LAN1 LAN 2 ...
Страница 80: ...Chapter 4 Configuration GFK 2224Q January 2017 67 ...
Страница 81: ......
Страница 122: ...Chapter 6 Programming EGD Commands GFK 2224Q January 2017 109 ...
Страница 142: ...Chapter 7 Programming SRTP Channel Commands GFK 2224Q January 2017 129 Figure 51 Sample Ladder Logic for COMMREQ ...
Страница 147: ......
Страница 193: ...Chapter 10 OPC UA Server 180 PACSystems RX7i RX3i TCP IP Ethernet Communications User Manual GFK 2224Q Example ...
Страница 202: ...Chapter 10 OPC UA Server GFK 2224Q January 2017 189 Figure 73 Machine Edition Online Command to Set Passwords ...
Страница 211: ......
Страница 253: ...Chapter 12 Diagnostics 240 PACSystems RX7i RX3i TCP IP Ethernet Communications User Manual GFK 2224Q ...
Страница 262: ...Chapter 13 Network Administration GFK 2224Q January 2017 249 ...
Страница 263: ......