BusWorks Model XT1531‐000
4 CH Current 4 CH Digital I/O w/USB & Modbus
Acromag, Inc. Tel: 248‐295‐0880
‐
35
‐
About Modbus
TCP/IP…
In practice, Modbus TCP embeds a Modbus data frame into a TCP frame, without the
Modbus checksum, as shown in the following diagram. The Modbus checksum is not
used, as the standard Ethernet TCP/IP link layer checksum methods are instead used
to guaranty data integrity.
TCP FRAME
Transaction Identifier
Protocol Identifier Length Field
Modbus Frame
Modbus Checksum
Not Included
Address
Function Code
Data
Checksum
MODBUS FRAME
IP Addressing
Note that the Modbus address field is referred to as the
Unit Identifier
in Modbus
TCP. In a typical slave application, the Unit ID is ignored and just echoed back in the
response.
Modbus operation over Ethernet is essentially transparent to the Modbus register &
command structure. The use of TCP/IP to travel over Ethernet does not change the
meaning of the Modbus message.
The IP address (Internet Protocol Address) uniquely defines a network host on the
Internet, from all other hosts on the Internet, while the Internet Protocol (IP) is the
method by which the data is exchanged between different hosts on the Internet.
A
Static IP Address
is as the name implies
—
static. That is, it is a unique IP Address
that is assigned by a service provider and never changes.
A
Dynamic IP Address
is an address that is temporarily assigned to a user by a service
provider each time a user connects.
A
Subnet
is a contiguous string of IP addresses. The first IP address in a subnet is
used to identify the subnet, while the last IP address in a subnet is always used as a
broadcast address. Addresses between the first and last subnet address make up the
address domain of the subnet. Anything sent to the last IP address of a subnet is
generally sent to every host on that particular subnet (e.g. to every address within its
domain).
Subnets are further broken down into three size classes based on the 4 octets that
make up the IP address. A Class A subnet is any subnet that shares the first octet of
the IP address. The remaining 3 octets of a Class A subnet will define up to
16,777,214 possible IP addresses (2
24
–
2). A Class B subnet shares the first two
octets of an IP address (providing 2
16
–
2, or 65534 possible IP addresses). Class C
subnets share the first 3 octets of an IP address, giving 254 possible IP addresses.
Recall that the first and last IP addresses are always used as a network number and
broadcast address respectively, and this is why we subtract 2 from the total possible
unique addresses that are defined via the remaining octet(s).
TIP: The first node (0), node 10, and the last node (255 for our example) are typically
reserved for servers and may yield poor results if used.