Print

How to connect our USB-RS485 adapter to the ACE-GTW-MQTT or ACE-GTW-4G

 

Our ACE-GTW 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 Gateway for connect it to a RS485 network, you need to add a USB-RS485 FTDI converter (or RS232).

We are going to connect our HMI RS485 port to the Gateway via the USB-RS485 converter.

For our HMI connected to a RS-232 converter, you must choose a FTDI version, SubD9 female, with TX on pin 2, RX on pin 3 and GND on pin 5. No signal on other pins. The other pins can enter into conflict with the RS485 pins present on the HMI SubD9.
In our example, the USB-RS485 converter will be connected to:

  • the the USB port of the ACE-GTW gateway (Master Modbus)
  • and to the RS485 port of the HMI (Slave Modbus in this case)

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

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

With our USB-RS485 converter, BROWN and GREEN is a 120 Ohms terminal resistor

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)