Our ACE-GTW-MQTT is dedicated for our ACE PLCS. It communique with the ACE PLC via their USB ports. However, if you wish to use our cheap ACE-GTW-MQTT Gateway for connect it to a RS485 network, you need to add a SUB-RS485 converter.

In our example, the USB-RS485 converter will be connected to:

  • the the USB port of the ACE-GTW gateway
  • and to the RS485 port of the HMI

For the wiring, please, see Wiring diagram of the serial RS232/RS485

HMI COM USB RS485 Converter
Sub-D9 – PIN 9 – A+ < > A+
Sub-D9 – PIN 8 – B- < > B-
GND – PIN 5 < > GND

Modbus RS485 slave device (our HMI) configuration

In HMI-Tool, add a Slave Modbus port to the COM1 or COM2 port.

Leave the other settings as defaults.

Note: HM-043 have only 1 COM1 port

For test here, add a “Numerical Input” on HMI screen.

Enter as address LW100, internal word memory of the HMI.

 

ACE-GTW-MQTT configuration

You must be connected to the Gateway, the default address is http://192.168.8.1
And your MQTT Gateway must be already connected to a Internet and a MQTT Broker (See the right tutorial)

On the ACE-GTW-MQTT configuration webpage

Go to Gateway > MQTT Configuration menu

Change the USB port type from /dev/ttyACM0 to /dev/ttyUSB0.

Leave the other settings as defaults.

Add a new MQTT Topic with as parameters:

  • A topic name of your choice
  • UI16 type register
  • 100 as Modbus address

 

Congratulations! Now, the ACE MQTT Gateway is able to read the value from the HMI and to publish it to MQTT Broker.

Remember: Your MQTT Gateway must be already connected to a Internet and a MQTT Broker (See the right tutorial)