Instructions
Commands 85
Doc: HMSI-27-314, Rev. 3.10Anybus Communicator EtherNet/IP / Modbus-TCP User Manual
15.3.5 Example: Specifying a Modbus-RTU Command in Master Mode
In the following example, a Modbus-RTU command is created in Master Mode. In Modbus-RTU, a
transaction always feature the following parts:
• Slave Address (1 byte)
• Function Code (1 bytes)
• A data field
• CRC (CRC-16)
Furthermore, each command always consists of a query and a response.
•Example Query
• Example Response
By default, the Modbus-RTU-specific frame objects are already in place, and a data object is inserted
between the function code and the CRC. These objects cannot be moved or deleted, however it is pos-
sible to add additional objects between the function code and the CRC as desired.
Name the new command by entering its name in the “Command Name” field, and enter a suitable func-
tion code in the “Command ID”-field. If the command is allowed to be broadcasted, check the “Allow
Broadcasting” checkbox.
Query1234
DisplayName Slave Address Function Data Checksum
Object Type Byte Object Byte Object Data Object Checksum Object
Value [SlaveAddress] ID User User
The value of this byte
constant will be set
using the “SlaveAd-
dress” parameter (see
“Node Parameters” on
page 67).
The value of this byte
constant will be set
using the “Command
ID”-field.
The size and location
of the data associated
with this object is
determined by the
user.
The checksum type etc
can be selected by the
user. By default, this is
set to match the Mod-
bus-RTU standard.
Response 1234
DisplayName Slave Address Function Data Checksum
Object Type Byte Object Byte Object Data Object Checksum Object
Value [SlaveAddress] ID User Depend
This value is linked to
the “SlaveAddress”
parameter in the
parameter window.
The value of this byte
constant will be set
using the “Command
ID”-field.
The size and location
of the data associated
with this object is
determined by the
user.
This object will retrieve
its settings from the
corresponding object
in the Query.










