
EDAM-4200 Series User’s manual Version 1.03
Chapter 9
MODBUS/TCP Command structure
EDAM-4200 system accepts a command/response form with the host computer. When systems are not
MODBUS/TCP Command structure. EDAM-4200 system accepts a command/response form with the host computer.
When systems are not transmitting they are in listen mode. The host issues a command to a system with a specific
address and waits a certain amount of time for the system to respond. If no response arrives, a time-out aborts the
sequence and returns control to the host. This chapter explains the structure of the commands with Modbus/TCP
protocol, and guides to use these command sets to implement user’s programs.
9.1
Command Structure
It is important to understand the encapsulation of a Modbus request or response carried on the Modbus/TCP
network. A complete command is consisted of command head and command body. The command head is prefixed
by six bytes and responded to pack Modbus format; the command body defines target device and requested action.
Following example will help you to realize this structure quickly.
Example
:
If you want to read digital input channels(0~11) of EADM-4050 (address: 00001~00012),
the Request command should be:
00 00 00 00 00 06
01 01 00 00 00 0C
and the Response should be:
00 00 00 00 00 05
01 01 02 00 00
Note: (Byte 6) Unit Indentifier 01 to FF(Always 01)
Printed Date: 27 February 2018
146
00
06
00
00
04
04
01
FF
7F
7F
Byte 2: Protocol indentifier-0
Byte 1: Transaction indentifier-0
Byte 0: Transaction indentifier-0
Byte 5: Length field-number of bytes following
Byte 4: Length field
Byte 3: Protocol indentifier-0
Byte 7: ModBus function code
Byte 6: Unit indentifier-1 (always 1)
Byte 10: Low byte of first address
Byte 9: High bye of first address
Byte 8: Byte count (each register need two byte)
00
Byte 11: High byte of second address
Command Head
Command Body
FF
00
Byte 12: Low byte of second address
00
00
06
00
04
01
00
01
00
02
Byte 0: Transaction indentifier-0
Byte 2: Protocol indentifier-0
Byte 1: Transaction indentifier-0
Byte 4: Length field
Byte 3: Protocol indentifier-0
Byte 6: Unit indentifier-1 (always 1)
Byte 5: Length field-number of bytes following
Byte 8: High byte of start address
Byte 7: ModBus function code
Byte 10: Requested number of reading register (high byte)
Byte 9: Low byte of start address
00
Byte 11: Requested number of reading register (low byte)
Command Head
Command Body
00