Summary of Contents for Automation Direct Stride SGW-MQ1611
Page 1
® MQTT Gateway USER MANUAL Manual Number: SGW-MQ1611-USER-M...
Page 3
~ WARNING ~ Thank you for purchasing automation equipment from Automationdirect.com ® , doing business as, AutomationDirect. We want your new automation equipment to operate safely. Anyone who installs or uses this equipment should read this publication (and any other relevant publications) before installing or operating the equipment.
Page 4
~ ADVERTENCIA ~ Gracias por comprar equipo de automatización de Automationdirect.com ® . Deseamos que su nuevo equipo de automatización opere de manera segura. Cualquier persona que instale o use este equipo debe leer esta publicación (y cualquier otra publicación pertinente) antes de instalar u operar el equipo. Para reducir al mínimo el riesgo debido a problemas de seguridad, debe seguir todos los códigos de seguridad locales o nacionales aplicables que regulan la instalación y operación de su equipo.
Page 5
~ AVERTISSEMENT ~ Nous vous remercions d’avoir acheté l’équipement d’automatisation de Automationdirect.com , en faisant des affaires ® comme, AutomationDirect. Nous tenons à ce que votre nouvel équipement d’automatisation fonctionne en toute sécurité. Toute personne qui installe ou utilise cet équipement doit lire la présente publication (et toutes les autres publications pertinentes) avant de l’installer ou de l’utiliser.
Page 6
Stride MQTT Gateway User Manual Please include the Manual Number and the Manual Issue, both shown below, when communicating with Technical Support regarding this publication. Manual Number: SGW-MQ1611-USER-M Issue: 1st Edition Issue Date: 8/2019 Publication History Issue Date Description of Changes 1st Edition 08/2019 Original...
Chapter 1: Hardware Introduction The Purpose of This User’s Manual Thank you for purchasing our Stride® MQTT Gateway for your Industrial Internet of Things (IIoT) data logging. This manual describes our MQTT Gateway, its specifications and included components, and provides you with important information for installation, connectivity and setup. Technical Support We strive to make our manuals the best in the industry.
Chapter 1: Hardware Hardware Overview The Stride MQTT Gateway is an industrial device specifically designed to implement an Industrial Internet of Things (IIoT) data collection system. It allows bidirectional communication between Modbus field equipment and an MQTT broker. It provides a Modbus RTU master interface on RS-485 and Modbus TCP over Ethernet.
Chapter 1: Hardware Specifications Stride MQTT Gateway Models Part Number Ethernet RS-485 WiFi SGW-MQ1611 ü ü SGW-MQ1611-WF ü ü ü RS-485 Specifications Connector Removable screw terminals, 5.08 mm pitch Baud rate Up to 115.2 kbps Parity Even, odd or none Stop bit 1 or 2 Number of Serial Devices...
Chapter 1: Hardware Environmental Specifications Operating Temperature 0°C to +60°C [32°F to +140°F] Storage Temperature −20°C to +70°C [−4°F to +158°F] Humidity 0–90%, noncondensing Maximum Altitude 2000m IP Rating IP20 Installation Indoor Category of Installation Pollution Degree RoHS Immunity EN61000-6-2 Emission EN61000-6-4 Agency Approvals...
Chapter 1: Hardware Installation Mounting The Stride MQTT Gateway may be used indoors only. It is designed to be mounted in a vertical position on DIN rail and cooled using natural convection. For proper cooling, you must provide clearance of at least 5mm [0.2 inches] between MQTT Gateway modules and at least 10mm [0.4 inches] between MQTT Gateway modules and power supplies or other devices.
Chapter 1: Hardware Wiring Wiring Guidelines WARNING: To minimize the risk of potential safety problems, you should follow all applicable local and national codes that regulate the installation and operation of your equipment. These codes vary from area to area and it is your responsibility to determine which codes should be followed, and to verify that the equipment, installation, and operation are in compliance with the latest revision of these codes.
Page 16
Chapter 1: Hardware Wiring Connections CONNECTIONS Description Notes POWER SUPPLY Power Supply 10–30VDC, 300mA @ 24VDC RS-485 Point-to-Point SHIELD RS-485 Shield MASTER SLAVE Connection to one or more SHIELD SHIELD RS-485 Data Modbus RTU servers D (+) D (+) D (−) D (−) Connection to MQTT broker and RJ45...
Chapter 1: Hardware Operation Configuration and operation of the STRIDE MQTT Gateway is primarily conducted using the device’s web interface, as discussed in Chapter 2. The hardware indicators and controls are described here. RS-485 TERMINALS POWER TERMINALS POWER ERROR RS-485 TRANSMIT RS-485 RECEIVE RECOVERY MODE BUTTON...
Page 18
Chapter 1: Hardware Recovery Mode The device can be booted into a Recovery Mode to reset portions of the configuration to default or to perform system maintenance and firmware updates. To enter Recovery Mode, press and hold the recessed reset button on the front of the gateway while applying power.
Chapter 2: Setup and Operation Getting Started Before you begin setting up the MQTT gateway, please make sure the following conditions are met: 1. The hardware is installed as described in the Mounting and Wiring sections of Chapter 1. 2. You have the necessary connection information on hand to connect to your MQTT broker. 3.
Chapter 2: Setup and Operation Setup Network Connection To change the network parameters, select Network interfaces from the More Options ( ) menu in the upper right corner of the web UI. Enter the desired network parameters and click SAVE, then CONFIRM the changes. NOTE: The gateway will always use its permanent default IP address when in recovery mode.
Chapter 2: Setup and Operation Setup Modbus Communications Channel The gateway can communicate over both RS-485 and Ethernet. Before setting up a Modbus device in the gateway, you must configure the RS-485 or Ethernet communications channel. Click on the CHANNEL tab to define the Modbus communications parameters. Click the “+”...
Page 23
Chapter 2: Setup and Operation • Enter a Name for the channel • Select the Communications protocol. You can create one Modbus RTU channel, and one or more Modbus TCP or Modbus RTU over TCP channels. • For Modbus RTU, enter the Baud Rate, Data bits, Stop bits, and Parity. •...
Chapter 2: Setup and Operation Setup Modbus Devices The gateway can communicate with up to 32 Modbus RTU Slaves via RS-485 and up to eight Modbus TCP Servers or Modbus RTU over TCP Servers via Ethernet. After the communications channels are defined, you can configure the connection and variables for each Modbus device.
Chapter 2: Setup and Operation Configure Modbus Variables Add each variable to be read from or written to the Modbus device by clicking the “+” icon. • Uncheck Read-only to make the variable writable, if desired. • Select the Format for the variable, and check Unsigned if necessary. Available variable formats are: Modbus Variable Formats Category Format...
Chapter 2: Setup and Operation • Enter a Variable name. • Enter the Modbus Address for the variable. • Select the Modbus Function Code to read the variable and to write the variable if not read-only. Valid function codes for each variable type are shown below. Modbus Read Function Codes Variable Type Read Function Codes...
Page 27
Chapter 2: Setup and Operation • If the variable read is to be published to your MQTT broker: – Enter an MQTT Topic (PUB). The circle arrow icon to the right of the Topic name will reset the name to the default <DEVICE_NAME>/get/<VARIABLE_NAME>, where <DEVICE_NAME>...
Chapter 2: Setup and Operation Configure MQTT Broker Check your MQTT broker for the settings it requires prior to configuring your gateway. Click on the MQTT tab to define the connection to an MQTT broker. • Set the Broker Address and Broker Port. •...
Page 29
Chapter 2: Setup and Operation • The Payload structure allows you to customize the payload structure and provides a preview of the message for valid and invalid values. – Select all the information to be included in the message. Each field can be edited to customize the message payload by clicking the pencil icon to the right of the selection.
Page 30
Chapter 2: Setup and Operation 2-12 Stride MQTT Gateway User Manual, 1st Edition...
Page 31
Chapter 2: Setup and Operation • The Messages queue can be enabled to batch transmission of messages. When the queue is disabled, each MQTT message is sent as soon as it is ready to be delivered. Some IoT web services (i.e.: Ubidots) also ignore incoming messages if the incoming frequency is higher than a prescribed number of messages per second.
Chapter 2: Setup and Operation Other Options Secondary settings and functions are accessed via the More Options icon in the upper right corner of the web UI. The Network interfaces settings were covered in “Setup Network Connection” on page 2-3. The remaining features under this menu are discussed below.
Chapter 2: Setup and Operation Change Password The password to log into the gateway web UI can be changed. Note that the user name is not editable. Logout The connected session to the gateway web UI will time out after several minutes of inactivity. To log out immediately, click Logout from the More Options menu.
Page 34
Chapter 2: Setup and Operation Firmware New firmware will be announced on our web site at https://support.automationdirect.com/firmware. We strongly recommend you subscribe to AutomationDirect’s firmware notification service at https://notify.automationdirect.com/firmware. To update the device firmware, download the firmware file to your PC and unzip it, then select More Options > Maintenance > Firmware upgrade and proceed as follows.
Page 35
Chapter 2: Setup and Operation After the firmware is updated, the gateway will reboot. If for any reason the firmware update is unsuccessful, restart the gateway in Recovery Mode, as discussed in the next section, and repeat the firmware upgrade. 2-17 Stride MQTT Gateway User Manual, 1st Edition...
Chapter 2: Setup and Operation Recovery Mode The device can be booted into a Recovery Mode to reset portions of the configuration to default or to perform system maintenance and firmware updates. To enter Recovery Mode, press and hold the recessed reset button on the front of the gateway while cycling power.
Chapter 2: Setup and Operation Maintenance From the Maintenance tab, you can check for file system errors, download stored logs and clean temporary files. Note that downloaded log files are tar.gz archives and will require an unarchive utility such as WinZip or 7-Zip if you need to open them on a Windows PC.
Page 38
ppendix ppendix ppendix afety and ecurity OnSideratiOnS In This Appendix... Security Considerations for Control Systems Networks................A-2 Safety Guidelines ............................A-3...
Appendix A: Safety and Security Considerations Security Considerations for Control Systems Networks Manufacturers are realizing that to stay competitive, their Automation and Control Systems need to be more integrated within their plant. The systems often need to be integrated with upstream Enterprise Data Systems, and even further integrated to allow information to be accessible across multiple plants, or even through the Internet.
Appendix A: Safety and Security Considerations Safety Guidelines NOTE: Products with CE marks perform their required functions safely and adhere to relevant standards as specified by CE directives provided they are used according to their intended purpose and that the instructions in this manual are adhered to.
Page 41
ppendix ppendix ppendix – OdbuS ddreSS OtatiOn utOMatiOn irect eviceS In This Appendix... Stride MQTT Gateway Modbus to AutomationDirect PLC Address Maps ..........A-2 CLICK PLCs ..............................A-2 DirectLogic PLCs ............................A-4 Do-more PLCs ............................A-5 Productivity Series PLCs ..........................A-6...
Appendix B: Modbus Address Notation – AutomationDirect Devices Stride MQTT Gateway Modbus to AutomationDirect PLC Address Maps The following tables provide mapping between Stride MQTT Gateway Modbus Addresses and specific AutomationDirect PLC product line addresses. CLICK PLCs Reading Coils (Function Code 1) Function Code MQTT Gateway Modbus Address Data Format CLICK Address...
Appendix B: Modbus Address Notation – AutomationDirect Devices Productivity Series PLCs Reading Coils (Function Code 1) Function Code MQTT Gateway Modbus Address Data Format Productivity Address* 000001 1 bit 000002 65534 065535 * Modbus addresses must be assigned to the tags in the “Tag Database” area of the Productivity Suite Programming Software. Reading Input Bits (Function Code 2) Function Code MQTT Gateway Modbus Address Data Format...
Page 47
ppendix ppendix ppendix MQtt b rOker xaMpleS In This Appendix... Introduction ..............................C-2 Example using Mosquitto ..........................C-3 Example using ThingsBoard.io ........................C-7...
Appendix C: MQTT Broker Examples Introduction The Stride MQTT Gateway can integrate your Modbus data into an IIoT system using any MQTT broker. It is compatible with popular public IIoT platforms such as Amazon AWS, IBM Watson IoT, ThingsBoard and others. You can also set up you own MQTT broker using Mosquitto or other MQTT software. The steps to set up the Stride MQTT Gateway are essentially identical regardless of which MQTT Broker you plan to use, but a given broker may require specific settings for the MQTT connection, topic syntax or message structure.
Appendix C: MQTT Broker Examples Example using Mosquitto Mosquitto is primarily an MQTT broker software intended to be installed on your own server. A public test server is available, however, and can provide a quick verification that all parts of the IIoT system are functioning properly.
Page 50
Appendix C: MQTT Broker Examples Setup a valid Channel under the “Channels” setup tab. In this case, Modbus RTU is being used back to a PC running Modbus Slave (available at https://www.modbustools.com) with the USB-485M converter. Stride MQTT Gateway User Manual, 1st Edition...
Page 51
Appendix C: MQTT Broker Examples Create a device in the “Devices” tab to specify a Modbus address and a MQTT topic. In this example, we are targeting Modbus RTU device 1, requesting Modbus address 400001 (Function Code 3, offset 0) and Publishing that to the “myTopic” Topic at test.mosquitto.org on a 1 second interval. Stride MQTT Gateway User Manual, 1st Edition...
Page 52
Appendix C: MQTT Broker Examples Once this setup has been saved to the gateway, we can go to the “test.mosquitto.org/ws.html” URL to check and see if our gateway is publishing data to the Broker. At the test.mosquitto.org/ws.html website, click on the “Connect” button and you should see a “CONNACK 0”...
Appendix C: MQTT Broker Examples Example using ThingsBoard.io ThingsBoard is an open-source IoT platform that provides device management, data collection, processing and visualization for your IoT solution. They offer multiple tiers of service. We’ll use a demo of their Community Edition to demonstrate a full-fledged IoT solution including data visualization. To begin, go to https://thingsboard.io and click on the “TRY IT NOW”...
Page 54
Appendix C: MQTT Broker Examples After the account has been created, go to https://demo.thingsboard.io. Sign in and go to the “DEVICES” tab on the left hand side. Click on the red + button on the bottom right hand side to create a new Device. Enter in a unique name and choose the “default”...
Page 55
Appendix C: MQTT Broker Examples Click on the Device that was just created. There are 2 important buttons on this next screen: “COPY DEVICE ID” and “COPY ACCESS TOKEN”. Click on the “COPY DEVICE ID” and then paste (CTRL-V) into the “ClientID” field of the MQTT setup tab in the MQTT gateway setup (field 3 in the screen capture below).
Page 56
Appendix C: MQTT Broker Examples 1. Broker Address should be: demo.thingsboard.io 2. Port number can be a few different options. For unencrypted connection, choose 1883. 3. This is the value that comes from the “COPY DEVICE ID” button of the thingsboard Device setup.
Page 57
Appendix C: MQTT Broker Examples Go the “Devices” tab of the MQTT setup page. Create a new Device and choose the Channel just selected. Choose the Address of your Modbus RTU device. In this example, we are reading Modbus address 400001 (Function Code 3, Offset 0).
Page 58
Appendix C: MQTT Broker Examples Save this configuration to the MQTT Gateway and switch back over to the thingsboard dashboard. In the Device setup, go to the “LATEST TELEMETRY” tab. If the communications are setup correctly in the MQTT Gateway, there will be an updating value shown here. Click on the checkbox to the left of the item that is updating then click the “SHOW ON WIDGET”...
Page 59
Appendix C: MQTT Broker Examples There is a list of widgets to choose from. For this example, we will choose a simple digital gauge as shown below. Click on the “ADD TO DASHBOARD” option after selecting a Widget. We will create a new Dashboard called “Site A” and choose the “Open dashboard” option. C-13 Stride MQTT Gateway User Manual, 1st Edition...
Page 60
Appendix C: MQTT Broker Examples The widget is now added to the Dashboard and is displaying the value in the Modbus RTU device at 40001. There are many other widgets and many display options available. To edit the dashboard and widgets, click on the pencil in the bottom right hand corner.
Need help?
Do you have a question about the Stride SGW-MQ1611 and is the answer not in the manual?
Questions and answers