Industrial
Electronic Devices
ADFweb.com S.r.l.
User Manual
Modbus Slave / MQTT
Document code: MN67934_ENG Revision 1.001 Page 27 of 33
TEMPLATE STRING: DEFINITION OF MQTT PAYLOAD
In the “Set MQTT Access” section, it is possible to define a Template string for the MQTT messages. The template is necessary in order to
define the structure of the payload of the MQTT message and the info contained.
It is possible to have a simple text format or a JSON format.
The definition of the template can be done using Key words, used to link a specific information of the Modbus messages. In relation to the
Working Mode selected, the key words used and their meanings are different:
Sniffer Mode
SOURCE: ID of the Modbus slave
FC: Function code
ADDRESS: Modbus register
NPOINT: Number of consecutive Modbus registers
TYPE: The type of message is defined (request or response)
CRC: validation of the CRC (OK or wrong)
VALUE: value of the Modbus variable
DESC: description of the Modbus request
DATA: Modbus string (hex format)
TIME: date and time
Asynchronous Mode
VALUE: value of the Modbus variable
DESC: description of the Modbus request
TIME: date and time
Warning:
The key words must be defined between “$” chars in order to be recognized (Ex.: $DATA$).