background image

   

Industrial

 

Electronic Devices 

 

 

 ADFweb.com S.r.l.           

User Manual   

Modbus Master / MQTT

 

 

Document code: MN67933_ENG     Revision 1.101   Page 38 of 45

 

 

 

TEMPLATE STRING: DEFINITION OF MQTT PAYLOAD 
 

In the section “Set Communication” of the SW67933, if “Synchronous” mode is selected, 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. 
This template is valid for the Modbus requests in reading. 
 
The definition of the template can be done using Key words, used to link a specific information of the Modbus requests. The key words used 
and their meanings are: 

 

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 (define in the “Modbus Set Access” table) 

 

DATA: Modbus string (hex format) 

 

TIME: date and time of the Modbus message 

 
 

Warning: 
    The key words must be defined between “$” chars in order to be recognized (Ex.: $DATA$). 

Summary of Contents for HD67933 B2 Series

Page 1: ...s Slave www adfweb com Product HD67935 Modbus TCP Master www adfweb com Product HD67936 Modbus TCP Slave www adfweb com Product HD67937 BACnet Master www adfweb com Product HD67938 BACnet Slave www ad...

Page 2: ...REGULATIONS AND STANDARDS 44 WARRANTIES AND TECHNICAL SUPPORT 45 RETURN POLICY 45 UPDATED DOCUMENTATION Dear customer we thank you for your attention and we remind you that you need to check that the...

Page 3: ...ice can be used only by qualified personnel strictly in accordance with the specifications Qualified personnel are persons who are familiar with the installation assembly commissioning and operation o...

Page 4: ...Industrial Electronic Devices ADFweb com S r l User Manual Modbus Master MQTT Document code MN67933_ENG Revision 1 101 Page 4 of 45 EXAMPLE OF CONNECTION...

Page 5: ...Industrial Electronic Devices ADFweb com S r l User Manual Modbus Master MQTT Document code MN67933_ENG Revision 1 101 Page 5 of 45 CONNECTION SCHEME Figure 1a Connection scheme for HD67933 2 B2...

Page 6: ...Industrial Electronic Devices ADFweb com S r l User Manual Modbus Master MQTT Document code MN67933_ENG Revision 1 101 Page 6 of 45 Figure 1b Connection scheme for HD67933 4 B2...

Page 7: ...Industrial Electronic Devices ADFweb com S r l User Manual Modbus Master MQTT Document code MN67933_ENG Revision 1 101 Page 7 of 45 Figure 1c Connection scheme for HD67933 2 G43 B2...

Page 8: ...Industrial Electronic Devices ADFweb com S r l User Manual Modbus Master MQTT Document code MN67933_ENG Revision 1 101 Page 8 of 45 Figure 1d Connection scheme for HD67933 4 G43 B2...

Page 9: ...Industrial Electronic Devices ADFweb com S r l User Manual Modbus Master MQTT Document code MN67933_ENG Revision 1 101 Page 9 of 45 Figure 1e Connection scheme for HD67933 2 GPRS B2...

Page 10: ...Industrial Electronic Devices ADFweb com S r l User Manual Modbus Master MQTT Document code MN67933_ENG Revision 1 101 Page 10 of 45 Figure 1e Connection scheme for HD67933 4 GPRS B2...

Page 11: ...isolation between MQTT and Modbus Mountable on 35mm Rail DIN Wide power supply input range 18 35V DC and 8 24V AC Wide temperature range 40 C 85 C 40 F 185 F CONFIGURATION You need Compositor SW67933...

Page 12: ...01 Page 12 of 45 POWER SUPPLY The devices can be powered at 8 24V AC and 12 35V DC For more details see the two tables below VAC VDC Vmin Vmax Vmin Vmax 8V 24V 12V 35V Consumption at 24V DC Device Con...

Page 13: ...the position of the Dip1 of Dip Switch A The first with Dip1 of Dip Switch A at OFF position is used for the normal working of the device The second with Dip1 of Dip Switch A at ON position is used fo...

Page 14: ...ks very slowly 0 5Hz update in progress 2 MQTT communication yellow Blinks when MQTT communication is running Blinks quickly Boot state Blinks very slowly 0 5Hz update in progress 3 Modbus communicati...

Page 15: ...code MN67933_ENG Revision 1 101 Page 15 of 45 RS232 The connection from RS232 socket to a serial port example one from a personal computer must be made with a NULL MODEM cable a serial cable where th...

Page 16: ...p 1 like in figure The maximum length of the cable should be 1200m 4000 feet Here some codes of cables Belden p n 8132 2x 28AWG stranded twisted pairs conductor foil shield braid shield Belden p n 828...

Page 17: ...d not exceed 100m The cable has to conform to the T568 norms relative to connections in cat 5 up to 100 Mbps To connect the device to an Hub Switch is recommended the use of a straight cable to connec...

Page 18: ...onverter use the available software that runs with Windows called SW67933 It is downloadable on the site www adfweb com and its operation is described in this document The software works with MS Windo...

Page 19: ...iguration A device s configuration can also be imported or exported To clone the configurations of a Programmable Modbus Master MQTT Converter in order to configure another device in the same manner i...

Page 20: ...e language of the software and check the updatings for the compositor In the section Language it is possible to change the language of the software In the section Connection Options it is possible to...

Page 21: ...Modbus Master MQTT Document code MN67933_ENG Revision 1 101 Page 21 of 45 In the section Software Settings it is possible to enable disable some keyboard s commands for an easier navigation inside the...

Page 22: ...n button from the main window for SW67933 Fig 2 the window Set Communication appears Fig 3 The window is divided in different sections in order to define the different parameters of the converter Sele...

Page 23: ...eld Device Name Hostname the Hostname to assign to the converter is defined If the field Obtain an IP Address Automatically DHCP for Cable Connection is checked DHCP for LAN connection is enabled If t...

Page 24: ...are In the field Serial the serial port to use is defined RS232 or RS485 In the field Baudrate the baudrate for the serial line is defined In the field Parity the parity of the serial line is defined...

Page 25: ...d the converter will publish the Will topic at the connection to the Server With this feature in case of incorrect disconnection the Server will publish this topic to all the MQTT Clients that subscri...

Page 26: ...d This feature is used for going out of the net TLS TRANSPORT LAYER SECURITY This section is used to define the parameters of TLS protocol The means of the fields are If the field Enable TLS is checke...

Page 27: ...n the field Subnet Mask the SubNet Mask of the converter is defined In the field GATEWAY the default gateway of the net is defined This feature can be enabled or disabled pressing the Check Box field...

Page 28: ...e of the converter is defined In the field Subnet Mask MQTT the SubNet Mask for MQTT side of the converter is defined In the field GATEWAY MQTT the default gateway of the MQTT net is defined This feat...

Page 29: ...ll subscribes for writing the data to Modbus The means of the fields are In the field Topic the MQTT topic is defined If the field Retained is defined the retained flag is enabled The MQTT server will...

Page 30: ...pic the MQTT topic is defined If the field Retained is defined the retained flag is enabled The MQTT server will hold the last topic published In the field QoS the QoS level is defined In the field Da...

Page 31: ...l Modbus Master MQTT Document code MN67933_ENG Revision 1 101 Page 31 of 45 If the field On Timer is checked the converter publishes the topic cyclically with the delay defined in the field Time ms In...

Page 32: ...bled The MQTT server will hold the last topic published In the field QoS the QoS level is defined In the field Data Type the type of data to use is defined In the field Dimension the dimension in byte...

Page 33: ...the following o Coil Status o Input Status o Holding Register o Input Register In the field Address the starting address of the register to be read is defined In the field NPoint the number of consecu...

Page 34: ...pe of the register to read is defined It is possible to choose between the following o Coil Status o Input Status o Holding Register o Input Register In the field Address the starting address of the r...

Page 35: ...o make the request is defined If the field On Change is checked the converter sends the writing request when the data from MQTT side change value If the field On CMD is checked the converter sends the...

Page 36: ...t cable Insert the IP 192 168 2 205 Select which operations you want to do Press the Execute update firmware button to start the upload When all the operations are OK turn OFF the Device Put Dip1 of D...

Page 37: ...o restart the PC Check the LAN settings If you are using the program inside a Virtual Machine try to use in the main Operating System If you are using Windows Seven Vista 8 or 10 make sure that you ha...

Page 38: ...This template is valid for the Modbus requests in reading The definition of the template can be done using Key words used to link a specific information of the Modbus requests The key words used and...

Page 39: ...300 NPoint 1 We define a template string in this way Modbus ID SOURCE Function Code FC Modbus register ADDRESS Num of Registers NPOINT Data VALUE The output of MQTT will be Row 1 Modbus ID 1 Function...

Page 40: ...se the Modbus request It is necessary to use a JSON format described below slave id SOURCE fc FC address ADDRESS npoint NPOINT value VALUE topic index INDEX Where SOURCE ID of the Modbus slave FC Func...

Page 41: ...com S r l User Manual Modbus Master MQTT Document code MN67933_ENG Revision 1 101 Page 41 of 45 Figure 10a Mechanical dimensions scheme for HD67933 X B2 Figure 10b Mechanical dimensions scheme for HD6...

Page 42: ...RS Serial port 2 RS232 4 RS485 Device Family HD67933 Modbus Master MQTT Converter Order Code HD67933 2 B2 Modbus Master MQTT Converter Modbus port RS232 Order Code HD67933 4 B2 Modbus Master MQTT Conv...

Page 43: ...User Manual Modbus Master MQTT Document code MN67933_ENG Revision 1 101 Page 43 of 45 ACCESSORIES Order Code AC34011 35mm Rail DIN Power Supply 220 240V AC 50 60Hz 12 V DC Order Code AC34012 35mm Rai...

Page 44: ...n systems This symbol on the product or on its packaging indicates that this product may not be treated as household rubbish Instead it should be taken to an applicable collection point for the recycl...

Page 45: ...the following Obtain a Product Return Number PRN from our internet support at www adfweb com Together with the request you need to provide detailed information about the problem Send the product to th...

Reviews: