Chapter 9. Modbus/TCP Client
GFK-2224Q
January 2017
151
Command 3003, Example 2
Read nine (9) Input Discretes starting from Discrete input address 5 in the remote Modbus/TCP server. Store the
registers at location %T3(bit mode). Return the COMMREQ Status word to %R10.
Dec (Hex)
Word 1
00008 (0008) Length of Channel command Data Block (8–14 words)
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
03003 (0BBB) Read from a Modbus/TCP Device
Word 8
00006 (0006) Channel number (6)
Word 9
00002 (0002) Modbus Function Code (Read Input Discretes)
Word 10
00074 (004A) Local PLC Memory Type
Word 11
00003 (0003) Local PLC Starting Address
Word 12
00005 (0005) Address in the Remote Device
Word 13
00009 (0009) Number of Input Discretes to Read from the Remote Device
Word 14
00001 (0001) Unit Identifier
(Word 7) Channel Command Number:
Word 7 identifies the COMMREQ as a Read Data from Modbus/TCP
Device command block.
(Word 8) Channel Number:
Word 8 identifies the channel number previously allocated for communication with
the remote Modbus/TCP server.
(Word 9) Modbus Function Code:
Word 9 specifies Modbus Function Code 2, Read Input Discretes.
(Word 10) Local PLC Memory Type:
Words 10-11 specify the location in the local PLC where the Ethernet
interface will store data received from the remote device. Valid values for Word 10 are listed on page 150.
(Word 11) Local PLC Memory Address:
Word 11 determines the starting address in the local PLC in which the
data from the remote device is to be stored. The value entered is the offset (1-based) from the beginning of PLC
memory for the memory type and mode specified in Word 10. This offset will be either in bits, bytes, or words
depending on the mode specified. Valid ranges of values depend on the PLC’s memory ranges. Be sure this
area is large enough to contain the requested data without overwriting other application data.
(Word 12) Remote Device Address:
Word 12 specifies the address in the remote Modbus/TCP device.
(Word 13) Number Registers in Remote Device:
Words 13 specifies the quantity of input discretes to read
from the remote device.
(Word 14) Unit Identifier:
This field is typically used by Ethernet to Serial bridges to specify the address of a
Modbus Slave on a multi-drop link. The Modbus/TCP Unit Identifier is a special control code used in a
Modbus/TCP message block.
Содержание 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: ......