smartDEN
IP-16R-XX
User Manual
13 Apr 2021
-
44
-
Figure 10.1.
Modbus-TCP message format
The MBAP header includes the following fields:
Transaction Identifier
- used for transaction pairing when multiple messages
are sent along the same TCP connection by a client without waiting for a prior
response;
Protocol Identifier
- this field is always set to 0 for Modbus-TCP services;
Length
– number of bytes in the remaining fields (unit identifier byte, function
code byte, and data fields);
Unit Identifier
- used to identify a remote server located on a non TCP/IP
network (for serial bridging). In a typical Modbus-TCP server application, the
unit ID is set to 0;
The function code field of the message contains one byte that specifies what kind
of action the slave needs to take. When the server responds to the client, it echoes
the same function code to indicate a normal (error-free) response. If the server
cannot process a request, it will instead return an error function code (exception
response) that is the original function code plus 80h (i.e. with its most significant bit
set to 1).
Modbus-
TCP uses a „big-Endian‟ representation for addresses and data fields
(when a numerical quantity larger than a single byte is transmitted, the most
significant byte is sent first).
smartDEN IP-16R-MT
acts as a Modbus-TCP slave/server device, while a typical
master device is a host computer running appropriate application software (for
example a Raspberry Pi board running Home Assistant automation platform).
10.2.1. MODBUS Commands
This following table shows the standard Modbus-TCP functions supported by the
smartDEN IP-16R-MT
module:
Table 10.6.
Modbus commands
Function
Code
Resources
Access
Read Coil Status
01 (0x01)
Relays 1..16
bit
Write Single Coil
05 (0x05)
Relays 1..16
bit
Write Multiple Coils
15 (0x0F)
Relays 1..16
bit
Read Holding Registers
03 (0x03)
Configuration parameters
16-bit
Write Single Register
06 (0x06)
Generate pulses,
Configuration parameters,
16-bit
Write Multiple Registers
16 (0x10)
Generate pulses,
Configuration parameters
16-bit
Содержание smartDEN IP-16R Series
Страница 63: ...smartDEN IP 16R XX User Manual 13 Apr 2021 63 Figure 10 9 Inputs state notifications...
Страница 66: ...smartDEN IP 16R XX User Manual 13 Apr 2021 66 13 Appendix 2 Application reply formats 13 1 XML reply...
Страница 67: ...smartDEN IP 16R XX User Manual 13 Apr 2021 67 13 2 JSON reply...